Module: Hoe::Manns
- Defined in:
- lib/hoe/version.rb,
lib/hoe/manns.rb
Overview
Main module Hoe TODO: Currently i don’t know how to fix this. Nested usage triggers error “hoe not a module” rubocop:disable Metrics/ClassAndModuleChildren
Defined Under Namespace
Modules: Version
Instance Attribute Summary collapse
-
#bundle_audit ⇒ Object
Returns the value of attribute bundle_audit.
-
#clean_pkg ⇒ Object
Returns the value of attribute clean_pkg.
-
#copy_master ⇒ Object
Returns the value of attribute copy_master.
-
#remove_pre_gemspec ⇒ Object
Returns the value of attribute remove_pre_gemspec.
-
#run_before_release ⇒ Object
Returns the value of attribute run_before_release.
Instance Method Summary collapse
-
#define_manns_tasks ⇒ Object
Definitions of the Rake task TODO: Check if this smells can be pacified in future rubocop:disable Metrics/AbcSize rubocop:disable Metrics/MethodLength This method smells of :reek:TooManyStatements.
-
#initialize_manns ⇒ Object
Initialize plugin.
Instance Attribute Details
#bundle_audit ⇒ Object
Returns the value of attribute bundle_audit.
30 31 32 |
# File 'lib/hoe/manns.rb', line 30 def bundle_audit @bundle_audit end |
#clean_pkg ⇒ Object
Returns the value of attribute clean_pkg.
29 30 31 |
# File 'lib/hoe/manns.rb', line 29 def clean_pkg @clean_pkg end |
#copy_master ⇒ Object
Returns the value of attribute copy_master.
27 28 29 |
# File 'lib/hoe/manns.rb', line 27 def copy_master @copy_master end |
#remove_pre_gemspec ⇒ Object
Returns the value of attribute remove_pre_gemspec.
26 27 28 |
# File 'lib/hoe/manns.rb', line 26 def remove_pre_gemspec @remove_pre_gemspec end |
#run_before_release ⇒ Object
Returns the value of attribute run_before_release.
28 29 30 |
# File 'lib/hoe/manns.rb', line 28 def run_before_release @run_before_release end |
Instance Method Details
#define_manns_tasks ⇒ Object
Definitions of the Rake task TODO: Check if this smells can be pacified in future rubocop:disable Metrics/AbcSize rubocop:disable Metrics/MethodLength This method smells of :reek:TooManyStatements
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/hoe/manns.rb', line 44 def define_manns_tasks # Install a Bundle desc 'Install a Bundle' task 'bundler:gemfile_install' do Hoe::MannsMethods.bundle_install end # Task for updating Gemfile.lock desc 'Update Gemfile.lock' task 'bundler:gemfile_lock' do Hoe::MannsMethods.update_gemfile_lock_method end # Task for removing Prerelease Gemspecs desc 'Remove Pre-Gemspec' task 'gem:spec_remove' do Hoe::MannsMethods.remove_pre_gemspec_method end # Task for git tag desc 'Copy master' task :copy_master do Hoe::MannsMethods.copy_master end # Task for running needed Rake Tasks before running rake release desc 'Run all tasks before rake release' task run_before_release: %w[git:manifest bundler:gemfile bundler:gemfile_lock gem:spec_remove bundle_audit:run copy_master] do puts 'Ready to run rake release VERSION=x.y.z'.color(:green) end # Task for cleaning up the pkg desc 'Clean pkg' task :clean_pkg do Hoe::MannsMethods.clean_pkg_method end # Tasks for bundle audit namespace :bundle_audit do desc 'Update bundle-audit database' task :update do Bundler::Audit::CLI.new.update end desc 'Check gems for vulns using bundle-audit' task :check do Bundler::Audit::CLI.new.check end desc 'Update vulns database and check gems using bundle-audit' task :run do Rake::Task['bundle_audit:update'].invoke Rake::Task['bundle_audit:check'].invoke end end task :bundle_audit do Rake::Task['bundle_audit:run'].invoke end end |
#initialize_manns ⇒ Object
Initialize plugin
33 34 35 36 37 |
# File 'lib/hoe/manns.rb', line 33 def initialize_manns require 'fileutils' require 'rainbow/ext/string' require 'bundler/audit/cli' end |