deploy_rubygem 0.60.43 → 0.60.45

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a77bb19d345806d57bf2df2d23b9f9b312c5f8381c05f0eac00a245a0da3196
4
- data.tar.gz: 9f0fe280087d5318ef663f23f73b5a3a8d529d680cc2bd6fa68ba337b852b76f
3
+ metadata.gz: 3c6f5176a71cf96fafed51ea805cc1c5175adaec0d41a49a58c97e04dcce28ae
4
+ data.tar.gz: fd9bdb45005a555765b05533569fbc58d62faa2a0b707660319ee436cdbd0467
5
5
  SHA512:
6
- metadata.gz: 1e227e609c098802e3398187e28c8d026f676703f82b720371f6baddf0fb1996574c2bd1b02031a050568085e7d070cb2a8539eb88c1275112954047e5908f35
7
- data.tar.gz: e1a9c01fa8ecea496d2005b773c3f7b3514612410a36b9f383a27fc27af321de9d5de4feb8357db160677e87d2d343c3a30e4a7c71cd3a53dd5a8a0c46ab98a0
6
+ metadata.gz: dd5d9669b7eb13eab69e8576bbd9b53130f64db7d3c27b57afc178795bb030ba2f6022a7ed353cd82bf71836b4b0eb0db91be25125fcfe60eb919d6758b86c11
7
+ data.tar.gz: f5e7c37f166c0d6d0e51d2dd9ad5529253ff8ef092cdfc7028f7a2ab783c1f2461a024afc11a60360687e9d56a077bbf766abd44cb39e66655fdf36fcd3b902a
checksums.yaml.gz.sig CHANGED
Binary file
data/.rubocop.yml CHANGED
@@ -28,7 +28,7 @@ Metrics/MethodLength:
28
28
 
29
29
  Metrics/ClassLength:
30
30
  Enabled: true
31
- Max: 102
31
+ Max: 104
32
32
 
33
33
  Gemspec/DeprecatedAttributeAssignment: # new in 1.30
34
34
  Enabled: true
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ # DeployRubygem module helper for rubygem
4
+ module DeployRubygem
5
+ # RakeTask to use with DeployRubygem projects
6
+ module ChefCookbookTask
7
+ def chef_client # :nodoc:
8
+ desc "@desc with #{__method__}"
9
+ task :chef_client do
10
+ system('sudo chef-client')
11
+ end
12
+ end
13
+
14
+ def install_policy # :nodoc:
15
+ desc "@desc with #{__method__}"
16
+ task install_policy: %i[build_cookbook] do
17
+ system('chef install Policyfile.rb')
18
+ end
19
+ end
20
+
21
+ def release_policy # :nodoc:
22
+ desc "@desc with #{__method__}"
23
+ task release_policy: %i[clean_cookbook install_policy] do
24
+ system('chef push prod Policyfile.lock.json')
25
+ end
26
+ end
27
+
28
+ def install_cookbook # :nodoc:
29
+ desc "@desc with #{__method__}"
30
+ task :install_cookbook do
31
+ system("sudo chef-client -o #{@task_name}")
32
+ end
33
+ end
34
+
35
+ def report # :nodoc:
36
+ desc "@desc with #{__method__}"
37
+ task :report do
38
+ system("sudo chef-client -o #{@task_name}::compile_report")
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # DeployRubygem module helper for rubygem
4
+ module DeployRubygem
5
+ # RakeTask to use with DeployRubygem projects
6
+ module InspecCookbookTask
7
+ def compliance # :nodoc:
8
+ desc "@desc with #{__method__}"
9
+ task :compliance do
10
+ inspect_opts = [
11
+ '--input-file', File.join('compliance', 'inputs', "#{@task_name}.yml"),
12
+ '--waiver-file', File.join('compliance', 'waivers', "#{@task_name}.yml"),
13
+ '--reporter', "html:/tmp/html/#{@task_name}_rake_report.html"
14
+ ]
15
+ inspec_cmd = "inspec exec compliance/profiles/#{@task_name}-accept #{inspect_opts.join(' ')}"
16
+ puts "inspec_cmd = #{inspec_cmd}"
17
+ system(inspec_cmd)
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # DeployRubygem module helper for rubygem
4
+ module DeployRubygem
5
+ # RakeTask to use with DeployRubygem projects
6
+ module KnifeCookbookTask
7
+ def cookstyle # :nodoc:
8
+ desc "@desc with #{__method__}"
9
+ task cookstyle: %i[rubocop] do
10
+ system('cookstyle')
11
+ end
12
+ end
13
+
14
+ def build_cookbook # :nodoc:
15
+ desc "@desc with #{__method__}"
16
+ task build_cookbook: %i[chef_client clean_cookbook cookstyle] do
17
+ system("knife cookbook upload #{@task_name}")
18
+ end
19
+ end
20
+ end
21
+ end
@@ -3,11 +3,18 @@
3
3
  require 'rake/dsl_definition'
