meteo 1.0.1 → 1.0.2
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.
- checksums.yaml +8 -8
- data/CHANGES +4 -0
- data/README.md +2 -2
- data/bin/meteo.bat +1 -1
- data/lib/meteo/reporter.rb +24 -0
- data/lib/meteo/version.rb +1 -1
- data/spec/meteo_spec.rb +2 -18
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTVkOTMyZjMzZmIzMzcxNWQ5ZjMyMjMwODg4NjVmNzQ4MTlhZmM4Zg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzA2MTUwYWY5Y2IyMTY2ZjcwN2MzMWNhOWI2ZTA4YjIzNjM5MzVmMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzZkMzc1ZGM0NmMyYWRlZmRiOGE4NTYyMTcxOWNmODUwZmI4MDFhNDU3NTU1
|
10
|
+
ZjE3MWM2MzZjODUzNDE0MzNhOWU4YzI2MDAwODVkZjZkNGVkNDc1ZGI0ZjYz
|
11
|
+
ZmVkZDcwZDA1YThmMzE3NWZiYTAzODY2NTRiOGU0MTNmYWJmYzU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZmI4M2E3NmJlOGVkZjM4Yzc2NzQxNDY5YzgyNTM5NzBkNTQ5NTRiMGMzMWM3
|
14
|
+
NGVhMTdlNDUyZGYxMjA3YWY0ZDM1MWM1ZDkyODkzNTRiOTE5ZTMwNjg2M2Iy
|
15
|
+
NTkxMzZiNTUwMDY0NTMwZDM4YjIyMGFkNTQ3MDQ5NThhYTI2OGU=
|
data/CHANGES
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Meteo
|
2
2
|
|
3
|
-
Provides command line access to OpenWeatherMap service
|
3
|
+
Provides command line access to [OpenWeatherMap] (http://openweathermap.org) service
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -24,7 +24,7 @@ Or install it yourself as:
|
|
24
24
|
## Note
|
25
25
|
|
26
26
|
This gem was inspired by another GitHub project, [AnsiWeather] (https://github.com/fcambus/ansiweather),
|
27
|
-
written in shell.
|
27
|
+
written in shell script language.
|
28
28
|
|
29
29
|
## Contributing
|
30
30
|
|
data/bin/meteo.bat
CHANGED
data/lib/meteo/reporter.rb
CHANGED
@@ -71,6 +71,13 @@ module Reporter
|
|
71
71
|
|
72
72
|
when 'Fog'
|
73
73
|
"fog"
|
74
|
+
|
75
|
+
when 'Snow'
|
76
|
+
"snow"
|
77
|
+
|
78
|
+
when 'Thunderstorm'
|
79
|
+
"thunderstorm"
|
80
|
+
|
74
81
|
else
|
75
82
|
(period == "night") ? 'moon' : 'sun'
|
76
83
|
end
|
@@ -91,4 +98,21 @@ module Reporter
|
|
91
98
|
def clouds
|
92
99
|
"\033[37;1m\xe2\x98\x81"
|
93
100
|
end
|
101
|
+
|
102
|
+
def rain
|
103
|
+
"\xe2\x98\x94"
|
104
|
+
end
|
105
|
+
|
106
|
+
def fog
|
107
|
+
"\033[37;1m\xe2\x96\x92"
|
108
|
+
end
|
109
|
+
|
110
|
+
def snow
|
111
|
+
"\033[37;1m\xe2\x9d\x84"
|
112
|
+
end
|
113
|
+
|
114
|
+
def thunderstorm
|
115
|
+
"\xe2\x9a\xa1"
|
116
|
+
end
|
117
|
+
|
94
118
|
end
|
data/lib/meteo/version.rb
CHANGED
data/spec/meteo_spec.rb
CHANGED
@@ -1,34 +1,18 @@
|
|
1
|
-
#
|
1
|
+
# meteo_spec.rb
|
2
2
|
|
3
3
|
require File.dirname(__FILE__) + '/spec_helper'
|
4
4
|
|
5
5
|
require 'meteo'
|
6
6
|
require 'json'
|
7
|
-
require 'awesome_print'
|
7
|
+
#require 'awesome_print'
|
8
8
|
|
9
9
|
describe Meteo do
|
10
10
|
describe "#quote" do
|
11
11
|
it "gets the quote" do
|
12
12
|
result = JSON.parse(subject.quote("plainsboro, nj", "imperial"))
|
13
13
|
|
14
|
-
ap result
|
15
|
-
|
16
14
|
expect(result['sys']['country']).to eq("United States of America")
|
17
15
|
end
|
18
16
|
end
|
19
17
|
|
20
|
-
#it "should raise an error if one of parameters is missing" do
|
21
|
-
# expect { subject.meteo(nil, :ru) }.to raise_error
|
22
|
-
#
|
23
|
-
# expect { subject.meteo(:en, nil) }.to raise_error
|
24
|
-
#
|
25
|
-
# expect { subject.meteo(:en, :ru, nil) }.to raise_error
|
26
|
-
#end
|
27
|
-
#
|
28
|
-
#it "should meteo test string from one language to another" do
|
29
|
-
# r = subject.meteo(:en, :ru, "hello world!")
|
30
|
-
# puts r
|
31
|
-
# r.size.should be > 0
|
32
|
-
#end
|
33
|
-
|
34
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meteo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Shvets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|