deploy_rubygem 0.60.26 → 0.60.28

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: c1e3e8c24fddc913664218e7c2cf528fae22a49f5e06ce355b417bad0787c025
4
- data.tar.gz: 65bfdde1b839c3a0ae0ccad12ab3e15f4059affc318cd20e631ae508076a8669
3
+ metadata.gz: 560eeb1bcd98d335fcd4c1cb339b52b3ebbefb3c7d7cdd6b70341497be4219f5
4
+ data.tar.gz: 12d5f2ebe6b2f88a231f662533192acc9f3958acc7216586fde1698bb1faa536
5
5
  SHA512:
6
- metadata.gz: cb2556543e6cdfed0b9ba632c5c7d7ae5845478f6557e0986fccd0735fedc62926e2bdea1861b6ff44b1c4b59ecd80b9ae2c6c8f04ec5b51e83024bdf5db8d4e
7
- data.tar.gz: 1d7a104b9751fb5bce12ad45f09be7980e566bf4d228f4db053c87b054b6ad8235eb8551b785dd714932d60cbad04c4cb7c5b7858210edaab22401883ad94f76
6
+ metadata.gz: 31f2ce57e486a66962902b40bcd91d3f2a0f87fcad5024c460b11a567404abf2bf6289be4721f29c3dc9149fb7f4fd421e43cc71e3e46595ae6ce93b3739a6a9
7
+ data.tar.gz: 3241ce37ec96c62d34fcb019bfa3ec19023b87081798e44207a4ad9fcaf68bf2ca17a2c134de13992d6fc1e16a3cf308de339254407c2299874bc22a508d9d5a
checksums.yaml.gz.sig CHANGED
Binary file
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ task test_version: %i[install compliance]
17
17
  task :compliance do
18
18
  system('inspec exec compliance')
19
19
  end
20
- task developper: %i[rubocop push default release]
20
+ task developper: %i[rubocop push default]
21
21
  task :push do
22
22
  system('git add .')
23
23
  system("git commit -m 'Rake pusing version #{DeployRubygem::VERSION}'")
@@ -17,7 +17,7 @@ module DeployRubygem
17
17
  @profiles = cookbook_info[:compliance_profiles].map do |profile_name|
18
18
  input_file = File.join(%w[compliance inputs] + ["#{cookbook_name}.yml"])
19
19
  waiver_file = File.join(%w[compliance waivers] + ["#{cookbook_name}.yml"])
20
- InspecTestor.new(profile_name, input_file, waiver_file)
20
+ InspecTestor.new(File.join(%w[compliance profiles], profile_name.to_s), input_file, waiver_file)
21
21
  end
22
22
  @kitchens = cookbook_info[:kitchens].map do |kitchen_name|
23
23
  Kitchen.new(kitchen_name, self)
@@ -27,6 +27,14 @@ module DeployRubygem
27
27
  end
28
28
  end
29
29
 
30
+ def generate
31
+ return if Dir.exist?(cookbook_path)
32
+
33
+ Dir.chdir(File.dirname(cookbook_path)) do
34
+ system("chef generate cookbook #{cookbook_name}")
35
+ end
36
+ end
37
+
30
38
  def cookbook_name
31
39
  project_name
32
40
  end
@@ -46,12 +46,20 @@ module DeployRubygem
46
46
  end
47
47
 
48
48
  def clean
49
- FileUtils.rm_rf(File.join(inspec_path, 'vendor'))
50
- File.delete(File.join(inspec_path, 'inspec.lock'))
49
+ FileUtils.rm_rf(vendor_folder) if Dir.exist?(vendor_folder)
50
+ File.delete(lock_file) if File.exist?(lock_file)
51
51
  end
52
52
 
53
53
  private
54
54
 
55
+ def vendor_folder
56
+ File.join(inspec_path, 'vendor')
57
+ end
58
+
59
+ def lock_file
60
+ File.join(inspec_path, 'inspec.lock')
61
+ end
62
+
55
63
  def chef_license
56
64
  '--chef-license accept'
