rapleaf_api 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -1
- data/README.md +3 -3
- data/Rakefile +1 -1
- data/lib/rapleaf_api.rb +2 -2
- data/rapleaf_api.gemspec +2 -2
- metadata +4 -4
data/CHANGELOG
CHANGED
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", @
|
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", @
|
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
|
-
- :
|
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.
|
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
|
-
@
|
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.
|
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.
|
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-
|
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:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
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-
|
18
|
+
date: 2011-03-22 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|