meteo 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NTljMTNlNzcxYzQ4Y2Y1NmZmNjRiMmZmNWZmNDU0YTE1ZDkxYmM5NQ==
4
+ YTVkOTMyZjMzZmIzMzcxNWQ5ZjMyMjMwODg4NjVmNzQ4MTlhZmM4Zg==
5
5
  data.tar.gz: !binary |-
6
- OTc3NDEwOTIyOGI1YjJjN2ZjZjU4YzZhMTZkOTg1NGY2YTA1Mzk2Zg==
6
+ MzA2MTUwYWY5Y2IyMTY2ZjcwN2MzMWNhOWI2ZTA4YjIzNjM5MzVmMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZWFjODZlNGRmMDRjNDliNWUwNjBhZjEwNDFjZGYzYjVmODZkZjYzMjQ4NDdi
10
- ZjliNzI1NTA1YTdhYTg4NTZjNDNjY2Q3M2RlZmNkMjAyMThjNmRiMjQyMGFk
11
- N2VhMmVkNDU4ODU4OWM1NDhkMTEzYWYyOTZhNTMxMTJmM2FhN2U=
9
+ YzZkMzc1ZGM0NmMyYWRlZmRiOGE4NTYyMTcxOWNmODUwZmI4MDFhNDU3NTU1
10
+ ZjE3MWM2MzZjODUzNDE0MzNhOWU4YzI2MDAwODVkZjZkNGVkNDc1ZGI0ZjYz
11
+ ZmVkZDcwZDA1YThmMzE3NWZiYTAzODY2NTRiOGU0MTNmYWJmYzU=
12
12
  data.tar.gz: !binary |-
13
- YjJiZDYxNWE1YzM3ZTBhMmI2YmIxMTAyZTAyZWYyNTJmNzFiZDdjM2VlMDU3
14
- NzlkZjc2MTQ5MjFhYWZmNGI1MjhlZmY5NWI1ZjljYjk0ZDU0YmRkMjc1NDlk
15
- YTZjMzM4MWM1MDRmNjVjYjgwYmI4OGRhMTNiNzEwNmI3ZGEyNDc=
13
+ ZmI4M2E3NmJlOGVkZjM4Yzc2NzQxNDY5YzgyNTM5NzBkNTQ5NTRiMGMzMWM3
14
+ NGVhMTdlNDUyZGYxMjA3YWY0ZDM1MWM1ZDkyODkzNTRiOTE5ZTMwNjg2M2Iy
15
+ NTkxMzZiNTUwMDY0NTMwZDM4YjIyMGFkNTQ3MDQ5NThhYTI2OGU=
data/CHANGES CHANGED
@@ -6,4 +6,8 @@
6
6
 
7
7
  == Version 1.0.1
8
8
 
9
+ * Bug fixes.
10
+
11
+ == Version 1.0.2
12
+
9
13
  * Bug fixes.
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
@@ -1,6 +1,6 @@
1
1
  @ECHO OFF
2
2
  IF NOT "%~f0" == "~f0" GOTO :WinNT
3
- @"ruby.exe" "C:/Ruby/ruby-1.9.1/bin/translate" %1 %2 %3 %4 %5 %6 %7 %8 %9
3
+ @"ruby.exe" "C:/Ruby/ruby-1.9.3/bin/meteo" %1 %2 %3 %4 %5 %6 %7 %8 %9
4
4
  GOTO :EOF
5
5
  :WinNT
6
6
  @"ruby.exe" "%~dpn0" %*
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Meteo
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/spec/meteo_spec.rb CHANGED
@@ -1,34 +1,18 @@
1
- # translate_spec.rb
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.1
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-10-29 00:00:00.000000000 Z
11
+ date: 2013-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor