netlify 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +13 -11
- data/lib/netlify/deploys.rb +7 -0
- data/lib/netlify/dns_record.rb +1 -1
- data/lib/netlify/site.rb +1 -1
- data/lib/netlify/sites.rb +1 -1
- data/lib/netlify/version.rb +1 -1
- data/netlify.gemspec +8 -4
- 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: 68d079d87183352e20ca8a48a7d3aa9803889818
|
4
|
+
data.tar.gz: 3604131e63ab18a3d518fd48e7df9406d4fa6e09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bd50ae51a5281703971aaeb745d2faf09f819d5f260f6734b433e4503f209edb5591e58f576c3c858645870734fbc5ed25f5fdcf93b426cc4b0e8bf6d3ba1d3
|
7
|
+
data.tar.gz: 6bb459d3d914a7b103ec1cdad497870d33a2ddac583b13baef20d8b1586e68d7f7426f9b6372442940a3920bcd6928ace7a033d4d3c76c931115df57ebc06bd8
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
netlify (0.2.
|
4
|
+
netlify (0.2.2)
|
5
5
|
github_api
|
6
6
|
highline
|
7
7
|
oauth2 (>= 0.9.2)
|
@@ -14,7 +14,7 @@ GEM
|
|
14
14
|
crack (0.3.2)
|
15
15
|
descendants_tracker (0.0.4)
|
16
16
|
thread_safe (~> 0.3, >= 0.3.1)
|
17
|
-
faraday (0.9.
|
17
|
+
faraday (0.9.2)
|
18
18
|
multipart-post (>= 1.2, < 3)
|
19
19
|
github_api (0.12.2)
|
20
20
|
addressable (~> 2.3)
|
@@ -24,24 +24,26 @@ GEM
|
|
24
24
|
multi_json (>= 1.7.5, < 2.0)
|
25
25
|
nokogiri (~> 1.6.3)
|
26
26
|
oauth2
|
27
|
-
hashie (3.3
|
28
|
-
highline (1.
|
29
|
-
jwt (1.5.
|
30
|
-
|
27
|
+
hashie (3.4.3)
|
28
|
+
highline (1.7.8)
|
29
|
+
jwt (1.5.2)
|
30
|
+
mini_portile2 (2.1.0)
|
31
31
|
minitest (5.0.8)
|
32
|
-
multi_json (1.
|
32
|
+
multi_json (1.12.1)
|
33
33
|
multi_xml (0.5.5)
|
34
34
|
multipart-post (2.0.0)
|
35
|
-
nokogiri (1.6.
|
36
|
-
|
35
|
+
nokogiri (1.6.8)
|
36
|
+
mini_portile2 (~> 2.1.0)
|
37
|
+
pkg-config (~> 1.1.7)
|
37
38
|
oauth2 (1.0.0)
|
38
39
|
faraday (>= 0.8, < 0.10)
|
39
40
|
jwt (~> 1.0)
|
40
41
|
multi_json (~> 1.3)
|
41
42
|
multi_xml (~> 0.5)
|
42
43
|
rack (~> 1.2)
|
43
|
-
|
44
|
-
|
44
|
+
pkg-config (1.1.7)
|
45
|
+
rack (1.6.4)
|
46
|
+
slop (4.2.0)
|
45
47
|
thread_safe (0.3.5)
|
46
48
|
webmock (1.11.0)
|
47
49
|
addressable (>= 2.2.7)
|
data/lib/netlify/deploys.rb
CHANGED
@@ -20,6 +20,13 @@ module Netlify
|
|
20
20
|
:headers => {"Content-Type" => "application/zip"}
|
21
21
|
)
|
22
22
|
Deploy.new(client, response.parsed)
|
23
|
+
elsif attributes[:tar]
|
24
|
+
request_path = attributes[:draft] ? "#{path}?draft=true" : path
|
25
|
+
response = client.request(:post, request_path,
|
26
|
+
:body => ::File.read(attributes[:tar]),
|
27
|
+
:headers => {"Content-Type" => "application/x-gzip"}
|
28
|
+
)
|
29
|
+
Deploy.new(client, response.parsed)
|
23
30
|
else
|
24
31
|
raise "Need dir or zip to create a deploy"
|
25
32
|
end
|
data/lib/netlify/dns_record.rb
CHANGED
data/lib/netlify/site.rb
CHANGED
@@ -25,7 +25,7 @@ module Netlify
|
|
25
25
|
def update(attributes)
|
26
26
|
response = client.request(:put, path, :body => mutable_attributes(attributes))
|
27
27
|
process(response.parsed)
|
28
|
-
if attributes[:zip] || attributes[:dir]
|
28
|
+
if attributes[:zip] || attributes[:tar] || attributes[:dir]
|
29
29
|
deploy = deploys.create(attributes)
|
30
30
|
self.deploy_id = deploy.id
|
31
31
|
end
|
data/lib/netlify/sites.rb
CHANGED
@@ -8,7 +8,7 @@ module Netlify
|
|
8
8
|
def create(attributes = {})
|
9
9
|
response = client.request(:post, path, :body => Site.new(client, {}).send(:mutable_attributes, attributes))
|
10
10
|
Site.new(client, response.parsed).tap do |site|
|
11
|
-
if attributes[:zip] || attributes[:dir]
|
11
|
+
if attributes[:zip] || attributes[:tar] || attributes[:dir]
|
12
12
|
deploy = site.deploys.create(attributes)
|
13
13
|
site.deploy_id = deploy.id
|
14
14
|
elsif attributes[:github]
|
data/lib/netlify/version.rb
CHANGED
data/netlify.gemspec
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
#
|
3
|
+
d = File.read(File.expand_path("../lib/netlify/version.rb", __FILE__))
|
4
|
+
if d =~ /VERSION = "(\d+\.\d+\.\d+)"/
|
5
|
+
version = $1
|
6
|
+
else
|
7
|
+
version = "0.0.1"
|
8
|
+
end
|
5
9
|
|
6
10
|
Gem::Specification.new do |gem|
|
7
11
|
gem.name = "netlify"
|
8
|
-
gem.version =
|
12
|
+
gem.version = version
|
9
13
|
gem.authors = ["Mathias Biilmann Christensen"]
|
10
14
|
gem.email = ["mathias@Netlify.com"]
|
11
15
|
gem.description = %q{API Client for Netlify}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netlify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
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:
|
11
|
+
date: 2016-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|