weather_hacker 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -27,13 +27,13 @@ require "weather_hacker"
27
27
  require "yaml"
28
28
  require "date"
29
29
 
30
- zipcode = "690-0261"
31
- weather = WeatherHacker.new(zipcode)
30
+ zipcode = "690-0261"
31
+ forecast = WeatherHacker.new(zipcode)
32
32
 
33
- y weather.on(Date.today)
34
- y weather.today
35
- y weather.tomorrow
36
- y weather.day_after_tomorrow
33
+ y forecast.on(Date.today)
34
+ y forecast.today
35
+ y forecast.tomorrow
36
+ y forecast.day_after_tomorrow
37
37
  ```
38
38
 
39
39
  ```
data/bin/weather ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "awesome_print"
4
+ require "date"
5
+
6
+ zipcode = ARGV[0]
7
+ unless zipcode
8
+ puts "Usage: weather [zipcode]"
9
+ exit!
10
+ end
11
+
12
+ $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
13
+ require "weather_hacker"
14
+
15
+ forecast = WeatherHacker.new(zipcode)
16
+
17
+ (0 .. 2).each do |i|
18
+ date = Date.today + i
19
+ puts date
20
+ ap forecast.on(date)
21
+ puts
22
+ end
@@ -1,3 +1,3 @@
1
1
  class WeatherHacker
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -17,6 +17,7 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.add_dependency 'rake', '>= 0.9.2'
19
19
  gem.add_dependency "httparty"
20
+ gem.add_dependency "awesome_print"
20
21
  gem.add_development_dependency "rspec"
21
22
  gem.add_development_dependency "simplecov"
22
23
  gem.add_development_dependency "simplecov-vim"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weather_hacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
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-04-09 00:00:00.000000000 Z
12
+ date: 2012-04-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &70181545291080 !ruby/object:Gem::Requirement
16
+ requirement: &70285964279140 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.9.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70181545291080
24
+ version_requirements: *70285964279140
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: httparty
27
- requirement: &70181545290660 !ruby/object:Gem::Requirement
27
+ requirement: &70285964278720 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,21 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70181545290660
35
+ version_requirements: *70285964278720
36
+ - !ruby/object:Gem::Dependency
37
+ name: awesome_print
38
+ requirement: &70285964278260 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70285964278260
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: rspec
38
- requirement: &70181545290200 !ruby/object:Gem::Requirement
49
+ requirement: &70285964277840 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ! '>='
@@ -43,10 +54,10 @@ dependencies:
43
54
  version: '0'
44
55
  type: :development
45
56
  prerelease: false
46
- version_requirements: *70181545290200
57
+ version_requirements: *70285964277840
47
58
  - !ruby/object:Gem::Dependency
48
59
  name: simplecov
49
- requirement: &70181545289780 !ruby/object:Gem::Requirement
60
+ requirement: &70285964277420 !ruby/object:Gem::Requirement
50
61
  none: false
51
62
  requirements:
52
63
  - - ! '>='
@@ -54,10 +65,10 @@ dependencies:
54
65
  version: '0'
55
66
  type: :development
56
67
  prerelease: false
57
- version_requirements: *70181545289780
68
+ version_requirements: *70285964277420
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: simplecov-vim
60
- requirement: &70181545289360 !ruby/object:Gem::Requirement
71
+ requirement: &70285964277000 !ruby/object:Gem::Requirement
61
72
  none: false
62
73
  requirements:
63
74
  - - ! '>='
@@ -65,11 +76,12 @@ dependencies:
65
76
  version: '0'
66
77
  type: :development
67
78
  prerelease: false
68
- version_requirements: *70181545289360
79
+ version_requirements: *70285964277000
69
80
  description: Library for Livedoor Weather Web Service
70
81
  email:
71
82
  - r7kamura@gmail.com
72
- executables: []
83
+ executables:
84
+ - weather
73
85
  extensions: []
74
86
  extra_rdoc_files: []
75
87
  files:
@@ -79,6 +91,7 @@ files:
79
91
  - LICENSE
80
92
  - README.md
81
93
  - Rakefile
94
+ - bin/weather
82
95
  - lib/weather_hacker.rb
83
96
  - lib/weather_hacker/area_data.rb
84
97
  - lib/weather_hacker/client.rb
@@ -104,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
117
  version: '0'
105
118
  segments:
106
119
  - 0
107
- hash: -14138050602801517
120
+ hash: 1882350461741233661
108
121
  required_rubygems_version: !ruby/object:Gem::Requirement
109
122
  none: false
110
123
  requirements:
@@ -113,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
126
  version: '0'
114
127
  segments:
115
128
  - 0
116
- hash: -14138050602801517
129
+ hash: 1882350461741233661
117
130
  requirements: []
118
131
  rubyforge_project:
119
132
  rubygems_version: 1.8.15