barometer 0.6.3 → 0.6.4

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/README.rdoc CHANGED
@@ -15,7 +15,7 @@ this.
15
15
 
16
16
  == version
17
17
 
18
- Version 0.6.3 is the current release of this gem.
18
+ Version 0.6.4 is the current release of this gem.
19
19
  The gem is available from github (attack-barometer) or rubyforge (barometer).
20
20
  It is fully functional (for five weather service APIs).
21
21
 
@@ -80,7 +80,7 @@ Tzinfo handles this time zone manipulation.
80
80
 
81
81
  The query handling is one of the most beneficial and powerful features of
82
82
  Barometer. Every weather service accepts a different set of possible
83
- queries, so it usually the case that the same query can only be used
83
+ queries, so it usually is the case that the same query can only be used
84
84
  for a couple weather services.
85
85
 
86
86
  Barometer will allow the use of all query formats for all services
data/Rakefile CHANGED
@@ -5,14 +5,18 @@ begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "barometer"
8
- gem.summary = %Q{TODO}
8
+ gem.summary = "A multi API consuming weather forecasting superstar."
9
+ gem.description = "A multi API consuming weather forecasting superstar."
9
10
  gem.email = "barometer@attackcorp.com"
10
11
  gem.homepage = "http://github.com/attack/barometer"
11
12
  gem.authors = ["Mark G"]
12
- gem.rubyforge_project = 'barometer'
13
-
14
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
13
+
14
+ gem.add_dependency 'httparty', '>= 0.4.5'
15
+ gem.add_dependency 'tzinfo', '>= 0.3.14'
16
+
17
+ #gem.add_development_dependency "mocha"
15
18
  end
19
+ Jeweler::GemcutterTasks.new
16
20
  rescue LoadError
17
21
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
18
22
  end
@@ -46,32 +50,4 @@ Rake::RDocTask.new do |rdoc|
46
50
  rdoc.title = "barometer #{version}"
47
51
  rdoc.rdoc_files.include('README*')
48
52
  rdoc.rdoc_files.include('lib/**/*.rb')
49
- end
50
-
51
- begin
52
- require 'rake/contrib/sshpublisher'
53
- namespace :rubyforge do
54
-
55
- desc "Release gem and RDoc documentation to RubyForge"
56
- task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
57
-
58
- namespace :release do
59
- desc "Publish RDoc to RubyForge."
60
- task :docs => [:rdoc] do
61
- config = YAML.load(
62
- File.read(File.expand_path('~/.rubyforge/user-config.yml'))
63
- )
64
-
65
- host = "#{config['username']}@rubyforge.org"
66
- remote_dir = "/var/www/gforge-projects/barometer/"
67
- local_dir = 'rdoc'
68
-
69
- Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
70
- end
71
- end
72
- end
73
- rescue LoadError
74
- puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
75
- end
76
-
77
-
53
+ end
data/TODO CHANGED
@@ -1,5 +1,6 @@
1
1
  == now
2
2
 
3
+ - google geocoding terms of service indicate that "a map must be shown" ... what to do?
3
4
  - driver: hamweather
4
5
  - driver: meter
5
6
 
data/VERSION.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  ---
2
- :patch: 3
3
2
  :major: 0
4
3
  :minor: 6
4
+ :patch: 4
5
+ :build:
data/barometer.gemspec CHANGED
@@ -1,18 +1,23 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
1
4
  # -*- encoding: utf-8 -*-
2
5
 
3
6
  Gem::Specification.new do |s|
4
7
  s.name = %q{barometer}
5
- s.version = "0.6.3"
8
+ s.version = "0.6.4"
6
9
 
7
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
11
  s.authors = ["Mark G"]
9
- s.date = %q{2009-05-21}
12
+ s.date = %q{2010-01-29}
10
13
  s.default_executable = %q{barometer}
14
+ s.description = %q{A multi API consuming weather forecasting superstar.}
11
15
  s.email = %q{barometer@attackcorp.com}
12
16
  s.executables = ["barometer"]
13
17
  s.extra_rdoc_files = [
14
18
  "LICENSE",
15
- "README.rdoc"
19
+ "README.rdoc",
20
+ "TODO"
16
21
  ]
17
22
  s.files = [
18
23
  ".document",
@@ -135,13 +140,11 @@ Gem::Specification.new do |s|
135
140
  "spec/web_services/geocode_spec.rb",
136
141
  "spec/web_services/web_services_spec.rb"
137
142
  ]
