deploy_rubygem 0.60.44 → 0.60.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3293c38588e7229b9f2074e0114709138d4fe9bb2b1a45eb4ac0291e9714d105
4
- data.tar.gz: 924e84c8f20fa1f9b6eb36ff7c03a19f7079e6f6ee2ac0cec363fa0574d592f5
3
+ metadata.gz: dcb280a60ac45ab9bfbf1a3ad1695612181419f938d1f441f0279b63f9edc8ca
4
+ data.tar.gz: 4743439217104602a7b0e5dad88eeb1f7c2d3742987156bfc0ee021555e7ae26
5
5
  SHA512:
6
- metadata.gz: 27ddeb97e43184716b2400c953b72c50c80efa5066e937702b7035ccc31eb27b9b10ecedd49398e491a6996e20bf53b85e93a78f133e626bd045c0bc47663253
7
- data.tar.gz: 8d8784c64e002254dd347aec7dcc4906b01490d8ec469751349c2ff977a7131f9ed12dd606788ceb8369de0c0d23cc0fe7def45593168daaeccc9f38b31e3019
6
+ metadata.gz: d02cc582046267a7c559dfd188be79c7d517565c1584ea75ee6d6f3578bd89e4f9e878083f425b53e9e8899f7425f08ee9e51ae1787d43db45640fb8e9f92ad3
7
+ data.tar.gz: f2803a21df09a95090fb24825400ed8373d3f29ad3a964d2b5375346927d6734c9eefbb156f073b8666d33093ba340884c82b8b330a90eb600ac5ca755a788ad
checksums.yaml.gz.sig CHANGED
Binary file
@@ -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
@@ -23,6 +30,7 @@ module DeployRubygem
23
30
  install_cookbook
24
31
  report
25
32
  clean_cookbook
33
+ chef_client
26
34
  end
27
35
 
28
36
  def test_framework # :nodoc:
@@ -55,62 +63,6 @@ module DeployRubygem
55
63
  task release_cookbook: %i[clean_cookbook release_policy release]
56
64
  end
57
65
 
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
- inspec_cmd = "inspec exec compliance/profiles/#{@task_name}-accept #{inspect_opts.join(' ')}"
102
- puts "inspec_cmd = #{inspec_cmd}"
103
- system(inspec_cmd)
104
- end
105
- end
106
-
107
- def report # :nodoc:
108
- desc "@desc with #{__method__}"
109
- task :report do
110
- system("sudo chef-client -o #{@task_name}::compile_report")
111
- end
112
- end
113
-
114
66
  def clean_cookbook # :nodoc:
115
67
  desc "@desc with #{__method__}"
116
68
  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.44'
6
+ VERSION = '0.60.46'
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.44
4
+ version: 0.60.46
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