Module: Hoe::Gemspec2
- Defined in:
- lib/hoe/gemspec2.rb
Constant Summary collapse
- VERSION =
'1.1.0'
Instance Method Summary collapse
Instance Method Details
#define_gemspec2_tasks ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/hoe/gemspec2.rb', line 4 def define_gemspec2_tasks gemspec = spec.name + '.gemspec' with_config do |config, _| unless config["exclude"] =~ '.gemspec' warn "WARNING You should add .gemspec to your .hoerc exclude list" end end file gemspec => %w[clobber Manifest.txt] + spec.files do open(gemspec, 'w') { |f| f.write(spec.to_ruby) } end desc "Regenerate #{gemspec}" task :gemspec => gemspec task :default => gemspec end |