dpl 1.6.5.travis.470.1 → 1.6.5.travis.477.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +1 -1
- data/lib/dpl/provider/releases.rb +6 -1
- data/spec/provider/releases_spec.rb +10 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGZmMjkzNzg4MGE2Y2Y2ZDk1YTA4NWI1MWQ4MWU5OThlNWUyZDNjOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODEyOGE3MDJjMDdhMTRmMTk4YjdiYTU4NzM5MjhkZWVlYjdmMmEzNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDljMmIxODk0ZmUxMzhkYmVhMzIzOGFjODk4MWQ1MmQwYzVmZDMzNThhNTI1
|
10
|
+
YzhiOTNjOTYwN2Y3ZTAxMjIyODQ3ZGVmYmEwNTQzMjRlZDhiNzJjMzMwZTM2
|
11
|
+
YzczNDg2OTQxM2I2MDg1ZThiNDRjZTU3YTZkNTI3ZjBlYzhmYjM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTc4Zjk5MjhkN2QxMjc3NzI2MWViMzRkZWE3MjlhM2YwZDdjNWEzOGNjYTM0
|
14
|
+
MDc1MDY4ZjdhOGE2ZDZmNDRkZjk0NDA2ZDM1YzIyMjgyMmY5YWZhYTdlZmI3
|
15
|
+
YjE5Nzk3Zjg3NWYzNjY5YTM1YmFlZGMzOWI0NzNmZmIzMDYzMTY=
|
data/README.md
CHANGED
@@ -157,7 +157,7 @@ As a rule of thumb, you should switch to the Git strategy if you run into issues
|
|
157
157
|
#### Examples:
|
158
158
|
|
159
159
|
dpl --provider=pypi --user=<username> --password=<password>
|
160
|
-
dpl --provider=pypi --user=<username> --password=<password> --server
|
160
|
+
dpl --provider=pypi --user=<username> --password=<password> --server='https://mypackageindex.com/index' --distributions='sdist bdist_wheel'
|
161
161
|
|
162
162
|
### NPM:
|
163
163
|
|
@@ -85,7 +85,12 @@ module DPL
|
|
85
85
|
if already_exists
|
86
86
|
log "#{filename} already exists, skipping."
|
87
87
|
else
|
88
|
-
|
88
|
+
content_type = MIME::Types.type_for(file).first.to_s
|
89
|
+
if content_type.empty?
|
90
|
+
# Specify the default content type, as it is required by GitHub
|
91
|
+
content_type = "application/octet-stream"
|
92
|
+
end
|
93
|
+
api.upload_asset(release_url, file, {:name => filename, :content_type => content_type})
|
89
94
|
end
|
90
95
|
end
|
91
96
|
end
|
@@ -70,7 +70,7 @@ describe DPL::Provider::Releases do
|
|
70
70
|
example "When Release Exists but has no Files" do
|
71
71
|
allow_message_expectations_on_nil
|
72
72
|
|
73
|
-
provider.options.update(:file => ["test/foo.bar", "bar.
|
73
|
+
provider.options.update(:file => ["test/foo.bar", "bar.txt"])
|
74
74
|
|
75
75
|
allow(provider).to receive(:releases).and_return([""])
|
76
76
|
allow(provider).to receive(:get_tag).and_return("v0.0.0")
|
@@ -86,8 +86,8 @@ describe DPL::Provider::Releases do
|
|
86
86
|
allow(provider.api.release.rels[:assets]).to receive(:get).and_return({:data => [""]})
|
87
87
|
allow(provider.api.release.rels[:assets].get).to receive(:data).and_return([])
|
88
88
|
|
89
|
-
expect(provider.api).to receive(:upload_asset).with(anything, "test/foo.bar", {:name=>"foo.bar", :content_type=>""})
|
90
|
-
expect(provider.api).to receive(:upload_asset).with(anything, "bar.
|
89
|
+
expect(provider.api).to receive(:upload_asset).with(anything, "test/foo.bar", {:name=>"foo.bar", :content_type=>"application/octet-stream"})
|
90
|
+
expect(provider.api).to receive(:upload_asset).with(anything, "bar.txt", {:name=>"bar.txt", :content_type=>"text/plain"})
|
91
91
|
|
92
92
|
provider.push_app
|
93
93
|
end
|
@@ -95,7 +95,7 @@ describe DPL::Provider::Releases do
|
|
95
95
|
example "When Release Exists and has Files" do
|
96
96
|
allow_message_expectations_on_nil
|
97
97
|
|
98
|
-
provider.options.update(:file => ["test/foo.bar", "bar.
|
98
|
+
provider.options.update(:file => ["test/foo.bar", "bar.txt"])
|
99
99
|
|
100
100
|
allow(provider).to receive(:releases).and_return([""])
|
101
101
|
allow(provider).to receive(:get_tag).and_return("v0.0.0")
|
@@ -111,7 +111,7 @@ describe DPL::Provider::Releases do
|
|
111
111
|
allow(provider.api.release.rels[:assets]).to receive(:get).and_return({:data => [""]})
|
112
112
|
allow(provider.api.release.rels[:assets].get).to receive(:data).and_return([double(:name => "foo.bar"), double(:name => "foo.foo")])
|
113
113
|
|
114
|
-
expect(provider.api).to receive(:upload_asset).with(anything, "bar.
|
114
|
+
expect(provider.api).to receive(:upload_asset).with(anything, "bar.txt", {:name=>"bar.txt", :content_type=>"text/plain"})
|
115
115
|
expect(provider).to receive(:log).with("foo.bar already exists, skipping.")
|
116
116
|
|
117
117
|
provider.push_app
|
@@ -120,7 +120,7 @@ describe DPL::Provider::Releases do
|
|
120
120
|
example "When Release Doesn't Exist" do
|
121
121
|
allow_message_expectations_on_nil
|
122
122
|
|
123
|
-
provider.options.update(:file => ["test/foo.bar", "bar.
|
123
|
+
provider.options.update(:file => ["test/foo.bar", "bar.txt"])
|
124
124
|
|
125
125
|
allow(provider).to receive(:releases).and_return([""])
|
126
126
|
|
@@ -139,8 +139,8 @@ describe DPL::Provider::Releases do
|
|
139
139
|
allow(provider.api.release.rels[:assets]).to receive(:get).and_return({:data => nil})
|
140
140
|
allow(provider.api.release.rels[:assets].get).to receive(:data).and_return([])
|
141
141
|
|
142
|
-
expect(provider.api).to receive(:upload_asset).with(anything, "test/foo.bar", {:name=>"foo.bar", :content_type=>""})
|
143
|
-
expect(provider.api).to receive(:upload_asset).with(anything, "bar.
|
142
|
+
expect(provider.api).to receive(:upload_asset).with(anything, "test/foo.bar", {:name=>"foo.bar", :content_type=>"application/octet-stream"})
|
143
|
+
expect(provider.api).to receive(:upload_asset).with(anything, "bar.txt", {:name=>"bar.txt", :content_type=>"text/plain"})
|
144
144
|
|
145
145
|
provider.push_app
|
146
146
|
end
|
@@ -148,7 +148,7 @@ describe DPL::Provider::Releases do
|
|
148
148
|
example "With Release Number" do
|
149
149
|
allow_message_expectations_on_nil
|
150
150
|
|
151
|
-
provider.options.update(:file => ["bar.
|
151
|
+
provider.options.update(:file => ["bar.txt"])
|
152
152
|
provider.options.update(:release_number => "1234")
|
153
153
|
|
154
154
|
allow(provider).to receive(:slug).and_return("foo/bar")
|
@@ -158,7 +158,7 @@ describe DPL::Provider::Releases do
|
|
158
158
|
allow(provider.api.release.rels[:assets]).to receive(:get).and_return({:data => nil})
|
159
159
|
allow(provider.api.release.rels[:assets].get).to receive(:data).and_return([])
|
160
160
|
|
161
|
-
expect(provider.api).to receive(:upload_asset).with("https://api.github.com/repos/foo/bar/releases/1234", "bar.
|
161
|
+
expect(provider.api).to receive(:upload_asset).with("https://api.github.com/repos/foo/bar/releases/1234", "bar.txt", {:name=>"bar.txt", :content_type=>"text/plain"})
|
162
162
|
|
163
163
|
provider.push_app
|
164
164
|
end
|
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.6.5.travis.
|
4
|
+
version: 1.6.5.travis.477.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|