deploy_rubygem 0.60.4 → 0.60.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.rspec +0 -1
- data/.rubocop.yml +4 -0
- data/LICENSE.txt +0 -21
- data/Rakefile +8 -8
- data/lib/deploy_rubygem/cookbook.rb +7 -3
- data/lib/deploy_rubygem/inspec.rb +15 -6
- data/lib/deploy_rubygem/kitchen.rb +0 -2
- data/lib/deploy_rubygem/project.rb +3 -42
- data/lib/deploy_rubygem/rubygem.rb +10 -8
- data/lib/deploy_rubygem/version.rb +4 -3
- data/lib/deploy_rubygem.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +16 -17
- metadata.gz.sig +0 -0
- data/.circleci/config.yml +0 -112
- data/.gitignore +0 -59
- data/Gemfile +0 -13
- data/bin/console +0 -11
- data/bin/deploy_jimbo_management_site_website +0 -11
- data/bin/deploy_with_habitat +0 -23
- data/bin/inspec_deploy_rubygem +0 -14
- data/bin/local_test_deploy_rubygem +0 -8
- data/bin/setup +0 -8
- data/deploy_rubygem.gemspec +0 -75
- data/spec/deploy_rubygem_spec.rb +0 -21
- data/spec/generate_test_cookbook.rb +0 -21
- data/spec/jimbo_management_site.rb +0 -50
- data/spec/spec_helper.rb +0 -25
- data/spec/unit_deploy_rubygem.rb +0 -73
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 333a7e12ad09ad46287654e3a183f5e936cfab06e18a022eb94e66f7d5fbbc6f
|
4
|
+
data.tar.gz: eb9866f85236652c2e1b1ecab159bbbac6dc46fd5ef603f9e768863c726a3aad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '081d60caddc42d51026155a0f3237f10d778b75df42da69dbce12b01059754e42f971212bfc0766e56730c40f9c9542943b2ddd8fa0b515f9eb65b9b1e092264'
|
7
|
+
data.tar.gz: 7c6787e8345c15fe16884acaf22315222c319cb2fd43196ba727e1d497b31e5be297f5bc0dcd3e62d3c1f205b7c93b540c7998f2a16c48c926edcac1f3674dca
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/.rspec
CHANGED
data/.rubocop.yml
CHANGED
data/LICENSE.txt
CHANGED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2024 Jimmy Provencher
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -3,15 +3,15 @@
|
|
3
3
|
require 'bundler/gem_tasks'
|
4
4
|
require 'rspec/core/rake_task'
|
5
5
|
|
6
|
-
RSpec::Core::RakeTask.new(:spec)
|
7
|
-
|
8
6
|
require 'rubocop/rake_task'
|
9
7
|
|
8
|
+
RSpec::Core::RakeTask.new(:spec)
|
10
9
|
RuboCop::RakeTask.new
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
task
|
17
|
-
|
11
|
+
task test_framework: %i[clean rubocop spec]
|
12
|
+
task default: %i[test_framework build install:local]
|
13
|
+
task cicd: %i[default release test_version]
|
14
|
+
task test_version: %i[install compliance]
|
15
|
+
task :compliance do
|
16
|
+
system('inspec exec git@github.com:JimboDragonGit/rubygem_baseline.git --input-file compliance.yml')
|
17
|
+
end
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
require_relative 'project'
|
4
|
+
require_relative 'kitchen'
|
5
|
+
require_relative 'inspec'
|
6
|
+
require_relative 'rubygem'
|
5
7
|
|
6
8
|
# DeployRubygem - deploy a gem using rake
|
7
9
|
# Containing a class
|
@@ -13,7 +15,9 @@ module DeployRubygem
|
|
13
15
|
def initialize(new_cookbook_info)
|
14
16
|
super(new_cookbook_info)
|
15
17
|
@profiles = cookbook_info[:compliance_profiles].map do |profile_name|
|
16
|
-
|
18
|
+
input_file = File.join(%w[compliance inputs] + ["#{cookbook_name}.yml"])
|
19
|
+
waiver_file = File.join(%w[compliance waivers] + ["#{cookbook_name}.yml"])
|
20
|
+
Inspec.new(profile_name, input_file, waiver_file)
|
17
21
|
end
|
18
22
|
@kitchens = cookbook_info[:kitchens].map do |kitchen_name|
|
19
23
|
Kitchen.new(kitchen_name, self)
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'deploy_rubygem/project'
|
4
|
-
|
5
3
|
# DeployRubygem - deploy a gem using rake
|
6
4
|
# Containing a class
|
7
5
|
module DeployRubygem
|
@@ -9,19 +7,30 @@ module DeployRubygem
|
|
9
7
|
class Inspec
|
10
8
|
attr_reader :inspec_name, :input_file
|
11
9
|
|
12
|
-
def initialize(inspec_name, input_file = nil)
|
10
|
+
def initialize(inspec_name, input_file = nil, waiver_file = nil)
|
13
11
|
@inspec_name = inspec_name
|
14
12
|
@input_file = input_file
|
13
|
+
@waiver_file = waiver_file
|
15
14
|
end
|
16
15
|
|
17
16
|
def apply
|
18
17
|
puts "ActuaL Dir #{Dir.pwd}"
|
19
18
|
puts "inspec_name = #{inspec_name}"
|
20
19
|
puts "input_file = #{input_file}"
|
20
|
+
puts "waiver_file = #{waiver_file}"
|
21
21
|
system("inspec check compliance/profiles/#{inspec_name}")
|
22
|
-
cmd_opt =
|
23
|
-
|
24
|
-
|
22
|
+
cmd_opt = []
|
23
|
+
|
24
|
+
unless input_file.nil?
|
25
|
+
cmd_opt << '--input-file'
|
26
|
+
cmd_opt << input_file
|
27
|
+
end
|
28
|
+
|
29
|
+
unless waiver_file.nil?
|
30
|
+
cmd_opt << '--waiver-file'
|
31
|
+
cmd_opt << waiver_file
|
32
|
+
end
|
33
|
+
system("inspec exec compliance/profiles/#{inspec_name} #{cmd_opt.join(' ')}")
|
25
34
|
end
|
26
35
|
|
27
36
|
def update
|
@@ -18,39 +18,6 @@ module DeployRubygem
|
|
18
18
|
@compliance_profile = Inspec.new(project_options[:compliance_profile])
|
19
19
|
end
|
20
20
|
|
21
|
-
# Wrapping GVB to fetch project version
|
22
|
-
class DeployVersion
|
23
|
-
attr_reader :path
|
24
|
-
|
25
|
-
def initialize(git_path)
|
26
|
-
@path = git_path
|
27
|
-
end
|
28
|
-
|
29
|
-
def execute_in_folder
|
30
|
-
current_folder = Dir.pwd
|
31
|
-
Dir.chdir path
|
32
|
-
get_gvb = yield if block_given?
|
33
|
-
Dir.chdir current_folder
|
34
|
-
get_gvb
|
35
|
-
end
|
36
|
-
|
37
|
-
def method_missing(method_name)
|
38
|
-
execute_in_folder { GVB.send(method_name) }
|
39
|
-
end
|
40
|
-
|
41
|
-
def respond_to_missing?(method_name)
|
42
|
-
GVB.methods.include?(method_name)
|
43
|
-
end
|
44
|
-
|
45
|
-
def patch_bump
|
46
|
-
execute_in_folder { system('git version-bump patch') }
|
47
|
-
end
|
48
|
-
|
49
|
-
def short_version
|
50
|
-
"#{major_version}.#{minor_version}.#{patch_version}"
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
21
|
def project_name
|
55
22
|
project_options[__method__]
|
56
23
|
end
|
@@ -108,15 +75,9 @@ module DeployRubygem
|
|
108
75
|
end
|
109
76
|
|
110
77
|
def git_commit
|
111
|
-
system('git add .') ||
|
112
|
-
system("git commit -m
|
113
|
-
system(
|
114
|
-
system('git push') || exit(108)
|
115
|
-
end
|
116
|
-
|
117
|
-
def gvb_version
|
118
|
-
@gvb_version ||= DeployVersion.new(path)
|
119
|
-
@gvb_version
|
78
|
+
system('git add .') || return
|
79
|
+
system("git commit -m 'Self validated for version #{GVB.version}'") || return
|
80
|
+
system('git push') || abort("Cannot push #{project_name} #{GVB.version}")
|
120
81
|
end
|
121
82
|
end
|
122
83
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require_relative 'project'
|
4
|
+
require_relative 'cookbook'
|
4
5
|
|
5
6
|
# DeployRubygem - deploy a gem using rake
|
6
7
|
# Containing a class
|
@@ -54,17 +55,18 @@ module DeployRubygem
|
|
54
55
|
|
55
56
|
def rake_test
|
56
57
|
File.delete('Gemfile.lock') if File.exist?('Gemfile.lock')
|
57
|
-
system('bundle') ||
|
58
|
-
system('
|
59
|
-
system('rake
|
60
|
-
system('rake
|
58
|
+
system('bundle') || return
|
59
|
+
system('bundle install') || return
|
60
|
+
system('rake') || return
|
61
|
+
# system('rake build') &&
|
62
|
+
# system('rake install:local') &&
|
61
63
|
end
|
62
64
|
|
63
65
|
def rake_release
|
64
66
|
change_to_project_folder
|
65
67
|
git_commit
|
66
|
-
system('rake install') ||
|
67
|
-
system('rake release') || exit(105)
|
68
|
+
system('rake install') || abort("Cannot rake install #{project_name} #{GVB.version}")
|
69
|
+
# system('rake release') || exit(105)
|
68
70
|
end
|
69
71
|
|
70
72
|
def release
|
@@ -78,7 +80,7 @@ module DeployRubygem
|
|
78
80
|
deploy_cookbooks
|
79
81
|
change_to_project_folder
|
80
82
|
|
81
|
-
release
|
83
|
+
# release
|
82
84
|
test_compliance
|
83
85
|
end
|
84
86
|
end
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
require 'git-version-bump'
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
require_relative 'rubygem'
|
6
|
+
require_relative 'deploy_rubygem_options'
|
7
7
|
|
8
8
|
# Set version for DeployRubygem
|
9
9
|
module DeployRubygem
|
@@ -16,5 +16,6 @@ module DeployRubygem
|
|
16
16
|
@self_project
|
17
17
|
end
|
18
18
|
|
19
|
-
VERSION = new_deploy_rubygem.gvb_version.short_version
|
19
|
+
# VERSION = new_deploy_rubygem.gvb_version.short_version
|
20
|
+
VERSION = '0.60.10'
|
20
21
|
end
|
data/lib/deploy_rubygem.rb
CHANGED
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.
|
4
|
+
version: 0.60.10
|
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-
|
36
|
+
date: 2024-06-08 00:00:00.000000000 Z
|
37
37
|
dependencies:
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: git-version-bump
|
@@ -63,6 +63,20 @@ dependencies:
|
|
63
63
|
- - "~>"
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: 3.13.0
|
66
|
+
- !ruby/object:Gem::Dependency
|
67
|
+
name: rspec-core
|
68
|
+
requirement: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - "~>"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 3.13.0
|
73
|
+
type: :runtime
|
74
|
+
prerelease: false
|
75
|
+
version_requirements: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - "~>"
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 3.13.0
|
66
80
|
- !ruby/object:Gem::Dependency
|
67
81
|
name: rspec-support
|
68
82
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,30 +134,20 @@ extra_rdoc_files:
|
|
120
134
|
- README.md
|
121
135
|
- LICENSE
|
122
136
|
files:
|
123
|
-
- ".circleci/config.yml"
|
124
|
-
- ".gitignore"
|
125
137
|
- ".kitchen/logs/kitchen.log"
|
126
138
|
- ".rspec"
|
127
139
|
- ".rubocop.yml"
|
128
140
|
- CHANGELOG.md
|
129
141
|
- CODE_OF_CONDUCT.md
|
130
|
-
- Gemfile
|
131
142
|
- LICENSE
|
132
143
|
- LICENSE.txt
|
133
144
|
- README.md
|
134
145
|
- Rakefile
|
135
|
-
- bin/console
|
136
|
-
- bin/deploy_jimbo_management_site_website
|
137
146
|
- bin/deploy_jimbodragon
|
138
147
|
- bin/deploy_rubygem
|
139
148
|
- bin/deploy_rubygem_manually
|
140
|
-
- bin/deploy_with_habitat
|
141
|
-
- bin/inspec_deploy_rubygem
|
142
|
-
- bin/local_test_deploy_rubygem
|
143
149
|
- bin/prepare_workstation
|
144
|
-
- bin/setup
|
145
150
|
- bin/test_deploy_rubygem
|
146
|
-
- deploy_rubygem.gemspec
|
147
151
|
- exe/deploy_rubygem
|
148
152
|
- lib/deploy_rubygem.rb
|
149
153
|
- lib/deploy_rubygem/cookbook.rb
|
@@ -154,11 +158,6 @@ files:
|
|
154
158
|
- lib/deploy_rubygem/rubygem.rb
|
155
159
|
- lib/deploy_rubygem/version.rb
|
156
160
|
- sig/deploy_rubygem.rbs
|
157
|
-
- spec/deploy_rubygem_spec.rb
|
158
|
-
- spec/generate_test_cookbook.rb
|
159
|
-
- spec/jimbo_management_site.rb
|
160
|
-
- spec/spec_helper.rb
|
161
|
-
- spec/unit_deploy_rubygem.rb
|
162
161
|
homepage: https://github.com/JimboDragonGit/deploy_rubygem
|
163
162
|
licenses:
|
164
163
|
- MIT
|
metadata.gz.sig
CHANGED
Binary file
|
data/.circleci/config.yml
DELETED
@@ -1,112 +0,0 @@
|
|
1
|
-
version: 2.1
|
2
|
-
|
3
|
-
jobs:
|
4
|
-
latest_install:
|
5
|
-
docker:
|
6
|
-
- image: cimg/ruby:3.1.2
|
7
|
-
auth:
|
8
|
-
username: $DOCKERHUB_USER
|
9
|
-
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
|
10
|
-
|
11
|
-
environment: {}
|
12
|
-
working_directory: /home/circleci/deploy_rubygem
|
13
|
-
steps:
|
14
|
-
- checkout
|
15
|
-
- run: |
|
16
|
-
set -xu
|
17
|
-
echo 'github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl' >> ~/.ssh/known_hosts
|
18
|
-
echo 'github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=' >> ~/.ssh/known_hosts
|
19
|
-
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=' >> ~/.ssh/known_hosts
|
20
|
-
cat ~/.ssh/known_hosts
|
21
|
-
ssh git@github.com || echo
|
22
|
-
gem install deploy_rubygem
|
23
|
-
chefrepo_checkout:
|
24
|
-
docker:
|
25
|
-
- image: cimg/ruby:3.1.2
|
26
|
-
auth:
|
27
|
-
username: $DOCKERHUB_USER
|
28
|
-
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
|
29
|
-
|
30
|
-
environment: {}
|
31
|
-
working_directory: /home/circleci/deploy_rubygem
|
32
|
-
steps:
|
33
|
-
- checkout
|
34
|
-
- run: |
|
35
|
-
set -xu
|
36
|
-
echo 'github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl' >> ~/.ssh/known_hosts
|
37
|
-
echo 'github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=' >> ~/.ssh/known_hosts
|
38
|
-
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=' >> ~/.ssh/known_hosts
|
39
|
-
cat ~/.ssh/known_hosts
|
40
|
-
ssh git@github.com || echo
|
41
|
-
gem install deploy_rubygem
|
42
|
-
deploy_public:
|
43
|
-
docker:
|
44
|
-
- image: cimg/ruby:3.1.2
|
45
|
-
auth:
|
46
|
-
username: $DOCKERHUB_USER
|
47
|
-
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
|
48
|
-
|
49
|
-
environment: {}
|
50
|
-
working_directory: /home/circleci/deploy_rubygem
|
51
|
-
steps:
|
52
|
-
- checkout
|
53
|
-
- run: |
|
54
|
-
set -xu
|
55
|
-
echo 'github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl' >> ~/.ssh/known_hosts
|
56
|
-
echo 'github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=' >> ~/.ssh/known_hosts
|
57
|
-
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=' >> ~/.ssh/known_hosts
|
58
|
-
cat ~/.ssh/known_hosts
|
59
|
-
ssh git@github.com || echo
|
60
|
-
gem install deploy_rubygem
|
61
|
-
|
62
|
-
deploy_rubygem
|
63
|
-
execute_local:
|
64
|
-
docker:
|
65
|
-
- image: cimg/ruby:3.1.2
|
66
|
-
auth:
|
67
|
-
username: $DOCKERHUB_USER
|
68
|
-
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
|
69
|
-
|
70
|
-
environment: {}
|
71
|
-
working_directory: /home/circleci/deploy_rubygem
|
72
|
-
steps:
|
73
|
-
- checkout
|
74
|
-
- run: |
|
75
|
-
ruby bin/deploy_rubygem
|
76
|
-
execute_rake:
|
77
|
-
docker:
|
78
|
-
- image: cimg/ruby:3.1.2
|
79
|
-
auth:
|
80
|
-
username: $DOCKERHUB_USER
|
81
|
-
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
|
82
|
-
|
83
|
-
environment: {}
|
84
|
-
working_directory: /home/circleci/deploy_rubygem
|
85
|
-
steps:
|
86
|
-
- checkout
|
87
|
-
- run: |
|
88
|
-
gem install git-version-bump
|
89
|
-
bundle install
|
90
|
-
rake circleci
|
91
|
-
#...
|
92
|
-
workflows:
|
93
|
-
version: 2
|
94
|
-
deploy_rubygem:
|
95
|
-
jobs:
|
96
|
-
- latest_install:
|
97
|
-
filters:
|
98
|
-
branches:
|
99
|
-
only: master
|
100
|
-
- execute_local:
|
101
|
-
filters:
|
102
|
-
branches:
|
103
|
-
only: master
|
104
|
-
- deploy_public:
|
105
|
-
filters:
|
106
|
-
branches:
|
107
|
-
only: master
|
108
|
-
- execute_rake:
|
109
|
-
filters:
|
110
|
-
branches:
|
111
|
-
only: master
|
112
|
-
|
data/.gitignore
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
/.config
|
4
|
-
/coverage/
|
5
|
-
/InstalledFiles
|
6
|
-
/pkg/
|
7
|
-
/spec/reports/
|
8
|
-
/spec/examples.txt
|
9
|
-
/test/tmp/
|
10
|
-
/test/version_tmp/
|
11
|
-
/tmp/
|
12
|
-
|
13
|
-
# Used by dotenv library to load environment variables.
|
14
|
-
# .env
|
15
|
-
|
16
|
-
# Ignore Byebug command history file.
|
17
|
-
.byebug_history
|
18
|
-
|
19
|
-
## Specific to RubyMotion:
|
20
|
-
.dat*
|
21
|
-
.repl_history
|
22
|
-
build/
|
23
|
-
*.bridgesupport
|
24
|
-
build-iPhoneOS/
|
25
|
-
build-iPhoneSimulator/
|
26
|
-
|
27
|
-
## Specific to RubyMotion (use of CocoaPods):
|
28
|
-
#
|
29
|
-
# We recommend against adding the Pods directory to your .gitignore. However
|
30
|
-
# you should judge for yourself, the pros and cons are mentioned at:
|
31
|
-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
32
|
-
#
|
33
|
-
# vendor/Pods/
|
34
|
-
|
35
|
-
## Documentation cache and generated files:
|
36
|
-
/.yardoc/
|
37
|
-
/_yardoc/
|
38
|
-
/doc/
|
39
|
-
/rdoc/
|
40
|
-
|
41
|
-
## Environment normalization:
|
42
|
-
/.bundle/
|
43
|
-
/vendor/bundle
|
44
|
-
/lib/bundler/man/
|
45
|
-
|
46
|
-
# for a library or gem, you might want to ignore these files since the code is
|
47
|
-
# intended to run in multiple environments; otherwise, check them in:
|
48
|
-
# Gemfile.lock
|
49
|
-
# .ruby-version
|
50
|
-
# .ruby-gemset
|
51
|
-
|
52
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
53
|
-
.rvmrc
|
54
|
-
|
55
|
-
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
56
|
-
# .rubocop-https?--*
|
57
|
-
Gemfile.lock
|
58
|
-
.rspec_status
|
59
|
-
inspec.lock
|
data/Gemfile
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source 'https://rubygems.org'
|
4
|
-
|
5
|
-
# Specify your gem's dependencies in deploy_rubygem.gemspec
|
6
|
-
gemspec
|
7
|
-
|
8
|
-
# gem 'git-version-bump', '0.19.1'
|
9
|
-
|
10
|
-
# gem 'rake', '~> 13.0'
|
11
|
-
# gem 'rspec', '~> 3.13.0'
|
12
|
-
# gem 'rspec-aupport', '~> 3.13.0'
|
13
|
-
# gem 'rubocop', '~> 1.21'
|
data/bin/console
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'bundler/setup'
|
5
|
-
require 'deploy_rubygem'
|
6
|
-
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
require 'irb'
|
11
|
-
IRB.start(__FILE__)
|
@@ -1,11 +0,0 @@
|
|
1
|
-
#!/opt/chef-workstation/embedded/bin/ruby
|
2
|
-
Signal.trap('INT') { exit 1 }
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w[.. lib])
|
5
|
-
require 'rubygems' unless defined?(Gem)
|
6
|
-
require 'deploy_rubygem'
|
7
|
-
|
8
|
-
DeployRubygem.new_deploy_rubygem.cookbooks.select do |cookbook|
|
9
|
-
puts "CHecking cookbook #{cookbook.cookbook_name}"
|
10
|
-
cookbook.cookbook_name.match 'jimbo_management_site'
|
11
|
-
end.first.deploy
|
data/bin/deploy_with_habitat
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
#!/opt/chef-workstation/embedded/bin/ruby
|
2
|
-
Signal.trap('INT') { exit 1 }
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w[.. lib])
|
5
|
-
require 'rubygems' unless defined?(Gem)
|
6
|
-
require 'json'
|
7
|
-
require 'deploy_rubygem'
|
8
|
-
|
9
|
-
def inspect_query(query)
|
10
|
-
puts "class = #{query.class}"
|
11
|
-
# puts "class = #{query}"
|
12
|
-
end
|
13
|
-
|
14
|
-
query = JSON.parse(`knife search node name:habitat_chef_client_builder --format json`)
|
15
|
-
|
16
|
-
puts query['results']
|
17
|
-
query['rows'].each do |client|
|
18
|
-
puts client['name']
|
19
|
-
`knife node delete #{client['name']} -y`
|
20
|
-
`knife client delete #{client['name']} -y`
|
21
|
-
end
|
22
|
-
|
23
|
-
`hab pkg build habitat/plan.sh`
|
data/bin/inspec_deploy_rubygem
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/opt/chef-workstation/embedded/bin/ruby
|
2
|
-
Signal.trap('INT') { exit 1 }
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w[.. lib])
|
5
|
-
require 'rubygems' unless defined?(Gem)
|
6
|
-
require 'deploy_rubygem'
|
7
|
-
|
8
|
-
profile_options = DeployRubygem::DeployRubygemOptions.new
|
9
|
-
jimbo_option = profile_options.jimbo_management_site_profile
|
10
|
-
|
11
|
-
inspec_profile = DeployRubygem::Inspec.new(jimbo_option[:profile], jimbo_option[:input])
|
12
|
-
|
13
|
-
inspec_profile.update
|
14
|
-
inspec_profile.apply
|
data/bin/setup
DELETED
data/deploy_rubygem.gemspec
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'git-version-bump'
|
4
|
-
|
5
|
-
::Gem::Specification.new do |s|
|
6
|
-
s.name = 'deploy_rubygem'
|
7
|
-
s.license = 'MIT'
|
8
|
-
s.authors = ['Jimmy Provencher']
|
9
|
-
s.email = ['jimbo_dragon@hotmail.com']
|
10
|
-
s.homepage = 'https://github.com/JimboDragonGit/deploy_rubygem'
|
11
|
-
s.summary = 'A auto chef bootstrapper and wrapper cookbook to deploy code and context'
|
12
|
-
s.description = 'Using Chef cookbook style and force any script using it to switch to chef even if it is not install. It will install it tho ;)'
|
13
|
-
|
14
|
-
s.version = "#{GVB.major_version}.#{GVB.minor_version}.#{GVB.patch_version}"
|
15
|
-
s.date = GVB.date
|
16
|
-
|
17
|
-
# all_files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
18
|
-
# s.files = all_files.grep(%r!^(exe|libraries|rubocop)/|^.rubocop.yml$!)
|
19
|
-
# code_folder = 'libraries/'
|
20
|
-
# s.files = %w(README.md LICENSE bin/selfbootstrap libraries/selfbootstrap.rb ) + Dir.glob('libraries/**/*') # + Dir.glob('{bin,lib,certs,test}/**/*')
|
21
|
-
# s.require_paths = [code_folder]
|
22
|
-
# s.executables = %w(selfbootstrap)
|
23
|
-
# s.bindir = 'exe'
|
24
|
-
|
25
|
-
s.files = `git ls-files`.split("\n")
|
26
|
-
s.executables = %w[
|
27
|
-
deploy_rubygem
|
28
|
-
prepare_workstation
|
29
|
-
test_deploy_rubygem
|
30
|
-
deploy_rubygem_manually
|
31
|
-
deploy_jimbodragon
|
32
|
-
]
|
33
|
-
|
34
|
-
# s.cert_chain = [File.expand_path('../jimbodragon/certs/public/jimbodragon.pem')]
|
35
|
-
# s.signing_key = File.expand_path('../jimbodragon/certs/private/jimbodragon-gem-private_key.pem') if $PROGRAM_NAME =~ /gem\z/
|
36
|
-
|
37
|
-
s.metadata = {
|
38
|
-
# 'source_code_uri' => '/home/git/selfbootstrap.git/',
|
39
|
-
'bug_tracker_uri' => 'https://github.com/JimboDragonGit/deploy_rubygem/issues',
|
40
|
-
'changelog_uri' => 'https://github.com/JimboDragonGit/deploy_rubygem/releases',
|
41
|
-
'homepage_uri' => s.homepage
|
42
|
-
}
|
43
|
-
|
44
|
-
s.rdoc_options = ['--charset=UTF-8']
|
45
|
-
s.extra_rdoc_files = %w[README.md LICENSE]
|
46
|
-
|
47
|
-
s.required_ruby_version = '>= 3.0'
|
48
|
-
# s.required_rubygems_version = '>= 2.7.0'
|
49
|
-
|
50
|
-
# s.add_development_dependency('chef')
|
51
|
-
# s.add_development_dependency('test-kitchen')
|
52
|
-
|
53
|
-
s.add_runtime_dependency('git-version-bump')
|
54
|
-
s.add_runtime_dependency('rspec', '~> 3.13.0')
|
55
|
-
s.add_runtime_dependency('rspec-support', '~> 3.13.0')
|
56
|
-
s.add_runtime_dependency('rubocop-rake')
|
57
|
-
s.add_runtime_dependency('rubocop-rspec')
|
58
|
-
|
59
|
-
# s.add_runtime_dependency('deploy-context')
|
60
|
-
|
61
|
-
# s.add_runtime_dependency('colorator', '~> 1.0')
|
62
|
-
# s.add_runtime_dependency('em-websocket', '~> 0.5')
|
63
|
-
# s.add_runtime_dependency('i18n', '~> 1.0')
|
64
|
-
# s.add_runtime_dependency('jekyll-sass-converter', '>= 2.0', '< 4.0')
|
65
|
-
# s.add_runtime_dependency('jekyll-watch', '~> 2.0')
|
66
|
-
# s.add_runtime_dependency('kramdown', '~> 2.3', '>= 2.3.1')
|
67
|
-
# s.add_runtime_dependency('kramdown-parser-gfm', '~> 1.0')
|
68
|
-
# s.add_runtime_dependency('liquid', '~> 4.0')
|
69
|
-
# s.add_runtime_dependency('mercenary', '>= 0.3.6', '< 0.5')
|
70
|
-
# s.add_runtime_dependency('pathutil', '~> 0.9')
|
71
|
-
# s.add_runtime_dependency('rouge', '>= 3.0', '< 5.0')
|
72
|
-
# s.add_runtime_dependency('safe_yaml', '~> 1.0')
|
73
|
-
# s.add_runtime_dependency('terminal-table', '>= 1.8', '< 4.0')
|
74
|
-
# s.add_runtime_dependency('webrick', '~> 1.7')
|
75
|
-
end
|
data/spec/deploy_rubygem_spec.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# RSpec.describe 'Publishing itself' do
|
4
|
-
# it "deploy itself" do
|
5
|
-
# self_deploy = DeployRubygem.self_deploy
|
6
|
-
# expect(self_deploy).not_to be nil
|
7
|
-
# end
|
8
|
-
|
9
|
-
# it "deploy jimbo_management_site" do
|
10
|
-
# jimbo_management_site_deploy = DeployRubygem.deploy_jimbo_management_site
|
11
|
-
# expect(jimbo_management_site_deploy).not_to be nil
|
12
|
-
# end
|
13
|
-
|
14
|
-
# it "has pre latest version publish" do
|
15
|
-
# expect(`gem list -r deploy_rubygem`).to include("deploy_rubygem (#{Gem::Version.new("#{GVB.major_version}.#{GVB.minor_version - 1}.1")})")
|
16
|
-
# end
|
17
|
-
|
18
|
-
# it "has latest version publish" do
|
19
|
-
# expect(`gem list -r deploy_rubygem`).not_to include("deploy_rubygem (#{GVB.version}})")
|
20
|
-
# end
|
21
|
-
# end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# RSpec.describe 'testing with cookbook' do
|
4
|
-
# it "create a test cookbook" do
|
5
|
-
# change_repo = DeployRubygem.change_to_directory(DeployRubygem.chefrepo_path, 'git@github.com:JimboDragonGit/jimbodragon.git')
|
6
|
-
# expect(change_repo).not_to be nil
|
7
|
-
# expect(change_repo).to include DeployRubygem.chefrepo_path
|
8
|
-
# end
|
9
|
-
|
10
|
-
# it "Change to jimbo_management_site folder" do
|
11
|
-
# change_repo = DeployRubygem.change_to_directory(DeployRubygem.jimbo_management_site_path, 'git@github.com:JimboDragonGit/jimbo_management_site.git')
|
12
|
-
# expect(change_repo).not_to be nil
|
13
|
-
# expect(change_repo).to include DeployRubygem.jimbo_management_site_path
|
14
|
-
# end
|
15
|
-
|
16
|
-
# it "Change to deploy_rubygem folder" do
|
17
|
-
# change_repo = DeployRubygem.change_to_directory(DeployRubygem.deploy_rubygem_path, 'git@github.com:JimboDragonGit/deploy_rubygem.git')
|
18
|
-
# expect(change_repo).not_to be nil
|
19
|
-
# expect(change_repo).to include DeployRubygem.deploy_rubygem_path
|
20
|
-
# end
|
21
|
-
# end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
RSpec.describe 'Get jimbo_management_site cookbook' do
|
4
|
-
it 'should not be null' do
|
5
|
-
expect(jimbo_management_site_cookbook).not_to be nil
|
6
|
-
end
|
7
|
-
it 'should be a Project' do
|
8
|
-
expect(jimbo_management_site_cookbook).to be_kind_of(DeployRubygem::Project)
|
9
|
-
end
|
10
|
-
it 'should be a Cookbook' do
|
11
|
-
expect(jimbo_management_site_cookbook).to be_kind_of(DeployRubygem::Cookbook)
|
12
|
-
end
|
13
|
-
%w[deploy].each do |method|
|
14
|
-
it "should have method #{method}" do
|
15
|
-
expect(jimbo_management_site_cookbook.methods.include?(method.to_sym)).to eq(true)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
RSpec.describe 'Upload jimbo_management_site cookbook' do
|
21
|
-
it 'should switch to cookbook folder' do
|
22
|
-
switch_output = jimbo_management_site_cookbook.switch_to_cookbook
|
23
|
-
expect(switch_output).to be_kind_of(String)
|
24
|
-
expect(switch_output).to eq(jimbo_management_site_cookbook.path)
|
25
|
-
end
|
26
|
-
it 'should save progress' do
|
27
|
-
expect(jimbo_management_site_cookbook.save_progress).to be true
|
28
|
-
end
|
29
|
-
it 'should upload cookbook' do
|
30
|
-
upload_cookbook_output = jimbo_management_site_cookbook.upload_cookbook
|
31
|
-
expect(upload_cookbook_output).to be_kind_of(Array)
|
32
|
-
expect(upload_cookbook_output).to match(jimbo_management_site_cookbook.groups)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
RSpec.describe 'Test jimbo_management_site cookbook' do
|
37
|
-
it 'should prepare test environment' do
|
38
|
-
prepare_test_environment_output = jimbo_management_site_cookbook.prepare_test_environment
|
39
|
-
expect(prepare_test_environment_output).to be_kind_of(Array)
|
40
|
-
expect(prepare_test_environment_output).to match(jimbo_management_site_cookbook.kitchens)
|
41
|
-
end
|
42
|
-
it 'should verify' do
|
43
|
-
verify_output = jimbo_management_site_cookbook.verify
|
44
|
-
expect(verify_output).to be_kind_of(Array)
|
45
|
-
expect(verify_output).to match(jimbo_management_site_cookbook.execute_profiles)
|
46
|
-
end
|
47
|
-
it 'should save progress again' do
|
48
|
-
expect(jimbo_management_site_cookbook.save_progress).to be true
|
49
|
-
end
|
50
|
-
end
|
data/spec/spec_helper.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'deploy_rubygem'
|
4
|
-
|
5
|
-
RSpec.configure do |config|
|
6
|
-
# Enable flags like --only-failures and --next-failure
|
7
|
-
config.example_status_persistence_file_path = '.rspec_status'
|
8
|
-
|
9
|
-
# Disable RSpec exposing methods globally on `Module` and `main`
|
10
|
-
config.disable_monkey_patching!
|
11
|
-
|
12
|
-
config.expect_with :rspec do |c|
|
13
|
-
c.syntax = :expect
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
def deploy_rubygem
|
18
|
-
DeployRubygem.new_deploy_rubygem
|
19
|
-
end
|
20
|
-
|
21
|
-
def jimbo_management_site_cookbook
|
22
|
-
deploy_rubygem.cookbooks.select do |cookbook|
|
23
|
-
cookbook.cookbook_name.match? 'jimbo_management_site'
|
24
|
-
end.first
|
25
|
-
end
|
data/spec/unit_deploy_rubygem.rb
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
RSpec.describe deploy_rubygem.gvb_version do
|
4
|
-
it 'has a version number' do
|
5
|
-
expect(deploy_rubygem.gvb_version).not_to be nil
|
6
|
-
expect(deploy_rubygem.gvb_version).to be_kind_of(DeployRubygem::Project::DeployVersion)
|
7
|
-
end
|
8
|
-
|
9
|
-
%w[major_version minor_version patch_version].each do |method_name|
|
10
|
-
it "has the method #{method_name}" do
|
11
|
-
expect(deploy_rubygem.gvb_version.send(method_name)).to be_kind_of(Integer)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
RSpec.describe DeployRubygem do
|
17
|
-
it 'has a version number' do
|
18
|
-
expect(DeployRubygem::VERSION).not_to be nil
|
19
|
-
end
|
20
|
-
|
21
|
-
it 'has pre latest version publish' do
|
22
|
-
project_version = deploy_rubygem.gvb_version
|
23
|
-
maj_ver = project_version.major_version
|
24
|
-
min_ver = project_version.minor_version
|
25
|
-
version_to_check = "deploy_rubygem (#{Gem::Version.new("#{maj_ver}.#{min_ver - 1}.1")})"
|
26
|
-
expect(`gem list -r deploy_rubygem`).to include(version_to_check)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
RSpec.describe "Testing #{DeployRubygem}" do
|
31
|
-
it 'has a Project Name' do
|
32
|
-
expect(deploy_rubygem.project_name).not_to be nil
|
33
|
-
end
|
34
|
-
it 'has Project Options' do
|
35
|
-
expect(deploy_rubygem.project_options).not_to be nil
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
RSpec.describe "Testing gem #{deploy_rubygem.project_name}" do
|
40
|
-
it 'should not be null' do
|
41
|
-
expect(deploy_rubygem).not_to be nil
|
42
|
-
end
|
43
|
-
it 'should be a Project' do
|
44
|
-
expect(deploy_rubygem).to be_kind_of(DeployRubygem::Project)
|
45
|
-
end
|
46
|
-
it 'should be a Rubygem' do
|
47
|
-
expect(deploy_rubygem).to be_kind_of(DeployRubygem::Rubygem)
|
48
|
-
end
|
49
|
-
it 'should get a Project Name' do
|
50
|
-
expect(deploy_rubygem.project_name).to eq(DeployRubygem.project_name)
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
RSpec.describe "Install #{deploy_rubygem.project_name}" do
|
55
|
-
it 'Change to deploy_rubygem folder' do
|
56
|
-
change_repo = deploy_rubygem.change_to_project_folder
|
57
|
-
expect(change_repo).not_to be nil
|
58
|
-
expect(Dir.pwd).to eq(deploy_rubygem.path)
|
59
|
-
end
|
60
|
-
|
61
|
-
it 'Change to Chef repo folder' do
|
62
|
-
change_repo = deploy_rubygem.change_to_chefrepo
|
63
|
-
expect(change_repo).not_to be nil
|
64
|
-
expect(change_repo).to eq(deploy_rubygem.chefrepo_path)
|
65
|
-
expect(Dir.pwd).to eq(deploy_rubygem.chefrepo_path)
|
66
|
-
end
|
67
|
-
|
68
|
-
it 'Should list his cookbooks dependencies' do
|
69
|
-
cookbooks = deploy_rubygem.cookbooks
|
70
|
-
expect(cookbooks).not_to be nil
|
71
|
-
expect(cookbooks).to be_kind_of(Array)
|
72
|
-
end
|
73
|
-
end
|