fullcontact 0.3.3 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -26,11 +26,21 @@ Usage Examples
26
26
  # Get information about a twitter
27
27
  person2 = FullContact.person(twitter: "brawest")
28
28
 
29
+ # Get information about a twitter and ensure a 30s socket open timeout and a 15s socket read timeout
30
+ # Can throw a Faraday::Error::TimeoutError if timeouts are exceeded
31
+ person3 = FullContact.person({:twitter => "brawest"}, {:request => {:timeout => 15, :open_timeout => 30}})
32
+
29
33
  # Get person's family_name
30
34
  puts person.contact_info.family_name
35
+
36
+ Contributions
37
+ -------------
38
+ - Michael Rose (Xorlev)
39
+ - Ian Fisher (i-taptera)
40
+ - Scott Watermasysk (scottwater)
31
41
 
32
42
  Copyright
33
43
  ---------
34
- Copyright (c) 2012 Brandon West
44
+ Copyright (c) 2012 FullContact, Brandon West
35
45
 
36
46
  See [LICENSE](https://github.com/brandonmwest/rainmaker/blob/master/LICENSE.md) for details.
data/fullcontact.gemspec CHANGED
@@ -16,20 +16,15 @@ Gem::Specification.new do |s|
16
16
  s.add_runtime_dependency 'multi_xml', '~> 0.4.2'
17
17
  s.add_runtime_dependency 'rash', '~> 0.3.0'
18
18
 
19
- s.author = "Brandon West"
19
+ s.author = "FullContact, Inc."
20
20
  s.description = %q{A Ruby wrapper for the FullContact API}
21
- s.email = ['brawest@gmail.com']
21
+ s.email = ['support@fullcontact.com']
22
22
 
23
- s.post_install_message = '
24
- -------------------------------------------------------------
25
- Follow me on Twitter! http://twitter.com/brandonmwest
26
- -------------------------------------------------------------
27
-
28
- '
23
+ s.post_install_message = ''
29
24
 
30
25
  s.executables = `git ls-files -- bin/*`.split("\n").map{|f| File.basename(f)}
31
26
  s.files = `git ls-files`.split("\n")
32
- s.homepage = 'https://github.com/brandonmwest/rainmaker'
27
+ s.homepage = 'https://github.com/fullcontact/fullcontact-api-ruby'
33
28
  s.name = 'fullcontact'
34
29
  s.require_paths = ['lib']
35
30
  s.required_rubygems_version = Gem::Requirement.new('>= 1.3.6')
@@ -3,12 +3,12 @@ module FullContact
3
3
  module Person
4
4
  # Returns extended information for a given person (email, phone, twitter or facebook)
5
5
  #
6
- def person(options={})
6
+ def person(options={}, faraday_options={})
7
7
  if options.is_a?(String)
8
8
  warn "[DEPRECATION] supplying an email address directly is deprecated. Please use {email: #{options}} instead."
9
9
  options = {:email => options}
10
10
  end
11
- response = get('person', options)
11
+ response = get('person', options, false, faraday_options)
12
12
  format.to_s.downcase == 'xml' ? response['person'] : response
13
13
  end
14
14
  end
@@ -8,13 +8,13 @@ module FullContact
8
8
  module Connection
9
9
  private
10
10
 
11
- def connection(raw=false)
11
+ def connection(raw=false, faraday_options={})
12
12
  options = {
13
13
  :headers => {'Accept' => "application/#{format}", 'User-Agent' => user_agent},
14
14
  :proxy => proxy,
15
15
  :ssl => {:verify => false},
16
16
  :url => api_endpoint,
17
- }
17
+ }.merge(faraday_options)
18
18
 
19
19
  Faraday.new(options) do |builder|
20
20
  builder.use Faraday::Request::UrlEncoded
@@ -2,17 +2,17 @@ module FullContact
2
2
  # Defines HTTP request methods
3
3
  module Request
4
4
  # Perform an HTTP GET request
5
- def get(path, options={}, raw=false)
6
- request(:get, path, options, raw)
5
+ def get(path, options={}, raw=false, faraday_options={})
6
+ request(:get, path, options, raw, faraday_options)
7
7
  end
8
8
 
9
9
  private
10
10
 
11
11
  # Perform an HTTP request
12
- def request(method, path, options, raw=false)
12
+ def request(method, path, options, raw=false, faraday_options={})
13
13
  options[:apiKey] = FullContact.options[:api_key]
