bitballoon 0.2.0 → 0.2.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 +4 -4
- data/lib/bitballoon/deploy.rb +2 -1
- data/lib/bitballoon/deploys.rb +7 -2
- data/lib/bitballoon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5b8520fe1c7482825685f04a9ab111a156f25ecf
|
|
4
|
+
data.tar.gz: 559da8ab6620be8f7c4b891f0687b70d5bef9503
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d466eb1a266999107416d660f18ed14a8845670de1b6fccdcd4d4e73e48816f7624a993d2bd307b459bebb5f4fb39d02da27ca4bb2f8a13222893df0526b663
|
|
7
|
+
data.tar.gz: 5e34e31567ee5f417d0987d6f20ffa591eacc11161a7f25f94b885dae149c6b800eb1d753a742cadedeee6d45bd5963a03c4110d1186cae938904d8d94ddc54f
|
data/lib/bitballoon/deploy.rb
CHANGED
data/lib/bitballoon/deploys.rb
CHANGED
|
@@ -7,14 +7,15 @@ module BitBalloon
|
|
|
7
7
|
def create(attributes)
|
|
8
8
|
if attributes[:dir]
|
|
9
9
|
response = client.request(:post, path,
|
|
10
|
-
:body => JSON.generate({:files => inventory(attributes[:dir])}),
|
|
10
|
+
:body => JSON.generate({:files => inventory(attributes[:dir]), :draft => attributes[:draft] || false}),
|
|
11
11
|
:headers => {"Content-Type" => "application/json"}
|
|
12
12
|
)
|
|
13
13
|
Deploy.new(client, response.parsed).tap do |deploy|
|
|
14
14
|
deploy.upload_dir(attributes[:dir])
|
|
15
15
|
end
|
|
16
16
|
elsif attributes[:zip]
|
|
17
|
-
|
|
17
|
+
request_path = attributes[:draft] ? "#{path}?draft=true" : path
|
|
18
|
+
response = client.request(:post, request_path,
|
|
18
19
|
:body => ::File.read(attributes[:zip]),
|
|
19
20
|
:headers => {"Content-Type" => "application/zip"}
|
|
20
21
|
)
|
|
@@ -24,6 +25,10 @@ module BitBalloon
|
|
|
24
25
|
end
|
|
25
26
|
end
|
|
26
27
|
|
|
28
|
+
def draft(attributes)
|
|
29
|
+
create(attributes.merge(:draft => true))
|
|
30
|
+
end
|
|
31
|
+
|
|
27
32
|
private
|
|
28
33
|
def inventory(dir)
|
|
29
34
|
files = {}
|
data/lib/bitballoon/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bitballoon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mathias Biilmann Christensen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-06-
|
|
11
|
+
date: 2014-06-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: oauth2
|