Class: DeployRubygem::RakeDefaultTask
- Inherits:
-
Object
- Object
- DeployRubygem::RakeDefaultTask
- Includes:
- Rake::DSL
- Defined in:
- lib/deploy_rubygem/rake/default.rb
Overview
RakeTask to use with DeployRubygem projects
Direct Known Subclasses
Instance Method Summary collapse
-
#check_local ⇒ Object
:nodoc:.
-
#chef_install ⇒ Object
:nodoc:.
-
#compliance ⇒ Object
:nodoc:.
-
#cycle ⇒ Object
:nodoc:.
-
#default ⇒ Object
:nodoc:.
-
#define_tasks ⇒ Object
:nodoc:.
-
#develop ⇒ Object
:nodoc:.
-
#initialize(task_name, desc) {|_self| ... } ⇒ RakeDefaultTask
constructor
Define DeployRubygem Rake task.
-
#push ⇒ Object
:nodoc:.
- #rspec_and_rubocop ⇒ Object
-
#test_framework ⇒ Object
:nodoc:.
-
#test_version ⇒ Object
:nodoc:.
Constructor Details
#initialize(task_name, desc) {|_self| ... } ⇒ RakeDefaultTask
Define DeployRubygem Rake task
13 14 15 16 17 18 |
# File 'lib/deploy_rubygem/rake/default.rb', line 13 def initialize(task_name, desc) @task_name = task_name @desc = desc yield self if block_given? define_tasks end |
Instance Method Details
#check_local ⇒ Object
:nodoc:
69 70 71 72 |
# File 'lib/deploy_rubygem/rake/default.rb', line 69 def check_local # :nodoc: desc "@desc with #{__method__}" task check_local: %i[rubocop spec] end |
#chef_install ⇒ Object
:nodoc:
41 42 43 44 45 46 47 |
# File 'lib/deploy_rubygem/rake/default.rb', line 41 def chef_install # :nodoc: desc "@desc with #{__method__}" task :install_chef_workstation do extend DeployRubygem install_chef_workstation end end |
#compliance ⇒ Object
:nodoc:
74 75 76 77 78 79 |
# File 'lib/deploy_rubygem/rake/default.rb', line 74 def compliance # :nodoc: desc "@desc with #{__method__}" task compliance: :install_chef_workstation do system('inspec exec compliance') end end |
#cycle ⇒ Object
:nodoc:
59 60 61 62 |
# File 'lib/deploy_rubygem/rake/default.rb', line 59 def cycle # :nodoc: desc "@desc with #{__method__}" task cycle: %i[install_chef_workstation default test_version] end |
#default ⇒ Object
:nodoc:
54 55 56 57 |
# File 'lib/deploy_rubygem/rake/default.rb', line 54 def default # :nodoc: desc "@desc with #{__method__}" task default: %i[test_framework build install:local] end |
#define_tasks ⇒ Object
:nodoc:
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/deploy_rubygem/rake/default.rb', line 28 def define_tasks # :nodoc: rspec_and_rubocop test_framework default cycle test_version check_local compliance develop push chef_install end |
#develop ⇒ Object
:nodoc:
81 82 83 84 |
# File 'lib/deploy_rubygem/rake/default.rb', line 81 def develop # :nodoc: desc "@desc with #{__method__}" task develop: %i[check_local clean push default] end |
#push ⇒ Object
:nodoc:
86 87 88 89 90 91 92 93 |
# File 'lib/deploy_rubygem/rake/default.rb', line 86 def push # :nodoc: desc "@desc with #{__method__}" task :push do system('git add .') system("git commit -m 'Rake pusing version #{VERSION}'") system('git push') end end |
#rspec_and_rubocop ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/deploy_rubygem/rake/default.rb', line 20 def rspec_and_rubocop require 'rspec/core/rake_task' require 'rubocop/rake_task' RSpec::Core::RakeTask.new(:spec) RuboCop::RakeTask.new end |
#test_framework ⇒ Object
:nodoc:
49 50 51 52 |
# File 'lib/deploy_rubygem/rake/default.rb', line 49 def test_framework # :nodoc: desc "@desc with #{__method__}" task test_framework: %i[clean check_local] end |
#test_version ⇒ Object
:nodoc:
64 65 66 67 |
# File 'lib/deploy_rubygem/rake/default.rb', line 64 def test_version # :nodoc: desc "@desc with #{__method__}" task test_version: %i[install compliance] end |