closeio 2.4.6 → 2.4.7

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: c16a39ff7d42199be60de6a8179adc3921a6ce1c
4
- data.tar.gz: 6353367937b60de7bdc173d1936e0e460bfcdcc4
3
+ metadata.gz: 6b7578e8247c0c1329c11e07ca9bf96739307e91
4
+ data.tar.gz: 516c6459cf07920a31801a2f930efdb35e5aa594
5
5
  SHA512:
6
- metadata.gz: 28e92aa4d9ee60ac2e5e50014f9d7e63c85bfa1c9b2ca4d242b8932c4de00d017a9d86b081babf8e519ed0348be73cc6450f7e04e04e30206ab219c41252cb56
7
- data.tar.gz: f27afe21edc3bef690e968414db1c3efc56f8ab594d016713b5a65c9c471b332ac802afde9fab1af6667a43873caf3d83771990acb1fd19daac7e70e4459a447
6
+ metadata.gz: 860f19f8d5bb5112039d8b5d1e6f2cec9a48fabba6ac8b8bbd69ba3b2ea28717e0690aa4b3f5e45db06deae01ee3662f19317467103dafaabb059ddd4f9d1069
7
+ data.tar.gz: 39ad9a5948e5bbed5312bb4857e741a11319a3495c63dc1200ae1abcbb01a79b0e0f821f0a4f30eb5f170416c369de2b1fed80f7a58e41b1c565c00fade845a8
data/README.md CHANGED
@@ -43,6 +43,19 @@ Add this line to your application's Gemfile:
43
43
  smart_views.leads
44
44
  ````
45
45
 
46
+ ### Options
47
+
48
+ You can disable the logger by passing in a second argument when creating a new client:
49
+ ```ruby
50
+ client = Closeio::Client.new("api key", false)
51
+ ```
52
+
53
+ Some servers running on SSL need [specific configurations](https://github.com/lostisland/faraday/wiki/Setting-up-SSL-certificates) for the Faraday dependency.
54
+ If you're running on Heroku with SSL enabled, you need to pass in the path of the CA certificate when creating a new client:
55
+ ```ruby
56
+ client = Closeio::Client.new("api key", true, '/usr/lib/ssl/certs/ca-certificates.crt')
57
+ ```
58
+
46
59
  ### History
47
60
 
48
61
  View the [changelog](https://github.com/taylorbrooks/closeio/blob/master/CHANGELOG.md)
@@ -20,11 +20,12 @@ module Closeio
20
20
  include Closeio::Client::Task
21
21
  include Closeio::Client::User
22
22
 
23
- attr_reader :api_key, :logger
23
+ attr_reader :api_key, :logger, :ca_file
24
24
 
25
- def initialize(api_key, logger = true)
25
+ def initialize(api_key, logger = true, ca_file = nil)
26
26
  @api_key = api_key
27
27
  @logger = logger
28
+ @ca_file = ca_file
28
29
  end
29
30
 
30
31
  def get(path, options={})
@@ -74,7 +75,8 @@ module Closeio
74
75
  end
75
76
 
76
77
  def connection
77
- Faraday.new(url: "https://app.close.io/api/v1", headers: { accept: 'application/json' }) do |conn|
78
+ Faraday.new(url: "https://app.close.io/api/v1", headers: { accept: 'application/json' }, ssl: {
79
+ ca_file: ca_file}) do |conn|
78
80
  conn.basic_auth api_key, ''
79
81
  conn.request :json
80
82
  conn.response :logger if logger
@@ -1,3 +1,3 @@
1
1
  module Closeio
2
- VERSION = "2.4.6"
2
+ VERSION = "2.4.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: closeio
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.6
4
+ version: 2.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Brooks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-19 00:00:00.000000000 Z
11
+ date: 2015-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  version: '0'
191
191
  requirements: []
192
192
  rubyforge_project:
193
- rubygems_version: 2.4.5
193
+ rubygems_version: 2.4.8
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: A Ruby wrapper for the CloseIO API