dpl 1.5.11.travis.414.1 → 1.5.11.travis.430.1
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/README.md +1 -0
- data/lib/dpl/provider/cloudcontrol.rb +1 -1
- data/lib/dpl/provider/releases.rb +10 -5
- data/spec/provider/cloudcontrol_spec.rb +1 -1
- data/spec/provider/releases_spec.rb +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
ODYxNDkwMTJhMTUxNmJjMTc1Y2VlM2JjYTNlZTIxNWE3NGRmYWQ2ZQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
Y2ZlMjRhZDYwMGFhMzdlOGEwMzcxZWU1OWEyMTZkNjZmMDhkMDNjNw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
OTg4MjczMGQzZGYyM2Q2MjZiMDIyYzAxNGMyNzA2YmE1N2U3MTA3NDRmMzdh
|
|
10
|
+
MGQ1Yzk2MDAwNDU3ZjliZmU1Mzg5NWRhMDhlYTFhYjBlYTg1MmViYzExZTNm
|
|
11
|
+
OThmNjViNzMzZDRjMWE5YWY1ZDhlNmU3NTQwYTM1MGE4Y2FiY2U=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
OGJhNmU1YzE5M2QyODJkMmRhZGE3ZmQwODczN2Y5YmU1MjY3NmQwYmQ0NjQw
|
|
14
|
+
NDQ0YjcyZGVlMjE3MzI5NGNkOWVkNjk1MTg5N2I3MDdmN2M1NzExY2ViZjgx
|
|
15
|
+
MDg5NmE1ZmI4NmM2ZDJlOTRjOWI5ODU3ZjYyOTcwZDQzOGNhYzM=
|
data/README.md
CHANGED
|
@@ -271,6 +271,7 @@ As a rule of thumb, you should switch to the Git strategy if you run into issues
|
|
|
271
271
|
* **password**: GitHub Password. Not necessary if `api-key` is used.
|
|
272
272
|
* **repo**: GitHub Repo. Defaults to git repo's name.
|
|
273
273
|
* **file**: File to upload to GitHub Release.
|
|
274
|
+
* **release-number**: Overide automatic release detection, set a release manually.
|
|
274
275
|
|
|
275
276
|
#### GitHub Two Factor Authentication
|
|
276
277
|
|
|
@@ -56,11 +56,16 @@ module DPL
|
|
|
56
56
|
def push_app
|
|
57
57
|
tag_matched = false
|
|
58
58
|
release_url = nil
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
|
|
60
|
+
if options[:release_number]
|
|
61
|
+
tag_matched = true
|
|
62
|
+
release_url = "https://api.github.com/repos/" + slug + "/releases/" + options[:release_number]
|
|
63
|
+
else
|
|
64
|
+
releases.each do |release|
|
|
65
|
+
if release.tag_name == get_tag
|
|
66
|
+
release_url = release.rels[:self].href
|
|
67
|
+
tag_matched = true
|
|
68
|
+
end
|
|
64
69
|
end
|
|
65
70
|
end
|
|
66
71
|
|
|
@@ -85,7 +85,7 @@ describe DPL::Provider::CloudControl do
|
|
|
85
85
|
it '#push_app shuld deploy the app' do
|
|
86
86
|
provider.instance_variable_set(:@repository, 'foo_repo.git')
|
|
87
87
|
context = double(:shell)
|
|
88
|
-
context.should receive(:shell).with("git push foo_repo.git HEAD:master
|
|
88
|
+
context.should receive(:shell).with("git push foo_repo.git HEAD:master -f")
|
|
89
89
|
provider.should receive(:context).and_return context
|
|
90
90
|
provider.should receive(:deploy_app)
|
|
91
91
|
|
|
@@ -144,5 +144,23 @@ describe DPL::Provider::Releases do
|
|
|
144
144
|
|
|
145
145
|
provider.push_app
|
|
146
146
|
end
|
|
147
|
+
|
|
148
|
+
example "With Release Number" do
|
|
149
|
+
allow_message_expectations_on_nil
|
|
150
|
+
|
|
151
|
+
provider.options.update(:file => ["bar.foo"])
|
|
152
|
+
provider.options.update(:release_number => "1234")
|
|
153
|
+
|
|
154
|
+
provider.stub(:slug).and_return("foo/bar")
|
|
155
|
+
|
|
156
|
+
provider.api.stub(:release)
|
|
157
|
+
provider.api.release.stub(:rels).and_return({:assets => nil})
|
|
158
|
+
provider.api.release.rels[:assets].stub(:get).and_return({:data => nil})
|
|
159
|
+
provider.api.release.rels[:assets].get.stub(:data).and_return([])
|
|
160
|
+
|
|
161
|
+
provider.api.should_receive(:upload_asset).with("https://api.github.com/repos/foo/bar/releases/1234", "bar.foo", {:name=>"bar.foo", :content_type=>""})
|
|
162
|
+
|
|
163
|
+
provider.push_app
|
|
164
|
+
end
|
|
147
165
|
end
|
|
148
166
|
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.5.11.travis.
|
|
4
|
+
version: 1.5.11.travis.430.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-05-
|
|
11
|
+
date: 2014-05-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|