robowhois 0.2.1 → 0.2.2

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.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## Release 0.2.2
5
+
6
+ * CHANGED: Update clients to the new API Errors.
7
+
8
+
4
9
  ## Release 0.2.1
5
10
 
6
11
  * FIXED: Fixed outdated documentation that describes an invalid way to initialize the client.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- robowhois (0.2.1)
4
+ robowhois (0.2.2)
5
5
  httparty (~> 0.8.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -97,9 +97,9 @@ In case of failure, the API call raises a `RoboWhois::APIError` exception.
97
97
  response = client.whois_properties('example.es')
98
98
  rescue => error
99
99
  puts error.code
100
- # => "R2"
100
+ # => "R04"
101
101
  puts error.name
102
- # => "ServerWhoisOnlyWeb"
102
+ # => "WhoisServerOnlyWeb"
103
103
  puts error.status
104
104
  # => 400
105
105
  end
@@ -13,7 +13,7 @@ class RoboWhois
13
13
  module Version
14
14
  MAJOR = 0
15
15
  MINOR = 2
16
- PATCH = 1
16
+ PATCH = 2
17
17
  BUILD = nil
18
18
 
19
19
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join(".")
data/robowhois.gemspec CHANGED
@@ -2,20 +2,20 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "robowhois"
5
- s.version = "0.2.1"
5
+ s.version = "0.2.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Simone Carletti"]
9
- s.date = "2012-03-05"
9
+ s.date = "2012-03-19"
10
10
  s.description = "Ruby client for the RoboWhois API."
11
11
  s.email = ["weppos@weppos.net"]
12
- s.files = [".gitignore", ".rspec", "CHANGELOG.md", "Gemfile", "Gemfile.lock", "LICENSE", "README.md", "Rakefile", "lib/robo_whois.rb", "lib/robo_whois/version.rb", "lib/robowhois.rb", "robowhois.gemspec", "spec/fixtures/account.dump", "spec/fixtures/commands.sh", "spec/fixtures/error_bad_credentials.dump", "spec/fixtures/error_server_whois_only_web.dump", "spec/fixtures/error_unauthenticated.dump", "spec/fixtures/whois.dump", "spec/fixtures/whois_availability.dump", "spec/fixtures/whois_availability_available.dump", "spec/fixtures/whois_availability_registered.dump", "spec/fixtures/whois_parts.dump", "spec/fixtures/whois_properties.dump", "spec/fixtures/whois_properties_available.dump", "spec/fixtures/whois_properties_registered.dump", "spec/fixtures/whois_record.dump", "spec/spec_helper.rb", "spec/support/fake_request_helpers.rb", "spec/support/helpers.rb", "spec/unit/robo_whois_spec.rb"]
12
+ s.files = [".gitignore", ".rspec", "CHANGELOG.md", "Gemfile", "Gemfile.lock", "LICENSE", "README.md", "Rakefile", "lib/robo_whois.rb", "lib/robo_whois/version.rb", "lib/robowhois.rb", "robowhois.gemspec", "spec/fixtures/account.dump", "spec/fixtures/commands.sh", "spec/fixtures/error_bad_credentials.dump", "spec/fixtures/error_unauthorized.dump", "spec/fixtures/error_whois_server_only_web.dump", "spec/fixtures/whois.dump", "spec/fixtures/whois_availability.dump", "spec/fixtures/whois_availability_available.dump", "spec/fixtures/whois_availability_registered.dump", "spec/fixtures/whois_parts.dump", "spec/fixtures/whois_properties.dump", "spec/fixtures/whois_properties_available.dump", "spec/fixtures/whois_properties_registered.dump", "spec/fixtures/whois_record.dump", "spec/spec_helper.rb", "spec/support/fake_request_helpers.rb", "spec/support/helpers.rb", "spec/unit/robo_whois_spec.rb"]
13
13
  s.homepage = "https://github.com/robowhois/robowhois-ruby-client"
