fullcontact 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2014 FullContact Inc. and contributors
3
+ Copyright (c) 2016 FullContact Inc. and contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -9,6 +9,9 @@ A Ruby wrapper for the [FullContact API](http://www.fullcontact.com/)
9
9
 
10
10
  Changes
11
11
  -------
12
+ - 0.13.0
13
+ - Raise `ArgumentError` if query by Facebook ID/username is used.
14
+ - Remove deprecated messages.
12
15
  - 0.12.0 - `include_headers_in_response = true` includes response headers in returned payload
13
16
  - Accessible as `http_headers` in response. Also accessible on thrown errors (e.g. RateLimited)
14
17
  - 0.11.0 - Plisskin transformation can be disabled by specifying a `skip_rubyize = true` in config block.
@@ -70,9 +73,6 @@ There's other ways you can query the Person API:
70
73
 
71
74
  # Get information about a twitter handle
72
75
  person4 = FullContact.person(twitter: "bartlorang")
73
-
74
- # Get information about a facebook username
75
- person5 = FullContact.person(facebookUsername: 'bart.lorang')
76
76
 
77
77
  # Get information from a phone number
78
78
  person6 = FullContact.person(phone:13037170414)
@@ -113,7 +113,7 @@ A full list of contributors can be found in
113
113
 
114
114
  License
115
115
  ---------
116
- Copyright (c) 2015 FullContact Inc. and contributors
116
+ Copyright (c) 2016 FullContact Inc. and contributors
117
117
 
118
118
 
119
119
 
@@ -5,13 +5,11 @@ module FullContact
5
5
  #
6
6
  def person(options={}, faraday_options={})
7
7
  if options.is_a?(String)
8
- warn "[DEPRECATION] supplying an email address directly is deprecated. Please use {email: #{options}} instead. This will be removed in 0.9.0."
9
- options = {:email => options}
8
+ raise ArgumentError, "Supplying an email address directly is not supported. Please use {email: #{options}} instead."
10
9
  end
11
10
 
12
- if options.has_key?(:timeoutSeconds)
13
- options.delete(:timeoutSeconds)
14
- warn '[DEPRECATION] timeoutSeconds is no longer a supported parameter. It has been removed from your request.'
11
+ if options.has_key?(:facebookUsername) || options.has_key?(:facebookId)
12
+ raise ArgumentError, "Querying by Facebook ID or username is no longer supported. Please contact support@fullcontact.com for more information."
15
13
  end
16
14
 
17
15
  response = get('person', options, false, faraday_options)
@@ -1,3 +1,3 @@
1
1
  module FullContact
2
- VERSION = '0.12.0'
2
+ VERSION = '0.13.0'
3
3
  end
@@ -29,13 +29,6 @@ describe FullContact do
29
29
  .should have_been_made
30
30
  end
31
31
 
32
- it "should strip the timeoutSeconds parameter" do
33
- FullContact.person(email: "brawest@gmail.com", timeoutSeconds: 30)
34
- a_get("person.json")
35
- .with(:query => {:apiKey => "api_key", :email => "brawest@gmail.com"})
36
- .should have_been_made
37
- end
38
-
39
32
  it "should return the same results as a client by email" do
40
33
  FullContact.person(:email => "brawest@gmail.com").should == FullContact::Client.new.person(:email => "brawest@gmail.com")
41
34
  end
@@ -71,4 +71,23 @@ describe FullContact::Client::Person do
71
71
  .to(eq("application/json; charset=utf-8"))
72
72
  end
73
73
  end
74
+
75
+ context "facebook queries removed" do
76
+
77
+ before do
78
+ FullContact.configure do |config|
79
+ config.api_key = "api_key"
80
+ end
81
+ end
82
+
83
+ it 'should not allow querying by facebookUsername' do
84
+ expect { FullContact.person(facebookUsername: "brawest") }.to raise_error(ArgumentError)
85
+
86
+ end
87
+
88
+ it 'should not allow querying by facebookId' do
89
+ expect { FullContact.person(facebookId: "123") }.to raise_error(ArgumentError)
90
+
91
+ end
92
+ end
74
93
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fullcontact
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-10 00:00:00.000000000 Z
12
+ date: 2016-02-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: maruku
16
- requirement: &70200921792780 !ruby/object:Gem::Requirement
16
+ requirement: &70101799106340 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.7'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70200921792780
24
+ version_requirements: *70101799106340
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: nokogiri
27
- requirement: &70200921791920 !ruby/object:Gem::Requirement
27
+ requirement: &70101799105820 !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: *70200921791920
35
+ version_requirements: *70101799105820
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &70200921791200 !ruby/object:Gem::Requirement
38
+ requirement: &70101799105340 !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: *70200921791200
46
+ version_requirements: *70101799105340
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70200921790200 !ruby/object:Gem::Requirement
49
+ requirement: &70101799104860 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '3.1'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70200921790200
57
+ version_requirements: *70101799104860
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: simplecov
60
- requirement: &70200921789020 !ruby/object:Gem::Requirement
60
+ requirement: &70101799104380 !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: *70200921789020
68
+ version_requirements: *70101799104380
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: webmock
71
- requirement: &70200921787660 !ruby/object:Gem::Requirement
71
+ requirement: &70101799103860 !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: *70200921787660
79
+ version_requirements: *70101799103860
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: yard
82
- requirement: &70200921784940 !ruby/object:Gem::Requirement
82
+ requirement: &70101799103400 !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: *70200921784940
90
+ version_requirements: *70101799103400
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: hashie
93
- requirement: &70200921781340 !ruby/object:Gem::Requirement
93
+ requirement: &70101799102900 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -101,10 +101,10 @@ dependencies:
101
101
  version: '4.0'
102
102
  type: :runtime
103
103
  prerelease: false
104
- version_requirements: *70200921781340
104
+ version_requirements: *70101799102900
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: faraday
107
- requirement: &70200921776380 !ruby/object:Gem::Requirement
107
+ requirement: &70101799102000 !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements:
110
110
  - - ~>
@@ -112,10 +112,10 @@ dependencies:
112
112
  version: 0.9.0
113
113
  type: :runtime
114
114
  prerelease: false
115
- version_requirements: *70200921776380
115
+ version_requirements: *70101799102000
116
116
  - !ruby/object:Gem::Dependency
117
117
  name: faraday_middleware
118
- requirement: &70200921775220 !ruby/object:Gem::Requirement
118
+ requirement: &70101799101220 !ruby/object:Gem::Requirement
119
119
  none: false
120
120
  requirements:
121
121
  - - ! '>='
@@ -123,10 +123,10 @@ dependencies:
123
123
  version: '0.9'
124
124
  type: :runtime
125
125
  prerelease: false
126
- version_requirements: *70200921775220
126
+ version_requirements: *70101799101220
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: plissken
129
- requirement: &70200921774140 !ruby/object:Gem::Requirement
129
+ requirement: &70101799100840 !ruby/object:Gem::Requirement
130
130
  none: false
131
131
  requirements:
132
132
  - - ! '>='
@@ -134,7 +134,7 @@ dependencies:
134
134
  version: '0'
135
135
  type: :runtime
136
136
  prerelease: false
137
- version_requirements: *70200921774140
137
+ version_requirements: *70101799100840
138
138
  description: A Ruby wrapper for the FullContact API
139
139
  email:
140
140
  - support@fullcontact.com
@@ -191,7 +191,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
191
191
  version: '0'
192
192
  segments:
193
193
  - 0
194
- hash: -928837889352333457
194
+ hash: -1493741065031286870
195
195
  required_rubygems_version: !ruby/object:Gem::Requirement
196
196
  none: false
197
197
  requirements: