dato 0.1.23 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dato.gemspec +1 -0
- data/lib/dato/account/client.rb +8 -1
- data/lib/dato/local/field_type/date_time.rb +1 -1
- data/lib/dato/local/item.rb +1 -1
- data/lib/dato/site/client.rb +9 -0
- data/lib/dato/version.rb +1 -1
- metadata +16 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7fa90b8b14dd53eab80f12f81f7ef08e860aac4
|
4
|
+
data.tar.gz: 191d5bff4920323a620bc8b2c86e2bb9880f9c67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f2c7569516aef85064d2bb0e31f4749bb198b224251913aa0e1790898ca10a745429f9a488cea5ea9fee5b0a1664a65d4a251aa0a9bb6479b35a5323f085380
|
7
|
+
data.tar.gz: 8b85427500a50cc8b54b094786a3a3293cf41d438604539913275149ace2cfec4fd049e3e1f8dfc404137900284369d08ab8988bbd2b0489d7919912605452b0
|
data/dato.gemspec
CHANGED
data/lib/dato/account/client.rb
CHANGED
@@ -10,6 +10,8 @@ require 'dato/account/repo/account'
|
|
10
10
|
require 'dato/account/repo/site'
|
11
11
|
require 'dato/api_error'
|
12
12
|
|
13
|
+
require 'cacert'
|
14
|
+
|
13
15
|
module Dato
|
14
16
|
module Account
|
15
17
|
class Client
|
@@ -42,7 +44,12 @@ module Dato
|
|
42
44
|
|
43
45
|
def request(*args)
|
44
46
|
connection.send(*args).body.with_indifferent_access
|
45
|
-
rescue Faraday::
|
47
|
+
rescue Faraday::SSLError => e
|
48
|
+
raise e if ENV['SSL_CERT_FILE'] == Cacert.pem
|
49
|
+
|
50
|
+
Cacert.set_in_env
|
51
|
+
request(*args)
|
52
|
+
rescue Faraday::ConnectionFailed, Faraday::TimeoutError => e
|
46
53
|
raise e
|
47
54
|
rescue Faraday::ClientError => e
|
48
55
|
raise ApiError, e
|
data/lib/dato/local/item.rb
CHANGED
data/lib/dato/site/client.rb
CHANGED
@@ -18,6 +18,8 @@ require 'dato/upload/file'
|
|
18
18
|
require 'dato/upload/image'
|
19
19
|
require 'dato/api_error'
|
20
20
|
|
21
|
+
require 'cacert'
|
22
|
+
|
21
23
|
module Dato
|
22
24
|
module Site
|
23
25
|
class Client
|
@@ -65,6 +67,13 @@ module Dato
|
|
65
67
|
|
66
68
|
def request(*args)
|
67
69
|
connection.send(*args).body.with_indifferent_access
|
70
|
+
rescue Faraday::SSLError => e
|
71
|
+
raise e if ENV['SSL_CERT_FILE'] == Cacert.pem
|
72
|
+
|
73
|
+
Cacert.set_in_env
|
74
|
+
request(*args)
|
75
|
+
rescue Faraday::ConnectionFailed, Faraday::TimeoutError => e
|
76
|
+
raise e
|
68
77
|
rescue Faraday::ClientError => e
|
69
78
|
raise ApiError, e
|
70
79
|
end
|
data/lib/dato/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Verna
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -290,6 +290,20 @@ dependencies:
|
|
290
290
|
- - ">="
|
291
291
|
- !ruby/object:Gem::Version
|
292
292
|
version: '0'
|
293
|
+
- !ruby/object:Gem::Dependency
|
294
|
+
name: cacert
|
295
|
+
requirement: !ruby/object:Gem::Requirement
|
296
|
+
requirements:
|
297
|
+
- - ">="
|
298
|
+
- !ruby/object:Gem::Version
|
299
|
+
version: '0'
|
300
|
+
type: :runtime
|
301
|
+
prerelease: false
|
302
|
+
version_requirements: !ruby/object:Gem::Requirement
|
303
|
+
requirements:
|
304
|
+
- - ">="
|
305
|
+
- !ruby/object:Gem::Version
|
306
|
+
version: '0'
|
293
307
|
description: Ruby client for DatoCMS API
|
294
308
|
email:
|
295
309
|
- s.verna@cantierecreativo.net
|
@@ -396,4 +410,3 @@ signing_key:
|
|
396
410
|
specification_version: 4
|
397
411
|
summary: Ruby client for DatoCMS API
|
398
412
|
test_files: []
|
399
|
-
has_rdoc:
|