dpl-pypi 1.10.7.travis.3151.5 → 1.10.7.travis.3177.5

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: 4e0500082d2daeaff78a5dace0565581321995173df15fb61a3a5062c063c673
4
- data.tar.gz: ea5c4e989748ea92cf06be62772d3b1b428483583f276991a67ffc8ac7945f32
3
+ metadata.gz: 8e7fb3f6e1d89ac1b29c9ede4e0b2bb336721be204a1b431d16a17aef5fb7a99
4
+ data.tar.gz: 6d97e9f31948326802d9d9a09bd64aabf8d956d7a714319265d74455dea87264
5
5
  SHA512:
6
- metadata.gz: 93477af3ce5c39a7b94a0729ce2d14021333e306e83f3dc149ffc335a221488e0f863ce654361e5800f49533d7e65373c8d370fc82a30df9a715400c8a9eb06d
7
- data.tar.gz: 9407baed5bc168edb738a8c587fd8cdaad7f757c9438caeecdac90d86869e209e74904bfb9c904e0294a4d1caa08dedeea8c8bc0f47fa679e702112f495aa30c
6
+ metadata.gz: 5a0141e5be87fb9daffd6d773483b3f41ec88f450d52fbd285dad5572ea4f0ad704abe1e4f8c4146dea745e4513a35a24bb138b1514564fb81da8f77badb2f91
7
+ data.tar.gz: 68e2d5d08b9089be3725914dca8387a0257b113660554c9579379d276e446a969a4119384b9e5137524f2bdaa7ecc77036eabdf37bb4e3ab8f5e7bd4f3076997
@@ -1,7 +1,7 @@
1
1
  module DPL
2
2
  class Provider
3
3
  class PyPI < Provider
4
- DEFAULT_SERVER = 'https://upload.pypi.org/legacy/'
4
+ DEFAULT_SERVER = false
5
5
  PYPIRC_FILE = '~/.pypirc'
6
6
 
7
7
  def pypi_user
@@ -66,23 +66,28 @@ module DPL
66
66
  end
67
67
 
68
68
  def install_deploy_dependencies
69
- unless context.shell "wget -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && " \
69
+ # --user likely fails inside virtualenvs but is needed outside to avoid needing sudo.
70
+ unless context.shell "if [ -z ${VIRTUAL_ENV+x} ]; then export PIP_USER=yes; fi && " \
71
+ "wget -nv -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && " \
70
72
  "pip install --upgrade #{pypi_setuptools_arg} #{pypi_twine_arg} #{pypi_wheel_arg}"
71
73
  error "Couldn't install pip, setuptools, twine or wheel."
72
74
  end
73
75
  end
74
76
 
75
77
  def config
