weather_in_poland 0.0.3 → 0.0.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/.gitignore +1 -0
- data/lib/weather_in_poland/version.rb +1 -1
- data/test/.test.rb.swp +0 -0
- data/test/test.rb +30 -0
- data/weather_in_poland.gemspec +1 -1
- metadata +10 -8
data/test/.test.rb.swp
ADDED
Binary file
|
data/test/test.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'test/unit'
|
3
|
+
require 'mechanize'
|
4
|
+
require "yahoo-weather"
|
5
|
+
require 'weather_in_poland'
|
6
|
+
|
7
|
+
class TestAPI < Test::Unit::TestCase
|
8
|
+
|
9
|
+
def setup
|
10
|
+
@weather = WeatherInPoland.new
|
11
|
+
end
|
12
|
+
|
13
|
+
#check code and city, images, and getting data
|
14
|
+
def test_all
|
15
|
+
location = 'Pomorskie, Gdynia'
|
16
|
+
correct_city = 'Gdynia'
|
17
|
+
correct_code = 493421
|
18
|
+
|
19
|
+
response = @weather.find_city(location)
|
20
|
+
assert(response)
|
21
|
+
assert_equal(correct_city, @weather.city)
|
22
|
+
assert_equal(correct_code, @weather.code)
|
23
|
+
|
24
|
+
@data = @weather.get_weather(@weather.code)
|
25
|
+
assert_not_nil(@data)
|
26
|
+
|
27
|
+
assert_not_nil(@data.condition.code)
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
data/weather_in_poland.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ["Oskar Szrajer"]
|
10
10
|
s.email = ["oskarszrajer@gmail.com"]
|
11
|
-
s.homepage = ""
|
11
|
+
s.homepage = "https://github.com/gotar/Weather-in-Poland"
|
12
12
|
s.summary = %q{Weather in Poland checker}
|
13
13
|
s.description = %q{Simply gem for Yahoo! Weather with location checking to get proper location code}
|
14
14
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weather_in_poland
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Oskar Szrajer
|
@@ -61,9 +61,11 @@ files:
|
|
61
61
|
- Rakefile
|
62
62
|
- lib/weather_in_poland.rb
|
63
63
|
- lib/weather_in_poland/version.rb
|
64
|
+
- test/.test.rb.swp
|
65
|
+
- test/test.rb
|
64
66
|
- weather_in_poland.gemspec
|
65
67
|
has_rdoc: true
|
66
|
-
homepage:
|
68
|
+
homepage: https://github.com/gotar/Weather-in-Poland
|
67
69
|
licenses: []
|
68
70
|
|
69
71
|
post_install_message:
|
@@ -92,9 +94,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
94
|
requirements: []
|
93
95
|
|
94
96
|
rubyforge_project: weather_in_poland
|
95
|
-
rubygems_version: 1.
|
97
|
+
rubygems_version: 1.5.0
|
96
98
|
signing_key:
|
97
99
|
specification_version: 3
|
98
100
|
summary: Weather in Poland checker
|
99
|
-
test_files:
|
100
|
-
|
101
|
+
test_files:
|
102
|
+
- test/test.rb
|