Class: Jeweler::Commands::ValidateGemspec
- Inherits:
-
Object
- Object
- Jeweler::Commands::ValidateGemspec
- Defined in:
- lib/jeweler/commands/validate_gemspec.rb
Instance Attribute Summary collapse
-
#gemspec_helper ⇒ Object
Returns the value of attribute gemspec_helper.
-
#output ⇒ Object
Returns the value of attribute output.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ ValidateGemspec
constructor
A new instance of ValidateGemspec.
- #run ⇒ Object
Constructor Details
#initialize ⇒ ValidateGemspec
Returns a new instance of ValidateGemspec.
6 7 8 |
# File 'lib/jeweler/commands/validate_gemspec.rb', line 6 def initialize self.output = $stdout end |
Instance Attribute Details
#gemspec_helper ⇒ Object
Returns the value of attribute gemspec_helper.
4 5 6 |
# File 'lib/jeweler/commands/validate_gemspec.rb', line 4 def gemspec_helper @gemspec_helper end |
#output ⇒ Object
Returns the value of attribute output.
4 5 6 |
# File 'lib/jeweler/commands/validate_gemspec.rb', line 4 def output @output end |
Class Method Details
.build_for(jeweler) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/jeweler/commands/validate_gemspec.rb', line 20 def self.build_for(jeweler) command = new command.gemspec_helper = jeweler.gemspec_helper command.output = jeweler.output command end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/jeweler/commands/validate_gemspec.rb', line 10 def run begin gemspec_helper.parse output.puts "#{gemspec_helper.path} is valid." rescue Exception => e output.puts "#{gemspec_helper.path} is invalid. See the backtrace for more details." raise end end |