poise-python 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.gitignore +1 -1
- data/.travis.yml +25 -28
- data/.yo-rc.json +7 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/lib/poise_python/python_providers/system.rb +3 -0
- data/lib/poise_python/resources/python_package.rb +33 -14
- data/lib/poise_python/resources/python_runtime.rb +1 -0
- data/lib/poise_python/resources/python_runtime_pip.rb +24 -2
- data/lib/poise_python/resources/python_runtime_test.rb +5 -0
- data/lib/poise_python/version.rb +1 -1
- data/poise-python.gemspec +3 -2
- data/test/cookbook/recipes/default.rb +27 -4
- data/test/gemfiles/{chef-12.13.gemfile → chef-12.20.gemfile} +2 -5
- data/test/gemfiles/{chef-12.12.gemfile → chef-12.21.gemfile} +2 -5
- data/test/gemfiles/chef-12.gemfile +1 -1
- data/test/gemfiles/chef-13.0.gemfile +1 -1
- data/test/gemfiles/{chef-12.1.gemfile → chef-13.1.gemfile} +2 -6
- data/test/gemfiles/{chef-12.2.gemfile → chef-13.2.gemfile} +2 -6
- data/test/gemfiles/chef-13.3.gemfile +19 -0
- data/test/gemfiles/chef-13.4.gemfile +19 -0
- data/test/gemfiles/chef-13.5.gemfile +19 -0
- data/test/gemfiles/chef-13.6.gemfile +19 -0
- data/test/gemfiles/chef-13.8.gemfile +19 -0
- data/test/gemfiles/chef-13.gemfile +1 -1
- data/test/gemfiles/chef-14.0.gemfile +19 -0
- data/test/gemfiles/chef-14.gemfile +19 -0
- data/test/gemfiles/master.gemfile +11 -8
- data/test/integration/default/serverspec/default_spec.rb +29 -1
- data/test/spec/python_providers/scl_spec.rb +2 -2
- data/test/spec/python_providers/system_spec.rb +5 -5
- data/test/spec/resources/python_package_spec.rb +15 -8
- metadata +33 -35
- data/test/gemfiles/chef-12.10.gemfile +0 -23
- data/test/gemfiles/chef-12.11.gemfile +0 -23
- data/test/gemfiles/chef-12.3.gemfile +0 -23
- data/test/gemfiles/chef-12.4.gemfile +0 -24
- data/test/gemfiles/chef-12.5.gemfile +0 -23
- data/test/gemfiles/chef-12.6.gemfile +0 -23
- data/test/gemfiles/chef-12.7.gemfile +0 -23
- data/test/gemfiles/chef-12.8.gemfile +0 -23
- data/test/gemfiles/chef-12.9.gemfile +0 -23
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: d14756918657f636aef76d1a3be5be60e9ec7f856ea5aa66a7263ea78e7a107f
|
|
4
|
+
data.tar.gz: 1c0295be2bb199bc1470b136a327e899fd25280fe60bd44883cc7f8aaf36e964
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 338ba450cb8b34621cfda533300bb0959c20f99429eb58e4bdff6b2df6b7498d1529b0c98f6f6a57e92d2f75196cdafb96a58e87ccb7e4d79d15947aa0b333dc
|
|
7
|
+
data.tar.gz: ab1070572da814fde7cf558e5534803de1c29b43b3d50d36b94ed627afe918fc74c146490859a67155c40eadfc5b5997b3d31da901074ac7608b4b6ad363bcce
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
dist: trusty
|
|
1
2
|
sudo: false
|
|
2
3
|
cache: bundler
|
|
3
4
|
language: ruby
|
|
@@ -18,34 +19,12 @@ matrix:
|
|
|
18
19
|
include:
|
|
19
20
|
- rvm: 2.3.1
|
|
20
21
|
gemfile: test/gemfiles/chef-12.gemfile
|
|
21
|
-
- rvm: 2.4.
|
|
22
|
+
- rvm: 2.4.3
|
|
22
23
|
gemfile: test/gemfiles/chef-13.gemfile
|
|
23
|
-
- rvm: 2.1
|
|
24
|
-
gemfile: test/gemfiles/chef-
|
|
25
|
-
- rvm: 2.1
|
|
26
|
-
gemfile: test/gemfiles/
|
|
27
|
-
- rvm: 2.1.4
|
|
28
|
-
gemfile: test/gemfiles/chef-12.3.gemfile
|
|
29
|
-
- rvm: 2.1.6
|
|
30
|
-
gemfile: test/gemfiles/chef-12.4.gemfile
|
|
31
|
-
- rvm: 2.1.6
|
|
32
|
-
gemfile: test/gemfiles/chef-12.5.gemfile
|
|
33
|
-
- rvm: 2.1.6
|
|
34
|
-
gemfile: test/gemfiles/chef-12.6.gemfile
|
|
35
|
-
- rvm: 2.1.6
|
|
36
|
-
gemfile: test/gemfiles/chef-12.7.gemfile
|
|
37
|
-
- rvm: 2.1.6
|
|
38
|
-
gemfile: test/gemfiles/chef-12.8.gemfile
|
|
39
|
-
- rvm: 2.1.8
|
|
40
|
-
gemfile: test/gemfiles/chef-12.9.gemfile
|
|
41
|
-
- rvm: 2.1.8
|
|
42
|
-
gemfile: test/gemfiles/chef-12.10.gemfile
|
|
43
|
-
- rvm: 2.1.8
|
|
44
|
-
gemfile: test/gemfiles/chef-12.11.gemfile
|
|
45
|
-
- rvm: 2.1.8
|
|
46
|
-
gemfile: test/gemfiles/chef-12.12.gemfile
|
|
47
|
-
- rvm: 2.1.9
|
|
48
|
-
gemfile: test/gemfiles/chef-12.13.gemfile
|
|
24
|
+
- rvm: 2.5.1
|
|
25
|
+
gemfile: test/gemfiles/chef-14.gemfile
|
|
26
|
+
- rvm: 2.5.1
|
|
27
|
+
gemfile: test/gemfiles/master.gemfile
|
|
49
28
|
- rvm: 2.3.1
|
|
50
29
|
gemfile: test/gemfiles/chef-12.14.gemfile
|
|
51
30
|
- rvm: 2.3.1
|
|
@@ -58,7 +37,25 @@ matrix:
|
|
|
58
37
|
gemfile: test/gemfiles/chef-12.18.gemfile
|
|
59
38
|
- rvm: 2.3.1
|
|
60
39
|
gemfile: test/gemfiles/chef-12.19.gemfile
|
|
40
|
+
- rvm: 2.3.1
|
|
41
|
+
gemfile: test/gemfiles/chef-12.20.gemfile
|
|
42
|
+
- rvm: 2.3.1
|
|
43
|
+
gemfile: test/gemfiles/chef-12.21.gemfile
|
|
61
44
|
- rvm: 2.4.1
|
|
62
45
|
gemfile: test/gemfiles/chef-13.0.gemfile
|
|
63
46
|
- rvm: 2.4.1
|
|
64
|
-
gemfile: test/gemfiles/
|
|
47
|
+
gemfile: test/gemfiles/chef-13.1.gemfile
|
|
48
|
+
- rvm: 2.4.1
|
|
49
|
+
gemfile: test/gemfiles/chef-13.2.gemfile
|
|
50
|
+
- rvm: 2.4.1
|
|
51
|
+
gemfile: test/gemfiles/chef-13.3.gemfile
|
|
52
|
+
- rvm: 2.4.2
|
|
53
|
+
gemfile: test/gemfiles/chef-13.4.gemfile
|
|
54
|
+
- rvm: 2.4.2
|
|
55
|
+
gemfile: test/gemfiles/chef-13.5.gemfile
|
|
56
|
+
- rvm: 2.4.2
|
|
57
|
+
gemfile: test/gemfiles/chef-13.6.gemfile
|
|
58
|
+
- rvm: 2.4.3
|
|
59
|
+
gemfile: test/gemfiles/chef-13.8.gemfile
|
|
60
|
+
- rvm: 2.5.1
|
|
61
|
+
gemfile: test/gemfiles/chef-14.0.gemfile
|
data/.yo-rc.json
ADDED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
|
@@ -28,11 +28,14 @@ module PoisePython
|
|
|
28
28
|
provides(:system)
|
|
29
29
|
packages('python', {
|
|
30
30
|
debian: {
|
|
31
|
+
'~> 10.0' => %w{python3.6 python2.7},
|
|
32
|
+
'~> 9.0' => %w{python3.5 python2.7},
|
|
31
33
|
'~> 8.0' => %w{python3.4 python2.7},
|
|
32
34
|
'~> 7.0' => %w{python3.2 python2.7 python2.6},
|
|
33
35
|
'~> 6.0' => %w{python3.1 python2.6 python2.5},
|
|
34
36
|
},
|
|
35
37
|
ubuntu: {
|
|
38
|
+
'18.04' => %w{python3.6 python2.7},
|
|
36
39
|
'16.04' => %w{python3.5 python2.7},
|
|
37
40
|
'14.04' => %w{python3.4 python2.7},
|
|
38
41
|
'12.04' => %w{python3.2 python2.7},
|
|
@@ -38,14 +38,19 @@ import sys
|
|
|
38
38
|
|
|
39
39
|
import pip
|
|
40
40
|
# Don't use pkg_resources because I don't want to require it before this anyway.
|
|
41
|
-
if re.match(r'0
|
|
41
|
+
if re.match(r'0\\.|1\\.|6\\.0', pip.__version__):
|
|
42
42
|
sys.stderr.write('The python_package resource requires pip >= 6.1.0, currently '+pip.__version__+'\\n')
|
|
43
43
|
sys.exit(1)
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
from pip.
|
|
47
|
-
from pip.
|
|
48
|
-
|
|
45
|
+
try:
|
|
46
|
+
from pip.commands import InstallCommand
|
|
47
|
+
from pip.index import PackageFinder
|
|
48
|
+
from pip.req import InstallRequirement
|
|
49
|
+
except ImportError:
|
|
50
|
+
# Pip 10 moved all internals to their own package.
|
|
51
|
+
from pip._internal.commands import InstallCommand
|
|
52
|
+
from pip._internal.index import PackageFinder
|
|
53
|
+
from pip._internal.req import InstallRequirement
|
|
49
54
|
|
|
50
55
|
packages = {}
|
|
51
56
|
cmd = InstallCommand()
|
|
@@ -113,6 +118,12 @@ EOH
|
|
|
113
118
|
# @return [String, Integer, nil]
|
|
114
119
|
attribute(:user, kind_of: [String, Integer, NilClass], default: lazy { default_user })
|
|
115
120
|
|
|
121
|
+
# This should probably be in the base class but ¯\_(ツ)_/¯.
|
|
122
|
+
# @!attribute allow_downgrade
|
|
123
|
+
# Allow downgrading the package.
|
|
124
|
+
# @return [Boolean]
|
|
125
|
+
attribute(:allow_downgrade, kind_of: [TrueClass, FalseClass], default: false)
|
|
126
|
+
|
|
116
127
|
def initialize(*args)
|
|
117
128
|
super
|
|
118
129
|
# For older Chef.
|
|
@@ -187,6 +198,7 @@ EOH
|
|
|
187
198
|
@current_resource = new_resource.class.new(new_resource.name, run_context)
|
|
188
199
|
current_resource.package_name(new_resource.package_name)
|
|
189
200
|
check_package_versions(current_resource)
|
|
201
|
+
Chef::Log.debug("[#{new_resource}] Current version: #{current_resource.version}, candidate version: #{@candidate_version}")
|
|
190
202
|
current_resource
|
|
191
203
|
end
|
|
192
204
|
|
|
@@ -200,7 +212,7 @@ EOH
|
|
|
200
212
|
def check_package_versions(resource, version=new_resource.version)
|
|
201
213
|
version_data = Hash.new {|hash, key| hash[key] = {current: nil, candidate: nil} }
|
|
202
214
|
# Get the version for everything currently installed.
|
|
203
|
-
list = pip_command('list', :list).stdout
|
|
215
|
+
list = pip_command('list', :list, [], environment: {'PIP_FORMAT' => 'json'}).stdout
|
|
204
216
|
parse_pip_list(list).each do |name, current|
|
|
205
217
|
# Merge current versions in to the data.
|
|
206
218
|
version_data[name][:current] = current
|
|
@@ -347,15 +359,22 @@ EOH
|
|
|
347
359
|
# @param text [String] Output to parse.
|
|
348
360
|
# @return [Hash<String, String>]
|
|
349
361
|
def parse_pip_list(text)
|
|
350
|
-
text
|
|
351
|
-
#
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
362
|
+
if text[0] == '['
|
|
363
|
+
# Pip 9 or newer, so it understood $PIP_FORMAT=json.
|
|
364
|
+
Chef::JSONCompat.parse(text).each_with_object({}) do |data, memo|
|
|
365
|
+
memo[parse_package_name(data['name'])] = data['version']
|
|
366
|
+
end
|
|
367
|
+
else
|
|
368
|
+
# Pip 8 or earlier, which doesn't support JSON output.
|
|
369
|
+
text.split(/\r?\n/).each_with_object({}) do |line, memo|
|
|
370
|
+
# Example of a line:
|
|
371
|
+
# boto (2.25.0)
|
|
372
|
+
if md = line.match(/^(\S+)\s+\(([^\s,]+).*\)$/i)
|
|
373
|
+
memo[parse_package_name(md[1])] = md[2]
|
|
374
|
+
else
|
|
375
|
+
Chef::Log.debug("[#{new_resource}] Unparsable line in pip list: #{line}")
|
|
376
|
+
end
|
|
357
377
|
end
|
|
358
|
-
memo
|
|
359
378
|
end
|
|
360
379
|
end
|
|
361
380
|
|
|
@@ -51,6 +51,7 @@ module PoisePython
|
|
|
51
51
|
# of https://bootstrap.pypa.io/get-pip.py is used. If you want to skip
|
|
52
52
|
# the pip installer entirely, set {#pip_version} to `false`.
|
|
53
53
|
# @return [String]
|
|
54
|
+
# If this default value changes, fix ths 2.6-compat logic in python_runtime_pip.
|
|
54
55
|
attribute(:get_pip_url, kind_of: String, default: 'https://bootstrap.pypa.io/get-pip.py')
|
|
55
56
|
# @!attribute pip_version
|
|
56
57
|
# Version of pip to install. If set to `true`, the latest available
|
|
@@ -30,6 +30,12 @@ module PoisePython
|
|
|
30
30
|
# Earliest version of pip we will try upgrading in-place.
|
|
31
31
|
PIP_INPLACE_VERSION = Gem::Version.create('7.0.0')
|
|
32
32
|
|
|
33
|
+
# Version to trigger the automatic get-pip.py URL fixup on for 2.6 compat.
|
|
34
|
+
PY26_FIXUP_VERSION = Gem::Version.create('2.7')
|
|
35
|
+
|
|
36
|
+
# Replacement URL for 2.6 compat.
|
|
37
|
+
PY26_FIXUP_GETPIP_URL = 'https://bootstrap.pypa.io/2.6/get-pip.py'
|
|
38
|
+
|
|
33
39
|
# A `python_runtime_pip` resource to install/upgrade pip itself. This is
|
|
34
40
|
# used internally by `python_runtime` and is not intended to be a public
|
|
35
41
|
# API.
|
|
@@ -103,15 +109,30 @@ module PoisePython
|
|
|
103
109
|
#
|
|
104
110
|
# @return [void]
|
|
105
111
|
def bootstrap_pip
|
|
112
|
+
# If we're on Python 2.6 and using the default get_pip_url, we need to
|
|
113
|
+
# switch to a 2.6-compatible version. This kind of sucks because it
|
|
114
|
+
# makes the default a magic value but it seems like the safest option.
|
|
115
|
+
get_pip_url = new_resource.get_pip_url
|
|
116
|
+
if get_pip_url == 'https://bootstrap.pypa.io/get-pip.py'
|
|
117
|
+
python_version_cmd = poise_shell_out!([new_resource.parent.python_binary, '--version'], environment: new_resource.parent.python_environment)
|
|
118
|
+
# Python 2 puts the output on stderr, 3 is on stdout. You can't make this shit up.
|
|
119
|
+
python_version = (python_version_cmd.stdout + python_version_cmd.stderr)[/Python (\S+)/, 1]
|
|
120
|
+
Chef::Log.debug("[#{new_resource}] Checking for Python 2.6 fixup of get-pip URL, found Python version #{python_version || '(unknown)'}")
|
|
121
|
+
if python_version && Gem::Version.create(python_version) < PY26_FIXUP_VERSION
|
|
122
|
+
Chef::Log.debug("[#{new_resource}] Detected old Python, enabling fixup")
|
|
123
|
+
get_pip_url = PY26_FIXUP_GETPIP_URL
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
106
127
|
# Always updated if we have hit this point.
|
|
107
|
-
converge_by("Bootstrapping pip #{new_resource.version || 'latest'} from #{
|
|
128
|
+
converge_by("Bootstrapping pip #{new_resource.version || 'latest'} from #{get_pip_url}") do
|
|
108
129
|
# Use a temp file to hold the installer.
|
|
109
130
|
# Put `Tempfile.create` back when Chef on Windows has a newer Ruby.
|
|
110
131
|
# Tempfile.create(['get-pip', '.py']) do |temp|
|
|
111
132
|
temp = Tempfile.new(['get-pip', '.py'])
|
|
112
133
|
begin
|
|
113
134
|
# Download the get-pip.py.
|
|
114
|
-
get_pip = Chef::HTTP.new(
|
|
135
|
+
get_pip = Chef::HTTP.new(get_pip_url).get('')
|
|
115
136
|
# Write it to the temp file.
|
|
116
137
|
temp.write(get_pip)
|
|
117
138
|
# Close the file to flush it.
|
|
@@ -165,6 +186,7 @@ module PoisePython
|
|
|
165
186
|
action :upgrade
|
|
166
187
|
parent_python new_resource.parent
|
|
167
188
|
version new_resource.version if new_resource.version
|
|
189
|
+
allow_downgrade true
|
|
168
190
|
end
|
|
169
191
|
end
|
|
170
192
|
end
|
|
@@ -70,6 +70,10 @@ module PoisePython
|
|
|
70
70
|
test_version
|
|
71
71
|
|
|
72
72
|
# Test python_package.
|
|
73
|
+
python_package 'argparse' do
|
|
74
|
+
# Needed for sqlparse but not in the stdlib until 2.7.
|
|
75
|
+
python new_resource.name
|
|
76
|
+
end
|
|
73
77
|
python_package 'sqlparse remove before' do
|
|
74
78
|
action :remove
|
|
75
79
|
package_name 'sqlparse'
|
|
@@ -176,6 +180,7 @@ EOH
|
|
|
176
180
|
end
|
|
177
181
|
test_import('docopt', python: nil, virtualenv: test_venv, user: test_user)
|
|
178
182
|
end
|
|
183
|
+
|
|
179
184
|
end
|
|
180
185
|
end
|
|
181
186
|
|
data/lib/poise_python/version.rb
CHANGED
data/poise-python.gemspec
CHANGED
|
@@ -26,14 +26,15 @@ Gem::Specification.new do |spec|
|
|
|
26
26
|
spec.description = "A Chef cookbook for managing Python installations."
|
|
27
27
|
spec.summary = spec.description
|
|
28
28
|
spec.homepage = 'https://github.com/poise/poise-python'
|
|
29
|
-
spec.license = 'Apache
|
|
29
|
+
spec.license = 'Apache-2.0'
|
|
30
|
+
spec.metadata['platforms'] = 'ubuntu debian redhat centos fedora amazon windows'
|
|
30
31
|
|
|
31
32
|
spec.files = `git ls-files`.split($/)
|
|
32
33
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
33
34
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
34
35
|
spec.require_paths = %w{lib}
|
|
35
36
|
|
|
36
|
-
spec.add_dependency 'chef', '>= 12.
|
|
37
|
+
spec.add_dependency 'chef', '>= 12.14', '< 15'
|
|
37
38
|
spec.add_dependency 'halite', '~> 1.0'
|
|
38
39
|
spec.add_dependency 'poise', '~> 2.7'
|
|
39
40
|
spec.add_dependency 'poise-languages', '~> 2.0'
|
|
@@ -55,24 +55,47 @@ tests_to_run = value_for_platform(
|
|
|
55
55
|
when 'pypy'
|
|
56
56
|
python_runtime_test 'pypy'
|
|
57
57
|
when 'pip'
|
|
58
|
-
#
|
|
58
|
+
# Some pip-related tests that I don't need to run on every Python version.
|
|
59
|
+
# Pip does plenty of testing on different Python versions and I already touch
|
|
60
|
+
# the basics.
|
|
59
61
|
pip_provider = value_for_platform_family(default: :portable_pypy, windows: :msi)
|
|
62
|
+
# Check the baseline state, should pull the latest pip.
|
|
60
63
|
python_runtime 'pip1' do
|
|
61
|
-
pip_version '7.1.2'
|
|
62
64
|
provider pip_provider
|
|
63
65
|
options path: '/test_pip1'
|
|
64
66
|
version ''
|
|
65
67
|
end
|
|
68
|
+
# Check installing a requested version.
|
|
66
69
|
python_runtime 'pip2' do
|
|
70
|
+
pip_version '8.1.2'
|
|
67
71
|
provider pip_provider
|
|
68
72
|
options path: '/test_pip2'
|
|
69
73
|
version ''
|
|
70
74
|
end
|
|
71
|
-
|
|
75
|
+
# Check installing the latest and reverting to an old version.
|
|
76
|
+
python_runtime 'pip3' do
|
|
77
|
+
provider pip_provider
|
|
78
|
+
options path: '/test_pip3'
|
|
79
|
+
version ''
|
|
80
|
+
end
|
|
81
|
+
python_runtime 'pip3b' do
|
|
72
82
|
pip_version '7.1.2'
|
|
73
83
|
provider pip_provider
|
|
74
|
-
options path: '/
|
|
84
|
+
options path: '/test_pip3'
|
|
75
85
|
version ''
|
|
76
86
|
end
|
|
87
|
+
# Test pip9 specifically just to be safe.
|
|
88
|
+
python_runtime 'pip4' do
|
|
89
|
+
pip_version '9.0.3'
|
|
90
|
+
provider pip_provider
|
|
91
|
+
options path: '/test_pip4'
|
|
92
|
+
version ''
|
|
93
|
+
end
|
|
94
|
+
# Run a simple package install on each just to test things.
|
|
95
|
+
(1..4).each do |n|
|
|
96
|
+
python_package 'structlog' do
|
|
97
|
+
python "pip#{n}"
|
|
98
|
+
end
|
|
99
|
+
end
|
|
77
100
|
end
|
|
78
101
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright
|
|
2
|
+
# Copyright 2018, Noah Kantrowitz
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
# you may not use this file except in compliance with the License.
|
|
@@ -16,7 +16,4 @@
|
|
|
16
16
|
|
|
17
17
|
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
18
|
|
|
19
|
-
gem 'chef', '~> 12.
|
|
20
|
-
gem 'foodcritic', '< 8'
|
|
21
|
-
gem 'fauxhai', '<= 3.9.0'
|
|
22
|
-
gem 'chefspec', '< 6'
|
|
19
|
+
gem 'chef', '~> 12.20.3'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright
|
|
2
|
+
# Copyright 2018, Noah Kantrowitz
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
# you may not use this file except in compliance with the License.
|
|
@@ -16,7 +16,4 @@
|
|
|
16
16
|
|
|
17
17
|
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
18
|
|
|
19
|
-
gem 'chef', '~> 12.
|
|
20
|
-
gem 'foodcritic', '< 8'
|
|
21
|
-
gem 'fauxhai', '<= 3.9.0'
|
|
22
|
-
gem 'chefspec', '< 6'
|
|
19
|
+
gem 'chef', '~> 12.21.31'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright
|
|
2
|
+
# Copyright 2017, Noah Kantrowitz
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
# you may not use this file except in compliance with the License.
|
|
@@ -16,8 +16,4 @@
|
|
|
16
16
|
|
|
17
17
|
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
18
|
|
|
19
|
-
gem 'chef', '~>
|
|
20
|
-
gem 'rack', '< 2'
|
|
21
|
-
gem 'foodcritic', '< 8'
|
|
22
|
-
gem 'fauxhai', '<= 3.9.0'
|
|
23
|
-
gem 'chefspec', '< 6'
|
|
19
|
+
gem 'chef', '~> 13.1.31'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright
|
|
2
|
+
# Copyright 2017, Noah Kantrowitz
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
# you may not use this file except in compliance with the License.
|
|
@@ -16,8 +16,4 @@
|
|
|
16
16
|
|
|
17
17
|
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
18
|
|
|
19
|
-
gem 'chef', '~>
|
|
20
|
-
gem 'rack', '< 2'
|
|
21
|
-
gem 'foodcritic', '< 8'
|
|
22
|
-
gem 'fauxhai', '<= 3.9.0'
|
|
23
|
-
gem 'chefspec', '< 6'
|
|
19
|
+
gem 'chef', '~> 13.2.20'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright 2018, Noah Kantrowitz
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
+
|
|
19
|
+
gem 'chef', '~> 13.3.42'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright 2018, Noah Kantrowitz
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
+
|
|
19
|
+
gem 'chef', '~> 13.4.24'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright 2018, Noah Kantrowitz
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
+
|
|
19
|
+
gem 'chef', '~> 13.5.3'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright 2018, Noah Kantrowitz
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
+
|
|
19
|
+
gem 'chef', '~> 13.6.4'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright 2018, Noah Kantrowitz
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
+
|
|
19
|
+
gem 'chef', '~> 13.8.0'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright 2018, Noah Kantrowitz
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
+
|
|
19
|
+
gem 'chef', '~> 14.0.202'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright 2018, Noah Kantrowitz
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
+
|
|
19
|
+
gem 'chef', '~> 14.0'
|
|
@@ -16,11 +16,14 @@
|
|
|
16
16
|
|
|
17
17
|
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
18
|
|
|
19
|
-
gem 'chef',
|
|
20
|
-
gem '
|
|
21
|
-
gem '
|
|
22
|
-
gem '
|
|
23
|
-
gem '
|
|
24
|
-
gem '
|
|
25
|
-
gem 'poise
|
|
26
|
-
gem 'poise-
|
|
19
|
+
gem 'chef', git: 'https://github.com/chef/chef.git'
|
|
20
|
+
gem 'chefspec', git: 'https://github.com/sethvargo/chefspec.git'
|
|
21
|
+
gem 'fauxhai', git: 'https://github.com/customink/fauxhai.git'
|
|
22
|
+
gem 'foodcritic', git: 'https://github.com/foodcritic/foodcritic.git'
|
|
23
|
+
gem 'halite', git: 'https://github.com/poise/halite.git'
|
|
24
|
+
gem 'ohai', git: 'https://github.com/chef/ohai.git'
|
|
25
|
+
gem 'poise', git: 'https://github.com/poise/poise.git'
|
|
26
|
+
gem 'poise-archive', git: 'https://github.com/poise/poise-archive.git'
|
|
27
|
+
gem 'poise-boiler', git: 'https://github.com/poise/poise-boiler.git'
|
|
28
|
+
gem 'poise-languages', git: 'https://github.com/poise/poise-languages.git'
|
|
29
|
+
gem 'poise-profiler', git: 'https://github.com/poise/poise-profiler.git'
|
|
@@ -128,13 +128,41 @@ describe 'pip reversion test', unless: File.exist?('/no_pip') do
|
|
|
128
128
|
'/bin/pypy'
|
|
129
129
|
end
|
|
130
130
|
|
|
131
|
+
# Confirm pip verisons.
|
|
131
132
|
describe command("/test_pip1#{path_suffix} -m pip --version") do
|
|
132
133
|
its(:exit_status) { is_expected.to eq 0 }
|
|
133
|
-
its(:stdout) { is_expected.to include '
|
|
134
|
+
its(:stdout) { is_expected.to include ' 10.' }
|
|
134
135
|
end
|
|
135
136
|
|
|
136
137
|
describe command("/test_pip2#{path_suffix} -m pip --version") do
|
|
138
|
+
its(:exit_status) { is_expected.to eq 0 }
|
|
139
|
+
its(:stdout) { is_expected.to include '8.1.2' }
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
describe command("/test_pip3#{path_suffix} -m pip --version") do
|
|
137
143
|
its(:exit_status) { is_expected.to eq 0 }
|
|
138
144
|
its(:stdout) { is_expected.to include '7.1.2' }
|
|
139
145
|
end
|
|
146
|
+
|
|
147
|
+
describe command("/test_pip4#{path_suffix} -m pip --version") do
|
|
148
|
+
its(:exit_status) { is_expected.to eq 0 }
|
|
149
|
+
its(:stdout) { is_expected.to include '9.0.3' }
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Check that structlog installed.
|
|
153
|
+
describe command("/test_pip1#{path_suffix} -c 'import structlog'") do
|
|
154
|
+
its(:exit_status) { is_expected.to eq 0 }
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
describe command("/test_pip2#{path_suffix} -c 'import structlog'") do
|
|
158
|
+
its(:exit_status) { is_expected.to eq 0 }
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
describe command("/test_pip3#{path_suffix} -c 'import structlog'") do
|
|
162
|
+
its(:exit_status) { is_expected.to eq 0 }
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
describe command("/test_pip4#{path_suffix} -c 'import structlog'") do
|
|
166
|
+
its(:exit_status) { is_expected.to eq 0 }
|
|
167
|
+
end
|
|
140
168
|
end
|
|
@@ -18,7 +18,7 @@ require 'spec_helper'
|
|
|
18
18
|
|
|
19
19
|
describe PoisePython::PythonProviders::Scl do
|
|
20
20
|
let(:python_version) { '' }
|
|
21
|
-
let(:chefspec_options) { {platform: 'centos', version: '7.
|
|
21
|
+
let(:chefspec_options) { {platform: 'centos', version: '7.4.1708'} }
|
|
22
22
|
let(:default_attributes) { {poise_python_version: python_version} }
|
|
23
23
|
let(:python_runtime) { chef_run.python_runtime('test') }
|
|
24
24
|
step_into(:python_runtime)
|
|
@@ -60,7 +60,7 @@ describe PoisePython::PythonProviders::Scl do
|
|
|
60
60
|
end # /context with version "3.3"
|
|
61
61
|
|
|
62
62
|
context 'with version "" on CentOS 6' do
|
|
63
|
-
let(:chefspec_options) { {platform: 'centos', version: '6.
|
|
63
|
+
let(:chefspec_options) { {platform: 'centos', version: '6.9'} }
|
|
64
64
|
let(:python_version) { '' }
|
|
65
65
|
it_behaves_like 'scl provider', 'rh-python34'
|
|
66
66
|
end # /context with version "" on CentOS 6
|
|
@@ -65,13 +65,13 @@ describe PoisePython::PythonProviders::System do
|
|
|
65
65
|
it_behaves_like 'system provider', %w{python2.3 python23 python}, 'python2.3'
|
|
66
66
|
end # /context with version 2.3
|
|
67
67
|
|
|
68
|
-
context 'on Debian 8
|
|
69
|
-
before { chefspec_options.update(platform: 'debian', version: '8.
|
|
68
|
+
context 'on Debian 8' do
|
|
69
|
+
before { chefspec_options.update(platform: 'debian', version: '8.9') }
|
|
70
70
|
it_behaves_like 'system provider', 'python3.4'
|
|
71
|
-
end # /context on Debian 8
|
|
71
|
+
end # /context on Debian 8
|
|
72
72
|
|
|
73
73
|
context 'on CentOS 7' do
|
|
74
|
-
before { chefspec_options.update(platform: 'centos', version: '7.
|
|
74
|
+
before { chefspec_options.update(platform: 'centos', version: '7.4.1708') }
|
|
75
75
|
recipe do
|
|
76
76
|
python_runtime 'test' do
|
|
77
77
|
provider :system
|
|
@@ -80,7 +80,7 @@ describe PoisePython::PythonProviders::System do
|
|
|
80
80
|
end
|
|
81
81
|
end
|
|
82
82
|
it_behaves_like 'system provider', 'python'
|
|
83
|
-
end # /context on
|
|
83
|
+
end # /context on CentOS 7
|
|
84
84
|
|
|
85
85
|
context 'action :uninstall' do
|
|
86
86
|
recipe do
|
|
@@ -50,7 +50,7 @@ describe PoisePython::Resources::PythonPackage do
|
|
|
50
50
|
end # /describe PoisePython::Resources::PythonPackage::Resource
|
|
51
51
|
|
|
52
52
|
describe PoisePython::Resources::PythonPackage::Provider do
|
|
53
|
-
let(:test_resource) {
|
|
53
|
+
let(:test_resource) { PoisePython::Resources::PythonPackage::Resource.new('package', chef_run.run_context) }
|
|
54
54
|
let(:test_provider) { described_class.new(test_resource, chef_run.run_context) }
|
|
55
55
|
def stub_cmd(cmd, **options)
|
|
56
56
|
options = options.dup
|
|
@@ -72,7 +72,7 @@ describe PoisePython::Resources::PythonPackage do
|
|
|
72
72
|
context 'with package_name foo' do
|
|
73
73
|
let(:package_name) { 'foo' }
|
|
74
74
|
before do
|
|
75
|
-
stub_cmd(%w{-m pip.__main__ list}, stdout: '')
|
|
75
|
+
stub_cmd(%w{-m pip.__main__ list}, environment: {'PIP_FORMAT' => 'json'}, stdout: '')
|
|
76
76
|
stub_cmd(%w{- foo}, input: kind_of(String), stdout: '{"foo":"1.0.0"}')
|
|
77
77
|
end
|
|
78
78
|
|
|
@@ -83,7 +83,7 @@ describe PoisePython::Resources::PythonPackage do
|
|
|
83
83
|
context 'with package_name ["foo", "bar"]' do
|
|
84
84
|
let(:package_name) { %w{foo bar} }
|
|
85
85
|
before do
|
|
86
|
-
stub_cmd(%w{-m pip.__main__ list}, stdout: '')
|
|
86
|
+
stub_cmd(%w{-m pip.__main__ list}, environment: {'PIP_FORMAT' => 'json'}, stdout: '')
|
|
87
87
|
stub_cmd(%w{- foo bar}, input: kind_of(String), stdout: '{"foo":"1.0.0","bar":"2.0.0"}')
|
|
88
88
|
end
|
|
89
89
|
|
|
@@ -94,7 +94,7 @@ describe PoisePython::Resources::PythonPackage do
|
|
|
94
94
|
context 'with a package with extras' do
|
|
95
95
|
let(:package_name) { 'foo[bar]' }
|
|
96
96
|
before do
|
|
97
|
-
stub_cmd(%w{-m pip.__main__ list}, stdout: '')
|
|
97
|
+
stub_cmd(%w{-m pip.__main__ list}, environment: {'PIP_FORMAT' => 'json'}, stdout: '')
|
|
98
98
|
stub_cmd(%w{- foo}, input: kind_of(String), stdout: '{"foo":"1.0.0"}')
|
|
99
99
|
end
|
|
100
100
|
|
|
@@ -105,7 +105,7 @@ describe PoisePython::Resources::PythonPackage do
|
|
|
105
105
|
context 'with a package with underscores' do
|
|
106
106
|
let(:package_name) { 'cx_foo' }
|
|
107
107
|
before do
|
|
108
|
-
stub_cmd(%w{-m pip.__main__ list}, stdout: '')
|
|
108
|
+
stub_cmd(%w{-m pip.__main__ list}, environment: {'PIP_FORMAT' => 'json'}, stdout: '')
|
|
109
109
|
stub_cmd(%w{- cx-foo}, input: kind_of(String), stdout: '{"cx-foo":"1.0.0"}')
|
|
110
110
|
end
|
|
111
111
|
|
|
@@ -117,7 +117,7 @@ describe PoisePython::Resources::PythonPackage do
|
|
|
117
117
|
let(:package_name) { 'foo' }
|
|
118
118
|
before do
|
|
119
119
|
test_resource.options('--index-url=http://example')
|
|
120
|
-
stub_cmd("-m pip.__main__ list --index-url=http://example ", stdout: '', array_13: true)
|
|
120
|
+
stub_cmd("-m pip.__main__ list --index-url=http://example ", environment: {'PIP_FORMAT' => 'json'}, stdout: '', array_13: true)
|
|
121
121
|
stub_cmd("- --index-url=http://example foo", input: kind_of(String), stdout: '{"foo":"1.0.0"}', array_13: true)
|
|
122
122
|
end
|
|
123
123
|
|
|
@@ -129,7 +129,7 @@ describe PoisePython::Resources::PythonPackage do
|
|
|
129
129
|
let(:package_name) { 'foo' }
|
|
130
130
|
before do
|
|
131
131
|
test_resource.list_options('--index-url=http://example')
|
|
132
|
-
stub_cmd("-m pip.__main__ list --index-url=http://example ", stdout: '')
|
|
132
|
+
stub_cmd("-m pip.__main__ list --index-url=http://example ", environment: {'PIP_FORMAT' => 'json'}, stdout: '')
|
|
133
133
|
stub_cmd("- --index-url=http://example foo", input: kind_of(String), stdout: '{"foo":"1.0.0"}')
|
|
134
134
|
end
|
|
135
135
|
|
|
@@ -141,7 +141,7 @@ describe PoisePython::Resources::PythonPackage do
|
|
|
141
141
|
let(:package_name) { 'foo' }
|
|
142
142
|
before do
|
|
143
143
|
test_resource.list_options(%w{--index-url=http://example})
|
|
144
|
-
stub_cmd(%w{-m pip.__main__ list --index-url=http://example}, stdout: '')
|
|
144
|
+
stub_cmd(%w{-m pip.__main__ list --index-url=http://example}, environment: {'PIP_FORMAT' => 'json'}, stdout: '')
|
|
145
145
|
stub_cmd(%w{- --index-url=http://example foo}, input: kind_of(String), stdout: '{"foo":"1.0.0"}')
|
|
146
146
|
end
|
|
147
147
|
|
|
@@ -302,6 +302,13 @@ EOH
|
|
|
302
302
|
it { is_expected.to eq({'eventlet' => '0.12.1', 'fabric' => '1.9.1', 'fabric-rundeck' => '1.2', 'flake8' => '2.1.0.dev0', 'cx-freeze' => '4.3.4'}) }
|
|
303
303
|
end # /context with standard content
|
|
304
304
|
|
|
305
|
+
context 'with JSON content' do
|
|
306
|
+
let(:text) { <<-EOH.strip }
|
|
307
|
+
[{"name":"eventlet","version":"0.12.1"}, {"name":"Fabric","version":"1.9.1"}, {"name":"fabric-rundeck","version":"1.2"}, {"name":"flake8","version":"2.1.0.dev0"}, {"name":"cx-Freeze","version":"4.3.4"}]
|
|
308
|
+
EOH
|
|
309
|
+
it { is_expected.to eq({'eventlet' => '0.12.1', 'fabric' => '1.9.1', 'fabric-rundeck' => '1.2', 'flake8' => '2.1.0.dev0', 'cx-freeze' => '4.3.4'}) }
|
|
310
|
+
end # /context with JSON content
|
|
311
|
+
|
|
305
312
|
context 'with malformed content' do
|
|
306
313
|
let(:text) { <<-EOH }
|
|
307
314
|
eventlet (0.12.1)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: poise-python
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Noah Kantrowitz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-04-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: chef
|
|
@@ -16,20 +16,20 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '12.
|
|
19
|
+
version: '12.14'
|
|
20
20
|
- - "<"
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '
|
|
22
|
+
version: '15'
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
26
|
requirements:
|
|
27
27
|
- - ">="
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: '12.
|
|
29
|
+
version: '12.14'
|
|
30
30
|
- - "<"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
32
|
+
version: '15'
|
|
33
33
|
- !ruby/object:Gem::Dependency
|
|
34
34
|
name: halite
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -97,6 +97,7 @@ files:
|
|
|
97
97
|
- ".kitchen.yml"
|
|
98
98
|
- ".travis.yml"
|
|
99
99
|
- ".yardopts"
|
|
100
|
+
- ".yo-rc.json"
|
|
100
101
|
- CHANGELOG.md
|
|
101
102
|
- Gemfile
|
|
102
103
|
- LICENSE
|
|
@@ -132,28 +133,26 @@ files:
|
|
|
132
133
|
- test/cookbook/recipes/default.rb
|
|
133
134
|
- test/docker/docker.ca
|
|
134
135
|
- test/docker/docker.pem
|
|
135
|
-
- test/gemfiles/chef-12.1.gemfile
|
|
136
|
-
- test/gemfiles/chef-12.10.gemfile
|
|
137
|
-
- test/gemfiles/chef-12.11.gemfile
|
|
138
|
-
- test/gemfiles/chef-12.12.gemfile
|
|
139
|
-
- test/gemfiles/chef-12.13.gemfile
|
|
140
136
|
- test/gemfiles/chef-12.14.gemfile
|
|
141
137
|
- test/gemfiles/chef-12.15.gemfile
|
|
142
138
|
- test/gemfiles/chef-12.16.gemfile
|
|
143
139
|
- test/gemfiles/chef-12.17.gemfile
|
|
144
140
|
- test/gemfiles/chef-12.18.gemfile
|
|
145
141
|
- test/gemfiles/chef-12.19.gemfile
|
|
146
|
-
- test/gemfiles/chef-12.
|
|
147
|
-
- test/gemfiles/chef-12.
|
|
148
|
-
- test/gemfiles/chef-12.4.gemfile
|
|
149
|
-
- test/gemfiles/chef-12.5.gemfile
|
|
150
|
-
- test/gemfiles/chef-12.6.gemfile
|
|
151
|
-
- test/gemfiles/chef-12.7.gemfile
|
|
152
|
-
- test/gemfiles/chef-12.8.gemfile
|
|
153
|
-
- test/gemfiles/chef-12.9.gemfile
|
|
142
|
+
- test/gemfiles/chef-12.20.gemfile
|
|
143
|
+
- test/gemfiles/chef-12.21.gemfile
|
|
154
144
|
- test/gemfiles/chef-12.gemfile
|
|
155
145
|
- test/gemfiles/chef-13.0.gemfile
|
|
146
|
+
- test/gemfiles/chef-13.1.gemfile
|
|
147
|
+
- test/gemfiles/chef-13.2.gemfile
|
|
148
|
+
- test/gemfiles/chef-13.3.gemfile
|
|
149
|
+
- test/gemfiles/chef-13.4.gemfile
|
|
150
|
+
- test/gemfiles/chef-13.5.gemfile
|
|
151
|
+
- test/gemfiles/chef-13.6.gemfile
|
|
152
|
+
- test/gemfiles/chef-13.8.gemfile
|
|
156
153
|
- test/gemfiles/chef-13.gemfile
|
|
154
|
+
- test/gemfiles/chef-14.0.gemfile
|
|
155
|
+
- test/gemfiles/chef-14.gemfile
|
|
157
156
|
- test/gemfiles/master.gemfile
|
|
158
157
|
- test/integration/default/serverspec/default_spec.rb
|
|
159
158
|
- test/spec/python_command_mixin_spec.rb
|
|
@@ -172,8 +171,9 @@ files:
|
|
|
172
171
|
- test/spec/utils_spec.rb
|
|
173
172
|
homepage: https://github.com/poise/poise-python
|
|
174
173
|
licenses:
|
|
175
|
-
- Apache
|
|
176
|
-
metadata:
|
|
174
|
+
- Apache-2.0
|
|
175
|
+
metadata:
|
|
176
|
+
platforms: ubuntu debian redhat centos fedora amazon windows
|
|
177
177
|
post_install_message:
|
|
178
178
|
rdoc_options: []
|
|
179
179
|
require_paths:
|
|
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
190
190
|
version: '0'
|
|
191
191
|
requirements: []
|
|
192
192
|
rubyforge_project:
|
|
193
|
-
rubygems_version: 2.6
|
|
193
|
+
rubygems_version: 2.7.6
|
|
194
194
|
signing_key:
|
|
195
195
|
specification_version: 4
|
|
196
196
|
summary: A Chef cookbook for managing Python installations.
|
|
@@ -199,28 +199,26 @@ test_files:
|
|
|
199
199
|
- test/cookbook/recipes/default.rb
|
|
200
200
|
- test/docker/docker.ca
|
|
201
201
|
- test/docker/docker.pem
|
|
202
|
-
- test/gemfiles/chef-12.1.gemfile
|
|
203
|
-
- test/gemfiles/chef-12.10.gemfile
|
|
204
|
-
- test/gemfiles/chef-12.11.gemfile
|
|
205
|
-
- test/gemfiles/chef-12.12.gemfile
|
|
206
|
-
- test/gemfiles/chef-12.13.gemfile
|
|
207
202
|
- test/gemfiles/chef-12.14.gemfile
|
|
208
203
|
- test/gemfiles/chef-12.15.gemfile
|
|
209
204
|
- test/gemfiles/chef-12.16.gemfile
|
|
210
205
|
- test/gemfiles/chef-12.17.gemfile
|
|
211
206
|
- test/gemfiles/chef-12.18.gemfile
|
|
212
207
|
- test/gemfiles/chef-12.19.gemfile
|
|
213
|
-
- test/gemfiles/chef-12.
|
|
214
|
-
- test/gemfiles/chef-12.
|
|
215
|
-
- test/gemfiles/chef-12.4.gemfile
|
|
216
|
-
- test/gemfiles/chef-12.5.gemfile
|
|
217
|
-
- test/gemfiles/chef-12.6.gemfile
|
|
218
|
-
- test/gemfiles/chef-12.7.gemfile
|
|
219
|
-
- test/gemfiles/chef-12.8.gemfile
|
|
220
|
-
- test/gemfiles/chef-12.9.gemfile
|
|
208
|
+
- test/gemfiles/chef-12.20.gemfile
|
|
209
|
+
- test/gemfiles/chef-12.21.gemfile
|
|
221
210
|
- test/gemfiles/chef-12.gemfile
|
|
222
211
|
- test/gemfiles/chef-13.0.gemfile
|
|
212
|
+
- test/gemfiles/chef-13.1.gemfile
|
|
213
|
+
- test/gemfiles/chef-13.2.gemfile
|
|
214
|
+
- test/gemfiles/chef-13.3.gemfile
|
|
215
|
+
- test/gemfiles/chef-13.4.gemfile
|
|
216
|
+
- test/gemfiles/chef-13.5.gemfile
|
|
217
|
+
- test/gemfiles/chef-13.6.gemfile
|
|
218
|
+
- test/gemfiles/chef-13.8.gemfile
|
|
223
219
|
- test/gemfiles/chef-13.gemfile
|
|
220
|
+
- test/gemfiles/chef-14.0.gemfile
|
|
221
|
+
- test/gemfiles/chef-14.gemfile
|
|
224
222
|
- test/gemfiles/master.gemfile
|
|
225
223
|
- test/integration/default/serverspec/default_spec.rb
|
|
226
224
|
- test/spec/python_command_mixin_spec.rb
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copyright 2016-2017, Noah Kantrowitz
|
|
3
|
-
#
|
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
-
|
|
19
|
-
gem 'chef', '~> 12.10.24'
|
|
20
|
-
gem 'rack', '< 2'
|
|
21
|
-
gem 'foodcritic', '< 8'
|
|
22
|
-
gem 'fauxhai', '<= 3.9.0'
|
|
23
|
-
gem 'chefspec', '< 6'
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copyright 2016-2017, Noah Kantrowitz
|
|
3
|
-
#
|
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
-
|
|
19
|
-
gem 'chef', '~> 12.11.18'
|
|
20
|
-
gem 'rack', '< 2'
|
|
21
|
-
gem 'foodcritic', '< 8'
|
|
22
|
-
gem 'fauxhai', '<= 3.9.0'
|
|
23
|
-
gem 'chefspec', '< 6'
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copyright 2015-2017, Noah Kantrowitz
|
|
3
|
-
#
|
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
-
|
|
19
|
-
gem 'chef', '~> 12.3.0'
|
|
20
|
-
gem 'rack', '< 2'
|
|
21
|
-
gem 'foodcritic', '< 8'
|
|
22
|
-
gem 'fauxhai', '<= 3.9.0'
|
|
23
|
-
gem 'chefspec', '< 6'
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copyright 2015-2017, Noah Kantrowitz
|
|
3
|
-
#
|
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
-
|
|
19
|
-
gem 'chef', '~> 12.4.3'
|
|
20
|
-
gem 'rack', '< 2'
|
|
21
|
-
gem 'foodcritic', '< 8'
|
|
22
|
-
gem 'fauxhai', '<= 3.9.0'
|
|
23
|
-
gem 'chefspec', '< 6'
|
|
24
|
-
gem 'gh', '0.14.0'
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copyright 2015-2017, Noah Kantrowitz
|
|
3
|
-
#
|
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
-
|
|
19
|
-
gem 'chef', '~> 12.5.1'
|
|
20
|
-
gem 'rack', '< 2'
|
|
21
|
-
gem 'foodcritic', '< 8'
|
|
22
|
-
gem 'fauxhai', '<= 3.9.0'
|
|
23
|
-
gem 'chefspec', '< 6'
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copyright 2015-2017, Noah Kantrowitz
|
|
3
|
-
#
|
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
-
|
|
19
|
-
gem 'chef', '~> 12.6.0'
|
|
20
|
-
gem 'rack', '< 2'
|
|
21
|
-
gem 'foodcritic', '< 8'
|
|
22
|
-
gem 'fauxhai', '<= 3.9.0'
|
|
23
|
-
gem 'chefspec', '< 6'
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copyright 2015-2017, Noah Kantrowitz
|
|
3
|
-
#
|
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
-
|
|
19
|
-
gem 'chef', '~> 12.7.2'
|
|
20
|
-
gem 'rack', '< 2'
|
|
21
|
-
gem 'foodcritic', '< 8'
|
|
22
|
-
gem 'fauxhai', '<= 3.9.0'
|
|
23
|
-
gem 'chefspec', '< 6'
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copyright 2015-2017, Noah Kantrowitz
|
|
3
|
-
#
|
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
-
|
|
19
|
-
gem 'chef', '~> 12.8.1'
|
|
20
|
-
gem 'rack', '< 2'
|
|
21
|
-
gem 'foodcritic', '< 8'
|
|
22
|
-
gem 'fauxhai', '<= 3.9.0'
|
|
23
|
-
gem 'chefspec', '< 6'
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copyright 2016-2017, Noah Kantrowitz
|
|
3
|
-
#
|
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
|
-
|
|
19
|
-
gem 'chef', '~> 12.9.41'
|
|
20
|
-
gem 'rack', '< 2'
|
|
21
|
-
gem 'foodcritic', '< 8'
|
|
22
|
-
gem 'fauxhai', '<= 3.9.0'
|
|
23
|
-
gem 'chefspec', '< 6'
|