Module: Hoe::MannsMethods
- Defined in:
- lib/hoe/manns-methods.rb
Overview
Module Hoe TODO: Try to fix this in future rubocop:disable Metrics/ClassAndModuleChildren
Class Method Summary collapse
-
.bundle_install ⇒ Object
Installs a bundle.
-
.clean_pkg_method ⇒ Object
Cleanup the pkg.
-
.copy_master ⇒ Object
Copying stuff to master.
-
.copy_master_co_master ⇒ Object
Check out master.
-
.remove_pre_gemspec_method ⇒ Object
Remove prerelease gemspec.
-
.update_gemfile_lock_method ⇒ Object
Update Gemfile.lock.
Class Method Details
.bundle_install ⇒ Object
Installs a bundle
24 25 26 27 28 |
# File 'lib/hoe/manns-methods.rb', line 24 def self.bundle_install puts 'Installing Bundle'.color(:yellow) system('bundle install') puts 'Installed Bundle'.color(:green) end |
.clean_pkg_method ⇒ Object
Cleanup the pkg
65 66 67 68 69 70 |
# File 'lib/hoe/manns-methods.rb', line 65 def self.clean_pkg_method puts 'Cleaning pkg'.color(:yellow) FileUtils.rm_rf('pkg') if Dir.exist?('pkg') FileUtils.rm_rf('recipes/pkg') if Dir.exist?('recipes/pkg') puts 'Cleanup succeed'.color(:green) end |
.copy_master ⇒ Object
Copying stuff to master
45 46 47 48 49 50 51 52 |
# File 'lib/hoe/manns-methods.rb', line 45 def self.copy_master copy_master_co_master puts 'Set a Git Tag'.color(:yellow) system('rake git:tag') puts 'Checking out develop again'.color(:yellow) system('git checkout develop') puts 'Done'.color(:green) end |
.copy_master_co_master ⇒ Object
Check out master
55 56 57 58 59 60 61 62 |
# File 'lib/hoe/manns-methods.rb', line 55 def self.copy_master_co_master puts 'Checking out master'.color(:yellow) system('git checkout master') puts 'Merging master with develop'.color(:yellow) system('git merge develop') puts 'Pushing master to origin'.color(:yellow) system('git push') end |
.remove_pre_gemspec_method ⇒ Object
Remove prerelease gemspec
38 39 40 41 42 |
# File 'lib/hoe/manns-methods.rb', line 38 def self.remove_pre_gemspec_method puts 'Removing pre version of gemspec'.color(:yellow) File.delete(*Dir.glob('*.gemspec')) puts 'Removed'.color(:green) end |
.update_gemfile_lock_method ⇒ Object
Update Gemfile.lock
31 32 33 34 35 |
# File 'lib/hoe/manns-methods.rb', line 31 def self.update_gemfile_lock_method puts 'Updating Gemfile.lock'.color(:yellow) system('bundle update') puts 'Updated Gemfile.lock'.color(:green) end |