57
65
  end
@@ -1,19 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'rubygem'
4
- require_relative 'deploy_rubygem_options'
5
4
 
6
5
  # Set version for DeployRubygem
7
6
  module DeployRubygem
8
- def self.project_name
9
- 'deploy_rubygem'
10
- end
11
-
12
- def self.new_deploy_rubygem
13
- @self_project = Rubygem.new(DeployRubygemOptions.new.compile) if @self_project.nil?
14
- @self_project
15
- end
16
-
17
7
  # VERSION = new_deploy_rubygem.gvb_version.short_version
18
- VERSION = '0.60.26'
8
+ VERSION = '0.60.28'
19
9
  end
@@ -2,30 +2,40 @@
2
2
 
3
3
  require_relative 'deploy_rubygem/version'
4
4
 
5
- # DeployRubygem - deploy a gem using rake
5
+ # DeployRubygem module helper for rubygem
6
6
  module DeployRubygem
7
- def deploy_rubygem
8
- DeployRubygem.new_deploy_rubygem
7
+ def rubygem_test
8
+ DeployRubygem.deployer
9
9
  end
10
10
 
11
- def jimbo_management_site_cookbook
12
- deploy_rubygem.cookbooks.select do |cookbook|
13
- cookbook.cookbook_name.match? 'jimbo_management_site'
14
- end.first
11
+ def self.exemple_cookbook
12
+ {
13
+ git: 'git@git.exemple.com:/Exemple/exemple_cookbook.git',
14
+ path: File.join(ENV['HOME'], 'jimbo_management_site'),
15
+ kitchens: %w[base],
16
+ compliance_profiles: {
17
+ input: 'compliance/inputs/user.yml',
18
+ profile: 'jimbodragon-management-site'
19
+ },
20
+ execute_profiles: %w[jimbodragon-accept],
21
+ groups: %w[base]
22
+ }
15
23
  end
16
- end
17
24
 
18
- # s.add_runtime_dependency('colorator', '~> 1.0')
19
- # s.add_runtime_dependency('em-websocket', '~> 0.5')
20
- # s.add_runtime_dependency('i18n', '~> 1.0')
21
- # s.add_runtime_dependency('jekyll-sass-converter', '>= 2.0', '< 4.0')
22
- # s.add_runtime_dependency('jekyll-watch', '~> 2.0')
23
- # s.add_runtime_dependency('kramdown', '~> 2.3', '>= 2.3.1')
24
- # s.add_runtime_dependency('kramdown-parser-gfm', '~> 1.0')
25
- # s.add_runtime_dependency('liquid', '~> 4.0')
26
- # s.add_runtime_dependency('mercenary', '>= 0.3.6', '< 0.5')
27
- # s.add_runtime_dependency('pathutil', '~> 0.9')
28
- # s.add_runtime_dependency('rouge', '>= 3.0', '< 5.0')
29
- # s.add_runtime_dependency('safe_yaml', '~> 1.0')
30
- # s.add_runtime_dependency('terminal-table', '>= 1.8', '< 4.0')
31
- # s.add_runtime_dependency('webrick', '~> 1.7')
25
+ def self.deployer
26
+ chefrepo_path = File.join(%w[test exemple chefrepo])
27
+ project_options = {
28
+ project_name: 'rubygem_test',
29
+ git: 'git@git.exemple.com:/Exemple/rubygem',
30
+ chefrepo_git: 'git@git.exemple.com:/Exemple/chefrepo',
31
+ chefrepo_path: chefrepo_path,
32
+ binaries: %w[exemple_deploy],
33
+ dependencies: %w[deploy_rubygem],
34
+ path: File.join(chefrepo_path, %w[projects rubygem_test]),
35
+ cookbooks: {
36
+ exemple_cookbook: exemple_cookbook
37
+ }
38
+ }
39
+ @deployer ||= DeployRubygem::Project.new(project_options)
40
+ end
41
+ 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.26
4
+ version: 0.60.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Provencher
@@ -33,7 +33,7 @@ cert_chain:
33
33
  n6Pwa3EckU/5n8N6gUJTAmGyu6Ncu1pbsZtH450+BJ2z82JNXomdFYlnG8+1XNlj
