Class: Berry
- Inherits:
-
Object
- Object
- Berry
- Defined in:
- lib/berry.rb,
lib/berry/version.rb,
lib/berry/gem_tasks.rb
Defined Under Namespace
Classes: GemTasks
Constant Summary collapse
- DEFAULT_FILES =
/(README|LICENSE|bin\/|lib\/)/
- VERSION =
"0.1.1"
Instance Method Summary collapse
-
#initialize(name, &block) ⇒ Berry
constructor
A new instance of Berry.
- #specification(&block) ⇒ Object
- #to_spec ⇒ Object
Constructor Details
#initialize(name, &block) ⇒ Berry
Returns a new instance of Berry.
9 10 11 12 13 14 15 |
# File 'lib/berry.rb', line 9 def initialize(name, &block) @name = name.to_s.downcase @namespace = @name.capitalize.constantize rescue nil @path = Path(".", :recursive => true, :short => true) auto_require_version! specification(&block) if block_given? end |
Instance Method Details
#specification(&block) ⇒ Object
17 18 19 |
# File 'lib/berry.rb', line 17 def specification(&block) @gemspec = Gem::Specification.new(&block) end |
#to_spec ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/berry.rb', line 21 def to_spec @gemspec.name ||= @name @gemspec.version ||= default_version @gemspec.summary ||= "WIP" @gemspec. ||= @gemspec.email ||= default_email @gemspec.description ||= @gemspec.summary @gemspec.homepage ||= default_homepage @gemspec.executables = (@gemspec.executables + default_executables).uniq @gemspec.files = (@gemspec.files + default_files).uniq @gemspec.rubyforge_project = "nowarning" @gemspec end |