14
14
  s.require_paths = ["lib"]
15
15
  s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
16
- s.rubygems_version = "1.8.11"
16
+ s.rubygems_version = "1.8.15"
17
17
  s.summary = "Ruby client for the RoboWhois API."
18
- s.test_files = ["spec/fixtures/account.dump", "spec/fixtures/commands.sh", "spec/fixtures/error_bad_credentials.dump", "spec/fixtures/error_server_whois_only_web.dump", "spec/fixtures/error_unauthenticated.dump", "spec/fixtures/whois.dump", "spec/fixtures/whois_availability.dump", "spec/fixtures/whois_availability_available.dump", "spec/fixtures/whois_availability_registered.dump", "spec/fixtures/whois_parts.dump", "spec/fixtures/whois_properties.dump", "spec/fixtures/whois_properties_available.dump", "spec/fixtures/whois_properties_registered.dump", "spec/fixtures/whois_record.dump", "spec/spec_helper.rb", "spec/support/fake_request_helpers.rb", "spec/support/helpers.rb", "spec/unit/robo_whois_spec.rb"]
18
+ s.test_files = ["spec/fixtures/account.dump", "spec/fixtures/commands.sh", "spec/fixtures/error_bad_credentials.dump", "spec/fixtures/error_unauthorized.dump", "spec/fixtures/error_whois_server_only_web.dump", "spec/fixtures/whois.dump", "spec/fixtures/whois_availability.dump", "spec/fixtures/whois_availability_available.dump", "spec/fixtures/whois_availability_registered.dump", "spec/fixtures/whois_parts.dump", "spec/fixtures/whois_properties.dump", "spec/fixtures/whois_properties_available.dump", "spec/fixtures/whois_properties_registered.dump", "spec/fixtures/whois_record.dump", "spec/spec_helper.rb", "spec/support/fake_request_helpers.rb", "spec/support/helpers.rb", "spec/unit/robo_whois_spec.rb"]
19
19
 
20
20
  if s.respond_to? :specification_version then
21
21
  s.specification_version = 3
@@ -6,10 +6,10 @@ Status: 401
6
6
  X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.11
7
7
  X-UA-Compatible: IE=Edge,chrome=1
8
8
  Cache-Control: no-cache, private
9
- X-Request-Id: 70744f5db685c3d5cb5293b0b04ca7a0
10
- X-Runtime: 0.354711
11
- Date: Mon, 05 Mar 2012 11:38:15 GMT
9
+ X-Request-Id: 6379c0483963ed0f5f4979925ff60c1f
10
+ X-Runtime: 0.113769
11
+ Date: Mon, 19 Mar 2012 21:27:49 GMT
12
12
  X-Rack-Cache: miss
13
13
  Server: nginx/1.1.14 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
14
14
 
15
- {"error":{"code":"C03","name":"BadCredentials"}}
15
+ {"error":{"code":"C02","name":"BadCredentials"}}
@@ -7,10 +7,10 @@ X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.11
7
7
  WWW-Authenticate: Basic realm="API"
8
8
  X-UA-Compatible: IE=Edge,chrome=1
9
9
  Cache-Control: no-cache
10
- X-Request-Id: 694d2e8894af1422aba9a045c293d1c2
11
- X-Runtime: 0.004623
12
- Date: Mon, 05 Mar 2012 11:38:21 GMT
10
+ X-Request-Id: 5406bd386bbf28fe4ea1085195d06912
11
+ X-Runtime: 0.003840
12
+ Date: Mon, 19 Mar 2012 21:26:45 GMT
13
13
  X-Rack-Cache: miss
14
14
  Server: nginx/1.1.14 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
15
15
 
16
- {"error":{"code":"C01","name":"Unauthenticated"}}
16
+ {"error":{"code":"C01","name":"Unauthorized"}}
@@ -6,10 +6,10 @@ Status: 400
6
6
  X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.11
7
7
  X-UA-Compatible: IE=Edge,chrome=1