4
4
 
5
5
  require_relative 'default'
6
+ require_relative 'cookbook/chef'
7
+ require_relative 'cookbook/inspec'
8
+ require_relative 'cookbook/knife'
6
9
 
7
10
  # DeployRubygem module helper for rubygem
8
11
  module DeployRubygem
9
12
  # RakeTask to use with DeployRubygem projects
10
13
  class RakeCookbookTask < RakeDefaultTask
14
+ include ChefCookbookTask
15
+ include InspecCookbookTask
16
+ include KnifeCookbookTask
17
+
11
18
  def initialize(task_name = 'cookbook', desc = 'Run DeployRubygem task')
12
19
  super
13
20
  end
@@ -55,60 +62,6 @@ module DeployRubygem
55
62
  task release_cookbook: %i[clean_cookbook release_policy release]
56
63
  end
57
64
 
58
- def cookstyle # :nodoc:
59
- desc "@desc with #{__method__}"
60
- task cookstyle: %i[rubocop] do
61
- system('cookstyle')
62
- end
63
- end
64
-
65
- def build_cookbook # :nodoc:
66
- desc "@desc with #{__method__}"
67
- task build_cookbook: %i[clean_cookbook cookstyle] do
68
- system('knife cookbook upload jimbo_management_site')
69
- end
70
- end
71
-
72
- def install_policy # :nodoc:
73
- desc "@desc with #{__method__}"
74
- task install_policy: %i[build_cookbook] do
75
- system('chef install Policyfile.rb')
76
- end
77
- end
78
-
79
- def release_policy # :nodoc:
80
- desc "@desc with #{__method__}"
81
- task release_policy: %i[clean_cookbook install_policy] do
82
- system('chef push prod Policyfile.lock.json')
83
- end
84
- end
85
-
86
- def install_cookbook # :nodoc:
87
- desc "@desc with #{__method__}"
88
- task :install_cookbook do
89
- system("sudo chef-client -o #{@task_name}")
90
- end
91
- end
92
-
93
- def compliance # :nodoc:
94
- desc "@desc with #{__method__}"
95
- task :compliance do
96
- inspect_opts = [
97
- '--input-file', File.join('compliance', 'inputs', "#{@task_name}.yml"),
98
- '--waiver-file', File.join('compliance', 'waivers', "#{@task_name}.yml"),
99
- '--reporter', "html:/tmp/html/#{@task_name}_rake_report.html"
100
- ]
101
- system("inspec exec compliance/profiles/#{@task_name}-accept #{inspect_opts.join(' ')}")
102
- end
103
- end
104
-
105
- def report # :nodoc:
106
- desc "@desc with #{__method__}"
107
- task :report do
108
- system("sudo chef-client -o #{@task_name}::compile_report")
109
- end
110
- end
111
-
112
65
  def clean_cookbook # :nodoc:
113
66
  desc "@desc with #{__method__}"
114
67
  task clean_cookbook: %i[clean] do
@@ -3,5 +3,5 @@
3
3
  # Set version for DeployRubygem
4
4
  module DeployRubygem
5
5
  # VERSION = new_deploy_rubygem.gvb_version.short_version
6
- VERSION = '0.60.43'
6
+ VERSION = '0.60.45'
7
7
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deploy_rubygem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.60.43
4
+ version: 0.60.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Provencher
@@ -135,6 +135,9 @@ files:
135
135
  - lib/deploy_rubygem/project.rb
136
136
  - lib/deploy_rubygem/rake.rb
137
137
  - lib/deploy_rubygem/rake/cookbook.rb
138
+ - lib/deploy_rubygem/rake/cookbook/chef.rb
139
+ - lib/deploy_rubygem/rake/cookbook/inspec.rb
140
+ - lib/deploy_rubygem/rake/cookbook/knife.rb
138
141
  - lib/deploy_rubygem/rake/default.rb
139
142
  - lib/deploy_rubygem/rspec.rb
140
143
  - lib/deploy_rubygem/rspec/chef.rb
metadata.gz.sig CHANGED
Binary file