poise-python 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/lib/poise_python/resources/python_package.rb +4 -4
- data/lib/poise_python/version.rb +1 -1
- data/test/gemfiles/master.gemfile +1 -1
- data/test/spec/resources/python_package_spec.rb +24 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f304a2454721479e3c38acad468e98a2774757e
|
4
|
+
data.tar.gz: b232e65292bf44a165365aff618bf43eba398fcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78e693a8d1fdb7d0928ffc6946fbcc4c229bddc9b492999cc4067ae6f8ae7f51a77197a1863567a02056429864806febf39d7914f75b4ce6371b6d6710c59c82
|
7
|
+
data.tar.gz: 73957a301bf9c69bde856b5afedc5f7628a0d31e8d3c4166d9e68bd210293c0d4ad557eba770a955f8671aef69dbd8feddc6acbac65be9574f349d023df4c818
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -188,13 +188,13 @@ EOH
|
|
188
188
|
@candidate_version = []
|
189
189
|
versions = []
|
190
190
|
[resource.package_name].flatten.each do |name|
|
191
|
-
ver = version_data[parse_package_name(name)
|
191
|
+
ver = version_data[parse_package_name(name)]
|
192
192
|
versions << ver[:current]
|
193
193
|
@candidate_version << ver[:candidate]
|
194
194
|
end
|
195
195
|
resource.version(versions)
|
196
196
|
else
|
197
|
-
ver = version_data[parse_package_name(resource.package_name)
|
197
|
+
ver = version_data[parse_package_name(resource.package_name)]
|
198
198
|
resource.version(ver[:current])
|
199
199
|
@candidate_version = ver[:candidate]
|
200
200
|
end
|
@@ -316,7 +316,7 @@ EOH
|
|
316
316
|
# Example of a line:
|
317
317
|
# boto (2.25.0)
|
318
318
|
if md = line.match(/^(\S+)\s+\(([^\s,]+).*\)$/i)
|
319
|
-
memo[md[1]
|
319
|
+
memo[parse_package_name(md[1])] = md[2]
|
320
320
|
else
|
321
321
|
Chef::Log.debug("[#{new_resource}] Unparsable line in pip list: #{line}")
|
322
322
|
end
|
@@ -340,7 +340,7 @@ EOH
|
|
340
340
|
$1
|
341
341
|
else
|
342
342
|
raw_name
|
343
|
-
end
|
343
|
+
end.downcase.gsub(/_/, '-')
|
344
344
|
end
|
345
345
|
|
346
346
|
end
|
data/lib/poise_python/version.rb
CHANGED
@@ -21,5 +21,5 @@ gem 'halite', github: 'poise/halite'
|
|
21
21
|
gem 'poise', github: 'poise/poise'
|
22
22
|
gem 'poise-archive', github: 'poise/poise-archive'
|
23
23
|
gem 'poise-boiler', github: 'poise/poise-boiler'
|
24
|
-
|
24
|
+
gem 'poise-languages', github: 'poise/poise-languages'
|
25
25
|
gem 'poise-profiler', github: 'poise/poise-profiler'
|
@@ -97,6 +97,17 @@ describe PoisePython::Resources::PythonPackage do
|
|
97
97
|
it { expect(candidate_version).to eq '1.0.0' }
|
98
98
|
end # /context with a package with extras
|
99
99
|
|
100
|
+
context 'with a package with underscores' do
|
101
|
+
let(:package_name) { 'cx_foo' }
|
102
|
+
before do
|
103
|
+
stub_cmd(%w{-m pip.__main__ list}, stdout: '')
|
104
|
+
stub_cmd(%w{- cx-foo}, input: kind_of(String), stdout: '{"cx-foo":"1.0.0"}')
|
105
|
+
end
|
106
|
+
|
107
|
+
its(:version) { is_expected.to be nil }
|
108
|
+
it { expect(candidate_version).to eq '1.0.0' }
|
109
|
+
end # /context with a package with underscores
|
110
|
+
|
100
111
|
context 'with options' do
|
101
112
|
let(:package_name) { 'foo' }
|
102
113
|
before do
|
@@ -189,6 +200,15 @@ describe PoisePython::Resources::PythonPackage do
|
|
189
200
|
subject
|
190
201
|
end
|
191
202
|
end # /context with a package with extras
|
203
|
+
|
204
|
+
context 'with a package with underscores' do
|
205
|
+
let(:package_name) { 'cx_foo' }
|
206
|
+
let(:candidate_version) { '1.0.0' }
|
207
|
+
it do
|
208
|
+
stub_cmd(%w{-m pip.__main__ install cx_foo==1.0.0})
|
209
|
+
subject
|
210
|
+
end
|
211
|
+
end # /context with a package with underscores
|
192
212
|
end # /describe action :install
|
193
213
|
|
194
214
|
describe 'action :upgrade' do
|
@@ -250,8 +270,9 @@ eventlet (0.12.1)
|
|
250
270
|
Fabric (1.9.1)
|
251
271
|
fabric-rundeck (1.2, /Users/coderanger/src/bal/fabric-rundeck)
|
252
272
|
flake8 (2.1.0.dev0)
|
273
|
+
cx-Freeze (4.3.4)
|
253
274
|
EOH
|
254
|
-
it { is_expected.to eq({'eventlet' => '0.12.1', 'fabric' => '1.9.1', 'fabric-rundeck' => '1.2', 'flake8' => '2.1.0.dev0'}) }
|
275
|
+
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'}) }
|
255
276
|
end # /context with standard content
|
256
277
|
|
257
278
|
context 'with malformed content' do
|
@@ -260,8 +281,9 @@ eventlet (0.12.1)
|
|
260
281
|
Fabric (1.9.1)
|
261
282
|
fabric-rundeck (1.2, /Users/coderanger/src/bal/fabric-rundeck)
|
262
283
|
flake 8 (2.1.0.dev0)
|
284
|
+
cx_Freeze (4.3.4)
|
263
285
|
EOH
|
264
|
-
it { is_expected.to eq({'eventlet' => '0.12.1', 'fabric' => '1.9.1', 'fabric-rundeck' => '1.2'}) }
|
286
|
+
it { is_expected.to eq({'eventlet' => '0.12.1', 'fabric' => '1.9.1', 'fabric-rundeck' => '1.2', 'cx-freeze' => '4.3.4'}) }
|
265
287
|
end # /context with malformed content
|
266
288
|
end # /describe #parse_pip_list
|
267
289
|
end # /describe PoisePython::Resources::PythonPackage::Provider
|
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.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Kantrowitz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|