From b020bf1394273ed6386e9f503bc00d14c49e391d Mon Sep 17 00:00:00 2001 From: Matt Bacchi Date: Thu, 17 Mar 2016 21:14:40 -0400 Subject: [PATCH 01/28] update example Django and Flask links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eed6cbe..fea4500 100644 --- a/README.md +++ b/README.md @@ -308,8 +308,8 @@ All actions and properties are the same as the [`python_virtualenv` resource](ht Some test recipes are available as examples for common application frameworks: -* [Flask](https://github.com/poise/application_python/blob/master/test/cookbooks/application_python_test/recipes/flask.rb) -* [Django](https://github.com/poise/application_python/blob/master/test/cookbooks/application_python_test/recipes/django.rb) +* [Flask](https://github.com/poise/application_python/blob/master/test/cookbook/recipes/flask.rb) +* [Django](https://github.com/poise/application_python/blob/master/test/cookbook/recipes/django.rb) ## Sponsors From 4d75f9048e8bc43c3b01beb4717b7dfd25010044 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Tue, 5 Jul 2016 13:50:19 -0700 Subject: [PATCH 02/28] Update Ruby version on Travis. See https://github.com/travis-ci/travis-rubies/issues/19 for details --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index eb6566e..c0cc6d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ sudo: false cache: bundler language: ruby rvm: -- '2.2' +- 2.3.1 addons: apt: packages: From 359c323cd4f2287e489317f98586995499a3cd69 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Mon, 7 Nov 2016 15:48:21 -0500 Subject: [PATCH 03/28] Update docstring. [ci skip] --- lib/poise_application_python/resources/gunicorn.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/poise_application_python/resources/gunicorn.rb b/lib/poise_application_python/resources/gunicorn.rb index ece8198..8f51724 100644 --- a/lib/poise_application_python/resources/gunicorn.rb +++ b/lib/poise_application_python/resources/gunicorn.rb @@ -50,7 +50,7 @@ def port(val) # Compute the default application module to pass to gunicorn. This # checks the app state and then looks for commonly used filenames. - # Raises an exception if no default can be found. + # Returns nil if no default can be found. # # @return [String] def default_app_module From f885a25cc8137ad4e70a149b76f06b07ed610b8e Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Mon, 7 Nov 2016 15:50:29 -0500 Subject: [PATCH 04/28] Update testing harness. --- .travis.yml | 65 ++++++++++++++++++++++---------- poise-application-python.gemspec | 1 + test/gemfiles/chef-12.1.gemfile | 3 ++ test/gemfiles/chef-12.10.gemfile | 22 +++++++++++ test/gemfiles/chef-12.11.gemfile | 22 +++++++++++ test/gemfiles/chef-12.12.gemfile | 21 +++++++++++ test/gemfiles/chef-12.13.gemfile | 21 +++++++++++ test/gemfiles/chef-12.14.gemfile | 19 ++++++++++ test/gemfiles/chef-12.15.gemfile | 19 ++++++++++ test/gemfiles/chef-12.2.gemfile | 3 ++ test/gemfiles/chef-12.3.gemfile | 3 ++ test/gemfiles/chef-12.4.gemfile | 4 +- test/gemfiles/chef-12.5.gemfile | 3 ++ test/gemfiles/chef-12.6.gemfile | 3 ++ test/gemfiles/chef-12.7.gemfile | 22 +++++++++++ test/gemfiles/chef-12.8.gemfile | 22 +++++++++++ test/gemfiles/chef-12.9.gemfile | 22 +++++++++++ test/gemfiles/chef-12.gemfile | 2 +- 18 files changed, 255 insertions(+), 22 deletions(-) create mode 100644 test/gemfiles/chef-12.10.gemfile create mode 100644 test/gemfiles/chef-12.11.gemfile create mode 100644 test/gemfiles/chef-12.12.gemfile create mode 100644 test/gemfiles/chef-12.13.gemfile create mode 100644 test/gemfiles/chef-12.14.gemfile create mode 100644 test/gemfiles/chef-12.15.gemfile create mode 100644 test/gemfiles/chef-12.7.gemfile create mode 100644 test/gemfiles/chef-12.8.gemfile create mode 100644 test/gemfiles/chef-12.9.gemfile diff --git a/.travis.yml b/.travis.yml index c0cc6d5..62068d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,26 +1,51 @@ sudo: false cache: bundler language: ruby -rvm: -- 2.3.1 -addons: - apt: - packages: - - libgecode-dev env: global: - - USE_SYSTEM_GECODE=true - - secure: rz8Ej7Zx5zArH+OwuAsRB8CH0rZVKIAm6nhB29wg73d7FrMv6cWEl5/B2uQqlefqZ1GYosAifhmoW7lVB1S2O9pDPB8wSpr2P9dsaHEupad4jBi6rIufxoCrx3YZIFPcmvL71u2+STi021VQpsXjcwfP6h2i+pVkPXxVr0Ihv3U= -before_install: "gem install bundler" -bundler_args: "--binstubs=$PWD/bin --jobs 3 --retry 3" + - secure: rz8Ej7Zx5zArH+OwuAsRB8CH0rZVKIAm6nhB29wg73d7FrMv6cWEl5/B2uQqlefqZ1GYosAifhmoW7lVB1S2O9pDPB8wSpr2P9dsaHEupad4jBi6rIufxoCrx3YZIFPcmvL71u2+STi021VQpsXjcwfP6h2i+pVkPXxVr0Ihv3U= + - USE_SYSTEM_GECODE=true +before_install: gem install bundler +bundler_args: '--binstubs=$PWD/bin --jobs 3 --retry 3' script: -- "./bin/rake travis" -gemfile: -- test/gemfiles/chef-12.gemfile -- test/gemfiles/chef-12.1.gemfile -- test/gemfiles/chef-12.2.gemfile -- test/gemfiles/chef-12.3.gemfile -- test/gemfiles/chef-12.4.gemfile -- test/gemfiles/chef-12.5.gemfile -- test/gemfiles/chef-12.6.gemfile -- test/gemfiles/master.gemfile + - ./bin/rake travis +matrix: + include: + - rvm: 2.3.1 + gemfile: test/gemfiles/chef-12.gemfile + - rvm: 2.1.4 + gemfile: test/gemfiles/chef-12.1.gemfile + - rvm: 2.1.4 + gemfile: test/gemfiles/chef-12.2.gemfile + - rvm: 2.1.4 + gemfile: test/gemfiles/chef-12.3.gemfile + - rvm: 2.1.6 + gemfile: test/gemfiles/chef-12.4.gemfile + - rvm: 2.1.6 + gemfile: test/gemfiles/chef-12.5.gemfile + - rvm: 2.1.6 + gemfile: test/gemfiles/chef-12.6.gemfile + - rvm: 2.1.6 + gemfile: test/gemfiles/chef-12.7.gemfile + - rvm: 2.1.6 + gemfile: test/gemfiles/chef-12.8.gemfile + - rvm: 2.1.8 + gemfile: test/gemfiles/chef-12.9.gemfile + - rvm: 2.1.8 + gemfile: test/gemfiles/chef-12.10.gemfile + - rvm: 2.1.8 + gemfile: test/gemfiles/chef-12.11.gemfile + - rvm: 2.1.8 + gemfile: test/gemfiles/chef-12.12.gemfile + - rvm: 2.1.9 + gemfile: test/gemfiles/chef-12.13.gemfile + - rvm: 2.3.1 + gemfile: test/gemfiles/chef-12.14.gemfile + - rvm: 2.3.1 + gemfile: test/gemfiles/chef-12.15.gemfile + - rvm: 2.3.1 + gemfile: test/gemfiles/master.gemfile +addons: + apt: + packages: + - libgecode-dev diff --git a/poise-application-python.gemspec b/poise-application-python.gemspec index b0e9d19..6e70cf0 100644 --- a/poise-application-python.gemspec +++ b/poise-application-python.gemspec @@ -34,6 +34,7 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = %w{lib} + spec.add_dependency 'chef', '~> 12.1' spec.add_dependency 'halite', '~> 1.0' spec.add_dependency 'poise', '~> 2.0' spec.add_dependency 'poise-application', '~> 5.0' diff --git a/test/gemfiles/chef-12.1.gemfile b/test/gemfiles/chef-12.1.gemfile index d06524e..46d9d2c 100644 --- a/test/gemfiles/chef-12.1.gemfile +++ b/test/gemfiles/chef-12.1.gemfile @@ -17,3 +17,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.1.2' +gem 'rack', '< 2' +gem 'foodcritic', '< 8' +gem 'fauxhai', '<= 3.9.0' diff --git a/test/gemfiles/chef-12.10.gemfile b/test/gemfiles/chef-12.10.gemfile new file mode 100644 index 0000000..44c9ef6 --- /dev/null +++ b/test/gemfiles/chef-12.10.gemfile @@ -0,0 +1,22 @@ +# +# Copyright 2016, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 12.10.24' +gem 'rack', '< 2' +gem 'foodcritic', '< 8' +gem 'fauxhai', '<= 3.9.0' diff --git a/test/gemfiles/chef-12.11.gemfile b/test/gemfiles/chef-12.11.gemfile new file mode 100644 index 0000000..8e39522 --- /dev/null +++ b/test/gemfiles/chef-12.11.gemfile @@ -0,0 +1,22 @@ +# +# Copyright 2016, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 12.11.18' +gem 'rack', '< 2' +gem 'foodcritic', '< 8' +gem 'fauxhai', '<= 3.9.0' diff --git a/test/gemfiles/chef-12.12.gemfile b/test/gemfiles/chef-12.12.gemfile new file mode 100644 index 0000000..d11f0e3 --- /dev/null +++ b/test/gemfiles/chef-12.12.gemfile @@ -0,0 +1,21 @@ +# +# Copyright 2016, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 12.12.15' +gem 'foodcritic', '< 8' +gem 'fauxhai', '<= 3.9.0' diff --git a/test/gemfiles/chef-12.13.gemfile b/test/gemfiles/chef-12.13.gemfile new file mode 100644 index 0000000..5334cda --- /dev/null +++ b/test/gemfiles/chef-12.13.gemfile @@ -0,0 +1,21 @@ +# +# Copyright 2016, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 12.13.37' +gem 'foodcritic', '< 8' +gem 'fauxhai', '<= 3.9.0' diff --git a/test/gemfiles/chef-12.14.gemfile b/test/gemfiles/chef-12.14.gemfile new file mode 100644 index 0000000..85816f7 --- /dev/null +++ b/test/gemfiles/chef-12.14.gemfile @@ -0,0 +1,19 @@ +# +# Copyright 2016, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 12.14.89' diff --git a/test/gemfiles/chef-12.15.gemfile b/test/gemfiles/chef-12.15.gemfile new file mode 100644 index 0000000..7bea12d --- /dev/null +++ b/test/gemfiles/chef-12.15.gemfile @@ -0,0 +1,19 @@ +# +# Copyright 2016, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 12.15.19' diff --git a/test/gemfiles/chef-12.2.gemfile b/test/gemfiles/chef-12.2.gemfile index 7b7ce03..1701010 100644 --- a/test/gemfiles/chef-12.2.gemfile +++ b/test/gemfiles/chef-12.2.gemfile @@ -17,3 +17,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.2.1' +gem 'rack', '< 2' +gem 'foodcritic', '< 8' +gem 'fauxhai', '<= 3.9.0' diff --git a/test/gemfiles/chef-12.3.gemfile b/test/gemfiles/chef-12.3.gemfile index b670201..595db0d 100644 --- a/test/gemfiles/chef-12.3.gemfile +++ b/test/gemfiles/chef-12.3.gemfile @@ -17,3 +17,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.3.0' +gem 'rack', '< 2' +gem 'foodcritic', '< 8' +gem 'fauxhai', '<= 3.9.0' diff --git a/test/gemfiles/chef-12.4.gemfile b/test/gemfiles/chef-12.4.gemfile index 2f1f66c..ab2643b 100644 --- a/test/gemfiles/chef-12.4.gemfile +++ b/test/gemfiles/chef-12.4.gemfile @@ -17,5 +17,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.4.3' -# Pending https://github.com/berkshelf/ridley/pull/335 +gem 'rack', '< 2' gem 'ridley', '4.4.1' +gem 'foodcritic', '< 8' +gem 'fauxhai', '<= 3.9.0' diff --git a/test/gemfiles/chef-12.5.gemfile b/test/gemfiles/chef-12.5.gemfile index 09ec87d..bb14884 100644 --- a/test/gemfiles/chef-12.5.gemfile +++ b/test/gemfiles/chef-12.5.gemfile @@ -17,3 +17,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.5.1' +gem 'rack', '< 2' +gem 'foodcritic', '< 8' +gem 'fauxhai', '<= 3.9.0' diff --git a/test/gemfiles/chef-12.6.gemfile b/test/gemfiles/chef-12.6.gemfile index b220e23..7eb8bbc 100644 --- a/test/gemfiles/chef-12.6.gemfile +++ b/test/gemfiles/chef-12.6.gemfile @@ -17,3 +17,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.6.0' +gem 'rack', '< 2' +gem 'foodcritic', '< 8' +gem 'fauxhai', '<= 3.9.0' diff --git a/test/gemfiles/chef-12.7.gemfile b/test/gemfiles/chef-12.7.gemfile new file mode 100644 index 0000000..0ad2264 --- /dev/null +++ b/test/gemfiles/chef-12.7.gemfile @@ -0,0 +1,22 @@ +# +# Copyright 2016, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 12.7.2' +gem 'rack', '< 2' +gem 'foodcritic', '< 8' +gem 'fauxhai', '<= 3.9.0' diff --git a/test/gemfiles/chef-12.8.gemfile b/test/gemfiles/chef-12.8.gemfile new file mode 100644 index 0000000..7d4e86f --- /dev/null +++ b/test/gemfiles/chef-12.8.gemfile @@ -0,0 +1,22 @@ +# +# Copyright 2016, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 12.8.1' +gem 'rack', '< 2' +gem 'foodcritic', '< 8' +gem 'fauxhai', '<= 3.9.0' diff --git a/test/gemfiles/chef-12.9.gemfile b/test/gemfiles/chef-12.9.gemfile new file mode 100644 index 0000000..23d7769 --- /dev/null +++ b/test/gemfiles/chef-12.9.gemfile @@ -0,0 +1,22 @@ +# +# Copyright 2016, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 12.9.41' +gem 'rack', '< 2' +gem 'foodcritic', '< 8' +gem 'fauxhai', '<= 3.9.0' diff --git a/test/gemfiles/chef-12.gemfile b/test/gemfiles/chef-12.gemfile index b27748e..325c822 100644 --- a/test/gemfiles/chef-12.gemfile +++ b/test/gemfiles/chef-12.gemfile @@ -16,4 +16,4 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) -gem 'chef', '~> 12.6' +gem 'chef', '~> 12.15' From 204018f28bae634ea622d59f5d552d536dcf9780 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Wed, 9 Nov 2016 21:06:30 -0500 Subject: [PATCH 05/28] Use poise-python from master for now. --- Gemfile | 2 +- test/gemfiles/master.gemfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 25e422c..0ab5ee3 100644 --- a/Gemfile +++ b/Gemfile @@ -34,5 +34,5 @@ dev_gem 'poise-application-git', path: '../application_git' dev_gem 'poise-boiler' dev_gem 'poise-languages' dev_gem 'poise-profiler' -dev_gem 'poise-python' +dev_gem 'poise-python', github: 'poise/poise-python' dev_gem 'poise-service' diff --git a/test/gemfiles/master.gemfile b/test/gemfiles/master.gemfile index a284541..72ae8d3 100644 --- a/test/gemfiles/master.gemfile +++ b/test/gemfiles/master.gemfile @@ -24,5 +24,5 @@ gem 'poise-application-git', github: 'poise/application_git' gem 'poise-boiler', github: 'poise/poise-boiler' gem 'poise-languages', github: 'poise/poise-languages' gem 'poise-profiler', github: 'poise/poise-profiler' -gem 'poise-python', github: 'poise/poise-python' +# gem 'poise-python', github: 'poise/poise-python' gem 'poise-service', github: 'poise/poise-service' From a7b30f6414e2e8c09d9f5dde058d7bed79801079 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Wed, 9 Nov 2016 21:06:57 -0500 Subject: [PATCH 06/28] Make pypy3 work again by switching to the 3.3 compat alpha, which works with pip 9. --- test/cookbook/recipes/django.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cookbook/recipes/django.rb b/test/cookbook/recipes/django.rb index 4d15589..49e4a41 100644 --- a/test/cookbook/recipes/django.rb +++ b/test/cookbook/recipes/django.rb @@ -19,7 +19,7 @@ application '/opt/test_django' do git 'https://github.com/poise/test_django.git' - python 'pypy3' + python 'pypy3-5.5' virtualenv pip_requirements django do From d0532329096692e7cae41797d919f6570acb53b5 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Fri, 18 Nov 2016 15:15:22 -0500 Subject: [PATCH 07/28] Update test harness. --- test/gemfiles/chef-12.4.gemfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/gemfiles/chef-12.4.gemfile b/test/gemfiles/chef-12.4.gemfile index ab2643b..d7a2c2c 100644 --- a/test/gemfiles/chef-12.4.gemfile +++ b/test/gemfiles/chef-12.4.gemfile @@ -18,6 +18,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.4.3' gem 'rack', '< 2' -gem 'ridley', '4.4.1' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' +gem 'ridley', '4.4.1' +gem 'gh', '0.14.0' From 30bed64eff40cf10414df3001b2e0f2faece3032 Mon Sep 17 00:00:00 2001 From: Farshid Ghods Date: Thu, 22 Dec 2016 13:23:28 -0800 Subject: [PATCH 08/28] allow the user to pass worker_pool to the celery_worker worker_pool can not be set in the celery configuration and it needs to be set via -P option while starting the worker i added it to the celery_worker.rb ref: http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-worker_pool --- lib/poise_application_python/resources/celery_worker.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/poise_application_python/resources/celery_worker.rb b/lib/poise_application_python/resources/celery_worker.rb index 2bb6513..0306da2 100644 --- a/lib/poise_application_python/resources/celery_worker.rb +++ b/lib/poise_application_python/resources/celery_worker.rb @@ -29,6 +29,7 @@ class Resource < Chef::Resource include PoiseApplicationPython::ServiceMixin provides(:application_celery_worker) + attribute(:worker_pool, kind_of: [String, NilClass], default: "prefork") attribute(:app_module, kind_of: [String, NilClass], default: lazy { default_app_module }) private @@ -68,7 +69,7 @@ class Provider < Chef::Provider def service_options(resource) super raise PoiseApplicationPython::Error.new("Unable to determine app module for #{new_resource}") unless new_resource.app_module - resource.command("#{new_resource.python} -m celery --app=#{new_resource.app_module} worker") + resource.command("#{new_resource.python} -m celery --app=#{new_resource.app_module} -P #{new_resource.worker_pool} worker") end end From 7bd0c9a97e1dbf0c6ff173239d741879d0a84105 Mon Sep 17 00:00:00 2001 From: Farshid Ghods Date: Thu, 22 Dec 2016 13:32:50 -0800 Subject: [PATCH 09/28] updated the README file to reflect changes made to celery_worker --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fea4500..1b563bc 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,7 @@ end * `path` – Base path for the application. *(name attribute)* * `app_module` – Celery application module. *(default: auto-detect)* +* `worker_pool` – The Pool implementation used by the Celery worker (gevent,eventlet or prefork). *(default: prefork)* * `service_name` – Name of the service to create. *(default: auto-detect)* # `user` – User to run the service as. *(default: application owner)* From 43e3ac18d7000ce795753c6797e1afbda05cd10a Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Sun, 1 Jan 2017 14:05:27 -0800 Subject: [PATCH 10/28] Update test harness. --- .travis.yml | 4 ++++ test/gemfiles/chef-12.1.gemfile | 2 ++ test/gemfiles/chef-12.10.gemfile | 2 ++ test/gemfiles/chef-12.11.gemfile | 2 ++ test/gemfiles/chef-12.12.gemfile | 2 ++ test/gemfiles/chef-12.13.gemfile | 2 ++ test/gemfiles/chef-12.16.gemfile | 19 +++++++++++++++++++ test/gemfiles/chef-12.17.gemfile | 19 +++++++++++++++++++ test/gemfiles/chef-12.2.gemfile | 2 ++ test/gemfiles/chef-12.3.gemfile | 2 ++ test/gemfiles/chef-12.4.gemfile | 4 +++- test/gemfiles/chef-12.5.gemfile | 2 ++ test/gemfiles/chef-12.6.gemfile | 2 ++ test/gemfiles/chef-12.7.gemfile | 2 ++ test/gemfiles/chef-12.8.gemfile | 2 ++ test/gemfiles/chef-12.9.gemfile | 2 ++ test/gemfiles/chef-12.gemfile | 2 +- 17 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 test/gemfiles/chef-12.16.gemfile create mode 100644 test/gemfiles/chef-12.17.gemfile diff --git a/.travis.yml b/.travis.yml index 62068d3..dba0b5c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,10 @@ matrix: gemfile: test/gemfiles/chef-12.14.gemfile - rvm: 2.3.1 gemfile: test/gemfiles/chef-12.15.gemfile + - rvm: 2.3.1 + gemfile: test/gemfiles/chef-12.16.gemfile + - rvm: 2.3.1 + gemfile: test/gemfiles/chef-12.17.gemfile - rvm: 2.3.1 gemfile: test/gemfiles/master.gemfile addons: diff --git a/test/gemfiles/chef-12.1.gemfile b/test/gemfiles/chef-12.1.gemfile index 46d9d2c..943d54f 100644 --- a/test/gemfiles/chef-12.1.gemfile +++ b/test/gemfiles/chef-12.1.gemfile @@ -20,3 +20,5 @@ gem 'chef', '~> 12.1.2' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' +gem 'nio4r', '< 2' +gem 'buff-extensions', '< 2' diff --git a/test/gemfiles/chef-12.10.gemfile b/test/gemfiles/chef-12.10.gemfile index 44c9ef6..38fe1ae 100644 --- a/test/gemfiles/chef-12.10.gemfile +++ b/test/gemfiles/chef-12.10.gemfile @@ -20,3 +20,5 @@ gem 'chef', '~> 12.10.24' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' +gem 'nio4r', '< 2' +gem 'buff-extensions', '< 2' diff --git a/test/gemfiles/chef-12.11.gemfile b/test/gemfiles/chef-12.11.gemfile index 8e39522..f854da7 100644 --- a/test/gemfiles/chef-12.11.gemfile +++ b/test/gemfiles/chef-12.11.gemfile @@ -20,3 +20,5 @@ gem 'chef', '~> 12.11.18' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' +gem 'nio4r', '< 2' +gem 'buff-extensions', '< 2' diff --git a/test/gemfiles/chef-12.12.gemfile b/test/gemfiles/chef-12.12.gemfile index d11f0e3..8502fd1 100644 --- a/test/gemfiles/chef-12.12.gemfile +++ b/test/gemfiles/chef-12.12.gemfile @@ -19,3 +19,5 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.12.15' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' +gem 'nio4r', '< 2' +gem 'buff-extensions', '< 2' diff --git a/test/gemfiles/chef-12.13.gemfile b/test/gemfiles/chef-12.13.gemfile index 5334cda..780276b 100644 --- a/test/gemfiles/chef-12.13.gemfile +++ b/test/gemfiles/chef-12.13.gemfile @@ -19,3 +19,5 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.13.37' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' +gem 'nio4r', '< 2' +gem 'buff-extensions', '< 2' diff --git a/test/gemfiles/chef-12.16.gemfile b/test/gemfiles/chef-12.16.gemfile new file mode 100644 index 0000000..601a96c --- /dev/null +++ b/test/gemfiles/chef-12.16.gemfile @@ -0,0 +1,19 @@ +# +# Copyright 2017, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 12.16.42' diff --git a/test/gemfiles/chef-12.17.gemfile b/test/gemfiles/chef-12.17.gemfile new file mode 100644 index 0000000..2b2dbab --- /dev/null +++ b/test/gemfiles/chef-12.17.gemfile @@ -0,0 +1,19 @@ +# +# Copyright 2017, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 12.17.44' diff --git a/test/gemfiles/chef-12.2.gemfile b/test/gemfiles/chef-12.2.gemfile index 1701010..8fc6b63 100644 --- a/test/gemfiles/chef-12.2.gemfile +++ b/test/gemfiles/chef-12.2.gemfile @@ -20,3 +20,5 @@ gem 'chef', '~> 12.2.1' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' +gem 'nio4r', '< 2' +gem 'buff-extensions', '< 2' diff --git a/test/gemfiles/chef-12.3.gemfile b/test/gemfiles/chef-12.3.gemfile index 595db0d..6b8b3c7 100644 --- a/test/gemfiles/chef-12.3.gemfile +++ b/test/gemfiles/chef-12.3.gemfile @@ -20,3 +20,5 @@ gem 'chef', '~> 12.3.0' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' +gem 'nio4r', '< 2' +gem 'buff-extensions', '< 2' diff --git a/test/gemfiles/chef-12.4.gemfile b/test/gemfiles/chef-12.4.gemfile index d7a2c2c..d3f8bf5 100644 --- a/test/gemfiles/chef-12.4.gemfile +++ b/test/gemfiles/chef-12.4.gemfile @@ -20,5 +20,7 @@ gem 'chef', '~> 12.4.3' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' -gem 'ridley', '4.4.1' gem 'gh', '0.14.0' +gem 'nio4r', '< 2' +gem 'buff-extensions', '< 2' +gem 'ridley', '4.4.1' diff --git a/test/gemfiles/chef-12.5.gemfile b/test/gemfiles/chef-12.5.gemfile index bb14884..5027835 100644 --- a/test/gemfiles/chef-12.5.gemfile +++ b/test/gemfiles/chef-12.5.gemfile @@ -20,3 +20,5 @@ gem 'chef', '~> 12.5.1' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' +gem 'nio4r', '< 2' +gem 'buff-extensions', '< 2' diff --git a/test/gemfiles/chef-12.6.gemfile b/test/gemfiles/chef-12.6.gemfile index 7eb8bbc..9b8d2c6 100644 --- a/test/gemfiles/chef-12.6.gemfile +++ b/test/gemfiles/chef-12.6.gemfile @@ -20,3 +20,5 @@ gem 'chef', '~> 12.6.0' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' +gem 'nio4r', '< 2' +gem 'buff-extensions', '< 2' diff --git a/test/gemfiles/chef-12.7.gemfile b/test/gemfiles/chef-12.7.gemfile index 0ad2264..a1b4716 100644 --- a/test/gemfiles/chef-12.7.gemfile +++ b/test/gemfiles/chef-12.7.gemfile @@ -20,3 +20,5 @@ gem 'chef', '~> 12.7.2' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' +gem 'nio4r', '< 2' +gem 'buff-extensions', '< 2' diff --git a/test/gemfiles/chef-12.8.gemfile b/test/gemfiles/chef-12.8.gemfile index 7d4e86f..5bda051 100644 --- a/test/gemfiles/chef-12.8.gemfile +++ b/test/gemfiles/chef-12.8.gemfile @@ -20,3 +20,5 @@ gem 'chef', '~> 12.8.1' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' +gem 'nio4r', '< 2' +gem 'buff-extensions', '< 2' diff --git a/test/gemfiles/chef-12.9.gemfile b/test/gemfiles/chef-12.9.gemfile index 23d7769..c30fe2a 100644 --- a/test/gemfiles/chef-12.9.gemfile +++ b/test/gemfiles/chef-12.9.gemfile @@ -20,3 +20,5 @@ gem 'chef', '~> 12.9.41' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' +gem 'nio4r', '< 2' +gem 'buff-extensions', '< 2' diff --git a/test/gemfiles/chef-12.gemfile b/test/gemfiles/chef-12.gemfile index 325c822..8327c89 100644 --- a/test/gemfiles/chef-12.gemfile +++ b/test/gemfiles/chef-12.gemfile @@ -16,4 +16,4 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) -gem 'chef', '~> 12.15' +gem 'chef', '~> 12.17' From 6928ba83699835f418b187a024d51b592f763486 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Sun, 1 Jan 2017 14:06:20 -0800 Subject: [PATCH 11/28] Update copyright years. --- Berksfile | 2 +- Gemfile | 2 +- README.md | 2 +- Rakefile | 2 +- lib/poise_application_python.rb | 2 +- lib/poise_application_python/app_mixin.rb | 2 +- lib/poise_application_python/cheftie.rb | 2 +- lib/poise_application_python/error.rb | 2 +- lib/poise_application_python/resources.rb | 2 +- lib/poise_application_python/resources/celery_beat.rb | 2 +- lib/poise_application_python/resources/celery_config.rb | 2 +- lib/poise_application_python/resources/celery_worker.rb | 2 +- lib/poise_application_python/resources/django.rb | 4 ++-- lib/poise_application_python/resources/gunicorn.rb | 2 +- lib/poise_application_python/resources/pip_requirements.rb | 2 +- lib/poise_application_python/resources/python.rb | 2 +- lib/poise_application_python/resources/python_execute.rb | 2 +- lib/poise_application_python/resources/python_package.rb | 2 +- lib/poise_application_python/resources/virtualenv.rb | 2 +- lib/poise_application_python/service_mixin.rb | 2 +- lib/poise_application_python/version.rb | 2 +- poise-application-python.gemspec | 2 +- test/cookbook/attributes/default.rb | 2 +- test/cookbook/metadata.rb | 2 +- test/cookbook/recipes/default.rb | 2 +- test/cookbook/recipes/django.rb | 2 +- test/cookbook/recipes/flask.rb | 2 +- test/gemfiles/chef-12.1.gemfile | 2 +- test/gemfiles/chef-12.10.gemfile | 2 +- test/gemfiles/chef-12.11.gemfile | 2 +- test/gemfiles/chef-12.12.gemfile | 2 +- test/gemfiles/chef-12.13.gemfile | 2 +- test/gemfiles/chef-12.14.gemfile | 2 +- test/gemfiles/chef-12.15.gemfile | 2 +- test/gemfiles/chef-12.2.gemfile | 2 +- test/gemfiles/chef-12.3.gemfile | 2 +- test/gemfiles/chef-12.4.gemfile | 2 +- test/gemfiles/chef-12.5.gemfile | 2 +- test/gemfiles/chef-12.6.gemfile | 2 +- test/gemfiles/chef-12.7.gemfile | 2 +- test/gemfiles/chef-12.8.gemfile | 2 +- test/gemfiles/chef-12.9.gemfile | 2 +- test/gemfiles/chef-12.gemfile | 2 +- test/gemfiles/master.gemfile | 2 +- test/integration/default/serverspec/default_spec.rb | 2 +- test/integration/default/serverspec/django_spec.rb | 2 +- test/integration/default/serverspec/flask_spec.rb | 2 +- test/spec/app_mixin_spec.rb | 2 +- test/spec/resources/celery_config_spec.rb | 2 +- test/spec/resources/django_spec.rb | 2 +- test/spec/resources/gunicorn_spec.rb | 2 +- test/spec/resources/python_execute_spec.rb | 2 +- test/spec/resources/python_spec.rb | 2 +- test/spec/resources/virtualenv_spec.rb | 2 +- test/spec/spec_helper.rb | 2 +- 55 files changed, 56 insertions(+), 56 deletions(-) diff --git a/Berksfile b/Berksfile index 5b70b2d..77ce3d7 100644 --- a/Berksfile +++ b/Berksfile @@ -1,7 +1,7 @@ # # Author:: Noah Kantrowitz # -# Copyright 2013-2016, Balanced, Inc. +# Copyright 2013-2017, Balanced, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/Gemfile b/Gemfile index 0ab5ee3..5a2b613 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index fea4500..e20f1a0 100644 --- a/README.md +++ b/README.md @@ -319,7 +319,7 @@ The Poise test server infrastructure is sponsored by [Rackspace](https://rackspa ## License -Copyright 2015-2016, Noah Kantrowitz +Copyright 2015-2017, Noah Kantrowitz Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Rakefile b/Rakefile index 8e19409..d2b12d0 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python.rb b/lib/poise_application_python.rb index b0c9f8c..028595f 100644 --- a/lib/poise_application_python.rb +++ b/lib/poise_application_python.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/app_mixin.rb b/lib/poise_application_python/app_mixin.rb index b5c4d74..048ce6e 100644 --- a/lib/poise_application_python/app_mixin.rb +++ b/lib/poise_application_python/app_mixin.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/cheftie.rb b/lib/poise_application_python/cheftie.rb index ed8a0ad..ad04a51 100644 --- a/lib/poise_application_python/cheftie.rb +++ b/lib/poise_application_python/cheftie.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/error.rb b/lib/poise_application_python/error.rb index 187831f..dfdacd0 100644 --- a/lib/poise_application_python/error.rb +++ b/lib/poise_application_python/error.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/resources.rb b/lib/poise_application_python/resources.rb index 9d69155..a7b8fa3 100644 --- a/lib/poise_application_python/resources.rb +++ b/lib/poise_application_python/resources.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/resources/celery_beat.rb b/lib/poise_application_python/resources/celery_beat.rb index 03700f7..e5664ca 100644 --- a/lib/poise_application_python/resources/celery_beat.rb +++ b/lib/poise_application_python/resources/celery_beat.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/resources/celery_config.rb b/lib/poise_application_python/resources/celery_config.rb index 77bd3d7..f4a835e 100644 --- a/lib/poise_application_python/resources/celery_config.rb +++ b/lib/poise_application_python/resources/celery_config.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/resources/celery_worker.rb b/lib/poise_application_python/resources/celery_worker.rb index 2bb6513..cd0fd2d 100644 --- a/lib/poise_application_python/resources/celery_worker.rb +++ b/lib/poise_application_python/resources/celery_worker.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/resources/django.rb b/lib/poise_application_python/resources/django.rb index 91b9c7c..dbe044c 100644 --- a/lib/poise_application_python/resources/django.rb +++ b/lib/poise_application_python/resources/django.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,7 +32,7 @@ module Resources # @since 4.0.0 module Django # Aliases for Django database engine names. Based on https://github.com/kennethreitz/dj-database-url/blob/master/dj_database_url.py - # Copyright 2014-2016, Kenneth Reitz. + # Copyright 2014-2017, Kenneth Reitz. ENGINE_ALIASES = { 'postgres' => 'django.db.backends.postgresql_psycopg2', 'postgresql' => 'django.db.backends.postgresql_psycopg2', diff --git a/lib/poise_application_python/resources/gunicorn.rb b/lib/poise_application_python/resources/gunicorn.rb index 8f51724..e9daed3 100644 --- a/lib/poise_application_python/resources/gunicorn.rb +++ b/lib/poise_application_python/resources/gunicorn.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/resources/pip_requirements.rb b/lib/poise_application_python/resources/pip_requirements.rb index e01dba8..8c236d8 100644 --- a/lib/poise_application_python/resources/pip_requirements.rb +++ b/lib/poise_application_python/resources/pip_requirements.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/resources/python.rb b/lib/poise_application_python/resources/python.rb index 22ee945..021bec0 100644 --- a/lib/poise_application_python/resources/python.rb +++ b/lib/poise_application_python/resources/python.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/resources/python_execute.rb b/lib/poise_application_python/resources/python_execute.rb index b24f074..646a117 100644 --- a/lib/poise_application_python/resources/python_execute.rb +++ b/lib/poise_application_python/resources/python_execute.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/resources/python_package.rb b/lib/poise_application_python/resources/python_package.rb index e3604bb..54ec9ee 100644 --- a/lib/poise_application_python/resources/python_package.rb +++ b/lib/poise_application_python/resources/python_package.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/resources/virtualenv.rb b/lib/poise_application_python/resources/virtualenv.rb index fba83b7..3bec6fa 100644 --- a/lib/poise_application_python/resources/virtualenv.rb +++ b/lib/poise_application_python/resources/virtualenv.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/service_mixin.rb b/lib/poise_application_python/service_mixin.rb index d21d18b..2c52420 100644 --- a/lib/poise_application_python/service_mixin.rb +++ b/lib/poise_application_python/service_mixin.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/poise_application_python/version.rb b/lib/poise_application_python/version.rb index 80d8e5b..50af440 100644 --- a/lib/poise_application_python/version.rb +++ b/lib/poise_application_python/version.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/poise-application-python.gemspec b/poise-application-python.gemspec index 6e70cf0..9cd2efd 100644 --- a/poise-application-python.gemspec +++ b/poise-application-python.gemspec @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/cookbook/attributes/default.rb b/test/cookbook/attributes/default.rb index 4e6ae40..56cb0d7 100644 --- a/test/cookbook/attributes/default.rb +++ b/test/cookbook/attributes/default.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/cookbook/metadata.rb b/test/cookbook/metadata.rb index 9658053..b5ba1a2 100644 --- a/test/cookbook/metadata.rb +++ b/test/cookbook/metadata.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/cookbook/recipes/default.rb b/test/cookbook/recipes/default.rb index a54694c..e1db35e 100644 --- a/test/cookbook/recipes/default.rb +++ b/test/cookbook/recipes/default.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/cookbook/recipes/django.rb b/test/cookbook/recipes/django.rb index 49e4a41..b6c2f3f 100644 --- a/test/cookbook/recipes/django.rb +++ b/test/cookbook/recipes/django.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/cookbook/recipes/flask.rb b/test/cookbook/recipes/flask.rb index 868dad8..59d98f2 100644 --- a/test/cookbook/recipes/flask.rb +++ b/test/cookbook/recipes/flask.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.1.gemfile b/test/gemfiles/chef-12.1.gemfile index 943d54f..f82c240 100644 --- a/test/gemfiles/chef-12.1.gemfile +++ b/test/gemfiles/chef-12.1.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.10.gemfile b/test/gemfiles/chef-12.10.gemfile index 38fe1ae..5e0b86d 100644 --- a/test/gemfiles/chef-12.10.gemfile +++ b/test/gemfiles/chef-12.10.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2016, Noah Kantrowitz +# Copyright 2016-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.11.gemfile b/test/gemfiles/chef-12.11.gemfile index f854da7..4cd4519 100644 --- a/test/gemfiles/chef-12.11.gemfile +++ b/test/gemfiles/chef-12.11.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2016, Noah Kantrowitz +# Copyright 2016-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.12.gemfile b/test/gemfiles/chef-12.12.gemfile index 8502fd1..4e89d53 100644 --- a/test/gemfiles/chef-12.12.gemfile +++ b/test/gemfiles/chef-12.12.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2016, Noah Kantrowitz +# Copyright 2016-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.13.gemfile b/test/gemfiles/chef-12.13.gemfile index 780276b..192cedc 100644 --- a/test/gemfiles/chef-12.13.gemfile +++ b/test/gemfiles/chef-12.13.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2016, Noah Kantrowitz +# Copyright 2016-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.14.gemfile b/test/gemfiles/chef-12.14.gemfile index 85816f7..e0cb5c1 100644 --- a/test/gemfiles/chef-12.14.gemfile +++ b/test/gemfiles/chef-12.14.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2016, Noah Kantrowitz +# Copyright 2016-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.15.gemfile b/test/gemfiles/chef-12.15.gemfile index 7bea12d..1095dd8 100644 --- a/test/gemfiles/chef-12.15.gemfile +++ b/test/gemfiles/chef-12.15.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2016, Noah Kantrowitz +# Copyright 2016-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.2.gemfile b/test/gemfiles/chef-12.2.gemfile index 8fc6b63..e69d777 100644 --- a/test/gemfiles/chef-12.2.gemfile +++ b/test/gemfiles/chef-12.2.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.3.gemfile b/test/gemfiles/chef-12.3.gemfile index 6b8b3c7..e99f51e 100644 --- a/test/gemfiles/chef-12.3.gemfile +++ b/test/gemfiles/chef-12.3.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.4.gemfile b/test/gemfiles/chef-12.4.gemfile index d3f8bf5..d742275 100644 --- a/test/gemfiles/chef-12.4.gemfile +++ b/test/gemfiles/chef-12.4.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.5.gemfile b/test/gemfiles/chef-12.5.gemfile index 5027835..83a8175 100644 --- a/test/gemfiles/chef-12.5.gemfile +++ b/test/gemfiles/chef-12.5.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.6.gemfile b/test/gemfiles/chef-12.6.gemfile index 9b8d2c6..5aae4fe 100644 --- a/test/gemfiles/chef-12.6.gemfile +++ b/test/gemfiles/chef-12.6.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.7.gemfile b/test/gemfiles/chef-12.7.gemfile index a1b4716..87dc205 100644 --- a/test/gemfiles/chef-12.7.gemfile +++ b/test/gemfiles/chef-12.7.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2016, Noah Kantrowitz +# Copyright 2016-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.8.gemfile b/test/gemfiles/chef-12.8.gemfile index 5bda051..34468bd 100644 --- a/test/gemfiles/chef-12.8.gemfile +++ b/test/gemfiles/chef-12.8.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2016, Noah Kantrowitz +# Copyright 2016-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.9.gemfile b/test/gemfiles/chef-12.9.gemfile index c30fe2a..d98a12f 100644 --- a/test/gemfiles/chef-12.9.gemfile +++ b/test/gemfiles/chef-12.9.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2016, Noah Kantrowitz +# Copyright 2016-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/chef-12.gemfile b/test/gemfiles/chef-12.gemfile index 8327c89..a9effa0 100644 --- a/test/gemfiles/chef-12.gemfile +++ b/test/gemfiles/chef-12.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/gemfiles/master.gemfile b/test/gemfiles/master.gemfile index 72ae8d3..1821fd7 100644 --- a/test/gemfiles/master.gemfile +++ b/test/gemfiles/master.gemfile @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/integration/default/serverspec/default_spec.rb b/test/integration/default/serverspec/default_spec.rb index bea8ab0..7d56643 100644 --- a/test/integration/default/serverspec/default_spec.rb +++ b/test/integration/default/serverspec/default_spec.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/integration/default/serverspec/django_spec.rb b/test/integration/default/serverspec/django_spec.rb index c054c3a..b9d8380 100644 --- a/test/integration/default/serverspec/django_spec.rb +++ b/test/integration/default/serverspec/django_spec.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/integration/default/serverspec/flask_spec.rb b/test/integration/default/serverspec/flask_spec.rb index 45f8e82..8c0d0f2 100644 --- a/test/integration/default/serverspec/flask_spec.rb +++ b/test/integration/default/serverspec/flask_spec.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/spec/app_mixin_spec.rb b/test/spec/app_mixin_spec.rb index ae4e96f..2e34119 100644 --- a/test/spec/app_mixin_spec.rb +++ b/test/spec/app_mixin_spec.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/spec/resources/celery_config_spec.rb b/test/spec/resources/celery_config_spec.rb index 8c5ae3f..846c221 100644 --- a/test/spec/resources/celery_config_spec.rb +++ b/test/spec/resources/celery_config_spec.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/spec/resources/django_spec.rb b/test/spec/resources/django_spec.rb index 65a712e..dccbd3c 100644 --- a/test/spec/resources/django_spec.rb +++ b/test/spec/resources/django_spec.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/spec/resources/gunicorn_spec.rb b/test/spec/resources/gunicorn_spec.rb index 0ba6cb9..77661e5 100644 --- a/test/spec/resources/gunicorn_spec.rb +++ b/test/spec/resources/gunicorn_spec.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/spec/resources/python_execute_spec.rb b/test/spec/resources/python_execute_spec.rb index 0803339..7b64852 100644 --- a/test/spec/resources/python_execute_spec.rb +++ b/test/spec/resources/python_execute_spec.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/spec/resources/python_spec.rb b/test/spec/resources/python_spec.rb index cb819cd..6e5ff3c 100644 --- a/test/spec/resources/python_spec.rb +++ b/test/spec/resources/python_spec.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/spec/resources/virtualenv_spec.rb b/test/spec/resources/virtualenv_spec.rb index e007509..082d2e7 100644 --- a/test/spec/resources/virtualenv_spec.rb +++ b/test/spec/resources/virtualenv_spec.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/spec/spec_helper.rb b/test/spec/spec_helper.rb index 3e9a0bf..2ed212f 100644 --- a/test/spec/spec_helper.rb +++ b/test/spec/spec_helper.rb @@ -1,5 +1,5 @@ # -# Copyright 2015-2016, Noah Kantrowitz +# Copyright 2015-2017, Noah Kantrowitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 376340155701cf23b6856e99e377d9f58c6b08e2 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Thu, 2 Mar 2017 15:16:44 -0800 Subject: [PATCH 12/28] Chef 13 compat. --- poise-application-python.gemspec | 2 +- test/gemfiles/master.gemfile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/poise-application-python.gemspec b/poise-application-python.gemspec index 9cd2efd..49d4f24 100644 --- a/poise-application-python.gemspec +++ b/poise-application-python.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = %w{lib} - spec.add_dependency 'chef', '~> 12.1' + spec.add_dependency 'chef', '>= 12.1', '< 14' spec.add_dependency 'halite', '~> 1.0' spec.add_dependency 'poise', '~> 2.0' spec.add_dependency 'poise-application', '~> 5.0' diff --git a/test/gemfiles/master.gemfile b/test/gemfiles/master.gemfile index 1821fd7..7f04ac5 100644 --- a/test/gemfiles/master.gemfile +++ b/test/gemfiles/master.gemfile @@ -18,6 +18,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', github: 'chef/chef' gem 'halite', github: 'poise/halite' +gem 'ohai', github: 'chef/ohai' gem 'poise', github: 'poise/poise' gem 'poise-application', github: 'poise/application' gem 'poise-application-git', github: 'poise/application_git' From 0ea12f7b5d900dcd83b7ae28c10e5935af70bf5e Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Tue, 11 Apr 2017 21:38:15 -0700 Subject: [PATCH 13/28] Use poise-build-essential. --- Berksfile | 25 ------------------------- poise-application-python.gemspec | 4 ++-- test/cookbook/metadata.rb | 2 +- test/cookbook/recipes/django.rb | 2 +- 4 files changed, 4 insertions(+), 29 deletions(-) delete mode 100644 Berksfile diff --git a/Berksfile b/Berksfile deleted file mode 100644 index 77ce3d7..0000000 --- a/Berksfile +++ /dev/null @@ -1,25 +0,0 @@ -# -# Author:: Noah Kantrowitz -# -# Copyright 2013-2017, Balanced, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -source 'https://supermarket.chef.io/' -extension 'halite' - -group :test do - cookbook 'application_git', gem: 'poise-application-git' - cookbook 'git' -end diff --git a/poise-application-python.gemspec b/poise-application-python.gemspec index 49d4f24..ce606f1 100644 --- a/poise-application-python.gemspec +++ b/poise-application-python.gemspec @@ -41,7 +41,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'poise-python', '~> 1.0' spec.add_dependency 'poise-service', '~> 1.0' - spec.add_development_dependency 'berkshelf', '~> 4.0' spec.add_development_dependency 'poise-boiler', '~> 1.6' - spec.add_development_dependency 'poise-application-git', '~> 1.0' + spec.add_development_dependency 'poise-application-git', '~> 1.2' + spec.add_development_dependency 'poise-build-essential', '~> 1.0' end diff --git a/test/cookbook/metadata.rb b/test/cookbook/metadata.rb index b5ba1a2..149dbeb 100644 --- a/test/cookbook/metadata.rb +++ b/test/cookbook/metadata.rb @@ -17,4 +17,4 @@ name 'application_python_test' depends 'application_git' depends 'application_python' -depends 'build-essential' +depends 'poise-build-essential' diff --git a/test/cookbook/recipes/django.rb b/test/cookbook/recipes/django.rb index b6c2f3f..6e5a59e 100644 --- a/test/cookbook/recipes/django.rb +++ b/test/cookbook/recipes/django.rb @@ -14,7 +14,7 @@ # limitations under the License. # -include_recipe 'build-essential' +include_recipe 'poise-build-essential' include_recipe 'poise-python' application '/opt/test_django' do From e2ee3f49c443b4f42e0b4e687925d7d1774e029b Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Tue, 11 Apr 2017 21:38:55 -0700 Subject: [PATCH 14/28] Use poise-python release. --- Gemfile | 3 ++- test/gemfiles/master.gemfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 5a2b613..60c6dcd 100644 --- a/Gemfile +++ b/Gemfile @@ -31,8 +31,9 @@ dev_gem 'halite' dev_gem 'poise' dev_gem 'poise-application', path: '../application' dev_gem 'poise-application-git', path: '../application_git' +dev_gem 'poise-archive' dev_gem 'poise-boiler' dev_gem 'poise-languages' dev_gem 'poise-profiler' -dev_gem 'poise-python', github: 'poise/poise-python' +dev_gem 'poise-python' dev_gem 'poise-service' diff --git a/test/gemfiles/master.gemfile b/test/gemfiles/master.gemfile index 7f04ac5..b756fde 100644 --- a/test/gemfiles/master.gemfile +++ b/test/gemfiles/master.gemfile @@ -22,8 +22,9 @@ gem 'ohai', github: 'chef/ohai' gem 'poise', github: 'poise/poise' gem 'poise-application', github: 'poise/application' gem 'poise-application-git', github: 'poise/application_git' +gem 'poise-archive', github: 'poise/poise-archive' gem 'poise-boiler', github: 'poise/poise-boiler' gem 'poise-languages', github: 'poise/poise-languages' gem 'poise-profiler', github: 'poise/poise-profiler' -# gem 'poise-python', github: 'poise/poise-python' +gem 'poise-python', github: 'poise/poise-python' gem 'poise-service', github: 'poise/poise-service' From b57748488cf79d8e78e0aa2446ffffe4fac8361a Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Tue, 11 Apr 2017 21:40:32 -0700 Subject: [PATCH 15/28] Update test harness. --- .travis.yml | 23 ++++++++++++++++------- test/gemfiles/chef-12.1.gemfile | 3 +-- test/gemfiles/chef-12.10.gemfile | 3 +-- test/gemfiles/chef-12.11.gemfile | 3 +-- test/gemfiles/chef-12.12.gemfile | 3 +-- test/gemfiles/chef-12.13.gemfile | 3 +-- test/gemfiles/chef-12.18.gemfile | 19 +++++++++++++++++++ test/gemfiles/chef-12.19.gemfile | 19 +++++++++++++++++++ test/gemfiles/chef-12.2.gemfile | 3 +-- test/gemfiles/chef-12.3.gemfile | 3 +-- test/gemfiles/chef-12.4.gemfile | 4 +--- test/gemfiles/chef-12.5.gemfile | 3 +-- test/gemfiles/chef-12.6.gemfile | 3 +-- test/gemfiles/chef-12.7.gemfile | 3 +-- test/gemfiles/chef-12.8.gemfile | 3 +-- test/gemfiles/chef-12.9.gemfile | 3 +-- test/gemfiles/chef-12.gemfile | 2 +- test/gemfiles/chef-13.0.gemfile | 19 +++++++++++++++++++ test/gemfiles/chef-13.gemfile | 19 +++++++++++++++++++ 19 files changed, 106 insertions(+), 35 deletions(-) create mode 100644 test/gemfiles/chef-12.18.gemfile create mode 100644 test/gemfiles/chef-12.19.gemfile create mode 100644 test/gemfiles/chef-13.0.gemfile create mode 100644 test/gemfiles/chef-13.gemfile diff --git a/.travis.yml b/.travis.yml index dba0b5c..d3670b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,15 +4,22 @@ language: ruby env: global: - secure: rz8Ej7Zx5zArH+OwuAsRB8CH0rZVKIAm6nhB29wg73d7FrMv6cWEl5/B2uQqlefqZ1GYosAifhmoW7lVB1S2O9pDPB8wSpr2P9dsaHEupad4jBi6rIufxoCrx3YZIFPcmvL71u2+STi021VQpsXjcwfP6h2i+pVkPXxVr0Ihv3U= - - USE_SYSTEM_GECODE=true -before_install: gem install bundler -bundler_args: '--binstubs=$PWD/bin --jobs 3 --retry 3' +before_install: + - 'if [[ $BUNDLE_GEMFILE == *master.gemfile ]]; then gem update --system; fi' + - gem --version + - gem install bundler + - bundle --version + - 'bundle config --local path ${BUNDLE_PATH:-$(dirname $BUNDLE_GEMFILE)/vendor/bundle}' + - bundle config --local bin $PWD/bin +install: bundle update --jobs=3 --retry=3 script: - ./bin/rake travis matrix: include: - rvm: 2.3.1 gemfile: test/gemfiles/chef-12.gemfile + - rvm: 2.4.1 + gemfile: test/gemfiles/chef-13.gemfile - rvm: 2.1.4 gemfile: test/gemfiles/chef-12.1.gemfile - rvm: 2.1.4 @@ -48,8 +55,10 @@ matrix: - rvm: 2.3.1 gemfile: test/gemfiles/chef-12.17.gemfile - rvm: 2.3.1 + gemfile: test/gemfiles/chef-12.18.gemfile + - rvm: 2.3.1 + gemfile: test/gemfiles/chef-12.19.gemfile + - rvm: 2.4.1 + gemfile: test/gemfiles/chef-13.0.gemfile + - rvm: 2.4.1 gemfile: test/gemfiles/master.gemfile -addons: - apt: - packages: - - libgecode-dev diff --git a/test/gemfiles/chef-12.1.gemfile b/test/gemfiles/chef-12.1.gemfile index f82c240..c7ace12 100644 --- a/test/gemfiles/chef-12.1.gemfile +++ b/test/gemfiles/chef-12.1.gemfile @@ -20,5 +20,4 @@ gem 'chef', '~> 12.1.2' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' -gem 'nio4r', '< 2' -gem 'buff-extensions', '< 2' +gem 'chefspec', '< 6' diff --git a/test/gemfiles/chef-12.10.gemfile b/test/gemfiles/chef-12.10.gemfile index 5e0b86d..4e96ed4 100644 --- a/test/gemfiles/chef-12.10.gemfile +++ b/test/gemfiles/chef-12.10.gemfile @@ -20,5 +20,4 @@ gem 'chef', '~> 12.10.24' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' -gem 'nio4r', '< 2' -gem 'buff-extensions', '< 2' +gem 'chefspec', '< 6' diff --git a/test/gemfiles/chef-12.11.gemfile b/test/gemfiles/chef-12.11.gemfile index 4cd4519..f6f55c6 100644 --- a/test/gemfiles/chef-12.11.gemfile +++ b/test/gemfiles/chef-12.11.gemfile @@ -20,5 +20,4 @@ gem 'chef', '~> 12.11.18' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' -gem 'nio4r', '< 2' -gem 'buff-extensions', '< 2' +gem 'chefspec', '< 6' diff --git a/test/gemfiles/chef-12.12.gemfile b/test/gemfiles/chef-12.12.gemfile index 4e89d53..0b673e4 100644 --- a/test/gemfiles/chef-12.12.gemfile +++ b/test/gemfiles/chef-12.12.gemfile @@ -19,5 +19,4 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.12.15' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' -gem 'nio4r', '< 2' -gem 'buff-extensions', '< 2' +gem 'chefspec', '< 6' diff --git a/test/gemfiles/chef-12.13.gemfile b/test/gemfiles/chef-12.13.gemfile index 192cedc..9cc50eb 100644 --- a/test/gemfiles/chef-12.13.gemfile +++ b/test/gemfiles/chef-12.13.gemfile @@ -19,5 +19,4 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.13.37' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' -gem 'nio4r', '< 2' -gem 'buff-extensions', '< 2' +gem 'chefspec', '< 6' diff --git a/test/gemfiles/chef-12.18.gemfile b/test/gemfiles/chef-12.18.gemfile new file mode 100644 index 0000000..eef6f42 --- /dev/null +++ b/test/gemfiles/chef-12.18.gemfile @@ -0,0 +1,19 @@ +# +# Copyright 2017, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 12.18.31' diff --git a/test/gemfiles/chef-12.19.gemfile b/test/gemfiles/chef-12.19.gemfile new file mode 100644 index 0000000..62c4b98 --- /dev/null +++ b/test/gemfiles/chef-12.19.gemfile @@ -0,0 +1,19 @@ +# +# Copyright 2017, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 12.19.36' diff --git a/test/gemfiles/chef-12.2.gemfile b/test/gemfiles/chef-12.2.gemfile index e69d777..157048b 100644 --- a/test/gemfiles/chef-12.2.gemfile +++ b/test/gemfiles/chef-12.2.gemfile @@ -20,5 +20,4 @@ gem 'chef', '~> 12.2.1' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' -gem 'nio4r', '< 2' -gem 'buff-extensions', '< 2' +gem 'chefspec', '< 6' diff --git a/test/gemfiles/chef-12.3.gemfile b/test/gemfiles/chef-12.3.gemfile index e99f51e..963a1f9 100644 --- a/test/gemfiles/chef-12.3.gemfile +++ b/test/gemfiles/chef-12.3.gemfile @@ -20,5 +20,4 @@ gem 'chef', '~> 12.3.0' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' -gem 'nio4r', '< 2' -gem 'buff-extensions', '< 2' +gem 'chefspec', '< 6' diff --git a/test/gemfiles/chef-12.4.gemfile b/test/gemfiles/chef-12.4.gemfile index d742275..e3a9da2 100644 --- a/test/gemfiles/chef-12.4.gemfile +++ b/test/gemfiles/chef-12.4.gemfile @@ -20,7 +20,5 @@ gem 'chef', '~> 12.4.3' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' +gem 'chefspec', '< 6' gem 'gh', '0.14.0' -gem 'nio4r', '< 2' -gem 'buff-extensions', '< 2' -gem 'ridley', '4.4.1' diff --git a/test/gemfiles/chef-12.5.gemfile b/test/gemfiles/chef-12.5.gemfile index 83a8175..91a0f0d 100644 --- a/test/gemfiles/chef-12.5.gemfile +++ b/test/gemfiles/chef-12.5.gemfile @@ -20,5 +20,4 @@ gem 'chef', '~> 12.5.1' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' -gem 'nio4r', '< 2' -gem 'buff-extensions', '< 2' +gem 'chefspec', '< 6' diff --git a/test/gemfiles/chef-12.6.gemfile b/test/gemfiles/chef-12.6.gemfile index 5aae4fe..2cf21ed 100644 --- a/test/gemfiles/chef-12.6.gemfile +++ b/test/gemfiles/chef-12.6.gemfile @@ -20,5 +20,4 @@ gem 'chef', '~> 12.6.0' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' -gem 'nio4r', '< 2' -gem 'buff-extensions', '< 2' +gem 'chefspec', '< 6' diff --git a/test/gemfiles/chef-12.7.gemfile b/test/gemfiles/chef-12.7.gemfile index 87dc205..d9a353c 100644 --- a/test/gemfiles/chef-12.7.gemfile +++ b/test/gemfiles/chef-12.7.gemfile @@ -20,5 +20,4 @@ gem 'chef', '~> 12.7.2' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' -gem 'nio4r', '< 2' -gem 'buff-extensions', '< 2' +gem 'chefspec', '< 6' diff --git a/test/gemfiles/chef-12.8.gemfile b/test/gemfiles/chef-12.8.gemfile index 34468bd..16834cd 100644 --- a/test/gemfiles/chef-12.8.gemfile +++ b/test/gemfiles/chef-12.8.gemfile @@ -20,5 +20,4 @@ gem 'chef', '~> 12.8.1' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' -gem 'nio4r', '< 2' -gem 'buff-extensions', '< 2' +gem 'chefspec', '< 6' diff --git a/test/gemfiles/chef-12.9.gemfile b/test/gemfiles/chef-12.9.gemfile index d98a12f..7e4aea3 100644 --- a/test/gemfiles/chef-12.9.gemfile +++ b/test/gemfiles/chef-12.9.gemfile @@ -20,5 +20,4 @@ gem 'chef', '~> 12.9.41' gem 'rack', '< 2' gem 'foodcritic', '< 8' gem 'fauxhai', '<= 3.9.0' -gem 'nio4r', '< 2' -gem 'buff-extensions', '< 2' +gem 'chefspec', '< 6' diff --git a/test/gemfiles/chef-12.gemfile b/test/gemfiles/chef-12.gemfile index a9effa0..bd22a0f 100644 --- a/test/gemfiles/chef-12.gemfile +++ b/test/gemfiles/chef-12.gemfile @@ -16,4 +16,4 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) -gem 'chef', '~> 12.17' +gem 'chef', '~> 12.19' diff --git a/test/gemfiles/chef-13.0.gemfile b/test/gemfiles/chef-13.0.gemfile new file mode 100644 index 0000000..ff571d0 --- /dev/null +++ b/test/gemfiles/chef-13.0.gemfile @@ -0,0 +1,19 @@ +# +# Copyright 2017, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 13.0.113' diff --git a/test/gemfiles/chef-13.gemfile b/test/gemfiles/chef-13.gemfile new file mode 100644 index 0000000..f7f40e8 --- /dev/null +++ b/test/gemfiles/chef-13.gemfile @@ -0,0 +1,19 @@ +# +# Copyright 2017, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 13.0' From 6982fb1d7141def5579ec14c953750ff78dd013a Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Wed, 12 Apr 2017 15:42:35 -0700 Subject: [PATCH 16/28] Use newer PyPy. --- test/cookbook/recipes/django.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cookbook/recipes/django.rb b/test/cookbook/recipes/django.rb index 6e5a59e..fda0cba 100644 --- a/test/cookbook/recipes/django.rb +++ b/test/cookbook/recipes/django.rb @@ -19,7 +19,7 @@ application '/opt/test_django' do git 'https://github.com/poise/test_django.git' - python 'pypy3-5.5' + python 'pypy3-5.7' virtualenv pip_requirements django do From 1f581cf08a3c855c3516c7ba93ab7b0d0fc588eb Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Thu, 13 Apr 2017 00:21:02 -0700 Subject: [PATCH 17/28] Use the new restart_delay option because PyPy can take more than 1 second to shut down. --- Gemfile | 2 +- test/cookbook/recipes/django.rb | 4 ++++ test/gemfiles/master.gemfile | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 60c6dcd..3f42884 100644 --- a/Gemfile +++ b/Gemfile @@ -36,4 +36,4 @@ dev_gem 'poise-boiler' dev_gem 'poise-languages' dev_gem 'poise-profiler' dev_gem 'poise-python' -dev_gem 'poise-service' +dev_gem 'poise-service', github: 'poise/poise-service' diff --git a/test/cookbook/recipes/django.rb b/test/cookbook/recipes/django.rb index fda0cba..9f3b4de 100644 --- a/test/cookbook/recipes/django.rb +++ b/test/cookbook/recipes/django.rb @@ -29,4 +29,8 @@ gunicorn do port 9000 end + # PyPy is a bit slower to shut down. + poise_service_options '/opt/test_django' do + restart_delay 10 + end end diff --git a/test/gemfiles/master.gemfile b/test/gemfiles/master.gemfile index b756fde..fe57d7b 100644 --- a/test/gemfiles/master.gemfile +++ b/test/gemfiles/master.gemfile @@ -27,4 +27,4 @@ gem 'poise-boiler', github: 'poise/poise-boiler' gem 'poise-languages', github: 'poise/poise-languages' gem 'poise-profiler', github: 'poise/poise-profiler' gem 'poise-python', github: 'poise/poise-python' -gem 'poise-service', github: 'poise/poise-service' +# gem 'poise-service', github: 'poise/poise-service' From 0f7df279ee97a1e7284b0ffc8ff88d12052deb90 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Thu, 13 Apr 2017 10:50:19 -0700 Subject: [PATCH 18/28] Still seeing restart failures. --- test/cookbook/recipes/django.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cookbook/recipes/django.rb b/test/cookbook/recipes/django.rb index 9f3b4de..c115174 100644 --- a/test/cookbook/recipes/django.rb +++ b/test/cookbook/recipes/django.rb @@ -31,6 +31,6 @@ end # PyPy is a bit slower to shut down. poise_service_options '/opt/test_django' do - restart_delay 10 + restart_delay 30 end end From c3ea8a072f3dcdd7801b887533949ba335f2b35a Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Thu, 13 Apr 2017 17:38:00 -0700 Subject: [PATCH 19/28] Fix tests for Chef 13. --- test/spec/resources/gunicorn_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/resources/gunicorn_spec.rb b/test/spec/resources/gunicorn_spec.rb index 77661e5..c50da3b 100644 --- a/test/spec/resources/gunicorn_spec.rb +++ b/test/spec/resources/gunicorn_spec.rb @@ -21,7 +21,7 @@ describe '#default_app_module' do let(:app_state) { {} } let(:files) { [] } - let(:test_resource) { described_class.new(nil, nil) } + let(:test_resource) { described_class.new('/test', nil) } before do allow(test_resource).to receive(:app_state).and_return(app_state) allow(Dir).to receive(:exist?).and_return(!files.empty?) From 217d3aae891e5e44c52701b097d97f5bb807fe0d Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Sun, 23 Apr 2017 21:30:01 -0700 Subject: [PATCH 20/28] Update metadata for latest foodcritic. --- poise-application-python.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/poise-application-python.gemspec b/poise-application-python.gemspec index ce606f1..8394013 100644 --- a/poise-application-python.gemspec +++ b/poise-application-python.gemspec @@ -26,8 +26,9 @@ Gem::Specification.new do |spec| spec.description = "A Chef cookbook for deploying Python application code." spec.summary = spec.description spec.homepage = 'https://github.com/poise/application_python' - spec.license = 'Apache 2.0' + spec.license = 'Apache-2.0' spec.metadata['halite_name'] = 'application_python' + spec.metadata['platforms'] = 'any' spec.files = `git ls-files`.split($/) spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } From 1cd9985d039aa4f2d12ae32b3d7045ac6172c0fd Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Sun, 23 Apr 2017 21:30:50 -0700 Subject: [PATCH 21/28] Update test harness. --- .gitignore | 4 ++-- .yardopts | 4 ++++ .yo-rc.json | 7 +++++++ Gemfile | 2 +- test/gemfiles/chef-12.1.gemfile | 6 +++--- test/gemfiles/chef-12.10.gemfile | 6 +++--- test/gemfiles/chef-12.11.gemfile | 6 +++--- test/gemfiles/chef-12.12.gemfile | 4 ++-- test/gemfiles/chef-12.13.gemfile | 4 ++-- test/gemfiles/chef-12.2.gemfile | 6 +++--- test/gemfiles/chef-12.3.gemfile | 6 +++--- test/gemfiles/chef-12.4.gemfile | 6 +++--- test/gemfiles/chef-12.5.gemfile | 6 +++--- test/gemfiles/chef-12.6.gemfile | 6 +++--- test/gemfiles/chef-12.7.gemfile | 6 +++--- test/gemfiles/chef-12.8.gemfile | 6 +++--- test/gemfiles/chef-12.9.gemfile | 6 +++--- test/gemfiles/chef-13.0.gemfile | 2 +- test/gemfiles/master.gemfile | 27 +++++++++++++++------------ 19 files changed, 67 insertions(+), 53 deletions(-) create mode 100644 .yo-rc.json diff --git a/.gitignore b/.gitignore index 38f93b5..d83b2bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,11 @@ +Berksfile.lock Gemfile.lock test/gemfiles/*.lock -Berksfile.lock .kitchen/ .kitchen.local.yml test/docker/ +test/ec2/ coverage/ pkg/ .yardoc/ doc/ - diff --git a/.yardopts b/.yardopts index 1c11d2a..be7cdef 100644 --- a/.yardopts +++ b/.yardopts @@ -1,3 +1,7 @@ --plugin classmethods +--embed-mixin ClassMethods +--hide-api private --markup markdown --hide-void-return +--tag provides:Provides +--tag action:Actions diff --git a/.yo-rc.json b/.yo-rc.json new file mode 100644 index 0000000..9cb8344 --- /dev/null +++ b/.yo-rc.json @@ -0,0 +1,7 @@ +{ + "generator-poise": { + "created": true, + "name": "poise-application-python", + "cookbookName": "application_python" + } +} \ No newline at end of file diff --git a/Gemfile b/Gemfile index 3f42884..77f0b86 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,7 @@ def dev_gem(name, path: File.join('..', name), github: nil) if File.exist?(path) gem name, path: path elsif github - gem name, github: github + gem name, git: "https://gitub.com/#{github}.git" end end diff --git a/test/gemfiles/chef-12.1.gemfile b/test/gemfiles/chef-12.1.gemfile index c7ace12..170e314 100644 --- a/test/gemfiles/chef-12.1.gemfile +++ b/test/gemfiles/chef-12.1.gemfile @@ -17,7 +17,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.1.2' -gem 'rack', '< 2' -gem 'foodcritic', '< 8' -gem 'fauxhai', '<= 3.9.0' gem 'chefspec', '< 6' +gem 'fauxhai', '<= 3.9.0' +gem 'foodcritic', '< 8' +gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.10.gemfile b/test/gemfiles/chef-12.10.gemfile index 4e96ed4..a98cfc0 100644 --- a/test/gemfiles/chef-12.10.gemfile +++ b/test/gemfiles/chef-12.10.gemfile @@ -17,7 +17,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.10.24' -gem 'rack', '< 2' -gem 'foodcritic', '< 8' -gem 'fauxhai', '<= 3.9.0' gem 'chefspec', '< 6' +gem 'fauxhai', '<= 3.9.0' +gem 'foodcritic', '< 8' +gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.11.gemfile b/test/gemfiles/chef-12.11.gemfile index f6f55c6..302cf79 100644 --- a/test/gemfiles/chef-12.11.gemfile +++ b/test/gemfiles/chef-12.11.gemfile @@ -17,7 +17,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.11.18' -gem 'rack', '< 2' -gem 'foodcritic', '< 8' -gem 'fauxhai', '<= 3.9.0' gem 'chefspec', '< 6' +gem 'fauxhai', '<= 3.9.0' +gem 'foodcritic', '< 8' +gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.12.gemfile b/test/gemfiles/chef-12.12.gemfile index 0b673e4..4724162 100644 --- a/test/gemfiles/chef-12.12.gemfile +++ b/test/gemfiles/chef-12.12.gemfile @@ -17,6 +17,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.12.15' -gem 'foodcritic', '< 8' -gem 'fauxhai', '<= 3.9.0' gem 'chefspec', '< 6' +gem 'fauxhai', '<= 3.9.0' +gem 'foodcritic', '< 8' diff --git a/test/gemfiles/chef-12.13.gemfile b/test/gemfiles/chef-12.13.gemfile index 9cc50eb..67e00b8 100644 --- a/test/gemfiles/chef-12.13.gemfile +++ b/test/gemfiles/chef-12.13.gemfile @@ -17,6 +17,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.13.37' -gem 'foodcritic', '< 8' -gem 'fauxhai', '<= 3.9.0' gem 'chefspec', '< 6' +gem 'fauxhai', '<= 3.9.0' +gem 'foodcritic', '< 8' diff --git a/test/gemfiles/chef-12.2.gemfile b/test/gemfiles/chef-12.2.gemfile index 157048b..3b3d674 100644 --- a/test/gemfiles/chef-12.2.gemfile +++ b/test/gemfiles/chef-12.2.gemfile @@ -17,7 +17,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.2.1' -gem 'rack', '< 2' -gem 'foodcritic', '< 8' -gem 'fauxhai', '<= 3.9.0' gem 'chefspec', '< 6' +gem 'fauxhai', '<= 3.9.0' +gem 'foodcritic', '< 8' +gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.3.gemfile b/test/gemfiles/chef-12.3.gemfile index 963a1f9..8700b6c 100644 --- a/test/gemfiles/chef-12.3.gemfile +++ b/test/gemfiles/chef-12.3.gemfile @@ -17,7 +17,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.3.0' -gem 'rack', '< 2' -gem 'foodcritic', '< 8' -gem 'fauxhai', '<= 3.9.0' gem 'chefspec', '< 6' +gem 'fauxhai', '<= 3.9.0' +gem 'foodcritic', '< 8' +gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.4.gemfile b/test/gemfiles/chef-12.4.gemfile index e3a9da2..00fc198 100644 --- a/test/gemfiles/chef-12.4.gemfile +++ b/test/gemfiles/chef-12.4.gemfile @@ -17,8 +17,8 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.4.3' -gem 'rack', '< 2' -gem 'foodcritic', '< 8' -gem 'fauxhai', '<= 3.9.0' gem 'chefspec', '< 6' +gem 'fauxhai', '<= 3.9.0' +gem 'foodcritic', '< 8' gem 'gh', '0.14.0' +gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.5.gemfile b/test/gemfiles/chef-12.5.gemfile index 91a0f0d..d0c73a4 100644 --- a/test/gemfiles/chef-12.5.gemfile +++ b/test/gemfiles/chef-12.5.gemfile @@ -17,7 +17,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.5.1' -gem 'rack', '< 2' -gem 'foodcritic', '< 8' -gem 'fauxhai', '<= 3.9.0' gem 'chefspec', '< 6' +gem 'fauxhai', '<= 3.9.0' +gem 'foodcritic', '< 8' +gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.6.gemfile b/test/gemfiles/chef-12.6.gemfile index 2cf21ed..fdd4417 100644 --- a/test/gemfiles/chef-12.6.gemfile +++ b/test/gemfiles/chef-12.6.gemfile @@ -17,7 +17,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.6.0' -gem 'rack', '< 2' -gem 'foodcritic', '< 8' -gem 'fauxhai', '<= 3.9.0' gem 'chefspec', '< 6' +gem 'fauxhai', '<= 3.9.0' +gem 'foodcritic', '< 8' +gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.7.gemfile b/test/gemfiles/chef-12.7.gemfile index d9a353c..9c22595 100644 --- a/test/gemfiles/chef-12.7.gemfile +++ b/test/gemfiles/chef-12.7.gemfile @@ -17,7 +17,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.7.2' -gem 'rack', '< 2' -gem 'foodcritic', '< 8' -gem 'fauxhai', '<= 3.9.0' gem 'chefspec', '< 6' +gem 'fauxhai', '<= 3.9.0' +gem 'foodcritic', '< 8' +gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.8.gemfile b/test/gemfiles/chef-12.8.gemfile index 16834cd..2b390eb 100644 --- a/test/gemfiles/chef-12.8.gemfile +++ b/test/gemfiles/chef-12.8.gemfile @@ -17,7 +17,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.8.1' -gem 'rack', '< 2' -gem 'foodcritic', '< 8' -gem 'fauxhai', '<= 3.9.0' gem 'chefspec', '< 6' +gem 'fauxhai', '<= 3.9.0' +gem 'foodcritic', '< 8' +gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.9.gemfile b/test/gemfiles/chef-12.9.gemfile index 7e4aea3..b67456e 100644 --- a/test/gemfiles/chef-12.9.gemfile +++ b/test/gemfiles/chef-12.9.gemfile @@ -17,7 +17,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.9.41' -gem 'rack', '< 2' -gem 'foodcritic', '< 8' -gem 'fauxhai', '<= 3.9.0' gem 'chefspec', '< 6' +gem 'fauxhai', '<= 3.9.0' +gem 'foodcritic', '< 8' +gem 'rack', '< 2' diff --git a/test/gemfiles/chef-13.0.gemfile b/test/gemfiles/chef-13.0.gemfile index ff571d0..7e864da 100644 --- a/test/gemfiles/chef-13.0.gemfile +++ b/test/gemfiles/chef-13.0.gemfile @@ -16,4 +16,4 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) -gem 'chef', '~> 13.0.113' +gem 'chef', '~> 13.0.118' diff --git a/test/gemfiles/master.gemfile b/test/gemfiles/master.gemfile index fe57d7b..4c902cb 100644 --- a/test/gemfiles/master.gemfile +++ b/test/gemfiles/master.gemfile @@ -16,15 +16,18 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) -gem 'chef', github: 'chef/chef' -gem 'halite', github: 'poise/halite' -gem 'ohai', github: 'chef/ohai' -gem 'poise', github: 'poise/poise' -gem 'poise-application', github: 'poise/application' -gem 'poise-application-git', github: 'poise/application_git' -gem 'poise-archive', github: 'poise/poise-archive' -gem 'poise-boiler', github: 'poise/poise-boiler' -gem 'poise-languages', github: 'poise/poise-languages' -gem 'poise-profiler', github: 'poise/poise-profiler' -gem 'poise-python', github: 'poise/poise-python' -# gem 'poise-service', github: 'poise/poise-service' +gem 'chef', git: 'https://github.com/chef/chef.git' +gem 'chefspec', git: 'https://github.com/sethvargo/chefspec.git' +gem 'fauxhai', git: 'https://github.com/customink/fauxhai.git' +gem 'foodcritic', git: 'https://github.com/foodcritic/foodcritic.git' +gem 'halite', git: 'https://github.com/poise/halite.git' +gem 'ohai', git: 'https://github.com/chef/ohai.git' +gem 'poise', git: 'https://github.com/poise/poise.git' +gem 'poise-application', git: 'https://github.com/poise/poise-application.git' +gem 'poise-application-git', git: 'https://github.com/poise/poise-application-git.git' +gem 'poise-archive', git: 'https://github.com/poise/poise-archive.git' +gem 'poise-boiler', git: 'https://github.com/poise/poise-boiler.git' +gem 'poise-languages', git: 'https://github.com/poise/poise-languages.git' +gem 'poise-profiler', git: 'https://github.com/poise/poise-profiler.git' +gem 'poise-python', git: 'https://github.com/poise/poise-python.git' +gem 'poise-service', git: 'https://github.com/poise/poise-service.git' From 78bd6ef34dfc054fdd2125beb5dc9b489d10493e Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Mon, 24 Apr 2017 00:26:50 -0700 Subject: [PATCH 22/28] Typo (and de-master). --- Gemfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 77f0b86..200b1cb 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,7 @@ def dev_gem(name, path: File.join('..', name), github: nil) if File.exist?(path) gem name, path: path elsif github - gem name, git: "https://gitub.com/#{github}.git" + gem name, git: "https://github.com/#{github}.git" end end @@ -36,4 +36,4 @@ dev_gem 'poise-boiler' dev_gem 'poise-languages' dev_gem 'poise-profiler' dev_gem 'poise-python' -dev_gem 'poise-service', github: 'poise/poise-service' +dev_gem 'poise-service' From 443a480edbf4ddc729e468a3791ee16cf5d85e68 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Mon, 24 Apr 2017 14:24:38 -0700 Subject: [PATCH 23/28] Fix git URLs. --- test/gemfiles/master.gemfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/gemfiles/master.gemfile b/test/gemfiles/master.gemfile index 4c902cb..182ae64 100644 --- a/test/gemfiles/master.gemfile +++ b/test/gemfiles/master.gemfile @@ -23,8 +23,8 @@ gem 'foodcritic', git: 'https://github.com/foodcritic/foodcritic.git' gem 'halite', git: 'https://github.com/poise/halite.git' gem 'ohai', git: 'https://github.com/chef/ohai.git' gem 'poise', git: 'https://github.com/poise/poise.git' -gem 'poise-application', git: 'https://github.com/poise/poise-application.git' -gem 'poise-application-git', git: 'https://github.com/poise/poise-application-git.git' +gem 'poise-application', git: 'https://github.com/poise/application.git' +gem 'poise-application-git', git: 'https://github.com/poise/application_git.git' gem 'poise-archive', git: 'https://github.com/poise/poise-archive.git' gem 'poise-boiler', git: 'https://github.com/poise/poise-boiler.git' gem 'poise-languages', git: 'https://github.com/poise/poise-languages.git' From 2b122c09ae5a1d5f947ecfb64deb050d618e6e49 Mon Sep 17 00:00:00 2001 From: Martin Cozzi Date: Thu, 11 May 2017 15:03:00 -0700 Subject: [PATCH 24/28] Use ?nil when checking for integer. Fixes #81 --- lib/poise_application_python/resources/django.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/poise_application_python/resources/django.rb b/lib/poise_application_python/resources/django.rb index dbe044c..61dd5d7 100644 --- a/lib/poise_application_python/resources/django.rb +++ b/lib/poise_application_python/resources/django.rb @@ -232,7 +232,7 @@ def parse_database_url(url) db[:USER] = parsed.user if parsed.user && !parsed.user.empty? db[:PASSWORD] = parsed.password if parsed.password && !parsed.password.empty? db[:HOST] = parsed.host if parsed.host && !parsed.host.empty? - db[:PORT] = parsed.port if parsed.port && !parsed.port.empty? + db[:PORT] = parsed.port if parsed.port && !parsed.port.nil? end end From f8965f07e318166622e0e8e22797364b3e7c28eb Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Sun, 30 Jul 2017 16:46:00 -0700 Subject: [PATCH 25/28] Fix tests on Chef master for new execute provider implementation. --- test/spec/resources/python_execute_spec.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/spec/resources/python_execute_spec.rb b/test/spec/resources/python_execute_spec.rb index 7b64852..29107f8 100644 --- a/test/spec/resources/python_execute_spec.rb +++ b/test/spec/resources/python_execute_spec.rb @@ -30,7 +30,13 @@ end it do - expect_any_instance_of(described_class::Provider).to receive(:shell_out!).with( + # Check which method to stub. I'm not super proud of this code, sorry. + method_to_stub = if IO.read(described_class::Provider.instance_method(:action_run).source_location.first) =~ /shell_out_with_systems_locale/ + :shell_out_with_systems_locale! + else + :shell_out! + end + expect_any_instance_of(described_class::Provider).to receive(method_to_stub).with( '/python myapp.py', user: 'myuser', group: 'mygroup', From e3d75f59ca3b6bc9a0e0e81a290aa0a3819096e0 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Sun, 13 Aug 2017 23:42:05 -0700 Subject: [PATCH 26/28] Update test harness. --- .travis.yml | 4 ++++ test/gemfiles/chef-12.1.gemfile | 1 + test/gemfiles/chef-12.10.gemfile | 1 + test/gemfiles/chef-12.11.gemfile | 1 + test/gemfiles/chef-12.12.gemfile | 1 + test/gemfiles/chef-12.13.gemfile | 1 + test/gemfiles/chef-12.2.gemfile | 1 + test/gemfiles/chef-12.3.gemfile | 1 + test/gemfiles/chef-12.4.gemfile | 1 + test/gemfiles/chef-12.5.gemfile | 1 + test/gemfiles/chef-12.6.gemfile | 1 + test/gemfiles/chef-12.7.gemfile | 1 + test/gemfiles/chef-12.8.gemfile | 1 + test/gemfiles/chef-12.9.gemfile | 1 + test/gemfiles/chef-13.1.gemfile | 19 +++++++++++++++++++ test/gemfiles/chef-13.2.gemfile | 19 +++++++++++++++++++ test/gemfiles/chef-13.gemfile | 2 +- 17 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 test/gemfiles/chef-13.1.gemfile create mode 100644 test/gemfiles/chef-13.2.gemfile diff --git a/.travis.yml b/.travis.yml index d3670b9..18bf4d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,5 +60,9 @@ matrix: gemfile: test/gemfiles/chef-12.19.gemfile - rvm: 2.4.1 gemfile: test/gemfiles/chef-13.0.gemfile + - rvm: 2.4.1 + gemfile: test/gemfiles/chef-13.1.gemfile + - rvm: 2.4.1 + gemfile: test/gemfiles/chef-13.2.gemfile - rvm: 2.4.1 gemfile: test/gemfiles/master.gemfile diff --git a/test/gemfiles/chef-12.1.gemfile b/test/gemfiles/chef-12.1.gemfile index 170e314..83ee246 100644 --- a/test/gemfiles/chef-12.1.gemfile +++ b/test/gemfiles/chef-12.1.gemfile @@ -19,5 +19,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.1.2' gem 'chefspec', '< 6' gem 'fauxhai', '<= 3.9.0' +gem 'ffi-yajl', '< 2.3.1' gem 'foodcritic', '< 8' gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.10.gemfile b/test/gemfiles/chef-12.10.gemfile index a98cfc0..b3f1bce 100644 --- a/test/gemfiles/chef-12.10.gemfile +++ b/test/gemfiles/chef-12.10.gemfile @@ -19,5 +19,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.10.24' gem 'chefspec', '< 6' gem 'fauxhai', '<= 3.9.0' +gem 'ffi-yajl', '< 2.3.1' gem 'foodcritic', '< 8' gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.11.gemfile b/test/gemfiles/chef-12.11.gemfile index 302cf79..e1a1b77 100644 --- a/test/gemfiles/chef-12.11.gemfile +++ b/test/gemfiles/chef-12.11.gemfile @@ -19,5 +19,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.11.18' gem 'chefspec', '< 6' gem 'fauxhai', '<= 3.9.0' +gem 'ffi-yajl', '< 2.3.1' gem 'foodcritic', '< 8' gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.12.gemfile b/test/gemfiles/chef-12.12.gemfile index 4724162..cdbf048 100644 --- a/test/gemfiles/chef-12.12.gemfile +++ b/test/gemfiles/chef-12.12.gemfile @@ -19,4 +19,5 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.12.15' gem 'chefspec', '< 6' gem 'fauxhai', '<= 3.9.0' +gem 'ffi-yajl', '< 2.3.1' gem 'foodcritic', '< 8' diff --git a/test/gemfiles/chef-12.13.gemfile b/test/gemfiles/chef-12.13.gemfile index 67e00b8..76b2217 100644 --- a/test/gemfiles/chef-12.13.gemfile +++ b/test/gemfiles/chef-12.13.gemfile @@ -19,4 +19,5 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.13.37' gem 'chefspec', '< 6' gem 'fauxhai', '<= 3.9.0' +gem 'ffi-yajl', '< 2.3.1' gem 'foodcritic', '< 8' diff --git a/test/gemfiles/chef-12.2.gemfile b/test/gemfiles/chef-12.2.gemfile index 3b3d674..1be9dc1 100644 --- a/test/gemfiles/chef-12.2.gemfile +++ b/test/gemfiles/chef-12.2.gemfile @@ -19,5 +19,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.2.1' gem 'chefspec', '< 6' gem 'fauxhai', '<= 3.9.0' +gem 'ffi-yajl', '< 2.3.1' gem 'foodcritic', '< 8' gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.3.gemfile b/test/gemfiles/chef-12.3.gemfile index 8700b6c..f467b24 100644 --- a/test/gemfiles/chef-12.3.gemfile +++ b/test/gemfiles/chef-12.3.gemfile @@ -19,5 +19,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.3.0' gem 'chefspec', '< 6' gem 'fauxhai', '<= 3.9.0' +gem 'ffi-yajl', '< 2.3.1' gem 'foodcritic', '< 8' gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.4.gemfile b/test/gemfiles/chef-12.4.gemfile index 00fc198..3982e37 100644 --- a/test/gemfiles/chef-12.4.gemfile +++ b/test/gemfiles/chef-12.4.gemfile @@ -19,6 +19,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.4.3' gem 'chefspec', '< 6' gem 'fauxhai', '<= 3.9.0' +gem 'ffi-yajl', '< 2.3.1' gem 'foodcritic', '< 8' gem 'gh', '0.14.0' gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.5.gemfile b/test/gemfiles/chef-12.5.gemfile index d0c73a4..cce7846 100644 --- a/test/gemfiles/chef-12.5.gemfile +++ b/test/gemfiles/chef-12.5.gemfile @@ -19,5 +19,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.5.1' gem 'chefspec', '< 6' gem 'fauxhai', '<= 3.9.0' +gem 'ffi-yajl', '< 2.3.1' gem 'foodcritic', '< 8' gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.6.gemfile b/test/gemfiles/chef-12.6.gemfile index fdd4417..5f699c5 100644 --- a/test/gemfiles/chef-12.6.gemfile +++ b/test/gemfiles/chef-12.6.gemfile @@ -19,5 +19,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.6.0' gem 'chefspec', '< 6' gem 'fauxhai', '<= 3.9.0' +gem 'ffi-yajl', '< 2.3.1' gem 'foodcritic', '< 8' gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.7.gemfile b/test/gemfiles/chef-12.7.gemfile index 9c22595..8eb0df8 100644 --- a/test/gemfiles/chef-12.7.gemfile +++ b/test/gemfiles/chef-12.7.gemfile @@ -19,5 +19,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.7.2' gem 'chefspec', '< 6' gem 'fauxhai', '<= 3.9.0' +gem 'ffi-yajl', '< 2.3.1' gem 'foodcritic', '< 8' gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.8.gemfile b/test/gemfiles/chef-12.8.gemfile index 2b390eb..cf1531f 100644 --- a/test/gemfiles/chef-12.8.gemfile +++ b/test/gemfiles/chef-12.8.gemfile @@ -19,5 +19,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.8.1' gem 'chefspec', '< 6' gem 'fauxhai', '<= 3.9.0' +gem 'ffi-yajl', '< 2.3.1' gem 'foodcritic', '< 8' gem 'rack', '< 2' diff --git a/test/gemfiles/chef-12.9.gemfile b/test/gemfiles/chef-12.9.gemfile index b67456e..4295ec5 100644 --- a/test/gemfiles/chef-12.9.gemfile +++ b/test/gemfiles/chef-12.9.gemfile @@ -19,5 +19,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) gem 'chef', '~> 12.9.41' gem 'chefspec', '< 6' gem 'fauxhai', '<= 3.9.0' +gem 'ffi-yajl', '< 2.3.1' gem 'foodcritic', '< 8' gem 'rack', '< 2' diff --git a/test/gemfiles/chef-13.1.gemfile b/test/gemfiles/chef-13.1.gemfile new file mode 100644 index 0000000..05668a3 --- /dev/null +++ b/test/gemfiles/chef-13.1.gemfile @@ -0,0 +1,19 @@ +# +# Copyright 2017, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 13.1.31' diff --git a/test/gemfiles/chef-13.2.gemfile b/test/gemfiles/chef-13.2.gemfile new file mode 100644 index 0000000..a466fdb --- /dev/null +++ b/test/gemfiles/chef-13.2.gemfile @@ -0,0 +1,19 @@ +# +# Copyright 2017, Noah Kantrowitz +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +eval_gemfile File.expand_path('../../../Gemfile', __FILE__) + +gem 'chef', '~> 13.2.20' diff --git a/test/gemfiles/chef-13.gemfile b/test/gemfiles/chef-13.gemfile index f7f40e8..3f49de1 100644 --- a/test/gemfiles/chef-13.gemfile +++ b/test/gemfiles/chef-13.gemfile @@ -16,4 +16,4 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__) -gem 'chef', '~> 13.0' +gem 'chef', '~> 13.2' From 518beb3102b039d046b19afb3e8d42c4e143de05 Mon Sep 17 00:00:00 2001 From: Bastien Jove Date: Tue, 9 Oct 2018 14:51:27 +0200 Subject: [PATCH 27/28] Fix Issue #86 with chef 14 --- lib/poise_application_python/resources/python_execute.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/poise_application_python/resources/python_execute.rb b/lib/poise_application_python/resources/python_execute.rb index 646a117..c3f445d 100644 --- a/lib/poise_application_python/resources/python_execute.rb +++ b/lib/poise_application_python/resources/python_execute.rb @@ -40,10 +40,10 @@ class Resource < PoisePython::Resources::PythonExecute::Resource def initialize(*args) super # Clear some instance variables so my defaults work. - remove_instance_variable(:@cwd) - remove_instance_variable(:@group) - remove_instance_variable(:@user) - end + remove_instance_variable(:@cwd) if defined?(@cwd) + remove_instance_variable(:@group) if defined?(@group) + remove_instance_variable(:@user) if defined?(@user) + end # #!attribute cwd # Override the default directory to be the app path if unspecified. From 3bcf11c46251126f2a4d9d2ccc289c91ee4c3c23 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Tue, 9 Oct 2018 13:56:14 -0700 Subject: [PATCH 28/28] Fix whitespace --- lib/poise_application_python/resources/python_execute.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/poise_application_python/resources/python_execute.rb b/lib/poise_application_python/resources/python_execute.rb index c3f445d..6b79fdf 100644 --- a/lib/poise_application_python/resources/python_execute.rb +++ b/lib/poise_application_python/resources/python_execute.rb @@ -42,8 +42,8 @@ def initialize(*args) # Clear some instance variables so my defaults work. remove_instance_variable(:@cwd) if defined?(@cwd) remove_instance_variable(:@group) if defined?(@group) - remove_instance_variable(:@user) if defined?(@user) - end + remove_instance_variable(:@user) if defined?(@user) + end # #!attribute cwd # Override the default directory to be the app path if unspecified.