Method: Bundler::LazySpecification#to_lock

Defined in:
lib/bundler/lazy_specification.rb

#to_lockObject



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/bundler/lazy_specification.rb', line 61

def to_lock
  out = String.new

  if platform == Gem::Platform::RUBY || platform.nil?
    out << "    #{name} (#{version})\n"
  else
    out << "    #{name} (#{version}-#{platform})\n"
  end

  dependencies.sort_by(&:to_s).uniq.each do |dep|
    next if dep.type == :development
    out << "    #{dep.to_lock}\n"
  end

  out
end