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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c72dfb654f316b931bded09235fe428a4bafaa73
4
- data.tar.gz: afd364ee0e63a4faa3c00410733bd9e29662b90c
3
+ metadata.gz: 68d079d87183352e20ca8a48a7d3aa9803889818
4
+ data.tar.gz: 3604131e63ab18a3d518fd48e7df9406d4fa6e09
5
5
  SHA512:
6
- metadata.gz: fbe97cb8486236171ea17edbe9c985b15048ec7a4bfcc5f59fbf9eec589bf3d7b40fd8893b8c95ea66d9daee91ac9a71e6a11d5a2aae27829165616ef4fb427b
7
- data.tar.gz: 191b1af59d508a358dab849608ae108bebf29e050df9e3f4839eee94b61d5f60c150d7311a3027502e99e4e7f7c3ba9f404ef993be3206a69d29da416cf14859
6
+ metadata.gz: 1bd50ae51a5281703971aaeb745d2faf09f819d5f260f6734b433e4503f209edb5591e58f576c3c858645870734fbc5ed25f5fdcf93b426cc4b0e8bf6d3ba1d3
7
+ data.tar.gz: 6bb459d3d914a7b103ec1cdad497870d33a2ddac583b13baef20d8b1586e68d7f7426f9b6372442940a3920bcd6928ace7a033d4d3c76c931115df57ebc06bd8
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- netlify (0.2.1)
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.1)
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.1)
28
- highline (1.6.21)
29
- jwt (1.5.1)
30
- mini_portile (0.6.2)
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.11.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.6.2)
36
- mini_portile (~> 0.6.0)
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
- rack (1.6.1)
44
- slop (4.0.0)
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)
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Netlify
2
2
  class DnsRecord < Model
3
- fields :id, :hostname, :type, :value, :ttl, :domain_id
3
+ fields :id, :hostname, :type, :value, :ttl, :domain_id, :managed
4
4
  end
5
5
  end
@@ -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
@@ -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]
@@ -1,3 +1,3 @@
1
1
  module Netlify
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -1,11 +1,15 @@
1
1
  # -*- encoding: utf-8 -*-
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'Netlify/version'
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 = Netlify::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.1
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: 2015-07-12 00:00:00.000000000 Z
11
+ date: 2016-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2