poise-application-git 1.0.0 → 1.1.0
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 +4 -4
- data/.kitchen.yml +1 -6
- data/.travis.yml +7 -1
- data/Berksfile +2 -12
- data/CHANGELOG.md +5 -0
- data/Gemfile +3 -1
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/lib/poise-application-git.rb +1 -1
- data/lib/poise_application_git.rb +1 -1
- data/lib/poise_application_git/cheftie.rb +1 -1
- data/lib/poise_application_git/resource.rb +22 -7
- data/lib/poise_application_git/safe_string.rb +1 -1
- data/lib/poise_application_git/version.rb +2 -2
- data/poise-application-git.gemspec +3 -2
- data/test/{cookbooks/application_git_test → cookbook}/metadata.rb +1 -1
- data/test/{cookbooks/application_git_test → cookbook}/recipes/default.rb +1 -1
- data/test/gemfiles/chef-12.0.gemfile +19 -0
- data/test/gemfiles/chef-12.1.gemfile +19 -0
- data/test/gemfiles/chef-12.2.gemfile +19 -0
- data/test/gemfiles/chef-12.3.gemfile +19 -0
- data/test/gemfiles/chef-12.4.gemfile +21 -0
- data/test/gemfiles/chef-12.5.gemfile +19 -0
- data/test/gemfiles/chef-12.6.gemfile +19 -0
- data/test/gemfiles/chef-12.gemfile +1 -1
- data/test/gemfiles/master.gemfile +1 -1
- data/test/integration/default/serverspec/default_spec.rb +1 -1
- data/test/spec/resource_spec.rb +46 -3
- data/test/spec/spec_helper.rb +1 -1
- metadata +37 -10
- data/.kitchen.travis.yml +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 15f9adac77390f39ac06e547c1f9d6c5ade40d5b
|
|
4
|
+
data.tar.gz: 187f54314b040338f8ad3d139837bf4fc4c9da16
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c4bc8942dfcc04257a896a660a036f58ad3285b7645022d92df8981c36cc8d1a62ab3627cb49997850d92c392b1413da1c0b3a1c63714bfb8b56c1cc60709d7
|
|
7
|
+
data.tar.gz: f3d01045634d7f4ca74f8651b2af1b6e60c5d4d7d947adf340c913681fd62b132c9bf2f4745a97461c0690aa452a36cde454745bf475914880d1844f1bb91b0c
|
data/.kitchen.yml
CHANGED
data/.travis.yml
CHANGED
|
@@ -11,7 +11,6 @@ addons:
|
|
|
11
11
|
env:
|
|
12
12
|
global:
|
|
13
13
|
- USE_SYSTEM_GECODE=true
|
|
14
|
-
- KITCHEN_LOCAL_YAML=.kitchen.travis.yml
|
|
15
14
|
- secure: AtUneb2rU3NtqZH3LULBSib7x/wgGpj6k4N6LZGwkAa6HztKI0tcV/OhKw90SlwhUDKTfYtH9ZMDEi5xfy53tCjL8iaRJsQsq6cs+UxRYQRtecHynJaiNjcxNfH2sKcDBcYRDXYJ/6TAG2PPa3jnXGdhv5sqOAKWeiKBUSIil1M=
|
|
16
15
|
- secure: IaXKhWRDmQ6o5a9iefVdoUgQedy4c4Tvr+/v3WxXPcZi92h2mqObJ3JGgvoznaRXn8PKeQfhYdmPT1JS4fAJJ7cHWTxIAY1xqxqu2FJzdjFV9+SyA57r1UrNNaqRvS9Uz3BGRAb1Uy0zcBSPUXJzbhOwmiPr2qLVbFy2hfKHY3g=
|
|
17
16
|
- secure: CavdSArLFhILYs0HGT0aIQIo7HjswATbIo6M1RDCF7fLPueWR1JtJQRcBlBkR+dR3irmyN+35HieKa4TbQJPm33oPuCHgNvPJFAosyjOh9ifwxXfiMwaBZpmdzAJ1tx3w2XFQlCpIYWW5Re8qeayP8ks2nFEIZw2GROgtYsVxzM=
|
|
@@ -20,4 +19,11 @@ script:
|
|
|
20
19
|
- "./bin/rake travis"
|
|
21
20
|
gemfile:
|
|
22
21
|
- test/gemfiles/chef-12.gemfile
|
|
22
|
+
- test/gemfiles/chef-12.0.gemfile
|
|
23
|
+
- test/gemfiles/chef-12.1.gemfile
|
|
24
|
+
- test/gemfiles/chef-12.2.gemfile
|
|
25
|
+
- test/gemfiles/chef-12.3.gemfile
|
|
26
|
+
- test/gemfiles/chef-12.4.gemfile
|
|
27
|
+
- test/gemfiles/chef-12.5.gemfile
|
|
28
|
+
- test/gemfiles/chef-12.6.gemfile
|
|
23
29
|
- test/gemfiles/master.gemfile
|
data/Berksfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright 2015, Noah Kantrowitz
|
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
# you may not use this file except in compliance with the License.
|
|
@@ -15,15 +15,5 @@
|
|
|
15
15
|
#
|
|
16
16
|
|
|
17
17
|
source 'https://supermarket.chef.io/'
|
|
18
|
-
extension 'halite'
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
cookbook 'poise', gem: 'poise'
|
|
22
|
-
cookbook 'application', gem: 'poise-application'
|
|
23
|
-
cookbook 'application_git', gem: 'poise-application-git'
|
|
24
|
-
cookbook 'poise-service', gem: 'poise-service'
|
|
25
|
-
|
|
26
|
-
group :test do
|
|
27
|
-
cookbook 'application_git_test', path: 'test/cookbooks/application_git_test'
|
|
28
|
-
cookbook 'apt'
|
|
29
|
-
end
|
|
19
|
+
cookbook 'git'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Application_Git Changelog
|
|
2
2
|
|
|
3
|
+
## v1.1.0
|
|
4
|
+
|
|
5
|
+
* [#2](https://github.com/poise/application_git/issues/2) – Inherit user and group values from the parent `application` resource.
|
|
6
|
+
* [#3](https://github.com/poise/application_git/issues/3) – Fix usage with users created during the current Chef run.
|
|
7
|
+
|
|
3
8
|
## v1.0.0
|
|
4
9
|
|
|
5
10
|
* Initial release.
|
data/Gemfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright 2015, Noah Kantrowitz
|
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
# you may not use this file except in compliance with the License.
|
|
@@ -31,4 +31,6 @@ dev_gem 'halite'
|
|
|
31
31
|
dev_gem 'poise'
|
|
32
32
|
dev_gem 'poise-application', path: '../application'
|
|
33
33
|
dev_gem 'poise-boiler'
|
|
34
|
+
dev_gem 'poise-profiler'
|
|
34
35
|
dev_gem 'poise-service'
|
|
36
|
+
|
data/README.md
CHANGED
|
@@ -93,7 +93,7 @@ The Poise test server infrastructure is sponsored by [Rackspace](https://rackspa
|
|
|
93
93
|
|
|
94
94
|
## License
|
|
95
95
|
|
|
96
|
-
Copyright 2015, Noah Kantrowitz
|
|
96
|
+
Copyright 2015-2016, Noah Kantrowitz
|
|
97
97
|
|
|
98
98
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
99
99
|
you may not use this file except in compliance with the License.
|
data/Rakefile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright 2015, Noah Kantrowitz
|
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
# you may not use this file except in compliance with the License.
|
|
@@ -50,12 +50,23 @@ module PoiseApplicationGit
|
|
|
50
50
|
# resolver system instead.
|
|
51
51
|
@resource_name = :application_git
|
|
52
52
|
@provider = PoiseApplicationGit::Provider
|
|
53
|
+
# Clear defaults in older versions of Chef.
|
|
54
|
+
remove_instance_variable(:@group) if instance_variable_defined?(:@group)
|
|
55
|
+
remove_instance_variable(:@user) if instance_variable_defined?(:@user)
|
|
53
56
|
end
|
|
54
57
|
|
|
58
|
+
# @!attribute group
|
|
59
|
+
# Group to run git as. Defaults to the application group.
|
|
60
|
+
# @return [String, Integer, nil, false]
|
|
61
|
+
attribute(:group, kind_of: [String, Integer, NilClass, FalseClass], default: lazy { parent && parent.group })
|
|
55
62
|
# @!attribute strict_ssh
|
|
56
63
|
# Enable strict SSH host key checking. Defaults to false.
|
|
57
64
|
# @return [Boolean]
|
|
58
65
|
attribute(:strict_ssh, equal_to: [true, false], default: false)
|
|
66
|
+
# @!attribute user
|
|
67
|
+
# User to run git as. Defaults to the application owner.
|
|
68
|
+
# @return [String, Integer, nil, false]
|
|
69
|
+
attribute(:user, kind_of: [String, Integer, NilClass, FalseClass], default: lazy { parent && parent.owner })
|
|
59
70
|
|
|
60
71
|
# @api private
|
|
61
72
|
def after_created
|
|
@@ -70,12 +81,8 @@ module PoiseApplicationGit
|
|
|
70
81
|
# SSH deploy key as either a string value or a path to a key file.
|
|
71
82
|
# @return [String]
|
|
72
83
|
def deploy_key(val=nil)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
ssh_wrapper(ssh_wrapper_path) if !ssh_wrapper
|
|
76
|
-
# Also use a SafeString for literal deploy keys so they aren't shown.
|
|
77
|
-
val = SafeString.new(val) unless deploy_key_is_local?(val)
|
|
78
|
-
end
|
|
84
|
+
# Use a SafeString for literal deploy keys so they aren't shown.
|
|
85
|
+
val = SafeString.new(val) if val && !deploy_key_is_local?(val)
|
|
79
86
|
set_or_return(:deploy_key, val, kind_of: String)
|
|
80
87
|
end
|
|
81
88
|
|
|
@@ -119,6 +126,14 @@ module PoiseApplicationGit
|
|
|
119
126
|
include PoiseApplication::AppMixin
|
|
120
127
|
provides(:application_git)
|
|
121
128
|
|
|
129
|
+
# @api private
|
|
130
|
+
def initialize(*args)
|
|
131
|
+
super
|
|
132
|
+
# Set the SSH wrapper path in a late-binding kind of way. This better
|
|
133
|
+
# supports situations where the user doesn't exist until Chef converges.
|
|
134
|
+
new_resource.ssh_wrapper(new_resource.ssh_wrapper_path) if new_resource.deploy_key
|
|
135
|
+
end
|
|
136
|
+
|
|
122
137
|
# @api private
|
|
123
138
|
def whyrun_supported?
|
|
124
139
|
false # Just not dealing with this right now
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright 2015, Noah Kantrowitz
|
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
# you may not use this file except in compliance with the License.
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
module PoiseApplicationGit
|
|
19
|
-
VERSION = '1.
|
|
19
|
+
VERSION = '1.1.0'
|
|
20
20
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright 2015, Noah Kantrowitz
|
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
# you may not use this file except in compliance with the License.
|
|
@@ -38,7 +38,8 @@ Gem::Specification.new do |spec|
|
|
|
38
38
|
spec.add_dependency 'poise', '~> 2.0'
|
|
39
39
|
spec.add_dependency 'poise-application', '~> 5.0'
|
|
40
40
|
|
|
41
|
-
spec.add_development_dependency '
|
|
41
|
+
spec.add_development_dependency 'berkshelf', '~> 4.0'
|
|
42
|
+
spec.add_development_dependency 'poise-boiler', '~> 1.6'
|
|
42
43
|
|
|
43
44
|
spec.metadata['halite_dependencies'] = 'git'
|
|
44
45
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
+
|
|
19
|
+
gem 'chef', '~> 12.0.3'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
+
|
|
19
|
+
gem 'chef', '~> 12.1.2'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
+
|
|
19
|
+
gem 'chef', '~> 12.2.1'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
+
|
|
19
|
+
gem 'chef', '~> 12.3.0'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
+
|
|
19
|
+
gem 'chef', '~> 12.4.3'
|
|
20
|
+
# Pending https://github.com/berkshelf/ridley/pull/335
|
|
21
|
+
gem 'ridley', '4.4.1'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
+
|
|
19
|
+
gem 'chef', '~> 12.5.1'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
+
|
|
19
|
+
gem 'chef', '~> 12.6.0'
|
data/test/spec/resource_spec.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright 2015, Noah Kantrowitz
|
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
# you may not use this file except in compliance with the License.
|
|
@@ -29,8 +29,8 @@ describe PoiseApplicationGit::Resource do
|
|
|
29
29
|
|
|
30
30
|
before do
|
|
31
31
|
# Don't actually run the real thing
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
allow_any_instance_of(PoiseApplicationGit::Provider).to receive(:action_sync).and_return(nil)
|
|
33
|
+
allow_any_instance_of(PoiseApplicationGit::Provider).to receive(:include_recipe).with('git').and_return(nil)
|
|
34
34
|
# Unwrap notifying_block
|
|
35
35
|
allow_any_instance_of(PoiseApplicationGit::Provider).to receive(:notifying_block) {|&block| block.call }
|
|
36
36
|
end
|
|
@@ -94,4 +94,47 @@ describe PoiseApplicationGit::Resource do
|
|
|
94
94
|
|
|
95
95
|
it { is_expected.to sync_application_git('https://example.com/test.git').with(destination: '/app', repository: 'https://example.com/test.git', revision: 'HEAD') }
|
|
96
96
|
end # /context with a short name
|
|
97
|
+
|
|
98
|
+
context 'with an application owner' do
|
|
99
|
+
before do
|
|
100
|
+
expect_any_instance_of(PoiseApplicationGit::Provider).to receive(:remote_resolve_reference) {|instance| instance.new_resource.revision }
|
|
101
|
+
end
|
|
102
|
+
recipe do
|
|
103
|
+
application '/app' do
|
|
104
|
+
owner 'myuser'
|
|
105
|
+
application_git 'https://example.com/test.git'
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
it { is_expected.to sync_application_git('https://example.com/test.git').with(user: 'myuser') }
|
|
110
|
+
end # /context with an application owner
|
|
111
|
+
|
|
112
|
+
context 'with an application group' do
|
|
113
|
+
before do
|
|
114
|
+
expect_any_instance_of(PoiseApplicationGit::Provider).to receive(:remote_resolve_reference) {|instance| instance.new_resource.revision }
|
|
115
|
+
end
|
|
116
|
+
recipe do
|
|
117
|
+
application '/app' do
|
|
118
|
+
group 'mygroup'
|
|
119
|
+
application_git 'https://example.com/test.git'
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
it { is_expected.to sync_application_git('https://example.com/test.git').with(group: 'mygroup') }
|
|
124
|
+
end # /context with an application group
|
|
125
|
+
|
|
126
|
+
context 'with a user that does not exist' do
|
|
127
|
+
recipe do
|
|
128
|
+
application_git '/test' do
|
|
129
|
+
action :nothing
|
|
130
|
+
user 'notauser'
|
|
131
|
+
repository 'https://example.com/test.git'
|
|
132
|
+
revision 'd44ec06d0b2a87732e91c005ed2048c824fd63ed'
|
|
133
|
+
deploy_key 'secretkey'
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Just make sure it doesn't crash on compile.
|
|
138
|
+
it { run_chef }
|
|
139
|
+
end # /context with a user that does not exist
|
|
97
140
|
end
|
data/test/spec/spec_helper.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: poise-application-git
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Noah Kantrowitz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-03-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: halite
|
|
@@ -52,20 +52,34 @@ dependencies:
|
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '5.0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: berkshelf
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '4.0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '4.0'
|
|
55
69
|
- !ruby/object:Gem::Dependency
|
|
56
70
|
name: poise-boiler
|
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
|
58
72
|
requirements:
|
|
59
73
|
- - "~>"
|
|
60
74
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '1.
|
|
75
|
+
version: '1.6'
|
|
62
76
|
type: :development
|
|
63
77
|
prerelease: false
|
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
79
|
requirements:
|
|
66
80
|
- - "~>"
|
|
67
81
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '1.
|
|
82
|
+
version: '1.6'
|
|
69
83
|
description: A plugin for poise-application to deploy applications from git.
|
|
70
84
|
email:
|
|
71
85
|
- noah@coderanger.net
|
|
@@ -74,7 +88,6 @@ extensions: []
|
|
|
74
88
|
extra_rdoc_files: []
|
|
75
89
|
files:
|
|
76
90
|
- ".gitignore"
|
|
77
|
-
- ".kitchen.travis.yml"
|
|
78
91
|
- ".kitchen.yml"
|
|
79
92
|
- ".travis.yml"
|
|
80
93
|
- ".yardopts"
|
|
@@ -92,10 +105,17 @@ files:
|
|
|
92
105
|
- lib/poise_application_git/safe_string.rb
|
|
93
106
|
- lib/poise_application_git/version.rb
|
|
94
107
|
- poise-application-git.gemspec
|
|
95
|
-
- test/
|
|
96
|
-
- test/
|
|
108
|
+
- test/cookbook/metadata.rb
|
|
109
|
+
- test/cookbook/recipes/default.rb
|
|
97
110
|
- test/docker/docker.ca
|
|
98
111
|
- test/docker/docker.pem
|
|
112
|
+
- test/gemfiles/chef-12.0.gemfile
|
|
113
|
+
- test/gemfiles/chef-12.1.gemfile
|
|
114
|
+
- test/gemfiles/chef-12.2.gemfile
|
|
115
|
+
- test/gemfiles/chef-12.3.gemfile
|
|
116
|
+
- test/gemfiles/chef-12.4.gemfile
|
|
117
|
+
- test/gemfiles/chef-12.5.gemfile
|
|
118
|
+
- test/gemfiles/chef-12.6.gemfile
|
|
99
119
|
- test/gemfiles/chef-12.gemfile
|
|
100
120
|
- test/gemfiles/master.gemfile
|
|
101
121
|
- test/integration/default/serverspec/default_spec.rb
|
|
@@ -123,15 +143,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
123
143
|
version: '0'
|
|
124
144
|
requirements: []
|
|
125
145
|
rubyforge_project:
|
|
126
|
-
rubygems_version: 2.
|
|
146
|
+
rubygems_version: 2.5.2
|
|
127
147
|
signing_key:
|
|
128
148
|
specification_version: 4
|
|
129
149
|
summary: A plugin for poise-application to deploy applications from git.
|
|
130
150
|
test_files:
|
|
131
|
-
- test/
|
|
132
|
-
- test/
|
|
151
|
+
- test/cookbook/metadata.rb
|
|
152
|
+
- test/cookbook/recipes/default.rb
|
|
133
153
|
- test/docker/docker.ca
|
|
134
154
|
- test/docker/docker.pem
|
|
155
|
+
- test/gemfiles/chef-12.0.gemfile
|
|
156
|
+
- test/gemfiles/chef-12.1.gemfile
|
|
157
|
+
- test/gemfiles/chef-12.2.gemfile
|
|
158
|
+
- test/gemfiles/chef-12.3.gemfile
|
|
159
|
+
- test/gemfiles/chef-12.4.gemfile
|
|
160
|
+
- test/gemfiles/chef-12.5.gemfile
|
|
161
|
+
- test/gemfiles/chef-12.6.gemfile
|
|
135
162
|
- test/gemfiles/chef-12.gemfile
|
|
136
163
|
- test/gemfiles/master.gemfile
|
|
137
164
|
- test/integration/default/serverspec/default_spec.rb
|