34
34
  3M1sBFUHvqrBg2hQkQcLHokmQYrYsRK5A7HrxwKcmwM=
35
35
  -----END CERTIFICATE-----
36
- date: 2024-06-11 00:00:00.000000000 Z
36
+ date: 2024-06-12 00:00:00.000000000 Z
37
37
  dependencies:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: rspec
@@ -128,7 +128,6 @@ files:
128
128
  - lib/deploy_rubygem.rb
129
129
  - lib/deploy_rubygem/chef_node.rb
130
130
  - lib/deploy_rubygem/cookbook.rb
131
- - lib/deploy_rubygem/deploy_rubygem_options.rb
132
131
  - lib/deploy_rubygem/inspec_result.rb
133
132
  - lib/deploy_rubygem/inspectestor.rb
134
133
  - lib/deploy_rubygem/kitchen.rb
metadata.gz.sig CHANGED
Binary file
@@ -1,106 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # DeployRubygem - deploy a gem using rake
4
- # Containing a class
5
- module DeployRubygem
6
- # Using Inspec to deploy and manage Inspec
7
- class DeployRubygemOptions
8
- def project_name
9
- 'deploy_rubygem'
10
- end
11
-
12
- def git
13
- 'git@github.com:JimboDragonGit/deploy_rubygem.git'
14
- end
15
-
16
- def chefrepo_git
17
- 'git@github.com:JimboDragonGit/jimbodragon.git'
18
- end
19
-
20
- def chefrepo_path
21
- '/usr/local/chef/repo/jimbodragon'
22
- end
23
-
24
- def binaries
25
- %w[
26
- deploy_rubygem
27
- prepare_workstation
28
- test_deploy_rubygem
29
- deploy_jimbodragon
30
- ]
31
- end
32
-
33
- def dependencies
34
- %w[
35
- deploy_rubygem
36
- jimbo_management_site
37
- ]
38
- end
39
-
40
- def path
41
- File.join(ENV['HOME'], 'deploy_rubygem')
42
- end
43
-
44
- def jimbodragon_profiles
45
- %w[
46
- jimbodragon-accept
47
- jimbodragon-applications
48
- jimbodragon-deploy-context
49
- jimbodragon-environment
50
- jimbodragon-git
51
- ]
52
- end
53
-
54
- def workstation_profiles
55
- %w[
56
- jimbodragon-linux-baseline
57
- jimbodragon-manual-push
58
- jimbodragon-push
59
- jimbodragon-services
60
- jimbodragon-users
61
- jimbodragon-workstation
62
- ]
63
- end
64
-
65
- def compliance_profiles
66
- jimbodragon_profiles + workstation_profiles
67
- end
68
-
69
- def jimbo_management_site_cookbook
70
- {
71
- git: 'git@github.com:JimboDragonGit/jimbo_management_site.git',
72
- path: File.join(ENV['HOME'], 'jimbo_management_site'),
73
- kitchens: %w[base],
74
- compliance_profiles: compliance_profiles,
75
- execute_profiles: %w[jimbodragon-accept],
76
- groups: %w[base]
77
- }
78
- end
79
-
80
- def jimbo_management_site_profile
81
- {
82
- input: 'compliance/inputs/user.yml',
83
- profile: 'jimbodragon-management-site'
84
- }
85
- end
86
-
87
- def cookbooks
88
- {
89
- jimbo_management_site: jimbo_management_site_cookbook
90
- }
91
- end
92
-
93
- def compile
94
- {
95
- project_name: project_name,
96
- git: git,
97
- chefrepo_git: chefrepo_git,
98
- chefrepo_path: chefrepo_path,
99
- binaries: binaries,
100
- dependencies: dependencies,
101
- path: path,
102
- cookbooks: cookbooks
103
- }
104
- end
105
- end
106
- end