Parent

Included Modules

GemInstaller::RubyGem

Attributes

name[RW]
version[RW]
platform[RW]
install_options[RW]
check_for_upgrade[RW]
fix_dependencies[RW]
no_autogem[RW]
prefer_binary_platform[RW]
uninstall_options[RW]

Public Class Methods

default_platform() click to toggle source
    # File lib/geminstaller/ruby_gem.rb, line 35
35:     def self.default_platform
36:       if GemInstaller::RubyGemsVersionChecker.matches?('>0.9.5')
37:         Gem::Platform::CURRENT
38:       else
39:         # Not sure if this is actually required for RubyGems <=0.9.5, but it 
40:         # was the original value in GemInstaller <=0.3.0, and makes the tests pass
41:         'ruby'
42:       end
43:     end
default_version() click to toggle source
    # File lib/geminstaller/ruby_gem.rb, line 31
31:     def self.default_version
32:       '> 0.0.0'
33:     end
new(name, opts={}) click to toggle source
    # File lib/geminstaller/ruby_gem.rb, line 6
 6:     def initialize(name, opts={})
 7:       @name = name
 8:       #TODO: the following logic could probably be more concise, but I'm not sure right now
 9:       @version = GemInstaller::RubyGem.default_version
10:       if opts[:version] != "" && opts[:version] != nil 
11:         @version = opts[:version] 
12:       end
13:       if GemInstaller::RubyGemsVersionChecker.matches?('<=0.9.5')
14:         @platform = 'ruby'
15:       end
16:       if opts[:platform] != "" && opts[:platform] != nil 
17:         @platform = opts[:platform]
18:       end
19:       @install_options = opts[:install_options] ||= []
20:       @uninstall_options = opts[:uninstall_options] ||= []
21:       @check_for_upgrade = opts[:check_for_upgrade] == true ? true : false
22:       @fix_dependencies = opts[:fix_dependencies] == true ? true : false
23:       @no_autogem = opts[:no_autogem] == true ? true : false
24:       if GemInstaller::RubyGemsVersionChecker.matches?('>=0.9.5')
25:         warn("The 'prefer_binary_platform' option is deprecated on RubyGems >= 0.9.5, and has no effect") unless opts[:prefer_binary_platorm].nil?
26:       else
27:         @prefer_binary_platform = opts[:prefer_binary_platorm] == false ? false : true
28:       end
29:     end

Public Instance Methods

<=>(other) click to toggle source
    # File lib/geminstaller/ruby_gem.rb, line 45
45:     def <=>(other)
46:       compare = @name <=> other.name
47:       return compare if compare != 0
48:       compare = @version <=> other.version # TODO: this should use rubygems version comparison, not string comparison
49:       return compare if compare != 0
50:       return 0 if (@platform == nil && other.platform == nil)
51:       return @platform <=> other.platform
52:     end
regexp_escaped_name() click to toggle source
    # File lib/geminstaller/ruby_gem.rb, line 54
54:     def regexp_escaped_name
55:       Regexp.escape(@name)
56:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.