Class: GNOME::Rake::PackageTask::DependencyConfiguration::GemConfiguration
- Inherits:
-
Object
- Object
- GNOME::Rake::PackageTask::DependencyConfiguration::GemConfiguration
- Defined in:
- lib/gnome/rake/package-task.rb
Instance Attribute Summary collapse
-
#development ⇒ Object
Returns the value of attribute development.
-
#runtime ⇒ Object
Returns the value of attribute runtime.
Instance Method Summary collapse
- #append_version(dependency) ⇒ Object
- #apply(spec) ⇒ Object
-
#initialize(package) ⇒ GemConfiguration
constructor
A new instance of GemConfiguration.
Constructor Details
#initialize(package) ⇒ GemConfiguration
Returns a new instance of GemConfiguration.
192 193 194 195 196 |
# File 'lib/gnome/rake/package-task.rb', line 192 def initialize(package) @package = package @runtime = [] @development = [] end |
Instance Attribute Details
#development ⇒ Object
Returns the value of attribute development.
191 192 193 |
# File 'lib/gnome/rake/package-task.rb', line 191 def development @development end |
#runtime ⇒ Object
Returns the value of attribute runtime.
191 192 193 |
# File 'lib/gnome/rake/package-task.rb', line 191 def runtime @runtime end |
Instance Method Details
#append_version(dependency) ⇒ Object
208 209 210 211 212 |
# File 'lib/gnome/rake/package-task.rb', line 208 def append_version(dependency) name, *ver = dependency.is_a?(Array) ? dependency : [dependency] ver << "= #{@package.version}" if @package.ruby_gnome2_package?(name) [name, *ver] end |
#apply(spec) ⇒ Object
198 199 200 201 202 203 204 205 206 |
# File 'lib/gnome/rake/package-task.rb', line 198 def apply(spec) @runtime.each do |dependency| spec.add_runtime_dependency(*append_version(dependency)) end @development.each do |dependency| spec.add_development_dependency(*append_version(dependency)) end end |