tzdetect 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/TZDetect.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
  gem.email = ["milboj@gmail.com"]
11
11
  gem.description = %q{Detects timezone by address or location using google or geoname web service}
12
12
  gem.summary = %q{Easy way to detect time zone by address or location }
13
- gem.homepage = ""
13
+ gem.homepage = "https://github.com/milboj/tzdetect"
14
14
  gem.required_ruby_version = ">= 1.9.2"
15
15
 
16
16
  gem.files = `git ls-files`.split($/)
@@ -19,7 +19,7 @@ module TZDetect
19
19
  response = http.request request # Net::HTTPResponse object
20
20
  json_result =JSON.parse(response.read_body)
21
21
 
22
- unless json_result["geonames"].empty?
22
+ if !json_result["geonames"].nil? and !json_result["geonames"].empty?
23
23
  geoname = json_result["geonames"][0]
24
24
  @latitude = geoname["lat"]
25
25
  @longitude = geoname["lng"]
@@ -1,3 +1,3 @@
1
1
  module TZDetect
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tzdetect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-12-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: tzinfo
16
- requirement: &70295667282600 !ruby/object:Gem::Requirement
16
+ requirement: &70159654860420 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.3.33
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70295667282600
24
+ version_requirements: *70159654860420
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &70295667282140 !ruby/object:Gem::Requirement
27
+ requirement: &70159654859960 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '1.7'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70295667282140
35
+ version_requirements: *70159654859960
36
36
  description: Detects timezone by address or location using google or geoname web
37
37
  service
38
38
  email:
@@ -64,7 +64,7 @@ files:
64
64
  - test/google_parser_test.rb
65
65
  - test/helper.rb
66
66
  - test/main_functionality_test.rb
67
- homepage: ''
67
+ homepage: https://github.com/milboj/tzdetect
68
68
  licenses: []
69
69
  post_install_message:
70
70
  rdoc_options: []