poise-application 5.1.0 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -1
- data/.kitchen.yml +1 -6
- data/.travis.yml +61 -22
- data/.yardopts +7 -0
- data/.yo-rc.json +7 -0
- data/CHANGELOG.md +6 -1
- data/Gemfile +4 -3
- data/README.md +7 -6
- data/Rakefile +1 -1
- data/lib/poise_application.rb +1 -1
- data/lib/poise_application/app_file_mixin.rb +6 -3
- data/lib/poise_application/app_mixin.rb +1 -1
- data/lib/poise_application/cheftie.rb +1 -1
- data/lib/poise_application/error.rb +1 -1
- data/lib/poise_application/resources.rb +2 -1
- data/lib/poise_application/resources/application.rb +1 -1
- data/lib/poise_application/resources/application_cookbook_file.rb +1 -1
- data/lib/poise_application/resources/application_directory.rb +50 -0
- data/lib/poise_application/resources/application_file.rb +1 -1
- data/lib/poise_application/resources/application_template.rb +1 -1
- data/lib/poise_application/service_mixin.rb +1 -1
- data/lib/poise_application/utils.rb +1 -1
- data/lib/poise_application/version.rb +2 -2
- data/poise-application.gemspec +5 -3
- data/test/{cookbooks/application_test → cookbook}/metadata.rb +1 -1
- data/test/{cookbooks/application_test → cookbook}/providers/test_plugin.rb +1 -1
- data/test/{cookbooks/application_test → cookbook}/recipes/default.rb +5 -1
- data/test/{cookbooks/application_test → cookbook}/resources/test_plugin.rb +1 -1
- data/test/gemfiles/chef-12.0.gemfile +5 -1
- data/test/gemfiles/chef-12.1.gemfile +5 -1
- data/{Berksfile → test/gemfiles/chef-12.10.gemfile} +7 -12
- data/test/gemfiles/chef-12.11.gemfile +23 -0
- data/test/gemfiles/chef-12.12.gemfile +22 -0
- data/test/gemfiles/chef-12.13.gemfile +22 -0
- data/test/gemfiles/chef-12.14.gemfile +19 -0
- data/test/gemfiles/chef-12.15.gemfile +19 -0
- data/test/gemfiles/chef-12.16.gemfile +19 -0
- data/test/gemfiles/chef-12.17.gemfile +19 -0
- data/test/gemfiles/chef-12.18.gemfile +19 -0
- data/test/gemfiles/chef-12.19.gemfile +19 -0
- data/test/gemfiles/chef-12.2.gemfile +5 -1
- data/test/gemfiles/chef-12.3.gemfile +5 -1
- data/test/gemfiles/chef-12.4.gemfile +6 -1
- data/test/gemfiles/chef-12.5.gemfile +5 -1
- data/test/gemfiles/chef-12.6.gemfile +5 -1
- data/test/gemfiles/chef-12.7.gemfile +23 -0
- data/test/gemfiles/chef-12.8.gemfile +23 -0
- data/test/gemfiles/chef-12.9.gemfile +23 -0
- data/test/gemfiles/chef-12.gemfile +2 -2
- data/test/gemfiles/chef-13.0.gemfile +19 -0
- data/test/gemfiles/chef-13.gemfile +19 -0
- data/test/gemfiles/master.gemfile +11 -6
- data/test/integration/default/serverspec/default_spec.rb +10 -1
- data/test/spec/app_mixin_spec.rb +1 -1
- data/test/spec/resources/application_cookbook_file_spec.rb +4 -4
- data/test/spec/resources/application_directory_spec.rb +100 -0
- data/test/spec/resources/application_file_spec.rb +4 -4
- data/test/spec/resources/application_spec.rb +1 -1
- data/test/spec/resources/application_template_spec.rb +4 -4
- data/test/spec/service_mixin_spec.rb +1 -1
- data/test/spec/spec_helper.rb +1 -1
- data/test/spec/utils_spec.rb +1 -1
- metadata +70 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fbb4b78b4f471f880b356b0ab5254e6438168b8
|
4
|
+
data.tar.gz: 1d3e90eff1e262b3d9167764e823f232e77b2ced
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da5d1a3f254b54ed3d892e05841772298b2f462bab0dbd298cc16e54adca069a0799a9c019cad321b839c6294349be2561afffa0e7d3ee52e61f67a660fe273b
|
7
|
+
data.tar.gz: 477c3f5179f6644adcbdc4a5bd178a25ecaf59ce223dacfd14285c7054e70fd07f067f772f5ee3a969552439fdcc95e5c1267784b8e0e07f726d0af155d586f5
|
data/.gitignore
CHANGED
data/.kitchen.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,28 +1,67 @@
|
|
1
1
|
sudo: false
|
2
2
|
cache: bundler
|
3
3
|
language: ruby
|
4
|
-
rvm:
|
5
|
-
- '2.2'
|
6
|
-
addons:
|
7
|
-
apt:
|
8
|
-
packages:
|
9
|
-
- libgecode-dev
|
10
4
|
env:
|
11
5
|
global:
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
-
|
16
|
-
|
6
|
+
- secure: QXR/BZQJDLzdefxrG4WOJYiUCey9l8hNzc5rAAlVqAGWa7Mg5WaPw9adkPD6StZE3k6NN6dnwrX84wL4x5R89RnB2oCU7e1mxfCPR+RRoQcm+BG/7PcLyFz/jO99wZ9R0DYVrT3PwTfTad6ABaQ+II/f+UZQBh4Xf4+rImMCXo8=
|
7
|
+
- secure: IZ0ingfE5sdwCCrBqIxCtiLI8UDoKQBf8eXGsVcanLRI13yo8Tn58XM+NgYE+WOuiQhfdGC2Q8UX8U3df/KVdqftP+JNZ1At7D55i4Pgy3d0ywvBKaxvhPGEs72krqjfT84bsNx2NZwQko2BHPxw9pozxnrEF/h7WR2GZSlJicI=
|
8
|
+
before_install:
|
9
|
+
- 'if [[ $BUNDLE_GEMFILE == *master.gemfile ]]; then gem update --system; fi'
|
10
|
+
- gem --version
|
11
|
+
- gem install bundler
|
12
|
+
- bundle --version
|
13
|
+
- 'bundle config --local path ${BUNDLE_PATH:-$(dirname $BUNDLE_GEMFILE)/vendor/bundle}'
|
14
|
+
- bundle config --local bin $PWD/bin
|
15
|
+
install: bundle update --jobs=3 --retry=3
|
17
16
|
script:
|
18
|
-
-
|
19
|
-
|
20
|
-
|
21
|
-
-
|
22
|
-
|
23
|
-
-
|
24
|
-
|
25
|
-
-
|
26
|
-
|
27
|
-
-
|
28
|
-
|
17
|
+
- ./bin/rake travis
|
18
|
+
matrix:
|
19
|
+
include:
|
20
|
+
- rvm: 2.3.1
|
21
|
+
gemfile: test/gemfiles/chef-12.gemfile
|
22
|
+
- rvm: 2.4.1
|
23
|
+
gemfile: test/gemfiles/chef-13.gemfile
|
24
|
+
- rvm: 2.1.4
|
25
|
+
gemfile: test/gemfiles/chef-12.0.gemfile
|
26
|
+
- rvm: 2.1.4
|
27
|
+
gemfile: test/gemfiles/chef-12.1.gemfile
|
28
|
+
- rvm: 2.1.4
|
29
|
+
gemfile: test/gemfiles/chef-12.2.gemfile
|
30
|
+
- rvm: 2.1.4
|
31
|
+
gemfile: test/gemfiles/chef-12.3.gemfile
|
32
|
+
- rvm: 2.1.6
|
33
|
+
gemfile: test/gemfiles/chef-12.4.gemfile
|
34
|
+
- rvm: 2.1.6
|
35
|
+
gemfile: test/gemfiles/chef-12.5.gemfile
|
36
|
+
- rvm: 2.1.6
|
37
|
+
gemfile: test/gemfiles/chef-12.6.gemfile
|
38
|
+
- rvm: 2.1.6
|
39
|
+
gemfile: test/gemfiles/chef-12.7.gemfile
|
40
|
+
- rvm: 2.1.6
|
41
|
+
gemfile: test/gemfiles/chef-12.8.gemfile
|
42
|
+
- rvm: 2.1.8
|
43
|
+
gemfile: test/gemfiles/chef-12.9.gemfile
|
44
|
+
- rvm: 2.1.8
|
45
|
+
gemfile: test/gemfiles/chef-12.10.gemfile
|
46
|
+
- rvm: 2.1.8
|
47
|
+
gemfile: test/gemfiles/chef-12.11.gemfile
|
48
|
+
- rvm: 2.1.8
|
49
|
+
gemfile: test/gemfiles/chef-12.12.gemfile
|
50
|
+
- rvm: 2.1.9
|
51
|
+
gemfile: test/gemfiles/chef-12.13.gemfile
|
52
|
+
- rvm: 2.3.1
|
53
|
+
gemfile: test/gemfiles/chef-12.14.gemfile
|
54
|
+
- rvm: 2.3.1
|
55
|
+
gemfile: test/gemfiles/chef-12.15.gemfile
|
56
|
+
- rvm: 2.3.1
|
57
|
+
gemfile: test/gemfiles/chef-12.16.gemfile
|
58
|
+
- rvm: 2.3.1
|
59
|
+
gemfile: test/gemfiles/chef-12.17.gemfile
|
60
|
+
- rvm: 2.3.1
|
61
|
+
gemfile: test/gemfiles/chef-12.18.gemfile
|
62
|
+
- rvm: 2.3.1
|
63
|
+
gemfile: test/gemfiles/chef-12.19.gemfile
|
64
|
+
- rvm: 2.4.1
|
65
|
+
gemfile: test/gemfiles/chef-13.0.gemfile
|
66
|
+
- rvm: 2.4.1
|
67
|
+
gemfile: test/gemfiles/master.gemfile
|
data/.yardopts
ADDED
data/.yo-rc.json
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
# Application Changelog
|
2
2
|
|
3
|
+
## v5.2.0
|
4
|
+
|
5
|
+
* Add `application_directory` resource.
|
6
|
+
* Chef 13 compatibility.
|
7
|
+
|
3
8
|
## v5.1.0
|
4
9
|
|
5
|
-
* Add `application_cookbook_file`, `application_file`, and `application_template resources.
|
10
|
+
* Add `application_cookbook_file`, `application_file`, and `application_template` resources.
|
6
11
|
|
7
12
|
## v5.0.0
|
8
13
|
|
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2009-
|
3
|
-
# Copyright 2015, Noah Kantrowitz
|
2
|
+
# Copyright 2009-2016, Opscode, Inc.
|
3
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
6
|
# you may not use this file except in compliance with the License.
|
@@ -24,7 +24,7 @@ def dev_gem(name, path: File.join('..', name), github: nil)
|
|
24
24
|
if File.exist?(path)
|
25
25
|
gem name, path: path
|
26
26
|
elsif github
|
27
|
-
gem name,
|
27
|
+
gem name, git: "https://gitub.com/#{github}.git"
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -32,3 +32,4 @@ dev_gem 'halite'
|
|
32
32
|
dev_gem 'poise'
|
33
33
|
dev_gem 'poise-boiler'
|
34
34
|
dev_gem 'poise-service'
|
35
|
+
dev_gem 'poise-profiler'
|
data/README.md
CHANGED
@@ -137,9 +137,9 @@ end
|
|
137
137
|
* `action_on_update_immediately` – Run the `action_on_update` notification with
|
138
138
|
`:immediately`. *(default: false)*
|
139
139
|
|
140
|
-
### `application_cookbook_file`, `application_file`, `application_template`
|
140
|
+
### `application_cookbook_file`, `application_directory`, `application_file`, `application_template`
|
141
141
|
|
142
|
-
The `application_cookbook_file`, `application_file`, and `application_template`
|
142
|
+
The `application_cookbook_file`, `application_directory`, `application_file`, and `application_template`
|
143
143
|
resources extend the core Chef resources to take some application-level
|
144
144
|
configuration in to account:
|
145
145
|
|
@@ -148,6 +148,7 @@ application '/opt/myapp' do
|
|
148
148
|
template 'myapp.conf' do
|
149
149
|
source 'myapp.conf.erb'
|
150
150
|
end
|
151
|
+
directory 'logs'
|
151
152
|
end
|
152
153
|
```
|
153
154
|
|
@@ -163,9 +164,9 @@ Some test recipes are available as examples for common application frameworks:
|
|
163
164
|
|
164
165
|
* [Sinatra](https://github.com/poise/application_ruby/blob/master/test/cookbooks/application_ruby_test/recipes/sinatra.rb)
|
165
166
|
* [Rails](https://github.com/poise/application_ruby/blob/master/test/cookbooks/application_ruby_test/recipes/rails.rb)
|
166
|
-
* [Flask](https://github.com/poise/application_python/blob/master/test/
|
167
|
-
* [Django](https://github.com/poise/application_python/blob/master/test/
|
168
|
-
* [Express](https://github.com/poise/application_javascript/blob/master/test/
|
167
|
+
* [Flask](https://github.com/poise/application_python/blob/master/test/cookbook/recipes/flask.rb)
|
168
|
+
* [Django](https://github.com/poise/application_python/blob/master/test/cookbook/recipes/django.rb)
|
169
|
+
* [Express](https://github.com/poise/application_javascript/blob/master/test/cookbook/recipes/express.rb)
|
169
170
|
|
170
171
|
## Upgrading From 4.x
|
171
172
|
|
@@ -244,7 +245,7 @@ The Poise test server infrastructure is sponsored by [Rackspace](https://rackspa
|
|
244
245
|
|
245
246
|
## License
|
246
247
|
|
247
|
-
Copyright 2015, Noah Kantrowitz
|
248
|
+
Copyright 2015-2016, Noah Kantrowitz
|
248
249
|
|
249
250
|
Licensed under the Apache License, Version 2.0 (the "License");
|
250
251
|
you may not use this file except in compliance with the License.
|
data/Rakefile
CHANGED
data/lib/poise_application.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.
|
@@ -48,10 +48,13 @@ module PoiseApplication
|
|
48
48
|
# @return [String, Integer]
|
49
49
|
attribute(:group, kind_of: [String, Integer, NilClass], default: lazy { parent && parent.group })
|
50
50
|
|
51
|
-
# @!attribute
|
51
|
+
# @!attribute owner
|
52
52
|
# Override the default user to be the app owner if unspecified.
|
53
53
|
# @return [String, Integer]
|
54
|
-
attribute(:
|
54
|
+
attribute(:owner, kind_of: [String, Integer, NilClass], default: lazy { parent && parent.owner })
|
55
|
+
|
56
|
+
# For the forgetful.
|
57
|
+
alias_method :user, :owner
|
55
58
|
end
|
56
59
|
|
57
60
|
module Provider
|
@@ -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,6 +16,7 @@
|
|
16
16
|
|
17
17
|
require 'poise_application/resources/application'
|
18
18
|
require 'poise_application/resources/application_cookbook_file'
|
19
|
+
require 'poise_application/resources/application_directory'
|
19
20
|
require 'poise_application/resources/application_file'
|
20
21
|
require 'poise_application/resources/application_template'
|
21
22
|
|
@@ -0,0 +1,50 @@
|
|
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
|
+
require 'poise_application/app_file_mixin'
|
18
|
+
|
19
|
+
|
20
|
+
module PoiseApplication
|
21
|
+
module Resources
|
22
|
+
# (see ApplicationDirectory::Resource)
|
23
|
+
# @since 5.1.0
|
24
|
+
module ApplicationDirectory
|
25
|
+
# An `application_directory` resource to manage Chef files inside and
|
26
|
+
# Application cookbook deployment.
|
27
|
+
#
|
28
|
+
# @provides application_directory
|
29
|
+
# @action create
|
30
|
+
# @action delete
|
31
|
+
# @example
|
32
|
+
# application '/srv/myapp' do
|
33
|
+
# directory 'logs'
|
34
|
+
# end
|
35
|
+
class Resource < Chef::Resource::Directory
|
36
|
+
include PoiseApplication::AppFileMixin
|
37
|
+
provides(:application_directory)
|
38
|
+
actions(:create, :delete)
|
39
|
+
subclass_providers!
|
40
|
+
|
41
|
+
def initialize(*args)
|
42
|
+
super
|
43
|
+
# For older Chef.
|
44
|
+
@resource_name = :application_directory
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
end
|
50
|
+
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.
|
@@ -16,5 +16,5 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
module PoiseApplication
|
19
|
-
VERSION = '5.
|
19
|
+
VERSION = '5.2.0'
|
20
20
|
end
|
data/poise-application.gemspec
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.
|
@@ -26,17 +26,19 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.description = "A Chef cookbook for deploying application code."
|
27
27
|
spec.summary = spec.description
|
28
28
|
spec.homepage = 'https://github.com/poise/application'
|
29
|
-
spec.license = 'Apache
|
29
|
+
spec.license = 'Apache-2.0'
|
30
30
|
spec.metadata['halite_name'] = 'application'
|
31
|
+
spec.metadata['platforms'] = 'any'
|
31
32
|
|
32
33
|
spec.files = `git ls-files`.split($/)
|
33
34
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
34
35
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
35
36
|
spec.require_paths = %w{lib}
|
36
37
|
|
38
|
+
spec.add_dependency 'chef', '>= 12', '< 14'
|
37
39
|
spec.add_dependency 'halite', '~> 1.0'
|
38
40
|
spec.add_dependency 'poise', '~> 2.4'
|
39
41
|
spec.add_dependency 'poise-service', '~> 1.0'
|
40
42
|
|
41
|
-
spec.add_development_dependency 'poise-boiler', '~> 1.
|
43
|
+
spec.add_development_dependency 'poise-boiler', '~> 1.6'
|
42
44
|
end
|