geo_ips 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ Gemfile.lock
1
2
  *.gem
2
3
  *.rbc
3
4
  .bundle
@@ -15,4 +16,4 @@ test/tmp
15
16
  test/version_tmp
16
17
  tmp
17
18
  .api_key
18
- spec/cassettes
19
+ spec/cassettes
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
1
  --color
2
- --format progress
2
+ --format Fivemat
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
6
+ - jruby-head
data/Gemfile CHANGED
@@ -1,4 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in geo_ips.gemspec
4
3
  gemspec
4
+
5
+ group :development, :test do
6
+ gem 'ZenTest', '~> 4.7.0'
7
+ gem 'fivemat'
8
+ end
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
 
11
11
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
12
12
  gem.files = `git ls-files`.split("\n")
13
- gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
13
+ gem.test_files = `git ls-files -- {spec}/*`.split("\n")
14
14
  gem.name = "geo_ips"
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = GeoIPs::VERSION
@@ -18,7 +18,6 @@ Gem::Specification.new do |gem|
18
18
  gem.add_runtime_dependency("typhoeus", "~> 0.3.3")
19
19
  gem.add_runtime_dependency("multi_json")
20
20
 
21
- gem.add_development_dependency("rspec", "~> 2.8.0")
22
- gem.add_development_dependency("autotest")
23
- gem.add_development_dependency("vcr", "~> 2.0.0")
21
+ gem.add_development_dependency("rspec", "~> 2.9.0")
22
+ gem.add_development_dependency("vcr", "~> 2.0.1")
24
23
  end
@@ -1,9 +1,10 @@
1
1
  require 'typhoeus'
2
2
  require 'multi_json'
3
3
 
4
- require 'geo_ips/version'
5
-
6
4
  class GeoIPs
5
+
6
+ BASE_URI = 'http://api.geoips.com'
7
+
7
8
  attr_writer :api_key
8
9
 
9
10
  def initialize api_key
@@ -16,7 +17,7 @@ class GeoIPs
16
17
 
17
18
  private
18
19
  def request ip
19
- response = Typhoeus::Request.get("http://api.geoips.com/ip/#{ip}/key/#{@api_key}/output/json")
20
+ response = Typhoeus::Request.get("#{BASE_URI}/ip/#{ip}/key/#{@api_key}/output/json")
20
21
 
21
22
  if response.success?
22
23
  parse(response.body)
@@ -33,3 +34,5 @@ class GeoIPs
33
34
  response_string.gsub(/,\n}$/,"\n}")
34
35
  end
35
36
  end
37
+
38
+ require 'geo_ips/version'
@@ -1,3 +1,3 @@
1
1
  class GeoIPs
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geo_ips
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.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-02 00:00:00.000000000 Z
12
+ date: 2012-04-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: typhoeus
16
- requirement: &2152157360 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: 0.3.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2152157360
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.3.3
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: multi_json
27
- requirement: &2152156400 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,40 +37,44 @@ dependencies:
32
37
  version: '0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *2152156400
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rspec
38
- requirement: &2152154920 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ~>
42
52
  - !ruby/object:Gem::Version
43
- version: 2.8.0
53
+ version: 2.9.0
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *2152154920
47
- - !ruby/object:Gem::Dependency
48
- name: autotest
49
- requirement: &2152153760 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
50
57
  none: false
51
58
  requirements:
52
- - - ! '>='
59
+ - - ~>
53
60
  - !ruby/object:Gem::Version
54
- version: '0'
55
- type: :development
56
- prerelease: false
57
- version_requirements: *2152153760
61
+ version: 2.9.0
58
62
  - !ruby/object:Gem::Dependency
59
63
  name: vcr
60
- requirement: &2152152980 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
61
65
  none: false
62
66
  requirements:
63
67
  - - ~>
64
68
  - !ruby/object:Gem::Version
65
- version: 2.0.0
69
+ version: 2.0.1
66
70
  type: :development
67
71
  prerelease: false
68
- version_requirements: *2152152980
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 2.0.1
69
78
  description: Ruby library to access the GeoIPs.com IP geo-location API
70
79
  email:
71
80
  - zeke@templ.in
@@ -77,8 +86,8 @@ files:
77
86
  - .gitignore
78
87
  - .rspec
79
88
  - .rvmrc
89
+ - .travis.yml
80
90
  - Gemfile
81
- - Gemfile.lock
82
91
  - LICENSE
83
92
  - README.md
84
93
  - Rakefile
@@ -99,20 +108,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
108
  - - ! '>='
100
109
  - !ruby/object:Gem::Version
101
110
  version: '0'
111
+ segments:
112
+ - 0
113
+ hash: -50036240108159775
102
114
  required_rubygems_version: !ruby/object:Gem::Requirement
103
115
  none: false
104
116
  requirements:
105
117
  - - ! '>='
106
118
  - !ruby/object:Gem::Version
107
119
  version: '0'
120
+ segments:
121
+ - 0
122
+ hash: -50036240108159775
108
123
  requirements: []
109
124
  rubyforge_project:
110
- rubygems_version: 1.8.17
125
+ rubygems_version: 1.8.21
111
126
  signing_key:
112
127
  specification_version: 3
113
128
  summary: Simple library to lookup IP geo-location information with the GeoIPs.com
114
129
  API.
115
- test_files:
116
- - spec/geo_ips_spec.rb
117
- - spec/spec_helper.rb
118
- has_rdoc:
130
+ test_files: []
@@ -1,36 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- geo_ips (0.1.0)
5
- multi_json
6
- typhoeus (~> 0.3.3)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- ZenTest (4.6.2)
12
- autotest (4.4.6)
13
- ZenTest (>= 4.4.1)
14
- diff-lcs (1.1.3)
15
- mime-types (1.17.2)
16
- multi_json (1.1.0)
17
- rspec (2.8.0)
18
- rspec-core (~> 2.8.0)
19
- rspec-expectations (~> 2.8.0)
20
- rspec-mocks (~> 2.8.0)
21
- rspec-core (2.8.0)
22
- rspec-expectations (2.8.0)
23
- diff-lcs (~> 1.1.2)
24
- rspec-mocks (2.8.0)
25
- typhoeus (0.3.3)
26
- mime-types
27
- vcr (2.0.0)
28
-
29
- PLATFORMS
30
- ruby
31
-
32
- DEPENDENCIES
33
- autotest
34
- geo_ips!
35
- rspec (~> 2.8.0)
36
- vcr (~> 2.0.0)