Class: MG
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- MG
- Defined in:
- lib/mg.rb
Instance Attribute Summary collapse
-
#gemspec ⇒ Object
Returns the value of attribute gemspec.
Instance Method Summary collapse
- #group ⇒ Object
-
#initialize(gemspec) ⇒ MG
constructor
A new instance of MG.
- #name ⇒ Object
-
#spec ⇒ Object
Load the gemspec using the same limitations as github.
Constructor Details
#initialize(gemspec) ⇒ MG
Returns a new instance of MG.
8 9 10 11 12 |
# File 'lib/mg.rb', line 8 def initialize(gemspec) @gemspec = gemspec define_tasks end |
Instance Attribute Details
#gemspec ⇒ Object
Returns the value of attribute gemspec.
6 7 8 |
# File 'lib/mg.rb', line 6 def gemspec @gemspec end |
Instance Method Details
#group ⇒ Object
18 19 20 |
# File 'lib/mg.rb', line 18 def group spec.rubyforge_project end |
#name ⇒ Object
14 15 16 |
# File 'lib/mg.rb', line 14 def name spec.name end |
#spec ⇒ Object
Load the gemspec using the same limitations as github
23 24 25 26 27 28 29 30 31 |
# File 'lib/mg.rb', line 23 def spec @spec ||= begin require "rubygems/specification" data = File.read(gemspec) spec = nil Thread.new { spec = eval("$SAFE = 3\n#{data}") }.join spec end end |