deploy_rubygem 0.60.20 → 0.60.21

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: 1f61e704844f1f80fc9da968ad0e9ad34f2961f1c97f31c6ed329ffdd21d4a17
4
- data.tar.gz: 7028f7729663bdff4748c01959c227865ef70fd506cc869bd0ef8e097c42a8fe
3
+ metadata.gz: d5a382592bfb10083db919cd98d351fedf46531b0f0316340dcd61440d78934a
4
+ data.tar.gz: ae39a1b035154186fd05ffb3a2a0ea3ce5d8d14a0bf13a3cab9d7270f54201d0
5
5
  SHA512:
6
- metadata.gz: 2a4e9293b7af8c0a4335aee4ba6aae09f5e8495da15055bebddd2187f9ba9fe620bb89f4b7ef3c46b16fd326d3cab518bced7ba096a8f96eb2aa0a8d35da3d88
7
- data.tar.gz: 29678da2f8a7096a239fed59503ad356d3171778ce19db1a8994a66714ec4874b47a993ff804b02917f7eb2783376a97abff823debce4dd2c0789685c6d55dcd
6
+ metadata.gz: 3316dfff7b0612fd01b95a28cec007e3a7a16a8c509117be35d2945c5e9fce846abbda0e6855cb68c9d44c92596e63eb258f528e087081e80d1cc2c24d7d5e55
7
+ data.tar.gz: 7b6b42ca9946bc38d148c0c74126f71b843951764b9aecca80223eb7128d126e0e0faef4f0152062283abffd5ae7d0e7d8cf172100f2436f1253e0c65e2e7755
checksums.yaml.gz.sig CHANGED
Binary file
@@ -17,7 +17,7 @@ module DeployRubygem
17
17
  @waiver_file = waiver_file
18
18
  end
19
19
 
20
- def inspect_name
20
+ def inspec_name
21
21
  File.basename(inspec_path)
22
22
  end
23
23
 
@@ -17,5 +17,5 @@ module DeployRubygem
17
17
  end
18
18
 
19
19
  # VERSION = new_deploy_rubygem.gvb_version.short_version
20
- VERSION = '0.60.20'
20
+ VERSION = '0.60.21'
21
21
  end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'rspec'
4
+
5
+ # DeployRubygem - deploy a gem using rake
6
+ # Containing a class
7
+ module DeployRubygem
8
+ # Using Project to deploy and manage Project
9
+ class Workstation
10
+ def clientrb
11
+ {
12
+ log_location: '/var/log/chef-client.log',
13
+ chef_server_url: ENV['CHEF_SERVER_URL'],
14
+ chef_license: 'accept',
15
+ file_cache_path: '/var/chef/cache',
16
+ file_backup_path: '/var/chef/backup',
17
+ node_name: ENV['NODENAME'],
18
+ policy_name: ENV['POLICYNAME'],
19
+ policy_group: ENV['POLICYGROUP']
20
+ }.map do |key, value|
21
+ [key, "'#{value}'"].join(' ')
22
+ end.join("\n")
23
+ end
24
+
25
+ def credential
26
+ (['[default]'] + {
27
+ client_name: ENV['KNIFE_NAME'],
28
+ client_key: File.join(ENV['HOME'], '.chef', 'cicd.pem'),
29
+ chef_server_url: ENV['CHEF_SERVER_URL']
30
+ # secret_file: File.join(ENV['HOME'], '.chef', 'cicd.secret')
31
+ }.map do |key, value|
32
+ [key, "'#{value}'"].join(' ')
33
+ end).join("\n")
34
+ end
35
+
36
+ def boostrap_workstation
37
+ clientrb_file = '/etc/chef/client.rb'
38
+ clientpem_file = '/etc/chef/client.pem'
39
+ cicdpem_file = File.join(ENV['HOME'], '.chef', 'cicd.pem')
40
+ cicdcredential_file = File.join(ENV['HOME'], '.chef', 'credentials')
41
+ File.write(clientrb_file, clientrb)
42
+ File.write(clientpem_file, ENV['CHEF_CLIENT_KEY'])
43
+ File.write(cicdpem_file, ENV['CHEF_KNIFE_KEY'])
44
+ File.write(cicdcredential_file, credential)
45
+
46
+ FileUtils.chmod(0o600, clientrb_file)
47
+ FileUtils.chmod(0o600, clientpem_file)
48
+ FileUtils.chmod(0o600, cicdpem_file)
49
+ FileUtils.chmod(0o600, cicdcredential_file)
50
+
51
+ system('chef-client')
52
+ end
53
+ end
54
+ 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.20
4
+ version: 0.60.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Provencher
@@ -146,6 +146,7 @@ files:
146
146
  - lib/deploy_rubygem/rubygem.rb
147
147
  - lib/deploy_rubygem/testing.rb
148
148
  - lib/deploy_rubygem/version.rb
149
+ - lib/deploy_rubygem/workstation.rb
149
150
  - sig/deploy_rubygem.rbs
150
151
  homepage: https://github.com/JimboDragonGit/deploy_rubygem
151
152
  licenses:
metadata.gz.sig CHANGED
Binary file