diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-06 20:41:22 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-06 20:41:22 -0700 |
commit | 1d1ea92f405ab6f47942b21233da04aa21498cb7 (patch) | |
tree | 856e16231a2ad29e3d83ad1bf593b77d1ccee0f8 /railties/lib/rails | |
parent | 89ea7bee3609e513b21151eb4a7991b074fc0e8f (diff) | |
download | rails-1d1ea92f405ab6f47942b21233da04aa21498cb7.tar.gz rails-1d1ea92f405ab6f47942b21233da04aa21498cb7.tar.bz2 rails-1d1ea92f405ab6f47942b21233da04aa21498cb7.zip |
GemDependency#specification should be public
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/gem_dependency.rb | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/railties/lib/rails/gem_dependency.rb b/railties/lib/rails/gem_dependency.rb index 30bdf416fc..4cac7f725a 100644 --- a/railties/lib/rails/gem_dependency.rb +++ b/railties/lib/rails/gem_dependency.rb @@ -98,27 +98,26 @@ module Rails self.name == other.name && self.requirement == other.requirement end -private ################################################################### - def specification @spec ||= Gem.source_index.search(Gem::Dependency.new(@name, @requirement)).sort_by { |s| s.version }.last end - def gem_command - RUBY_PLATFORM =~ /win32/ ? 'gem.bat' : 'gem' - end + private + def gem_command + RUBY_PLATFORM =~ /win32/ ? 'gem.bat' : 'gem' + end - def install_command - cmd = %w(install) << @name - cmd << "--version" << %("#{@requirement.to_s}") if @requirement - cmd << "--source" << @source if @source - cmd - end + def install_command + cmd = %w(install) << @name + cmd << "--version" << %("#{@requirement.to_s}") if @requirement + cmd << "--source" << @source if @source + cmd + end - def unpack_command - cmd = %w(unpack) << @name - cmd << "--version" << %("#{@requirement.to_s}") if @requirement - cmd - end + def unpack_command + cmd = %w(unpack) << @name + cmd << "--version" << %("#{@requirement.to_s}") if @requirement + cmd + end end end |