76
- {
77
- :header => '[distutils]',
78
- :servers_line => 'index-servers = pypi',
79
- :servers => {
78
+ servers = {
80
79
  'pypi' => [
81
- "repository: #{pypi_server}",
82
- "username: #{pypi_user}",
83
- "password: #{pypi_password}",
80
+ "username: #{pypi_user}",
81
+ "password: #{pypi_password}",
84
82
  ]
85
83
  }
84
+ if pypi_server
85
+ servers['pypi'].insert(0, "repository: #{pypi_server}")
86
+ end
87
+ {
88
+ :header => '[distutils]',
89
+ :servers_line => 'index-servers = pypi',
90
+ :servers => servers
86
91
  }
87
92
  end
88
93
 
data/lib/dpl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DPL
2
- VERSION = '1.10.7.travis.3151.5'
2
+ VERSION = '1.10.7.travis.3177.5'
3
3
  end
@@ -9,7 +9,7 @@ describe DPL::Provider::PyPI do
9
9
  describe "#install_deploy_dependencies" do
10
10
  example do
11
11
  expect(provider.context).to receive(:shell).with(
12
- "wget -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && pip install --upgrade setuptools twine wheel"
12
+ "if [ -z ${VIRTUAL_ENV+x} ]; then export PIP_USER=yes; fi && wget -nv -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && pip install --upgrade setuptools twine wheel"
13
13
  ).and_return(true)
14
14
  provider.install_deploy_dependencies
15
15
  end
@@ -21,7 +21,7 @@ describe DPL::Provider::PyPI do
21
21
  provider.options.update(:twine_version => '1.1.0')
22
22
  provider.options.update(:wheel_version => '0.1.0')
23
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"
24
+ "if [ -z ${VIRTUAL_ENV+x} ]; then export PIP_USER=yes; fi && wget -nv -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
25
  ).and_return(true)
26
26
  provider.install_deploy_dependencies
27
27
  end
@@ -82,7 +82,7 @@ describe DPL::Provider::PyPI do
82
82
  expect(provider.context).to receive(:shell).with("python setup.py sdist").and_return(true)
83
83
  expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*").and_return(true)
84
84
  expect(provider.context).to receive(:shell).with("rm -rf dist/*").and_return(true)
85
- expect(provider.context).not_to receive(:shell).with("python setup.py upload_docs -r https://upload.pypi.org/legacy/")
85
+ expect(provider.context).not_to receive(:shell).with("python setup.py upload_docs -r false")
86
86
  provider.push_app
87
87
  end
88
88
 
@@ -91,7 +91,7 @@ describe DPL::Provider::PyPI do
91
91
  expect(provider.context).to receive(:shell).with("python setup.py sdist").and_return(true)
92
92
  expect(provider.context).to receive(:shell).with("twine upload --skip-existing -r pypi dist/*").and_return(true)
93
93
  expect(provider.context).to receive(:shell).with("rm -rf dist/*").and_return(true)
94
- expect(provider.context).not_to receive(:shell).with("python setup.py upload_docs -r https://upload.pypi.org/legacy/")
94
+ expect(provider.context).not_to receive(:shell).with("python setup.py upload_docs -r false")
95
95
  provider.push_app
96
96
  end
97
97
 
@@ -100,7 +100,7 @@ describe DPL::Provider::PyPI do
100
100
  expect(provider.context).to receive(:shell).with("python setup.py sdist").and_return(true)
101
101
  expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*").and_return(true)
102
102
  expect(provider.context).to receive(:shell).with("rm -rf dist/*").and_return(true)
103
- expect(provider.context).not_to receive(:shell).with("python setup.py upload_docs -r https://upload.pypi.org/legacy/")
103
+ expect(provider.context).not_to receive(:shell).with("python setup.py upload_docs -r false")
104
104
  provider.push_app
105
105
  end
106
106
 
@@ -113,7 +113,7 @@ describe DPL::Provider::PyPI do
113
113
  expect(provider.context).to receive(:shell).with("python setup.py sdist").and_return(true)
114
114
  expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*").and_return(true)
115
115
  expect(provider.context).to receive(:shell).with("rm -rf dist/*").and_return(true)
116
- expect(provider.context).to receive(:shell).with("python setup.py upload_docs -r https://upload.pypi.org/legacy/").and_return(true)
116
+ expect(provider.context).to receive(:shell).with("python setup.py upload_docs -r false").and_return(true)
117
117
  provider.push_app
118
118
  end
119
119
 
@@ -122,7 +122,7 @@ describe DPL::Provider::PyPI do
122
122
  expect(provider.context).to receive(:shell).with("python setup.py sdist").and_return(true)
123
123
  expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*").and_return(true)
124
124
  expect(provider.context).to receive(:shell).with("rm -rf dist/*").and_return(true)
125
- expect(provider.context).to receive(:shell).with("python setup.py upload_docs --upload-dir some/dir -r https://upload.pypi.org/legacy/").and_return(true)
125
+ expect(provider.context).to receive(:shell).with("python setup.py upload_docs --upload-dir some/dir -r false").and_return(true)
126
126
  provider.push_app
127
127
  end
128
128
  end
@@ -134,10 +134,10 @@ describe DPL::Provider::PyPI do
134
134
  f = double(:f)
135
135
  expect(f).to receive(:puts).with(" pypi")
136
136
  expect(f).to receive(:puts).with("[pypi]")
137
- expect(f).to receive(:puts).with(["repository: https://upload.pypi.org/legacy/",
138
- "username: foo",
139
- "password: bar"
140
- ])
137
+ expect(f).to receive(:puts).with([
138
+ "username: foo",
139
+ "password: bar"
140
+ ])
141
141
  provider.write_servers(f)
142
142
  end
143
143
  end
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.10.7.travis.3151.5
4
+ version: 1.10.7.travis.3177.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-16 00:00:00.000000000 Z
11
+ date: 2019-02-04 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.10.7.travis.3151.5
19
+ version: 1.10.7.travis.3177.5
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.10.7.travis.3151.5
26
+ version: 1.10.7.travis.3177.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement