dpl 1.7.17.travis.882.4 → 1.7.17.travis.884.4
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 +8 -8
- data/lib/dpl/provider/pypi.rb +6 -3
- data/spec/provider/pypi_spec.rb +14 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWFhYTk0ODYwNjllN2YzOTkyMDdlZWU4NGIxODUwMTBkNDEyMTgxYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWM5OTdjY2ZmMjQ1YzNjNmZiZTNmOTNiMzk5MDkzZDM0Y2UzODJjYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTVmZTI3ZDcwOGJhZWZkNTYxZDFmZGQwNjE1OWZkNjg1MGIxMzcyZjg1Y2Iw
|
10
|
+
OTY2YjkyYWRiNGU3NGIxNTM3MzE0OTY3YWY3NmRmYjk1YTFhMmUzYjQwYzM0
|
11
|
+
YWIwOGRlZTVmMzRjYmQ0NGM0NDhlZDI5NWIwOGYxZmRkMTBhYTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzA5Y2MzZmIyYzM3YmRjMDFjNmUwZjVhYTJkMGQzNGQ5Y2U2OWE5YzZjODE3
|
14
|
+
OWUwM2Y0OTQ3ZGZmOWU2NWQ5MmMzODJkNTViODcwMTIwZThjNTU5ZGE5MmRl
|
15
|
+
NzVmNjQyY2YxMWJjNGYwYzVjYTc5ZWJmNGYxNTI5NTUyN2YwMjU=
|
data/lib/dpl/provider/pypi.rb
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
module DPL
|
2
2
|
class Provider
|
3
3
|
class PyPI < Provider
|
4
|
-
DEFAULT_SERVER = '
|
4
|
+
DEFAULT_SERVER = 'https://pypi.python.org/pypi'
|
5
5
|
PYPIRC_FILE = '~/.pypirc'
|
6
6
|
|
7
7
|
def self.install_setuptools
|
8
|
-
shell 'wget https://
|
8
|
+
shell 'wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python'
|
9
9
|
shell 'rm -f setuptools-*.zip'
|
10
10
|
end
|
11
11
|
|
12
12
|
def initialize(*args)
|
13
13
|
super(*args)
|
14
|
+
self.class.pip 'twine'
|
14
15
|
self.class.pip 'wheel' if options[:distributions].to_s.include? 'bdist_wheel'
|
15
16
|
end
|
16
17
|
|
@@ -64,7 +65,9 @@ module DPL
|
|
64
65
|
|
65
66
|
def push_app
|
66
67
|
context.shell "python setup.py register -r #{options[:server] || 'pypi'}"
|
67
|
-
context.shell "python setup.py #{options[:distributions] || 'sdist'}
|
68
|
+
context.shell "python setup.py #{options[:distributions] || 'sdist'}"
|
69
|
+
context.shell "twine upload -r #{options[:server] || 'pypi'} dist/*"
|
70
|
+
context.shell "rm -rf dist/*"
|
68
71
|
if options[:docs_dir]
|
69
72
|
docs_dir_option = '--upload-dir ' + options[:docs_dir]
|
70
73
|
else
|
data/spec/provider/pypi_spec.rb
CHANGED
@@ -15,6 +15,7 @@ describe DPL::Provider::PyPI do
|
|
15
15
|
|
16
16
|
describe "#initialize" do
|
17
17
|
example "with :distributions option containing 'bdist_wheel'" do
|
18
|
+
expect(described_class).to receive(:pip).with("twine")
|
18
19
|
expect(described_class).to receive(:pip).with("wheel")
|
19
20
|
described_class.new(DummyContext.new, :user => 'foo', :password => 'bar', :distributions => 'bdist_wheel sdist')
|
20
21
|
end
|
@@ -30,7 +31,9 @@ describe DPL::Provider::PyPI do
|
|
30
31
|
describe "#push_app" do
|
31
32
|
example do
|
32
33
|
expect(provider.context).to receive(:shell).with("python setup.py register -r pypi")
|
33
|
-
expect(provider.context).to receive(:shell).with("python setup.py sdist
|
34
|
+
expect(provider.context).to receive(:shell).with("python setup.py sdist")
|
35
|
+
expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*")
|
36
|
+
expect(provider.context).to receive(:shell).with("rm -rf dist/*")
|
34
37
|
expect(provider.context).to receive(:shell).with("python setup.py upload_docs -r pypi")
|
35
38
|
provider.push_app
|
36
39
|
end
|
@@ -38,7 +41,9 @@ describe DPL::Provider::PyPI do
|
|
38
41
|
example "with :distributions option" do
|
39
42
|
provider.options.update(:distributions => 'sdist bdist')
|
40
43
|
expect(provider.context).to receive(:shell).with("python setup.py register -r pypi")
|
41
|
-
expect(provider.context).to receive(:shell).with("python setup.py sdist bdist
|
44
|
+
expect(provider.context).to receive(:shell).with("python setup.py sdist bdist")
|
45
|
+
expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*")
|
46
|
+
expect(provider.context).to receive(:shell).with("rm -rf dist/*")
|
42
47
|
expect(provider.context).to receive(:shell).with("python setup.py upload_docs -r pypi")
|
43
48
|
provider.push_app
|
44
49
|
end
|
@@ -46,7 +51,9 @@ describe DPL::Provider::PyPI do
|
|
46
51
|
example "with :server option" do
|
47
52
|
provider.options.update(:server => 'http://blah.com')
|
48
53
|
expect(provider.context).to receive(:shell).with("python setup.py register -r http://blah.com")
|
49
|
-
expect(provider.context).to receive(:shell).with("python setup.py sdist
|
54
|
+
expect(provider.context).to receive(:shell).with("python setup.py sdist")
|
55
|
+
expect(provider.context).to receive(:shell).with("twine upload -r http://blah.com dist/*")
|
56
|
+
expect(provider.context).to receive(:shell).with("rm -rf dist/*")
|
50
57
|
expect(provider.context).to receive(:shell).with("python setup.py upload_docs -r http://blah.com")
|
51
58
|
provider.push_app
|
52
59
|
end
|
@@ -54,7 +61,9 @@ describe DPL::Provider::PyPI do
|
|
54
61
|
example "with :docs_dir option" do
|
55
62
|
provider.options.update(:docs_dir => 'some/dir')
|
56
63
|
expect(provider.context).to receive(:shell).with("python setup.py register -r pypi")
|
57
|
-
expect(provider.context).to receive(:shell).with("python setup.py sdist
|
64
|
+
expect(provider.context).to receive(:shell).with("python setup.py sdist")
|
65
|
+
expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*")
|
66
|
+
expect(provider.context).to receive(:shell).with("rm -rf dist/*")
|
58
67
|
expect(provider.context).to receive(:shell).with("python setup.py upload_docs --upload-dir some/dir -r pypi")
|
59
68
|
provider.push_app
|
60
69
|
end
|
@@ -65,7 +74,7 @@ describe DPL::Provider::PyPI do
|
|
65
74
|
f = double(:f)
|
66
75
|
expect(f).to receive(:puts).with(" pypi")
|
67
76
|
expect(f).to receive(:puts).with("[pypi]")
|
68
|
-
expect(f).to receive(:puts).with(["repository:
|
77
|
+
expect(f).to receive(:puts).with(["repository: https://pypi.python.org/pypi",
|
69
78
|
"username: foo",
|
70
79
|
"password: bar"
|
71
80
|
])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dpl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.17.travis.
|
4
|
+
version: 1.7.17.travis.884.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|