Class: CookbookDevelopment::VersionTasks
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- CookbookDevelopment::VersionTasks
- Defined in:
- lib/cookbook/development/rake/version_tasks.rb
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize {|_self| ... } ⇒ VersionTasks
constructor
A new instance of VersionTasks.
Constructor Details
#initialize {|_self| ... } ⇒ VersionTasks
Returns a new instance of VersionTasks.
73 74 75 76 77 |
# File 'lib/cookbook/development/rake/version_tasks.rb', line 73 def initialize @version_file = VersionFile.in_dir(Dir.pwd) yield(self) if block_given? define end |
Instance Method Details
#define ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/cookbook/development/rake/version_tasks.rb', line 79 def define namespace :version do namespace :bump do desc "Bump to #{@version_file.bump(:major)}" task :major do bump_version!(:major) end desc "Bump to #{@version_file.bump(:minor)}" task :minor do bump_version!(:minor) end desc "Bump to #{@version_file.bump(:revision)}" task :patch do bump_version!(:revision) end end end end |