Class: Jeweler::Tasks
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Jeweler::Tasks
- Defined in:
- lib/jeweler/tasks.rb
Overview
Rake tasks for managing your gem.
Here’s a basic example of using it:
Jeweler::Tasks.new do |gem|
gem.name = "jeweler"
gem.summary = "Simple and opinionated helper for creating Rubygem projects on GitHub"
gem.email = "[email protected]"
gem.homepage = "http://github.com/technicalpickles/jeweler"
gem.description = "Simple and opinionated helper for creating Rubygem projects on GitHub"
gem. = ["Josh Nichols"]
end
The block variable gem is actually a Gem::Specification, so you can do anything you would normally do with a Gem::Specification. For more details, see the official gemspec reference: docs.rubygems.org/read/chapter/20
Jeweler fills in a few reasonable defaults for you:
- gem.files
-
a Rake::FileList of anything that is in git and not gitignored. You can include/exclude this default set, or override it entirely
- gem.test_files
-
Similar to gem.files, except it’s only things under the spec, test, or examples directory.
- gem.extra_rdoc_files
-
a Rake::FileList including files like README*, ChangeLog*, and LICENSE*
- gem.executables
-
uses anything found in the bin/ directory. You can override this.
Instance Attribute Summary collapse
-
#gemspec ⇒ Object
Returns the value of attribute gemspec.
-
#jeweler ⇒ Object
Returns the value of attribute jeweler.
Instance Method Summary collapse
-
#initialize(gemspec = nil) {|@gemspec| ... } ⇒ Tasks
constructor
A new instance of Tasks.
Constructor Details
#initialize(gemspec = nil) {|@gemspec| ... } ⇒ Tasks
Returns a new instance of Tasks.
34 35 36 37 38 39 40 41 |
# File 'lib/jeweler/tasks.rb', line 34 def initialize(gemspec = nil, &block) @gemspec = gemspec || Gem::Specification.new @jeweler = Jeweler.new(@gemspec) yield @gemspec if block_given? Rake.application.jeweler = @jeweler define end |
Instance Attribute Details
#gemspec ⇒ Object
Returns the value of attribute gemspec.
32 33 34 |
# File 'lib/jeweler/tasks.rb', line 32 def gemspec @gemspec end |
#jeweler ⇒ Object
Returns the value of attribute jeweler.
32 33 34 |
# File 'lib/jeweler/tasks.rb', line 32 def jeweler @jeweler end |