138
- s.has_rdoc = true
139
143
  s.homepage = %q{http://github.com/attack/barometer}
140
144
  s.rdoc_options = ["--charset=UTF-8"]
141
145
  s.require_paths = ["lib"]
142
- s.rubyforge_project = %q{barometer}
143
- s.rubygems_version = %q{1.3.1}
144
- s.summary = %q{TODO}
146
+ s.rubygems_version = %q{1.3.5}
147
+ s.summary = %q{A multi API consuming weather forecasting superstar.}
145
148
  s.test_files = [
146
149
  "spec/barometer_spec.rb",
147
150
  "spec/data/distance_spec.rb",
@@ -181,11 +184,18 @@ Gem::Specification.new do |s|
181
184
 
182
185
  if s.respond_to? :specification_version then
183
186
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
184
- s.specification_version = 2
187
+ s.specification_version = 3
185
188
 
186
189
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
190
+ s.add_runtime_dependency(%q<httparty>, [">= 0.4.5"])
191
+ s.add_runtime_dependency(%q<tzinfo>, [">= 0.3.14"])
187
192
  else
193
+ s.add_dependency(%q<httparty>, [">= 0.4.5"])
194
+ s.add_dependency(%q<tzinfo>, [">= 0.3.14"])
188
195
  end
189
196
  else
197
+ s.add_dependency(%q<httparty>, [">= 0.4.5"])
198
+ s.add_dependency(%q<tzinfo>, [">= 0.3.14"])
190
199
  end
191
200
  end
201
+
@@ -27,8 +27,13 @@ module Barometer
27
27
  placemark = placemark.first if placemark.is_a?(Array)
28
28
 
29
29
  if placemark && placemark["Point"] && placemark["Point"]["coordinates"]
30
- @latitude = placemark["Point"]["coordinates"].split(',')[1].to_f
31
- @longitude = placemark["Point"]["coordinates"].split(',')[0].to_f
30
+ if placemark["Point"]["coordinates"].is_a?(Array)
31
+ @latitude = placemark["Point"]["coordinates"][1].to_f
32
+ @longitude = placemark["Point"]["coordinates"][0].to_f
33
+ else
34
+ @latitude = placemark["Point"]["coordinates"].split(',')[1].to_f
35
+ @longitude = placemark["Point"]["coordinates"].split(',')[0].to_f
36
+ end
32
37
  end
33
38
  if placemark && placemark["AddressDetails"] && placemark["AddressDetails"]["Country"]
34
39
  if placemark["AddressDetails"]["Country"]["AdministrativeArea"]
@@ -14,11 +14,11 @@ module Barometer
14
14
  "http://maps.google.com/maps/geo",
15
15
  :query => {
16
16
  :gl => query.country_code, :key => Barometer.google_geocode_key,
17
- :output => "xml", :q => query.q
17
+ :output => "json", :q => query.q, :sensor => "false"
18
18
  },
19
- :format => :xml, :timeout => Barometer.timeout
19
+ :format => :json, :timeout => Barometer.timeout
20
20
  )
21
- location = location['kml']['Response'] if location && location['kml']
21
+ location = location['kml']['Response'] if (location && location['kml'])
22
22
  location ? (geo = Data::Geo.new(location)) : nil
23
23
  end
24
24
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barometer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark G
@@ -9,11 +9,30 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-21 00:00:00 -06:00
12
+ date: 2010-01-29 00:00:00 -07:00
13
13
  default_executable: barometer
14
- dependencies: []
15
-
16
- description:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: httparty
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.4.5
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: tzinfo
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.3.14
34
+ version:
35
+ description: A multi API consuming weather forecasting superstar.
17
36
  email: barometer@attackcorp.com
18
37
  executables:
19
38
  - barometer
@@ -22,6 +41,7 @@ extensions: []
22
41
  extra_rdoc_files:
23
42
  - LICENSE
24
43
  - README.rdoc
44
+ - TODO
25
45
  files:
26
46
  - .document
27
47
  - .gitignore
@@ -144,6 +164,8 @@ files:
144
164
  - spec/web_services/web_services_spec.rb
145
165
  has_rdoc: true
146
166
  homepage: http://github.com/attack/barometer
167
+ licenses: []
168
+
147
169
  post_install_message:
148
170
  rdoc_options:
149
171
  - --charset=UTF-8
@@ -163,11 +185,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
185
  version:
164
186
  requirements: []
165
187
 
166
- rubyforge_project: barometer
167
- rubygems_version: 1.3.1
188
+ rubyforge_project:
189
+ rubygems_version: 1.3.5
168
190
  signing_key:
169
- specification_version: 2
170
- summary: TODO
191
+ specification_version: 3
192
+ summary: A multi API consuming weather forecasting superstar.
171
193
  test_files:
172
194
  - spec/barometer_spec.rb
173
195
  - spec/data/distance_spec.rb