8
8
  Cache-Control: no-cache, private
9
- X-Request-Id: a55f033b1038cb6512314949813822ca
10
- X-Runtime: 0.327995
11
- Date: Mon, 05 Mar 2012 11:46:59 GMT
9
+ X-Request-Id: 04004e80546be00d1b82ef79c7faa62d
10
+ X-Runtime: 0.398387
11
+ Date: Mon, 19 Mar 2012 21:28:30 GMT
12
12
  X-Rack-Cache: miss
13
13
  Server: nginx/1.1.14 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
14
14
 
15
- {"error":{"code":"R02","name":"ServerWhoisOnlyWeb"}}
15
+ {"error":{"code":"R04","name":"WhoisServerOnlyWeb"}}
@@ -192,13 +192,13 @@ describe RoboWhois do
192
192
 
193
193
  describe "ServerWhoisOnlyWeb" do
194
194
  before do
195
- stub_get('http://API_KEY:X@api.robowhois.com/whois/example.com/record', 'error_server_whois_only_web')
195
+ stub_get('http://API_KEY:X@api.robowhois.com/whois/example.com/record', 'error_whois_server_only_web')
196
196
  end
197
197
 
198
198
  it "raises an APIError" do
199
199
  lambda {
200
200
  client.whois_record("example.com")
201
- }.should raise_error(RoboWhois::APIError, /ServerWhoisOnlyWeb/)
201
+ }.should raise_error(RoboWhois::APIError, /WhoisServerOnlyWeb/)
202
202
  end
203
203
  end
204
204
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robowhois
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
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: 2012-03-05 00:00:00.000000000Z
12
+ date: 2012-03-19 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
16
- requirement: &70154354022200 !ruby/object:Gem::Requirement
16
+ requirement: &70116522457040 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.8.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70154354022200
24
+ version_requirements: *70116522457040
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &70154354021740 !ruby/object:Gem::Requirement
27
+ requirement: &70116522456580 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.9'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70154354021740
35
+ version_requirements: *70116522456580
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: yard
38
- requirement: &70154354029540 !ruby/object:Gem::Requirement
38
+ requirement: &70116522456200 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70154354029540
46
+ version_requirements: *70116522456200
47
47
  description: Ruby client for the RoboWhois API.
48
48
  email:
49
49
  - weppos@weppos.net
@@ -66,8 +66,8 @@ files:
66
66
  - spec/fixtures/account.dump
67
67
  - spec/fixtures/commands.sh
68
68
  - spec/fixtures/error_bad_credentials.dump
69
- - spec/fixtures/error_server_whois_only_web.dump
70
- - spec/fixtures/error_unauthenticated.dump
69
+ - spec/fixtures/error_unauthorized.dump
70
+ - spec/fixtures/error_whois_server_only_web.dump
71
71
  - spec/fixtures/whois.dump
72
72
  - spec/fixtures/whois_availability.dump
73
73
  - spec/fixtures/whois_availability_available.dump
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  version: '0'
102
102
  requirements: []
103
103
  rubyforge_project:
104
- rubygems_version: 1.8.11
104
+ rubygems_version: 1.8.15
105
105
  signing_key:
106
106
  specification_version: 3
107
107
  summary: Ruby client for the RoboWhois API.
@@ -109,8 +109,8 @@ test_files:
109
109
  - spec/fixtures/account.dump
110
110
  - spec/fixtures/commands.sh
111
111
  - spec/fixtures/error_bad_credentials.dump
112
- - spec/fixtures/error_server_whois_only_web.dump
113
- - spec/fixtures/error_unauthenticated.dump
112
+ - spec/fixtures/error_unauthorized.dump
113
+ - spec/fixtures/error_whois_server_only_web.dump
114
114
  - spec/fixtures/whois.dump
115
115
  - spec/fixtures/whois_availability.dump
116
116
  - spec/fixtures/whois_availability_available.dump