rapleaf_api 1.2.0 → 1.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.
data/CHANGELOG CHANGED
@@ -1,4 +1,6 @@
1
- v1.2.0 Bump version number to match User-Agent
1
+ v1.2.1. Support ca_file instead of ca_path in constructor
2
+
3
+ v1.2.0. Bump version number to match User-Agent
2
4
 
3
5
  v0.1.1. Bug fixes
4
6
 
data/README.md CHANGED
@@ -12,7 +12,7 @@ Usage
12
12
  > require 'rapleaf_api'
13
13
  => true
14
14
  > api = RapleafApi::Api.new('my secret API key')
15
- => #<RapleafApi::Api:0x101b7f5f0 @API_KEY="my secret API key", @CA_PATH=nil, @TIMEOUT=2, @BASE_PATH="/v4/dr?api_key=my secret API key">
15
+ => #<RapleafApi::Api:0x101b7f5f0 @API_KEY="my secret API key", @CA_FILE=nil, @TIMEOUT=2, @BASE_PATH="/v4/dr?api_key=my secret API key">
16
16
  > h = api.query_by_email('test@example.com')
17
17
  => {"location"=>"Fakesville, California, United States", "gender"=>"Male", "age"=>"25-34"}
18
18
 
@@ -21,12 +21,12 @@ Constructor Options
21
21
  You can pass in an options hash to the API constructor, like so:
22
22
 
23
23
  > api = RapleafApi::Api.new('my secret API key', :timeout => 10)
24
- => #<RapleafApi::Api:0x101b7f5f0 @API_KEY="my secret API key", @CA_PATH=nil, @TIMEOUT=10, @BASE_PATH="/v4/dr?api_key=my secret API key">
24
+ => #<RapleafApi::Api:0x101b7f5f0 @API_KEY="my secret API key", @CA_FILE=nil, @TIMEOUT=10, @BASE_PATH="/v4/dr?api_key=my secret API key">
25
25
 
26
26
  The possible options/keys accepted by the constructor are:
27
27
 
28
28
  - :timeout => The max amount of time to wait for a request to finish. Defaults to 2.
29
- - :ca_path => Set this to your system-wide root CA cert path if you're having SSL verification issues. Defaults to nil.
29
+ - :ca_file => Set this to your system-wide root CA cert path if you're having SSL verification issues. Defaults to nil.
30
30
 
31
31
  Query Options
32
32
  -------------
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('rapleaf_api', '1.2.0') do |p|
5
+ Echoe.new('rapleaf_api', '1.2.1') do |p|
6
6
  p.author = 'Rapleaf'
7
7
  p.description = "A library for interacting with Rapleaf's Personalization API."
8
8
  p.email = 'developer @nospam@ rapleaf.com'
data/lib/rapleaf_api.rb CHANGED
@@ -31,7 +31,7 @@ module RapleafApi
31
31
  @API_KEY = api_key
32
32
  @BASE_PATH = "/v4/dr?api_key=#{@API_KEY}"
33
33
  @TIMEOUT = options[:timeout] || 2
34
- @CA_PATH = options[:ca_path] # set to your system-wide root ca cert path
34
+ @CA_FILE = options[:ca_file] # set to your system-wide root ca cert file
35
35
  # if you're having ssl verification issues
36
36
  end
37
37
 
@@ -124,7 +124,7 @@ module RapleafApi
124
124
  unless defined?(@@http_client)
125
125
  @@http_client = Net::HTTP.new(HOST, PORT)
126
126
  @@http_client.use_ssl = true
127
- @@http_client.ca_path = @CA_PATH if @CA_PATH
127
+ @@http_client.ca_file = @CA_FILE if @CA_FILE
128
128
  @@http_client.verify_mode = OpenSSL::SSL::VERIFY_PEER
129
129
  @@http_client.start
130
130
  end
data/rapleaf_api.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rapleaf_api}
5
- s.version = "1.2.0"
5
+ s.version = "1.2.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Rapleaf"]
9
- s.date = %q{2011-03-11}
9
+ s.date = %q{2011-03-22}
10
10
  s.description = %q{A library for interacting with Rapleaf's Personalization API.}
11
11
  s.email = %q{developer @nospam@ rapleaf.com}
12
12
  s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.md", "lib/rapleaf_api.rb"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rapleaf_api
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 0
10
- version: 1.2.0
9
+ - 1
10
+ version: 1.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rapleaf
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-11 00:00:00 -08:00
18
+ date: 2011-03-22 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency