lita-forecast 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0ca70495987b9e91016e2d017d053fc7826b46bf
4
- data.tar.gz: 7012323fbbdff18f5dd4d06bb49ec2c869517745
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZmVlODRlN2VkYTE0OGZkZDM1Y2Y1ZmYzMzBmYWFhZWRiZDQxOWJlMw==
5
+ data.tar.gz: !binary |-
6
+ ZWZjZDA4YzNiOGMzMGU0NzdmZmUzNzYyYTRiYzU4YTZjY2FjZDMxMg==
5
7
  SHA512:
6
- metadata.gz: 6c23171c3445e152ebc2c387eced2664e8df2b349714642c571dbe942417eb007e68541d15f3932348c3fb2b42fc8c954cea4c727aa766309ecb42299c229f4e
7
- data.tar.gz: 873076adb7b04093a1dad99307d350f56e0adef16d52291c10f7cff7fab060a2b83db122eb235d64c83fc3e3bcb16b10ccc933011366ef93dc643e4d86d5ab9e
8
+ metadata.gz: !binary |-
9
+ OTQyZTBhOTY5NGRhOTJlZDU5MmM1MDA4MGJmZjZiZjEwOGY3NjJiZThjMTcy
10
+ Yzg0OTg5MWY0NTRiZGVlM2Q1MWUwZTA0MjZhN2U0N2RhNDBmZmU5YWU3NjVh
11
+ NjQ0ZDQ5MDg3ZWIwNGQzNGZmMzdhMTdlODEzY2Q3YTZiMGQ0OTU=
12
+ data.tar.gz: !binary |-
13
+ YTZiMjQ0YzQyYTI1ZWFmY2U0ODM3ZjFlZTU5ZDk5MjgxZDliNjMwMzQ1MTBl
14
+ Y2UyZTJkNzcwM2M4ODU2M2YzNGZjMDBmZWY2NjNmZDMxYzc3NzVkZDc1OWJl
15
+ MDQ5NWQwODgzYzVjNWI4Yjk3MGI0OTRiMmQ3MzFmM2M4MzNlMDk=
@@ -24,5 +24,5 @@
24
24
  # LitaForcast module, just for version handling
25
25
  #
26
26
  module LitaForecast
27
- VERSION = '0.1.4'
27
+ VERSION = '0.1.5'
28
28
  end
@@ -32,23 +32,17 @@ module LitaForecast
32
32
 
33
33
  def desc(loc)
34
34
  l = ''
35
- h = { c: city(loc), s: state(loc) }
35
+ h = { c: name(:city, loc), s: name(:state, loc) }
36
36
  l << h[:c]
37
37
  l << ', ' unless h[:c].empty? || h[:s].empty?
38
38
  l << h[:s]
39
39
  l
40
40
  end
41
41
 
42
- def city(loc)
43
- c = ''
44
- c << loc[:city] if loc[:city].is_a?(String) && !loc[:city].empty?
45
- c
46
- end
47
-
48
- def state(loc)
49
- s = ''
50
- s << loc[:state] if loc[:state].is_a?(String) && !loc[:state].empty?
51
- s
42
+ def name(key, loc)
43
+ n = ''
44
+ n << loc[key] if loc[key].is_a?(String) && !loc[key].empty?
45
+ n
52
46
  end
53
47
  end
54
48
  end
@@ -23,13 +23,13 @@ Gem::Specification.new do |g|
23
23
 
24
24
  g.add_development_dependency 'bundler', '~> 1.5'
25
25
  g.add_development_dependency 'rake', '~> 10.2.2'
26
- g.add_development_dependency 'rubocop', '~> 0.19.1'
26
+ g.add_development_dependency 'rubocop', '~> 0.20.0'
27
27
  g.add_development_dependency 'rspec', '>= 3.0.0.beta2'
28
28
  g.add_development_dependency 'fuubar', '~> 1.3.2'
29
29
  g.add_development_dependency 'coveralls', '~> 0.7.0'
30
30
  g.add_development_dependency 'simplecov', '~> 0.8.2'
31
31
 
32
- g.add_runtime_dependency 'lita', '~>3.0.0'
32
+ g.add_runtime_dependency 'lita', '>=3.0.0'
33
33
  g.add_runtime_dependency 'forecast_io', '~>2.0.0'
34
34
  g.add_runtime_dependency 'geocoder', '~>1.1.9'
35
35
  g.add_runtime_dependency 'compass_rose', '~> 0.1.0'
@@ -65,93 +65,79 @@ describe LitaForecast::Location do
65
65
  end
66
66
  end
67
67
 
68
- describe '.city' do
69
- context 'when given more than one arg' do
68
+ describe '.name' do
69
+ context 'when given more than two arga' do
70
70
  it 'should raise ArgumentError' do
71
71
  expect do
72
- @lfloc.send(:city, nil, nil)
72
+ @lfloc.send(:name, nil, nil, nil)
73
73
  end.to raise_error ArgumentError
74
74
  end
75
75
  end
76
76
 
77
- context 'when given less than one arg' do
77
+ context 'when given less than two args' do
78
78
  it 'should raise ArgumentError' do
79
79
  expect do
80
- @lfloc.send(:city)
80
+ @lfloc.send(:name, nil)
81
81
  end.to raise_error ArgumentError
82
82
  end
83
83
  end
84
84
 
85
- context 'when given a location with a city and state' do
86
- let(:location) { { city: 'San Francisco', state: 'CA' } }
87
- subject { @lfloc.send(:city, location) }
85
+ context 'when looking for a city' do
86
+ context 'when given a location with a city and state' do
87
+ let(:location) { { city: 'San Francisco', state: 'CA' } }
88
+ subject { @lfloc.send(:name, :city, location) }
88
89
 
89
- it { should be_an_instance_of String }
90
+ it { should be_an_instance_of String }
90
91
 
91
- it { should eql 'San Francisco' }
92
- end
93
-
94
- context 'when given a location with a city' do
95
- let(:location) { { city: 'San Francisco' } }
96
- subject { @lfloc.send(:city, location) }
92
+ it { should eql 'San Francisco' }
93
+ end
97
94
 
98
- it { should be_an_instance_of String }
95
+ context 'when given a location with a city' do
96
+ let(:location) { { city: 'San Francisco' } }
97
+ subject { @lfloc.send(:name, :city, location) }
99
98
 
100
- it { should eql 'San Francisco' }
101
- end
99
+ it { should be_an_instance_of String }
102
100
 
103
- context 'when given a location without a city' do
104
- let(:location) { { state: 'CA' } }
105
- subject { @lfloc.send(:city, location) }
101
+ it { should eql 'San Francisco' }
102
+ end
106
103
 
107
- it { should be_an_instance_of String }
104
+ context 'when given a location without a city' do
105
+ let(:location) { { state: 'CA' } }
106
+ subject { @lfloc.send(:name, :city, location) }
108
107
 
109
- it { should eql '' }
110
- end
111
- end
108
+ it { should be_an_instance_of String }
112
109
 
113
- describe '.state' do
114
- context 'when given more than one arg' do
115
- it 'should raise ArgumentError' do
116
- expect do
117
- subject.send(:state, nil, nil)
118
- end.to raise_error ArgumentError
110
+ it { should eql '' }
119
111
  end
120
112
  end
121
113
 
122
- context 'when given less than one arg' do
123
- it 'should raise ArgumentError' do
124
- expect do
125
- subject.send(:state)
126
- end.to raise_error ArgumentError
127
- end
128
- end
129
-
130
- context 'when given location with a city and a state' do
131
- let(:location) { { city: 'San Francisco', state: 'CA' } }
132
- subject { @lfloc.send(:state, location) }
114
+ context 'when looking for a state' do
115
+ context 'when given location with a city and a state' do
116
+ let(:location) { { city: 'San Francisco', state: 'CA' } }
117
+ subject { @lfloc.send(:name, :state, location) }
133
118
 
134
- it { should be_an_instance_of String }
119
+ it { should be_an_instance_of String }
135
120
 
136
- it { should eql 'CA' }
137
- end
121
+ it { should eql 'CA' }
122
+ end
138
123
 
139
- context 'when given location with a state' do
140
- let(:location) { { state: 'CA' } }
141
- subject { @lfloc.send(:state, location) }
124
+ context 'when given location with a state' do
125
+ let(:location) { { state: 'CA' } }
126
+ subject { @lfloc.send(:name, :state, location) }
142
127
 
143
- it { should be_an_instance_of String }
128
+ it { should be_an_instance_of String }
144
129
 
145
- it { should eql 'CA' }
146
- end
130
+ it { should eql 'CA' }
131
+ end
147
132
 
148
- context 'when given location with only a city' do
149
- let(:location) { { city: 'San Francisco' } }
150
- subject { @lfloc.send(:state, location) }
133
+ context 'when given location with only a city' do
134
+ let(:location) { { city: 'San Francisco' } }
135
+ subject { @lfloc.send(:name, :state, location) }
151
136
 
152
- it { should be_an_instance_of String }
137
+ it { should be_an_instance_of String }
153
138
 
154
- it { should eql '' }
139
+ it { should eql '' }
140
+ end
155
141
  end
156
142
  end
157
143
 
metadata CHANGED
@@ -1,167 +1,167 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-forecast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Heckman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-03 00:00:00.000000000 Z
11
+ date: 2014-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.5'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: 10.2.2
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: 10.2.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rubocop
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: 0.19.1
47
+ version: 0.20.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 0.19.1
54
+ version: 0.20.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: 3.0.0.beta2
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: 3.0.0.beta2
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: fuubar
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: 1.3.2
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.3.2
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: coveralls
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.7.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.7.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: simplecov
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: 0.8.2
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.8.2
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: lita
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ! '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: 3.0.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ! '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: 3.0.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: forecast_io
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ~>
130
130
  - !ruby/object:Gem::Version
131
131
  version: 2.0.0
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - ~>
137
137
  - !ruby/object:Gem::Version
138
138
  version: 2.0.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: geocoder
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - ~>
144
144
  - !ruby/object:Gem::Version
145
145
  version: 1.1.9
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
150
+ - - ~>
151
151
  - !ruby/object:Gem::Version
152
152
  version: 1.1.9
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: compass_rose
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - "~>"
157
+ - - ~>
158
158
  - !ruby/object:Gem::Version
159
159
  version: 0.1.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - "~>"
164
+ - - ~>
165
165
  - !ruby/object:Gem::Version
166
166
  version: 0.1.0
167
167
  description: Lita plugin for Forecast.io
@@ -170,10 +170,10 @@ executables: []
170
170
  extensions: []
171
171
  extra_rdoc_files: []
172
172
  files:
173
- - ".gitignore"
174
- - ".rspec"
175
- - ".rubocop.yml"
176
- - ".travis.yml"
173
+ - .gitignore
174
+ - .rspec
175
+ - .rubocop.yml
176
+ - .travis.yml
177
177
  - CONTRIBUTING.md
178
178
  - Gemfile
179
179
  - LICENSE
@@ -215,12 +215,12 @@ require_paths:
215
215
  - lib
216
216
  required_ruby_version: !ruby/object:Gem::Requirement
217
217
  requirements:
218
- - - ">="
218
+ - - ! '>='
219
219
  - !ruby/object:Gem::Version
220
220
  version: 2.0.0
221
221
  required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  requirements:
223
- - - ">="
223
+ - - ! '>='
224
224
  - !ruby/object:Gem::Version
225
225
  version: '0'
226
226
  requirements: []