dpl-pypi 1.9.1.travis.2689.5 → 1.9.1.travis.2705.5
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/lib/dpl/provider/pypi.rb +7 -1
- data/spec/provider/pypi_spec.rb +18 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9236ba14bd57c5cc3be7d6512ebd587c7c2da4a0b5851711760362241d9efc4
|
4
|
+
data.tar.gz: 6d7b45f053858f27e1cf99b1b6e7d89910c75e03ca76a7958463b913f49f1a02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35a0253dcc1ef8eaa2b4afeeb52b91e748e09c115c30aff8f6ea3814a791bb8be7a8f5b0b737c7755a2dde08c8a7ba3f83080e357466a6b354c5173be6549c88
|
7
|
+
data.tar.gz: 9a9cdccc1d52bbc29d94c71058a2ebc9e2476c0cf99ce252705a8608d04f0a3ef5f7c1980762272eb27cee52de886ef547dc7d72a2a0c14ac8b1fa150b050d82
|
data/lib/dpl/provider/pypi.rb
CHANGED
@@ -32,6 +32,12 @@ module DPL
|
|
32
32
|
(options.has_key?(:skip_upload_docs) && options[:skip_upload_docs])
|
33
33
|
end
|
34
34
|
|
35
|
+
def pypi_skip_existing_option
|
36
|
+
if options.fetch(:skip_existing, false)
|
37
|
+
' --skip-existing'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
35
41
|
def install_deploy_dependencies
|
36
42
|
unless context.shell "wget -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && " \
|
37
43
|
"pip install --upgrade setuptools twine wheel"
|
@@ -89,7 +95,7 @@ module DPL
|
|
89
95
|
|
90
96
|
def push_app
|
91
97
|
context.shell "python setup.py #{pypi_distributions}"
|
92
|
-
unless context.shell "twine upload -r pypi dist/*"
|
98
|
+
unless context.shell "twine upload#{pypi_skip_existing_option} -r pypi dist/*"
|
93
99
|
error 'PyPI upload failed.'
|
94
100
|
end
|
95
101
|
context.shell "rm -rf dist/*"
|
data/spec/provider/pypi_spec.rb
CHANGED
@@ -56,6 +56,24 @@ describe DPL::Provider::PyPI do
|
|
56
56
|
provider.push_app
|
57
57
|
end
|
58
58
|
|
59
|
+
example "with :skip_existing option being false" do
|
60
|
+
provider.options.update(:skip_existing => false)
|
61
|
+
expect(provider.context).to receive(:shell).with("python setup.py sdist").and_return(true)
|
62
|
+
expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*").and_return(true)
|
63
|
+
expect(provider.context).to receive(:shell).with("rm -rf dist/*").and_return(true)
|
64
|
+
expect(provider.context).not_to receive(:shell).with("python setup.py upload_docs -r https://upload.pypi.org/legacy/")
|
65
|
+
provider.push_app
|
66
|
+
end
|
67
|
+
|
68
|
+
example "with :skip_existing option being true" do
|
69
|
+
provider.options.update(:skip_existing => true)
|
70
|
+
expect(provider.context).to receive(:shell).with("python setup.py sdist").and_return(true)
|
71
|
+
expect(provider.context).to receive(:shell).with("twine upload --skip-existing -r pypi dist/*").and_return(true)
|
72
|
+
expect(provider.context).to receive(:shell).with("rm -rf dist/*").and_return(true)
|
73
|
+
expect(provider.context).not_to receive(:shell).with("python setup.py upload_docs -r https://upload.pypi.org/legacy/")
|
74
|
+
provider.push_app
|
75
|
+
end
|
76
|
+
|
59
77
|
example "with :skip_upload_docs option" do
|
60
78
|
provider.options.update(:skip_upload_docs => true)
|
61
79
|
expect(provider.context).to receive(:shell).with("python setup.py sdist").and_return(true)
|
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.1.travis.
|
4
|
+
version: 1.9.1.travis.2705.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: 2018-03-
|
11
|
+
date: 2018-03-09 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.1.travis.
|
19
|
+
version: 1.9.1.travis.2705.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.9.1.travis.
|
26
|
+
version: 1.9.1.travis.2705.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|