Class: Stove::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Stove::RakeTask
- Includes:
- Logify
- Defined in:
- lib/stove/rake_task.rb
Class Method Summary collapse
-
.option(option) ⇒ Object
Define a CLI option.
Instance Method Summary collapse
-
#initialize(name = nil) {|_self| ... } ⇒ RakeTask
constructor
A new instance of RakeTask.
- #locale=(locale) ⇒ Object
- #log_level=(level) ⇒ Object
Constructor Details
#initialize(name = nil) {|_self| ... } ⇒ RakeTask
Returns a new instance of RakeTask.
41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/stove/rake_task.rb', line 41 def initialize(name = nil) yield self if block_given? desc 'Publish this cookbook' unless ::Rake.application.last_comment task(name || :publish, :version) do |t, args| log.info("Options: #{.inspect}") cookbook = Cookbook.new([:path]) [:version] = args[:version] || minor_bump(cookbook.version) Runner.run(cookbook, ) end end |
Class Method Details
.option(option) ⇒ Object
Define a CLI option.
18 19 20 21 22 23 |
# File 'lib/stove/rake_task.rb', line 18 def option(option) define_method("#{option}=".to_sym) do |value| log.debug("Setting #{option} = #{value.inspect}") [option.to_sym] = value end end |
Instance Method Details
#locale=(locale) ⇒ Object
54 55 56 57 |
# File 'lib/stove/rake_task.rb', line 54 def locale=(locale) log.debug("Setting locale = #{locale.inspect}") I18n.locale = locale end |