14
14
 
15
- response = connection(raw).send(method) do |request|
15
+ response = connection(raw, faraday_options).send(method) do |request|
16
16
  request.url(formatted_path(path), options)
17
17
  end
18
18
 
@@ -1,3 +1,3 @@
1
1
  module FullContact
2
- VERSION = "0.3.3"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fullcontact
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
- - Brandon West
8
+ - FullContact, Inc.
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-12 00:00:00.000000000 Z
12
+ date: 2012-06-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: maruku
16
- requirement: &70330782185720 !ruby/object:Gem::Requirement
16
+ requirement: &70362520233640 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.6'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70330782185720
24
+ version_requirements: *70362520233640
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: nokogiri
27
- requirement: &70330782184860 !ruby/object:Gem::Requirement
27
+ requirement: &70362520232640 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '1.4'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70330782184860
35
+ version_requirements: *70362520232640
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &70330782209900 !ruby/object:Gem::Requirement
38
+ requirement: &70362520231500 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0.9'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70330782209900
46
+ version_requirements: *70362520231500
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70330782208100 !ruby/object:Gem::Requirement
49
+ requirement: &70362520230420 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '2.6'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70330782208100
57
+ version_requirements: *70362520230420
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: simplecov
60
- requirement: &70330782206220 !ruby/object:Gem::Requirement
60
+ requirement: &70362520229460 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0.4'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70330782206220
68
+ version_requirements: *70362520229460
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: webmock
71
- requirement: &70330782204080 !ruby/object:Gem::Requirement
71
+ requirement: &70362520228820 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '1.6'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70330782204080
79
+ version_requirements: *70362520228820
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: yard
82
- requirement: &70330782230300 !ruby/object:Gem::Requirement
82
+ requirement: &70362520244100 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0.7'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70330782230300
90
+ version_requirements: *70362520244100
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: hashie
93
- requirement: &70330782229020 !ruby/object:Gem::Requirement
93
+ requirement: &70362520240820 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 1.2.0
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *70330782229020
101
+ version_requirements: *70362520240820
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: faraday
104
- requirement: &70330782228200 !ruby/object:Gem::Requirement
104
+ requirement: &70362520193540 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0.8'
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *70330782228200
112
+ version_requirements: *70362520193540
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: faraday_middleware
115
- requirement: &70330782227360 !ruby/object:Gem::Requirement
115
+ requirement: &70362520191660 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 0.8.6
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *70330782227360
123
+ version_requirements: *70362520191660
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: multi_xml
126
- requirement: &70330782226580 !ruby/object:Gem::Requirement
126
+ requirement: &70362520190820 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ~>
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: 0.4.2
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *70330782226580
134
+ version_requirements: *70362520190820
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: rash
137
- requirement: &70330782224780 !ruby/object:Gem::Requirement
137
+ requirement: &70362520190040 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ~>
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: 0.3.0
143
143
  type: :runtime
144
144
  prerelease: false
145
- version_requirements: *70330782224780
145
+ version_requirements: *70362520190040
146
146
  description: A Ruby wrapper for the FullContact API
147
147
  email:
148
- - brawest@gmail.com
148
+ - support@fullcontact.com
149
149
  executables: []
150
150
  extensions: []
151
151
  extra_rdoc_files: []
@@ -181,18 +181,9 @@ files:
181
181
  - spec/ruby_fullcontact/client_spec.rb
182
182
  - vendor/cache/maruku-0.6.0.gem
183
183
  - vendor/cache/syntax-1.0.0.gem
184
- homepage: https://github.com/brandonmwest/rainmaker
184
+ homepage: https://github.com/fullcontact/fullcontact-api-ruby
185
185
  licenses: []
186
- post_install_message: ! '
187
-
188
- -------------------------------------------------------------
189
-
190
- Follow me on Twitter! http://twitter.com/brandonmwest
191
-
192
- -------------------------------------------------------------
193
-
194
-
195
- '
186
+ post_install_message: ''
196
187
  rdoc_options: []
197
188
  require_paths:
198
189
  - lib
@@ -204,7 +195,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
204
195
  version: '0'
205
196
  segments:
206
197
  - 0
207
- hash: 1004734639321672058
198
+ hash: 4535507749860317421
208
199
  required_rubygems_version: !ruby/object:Gem::Requirement
209
200
  none: false
210
201
  requirements: