dpl-pypi 1.9.6.travis.2837.6 → 1.9.6.travis.2848.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e7831b20c9c9d1a5bc8d8d086412686b7aecf04fa523e646651794d08cf39cc
4
- data.tar.gz: c8a9e51131d55149f59d1cfcbe75e17292c1c0930f435cefefa63ddbdb43846d
3
+ metadata.gz: f797cd119efe1c142e57136a0a30bc6b18071de6c7b4f293b9350d16b892cfd5
4
+ data.tar.gz: 142fa2f6c59027b3c7114f7c210668f765263a8258b68b3387250c7e88a9ab74
5
5
  SHA512:
6
- metadata.gz: 6024bba4fe483cca3ce2c7e196197bc28617ba1c8aedff5533a6c0292e122eac35370d437091c55919be57515efdb4a723e545758163c98b6f64cd68e514ee80
7
- data.tar.gz: bd261c7220be4c99232437c1c8bbeaea569541f31efa4d4b345ad2393a3a71ae734de30e898895ca280bcedd7f721d30d6875dfdd3bd5ac2cebe11ebccd4dacc
6
+ metadata.gz: 643d7967acf721edad5eb49aef2c90b26fa3cb28c0d9cf9b14517a6ff7d71d7e654c227f8703996e2df0e1ced3b4044eab44d075d3eadcb26b8237c933c2f3c2
7
+ data.tar.gz: ac4880990fee780d3d57949ddbfb4ff890c9431ad6a41a99e568e7317e3784aae40eabccef1d6239aab7254b029e726608c324641d935b1386d3c7b8a03a2b86
@@ -38,9 +38,36 @@ module DPL
38
38
  end
39
39
  end
40
40
 
41
+ def pypi_setuptools_arg
42
+ setuptools_version = options[:setuptools_version] || context.env['SETUPTOOLS_VERSION'] || ''
43
+ if setuptools_version[/\A\d+(?:\.\d+)*\z/]
44
+ 'setuptools==' + setuptools_version
45
+ else
46
+ 'setuptools'
47
+ end
48
+ end
49
+
50
+ def pypi_twine_arg
51
+ twine_version = options[:twine_version] || context.env['TWINE_VERSION'] || ''
52
+ if twine_version[/\A\d+(?:\.\d+)*\z/]
53
+ 'twine==' + twine_version
54
+ else
55
+ 'twine'
56
+ end
57
+ end
58
+
59
+ def pypi_wheel_arg
60
+ wheel_version = options[:wheel_version] || context.env['WHEEL_VERSION'] || ''
61
+ if wheel_version[/\A\d+(?:\.\d+)*\z/]
62
+ 'wheel==' + wheel_version
63
+ else
64
+ 'wheel'
65
+ end
66
+ end
67
+
41
68
  def install_deploy_dependencies
42
69
  unless context.shell "wget -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && " \
43
- "pip install --upgrade setuptools twine wheel"
70
+ "pip install --upgrade #{pypi_setuptools_arg} #{pypi_twine_arg} #{pypi_wheel_arg}"
44
71
  error "Couldn't install pip, setuptools, twine or wheel."
45
72
  end
46
73
  end
@@ -15,6 +15,27 @@ describe DPL::Provider::PyPI do
15
15
  end
16
16
  end
17
17
 
18
+ describe "#install_pinned_deploy_dependencies" do
19
+ example do
20
+ provider.options.update(:setuptools_version => '1.0.1')
21
+ provider.options.update(:twine_version => '1.1.0')
22
+ provider.options.update(:wheel_version => '0.1.0')
23
+ expect(provider.context).to receive(:shell).with(
24
+ "wget -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && pip install --upgrade setuptools==1.0.1 twine==1.1.0 wheel==0.1.0"
25
+ ).and_return(true)
26
+ provider.install_deploy_dependencies
27
+ end
28
+ end
29
+
30
+ describe "#skip_wrong_pinned_versions" do
31
+ example do
32
+ provider.options.update(:setuptools_version => '0.0.0-wrong')
33
+ provider.options.update(:twine_version => '0.0.0-pinned')
34
+ provider.options.update(:wheel_version => '0.0.0-version')
35
+ expect{provider.install_deploy_dependencies}.to raise_error(DPL::Error, "Couldn't install pip, setuptools, twine or wheel.")
36
+ end
37
+ end
38
+
18
39
  describe "#config" do
19
40
  it 'accepts a user and a password' do
20
41
  expect(provider.config[:servers]['pypi']).to include 'username: foo'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dpl-pypi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.6.travis.2837.6
4
+ version: 1.9.6.travis.2848.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-12 00:00:00.000000000 Z
11
+ date: 2018-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dpl
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.9.6.travis.2837.6
19
+ version: 1.9.6.travis.2848.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.9.6.travis.2837.6
26
+ version: 1.9.6.travis.2848.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement