windward 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -0
- data/.travis.yml +6 -0
- data/Gemfile +3 -1
- data/README.md +4 -1
- data/Rakefile +6 -0
- data/lib/windward.rb +64 -38
- data/lib/windward/version.rb +2 -1
- data/spec/spec_helper.rb +21 -3
- data/spec/support/vcr_cassettes/Windward/Weather/should_get_new_windward_weather.yml +672 -0
- data/spec/support/vcr_cassettes/Windward/Weather/should_return_a_hash_that_contains_a_previsions_hash_of_region.yml +660 -0
- data/spec/support/vcr_cassettes/Windward/Weather/should_return_a_hash_with_slug_value_and_previsions_of_region.yml +660 -0
- data/spec/support/vcr_cassettes/Windward/Weather/should_return_a_previsions_hash_of_region.yml +660 -0
- data/spec/support/vcr_cassettes/Windward/Weather/should_return_only_previsions_hash_of_region.yml +660 -0
- data/spec/support/vcr_cassettes/Windward/Weather/should_return_weather_of_region.yml +660 -0
- data/spec/support/vcr_cassettes/Windward/Weather/should_returns_regions_list.yml +660 -0
- data/spec/windward_spec.rb +25 -5
- data/windward.gemspec +1 -0
- metadata +32 -2
data/spec/windward_spec.rb
CHANGED
@@ -1,9 +1,29 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
2
|
|
3
|
-
describe
|
4
|
-
describe
|
5
|
-
it
|
6
|
-
Windward::Weather.new.
|
3
|
+
describe 'Windward', vcr: true do
|
4
|
+
describe 'Weather' do
|
5
|
+
it 'should get new windward weather' do
|
6
|
+
expect(Windward::Weather.new).to_not be_nil
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should returns regions list' do
|
10
|
+
weather = Windward::Weather.new
|
11
|
+
expect(weather.regions).to include 'Alsace'
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should return a hash with slug value and previsions of region' do
|
15
|
+
weather = Windward::Weather.new
|
16
|
+
expect(weather.region 'Alsace').to match a_hash_including('slug', 'value', 'previsions')
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should return a hash that contains a previsions hash of region' do
|
20
|
+
weather = Windward::Weather.new
|
21
|
+
expect(weather.region('Alsace')['previsions'].values[0]).to match a_hash_including('temps', 'temper', 'city')
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'should return only previsions hash of region' do
|
25
|
+
weather = Windward::Weather.new
|
26
|
+
expect(weather.previsions('Alsace').values[0]).to match a_hash_including('temps', 'temper', 'city')
|
7
27
|
end
|
8
28
|
end
|
9
|
-
end
|
29
|
+
end
|
data/windward.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: windward
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yann VERY
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mechanize
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: coveralls
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: Windward is a parser for meteofrance.fr\n You can retrieve informations
|
56
70
|
like weather, temperature for each region of France.
|
57
71
|
email:
|
@@ -61,7 +75,9 @@ extensions: []
|
|
61
75
|
extra_rdoc_files: []
|
62
76
|
files:
|
63
77
|
- ".DS_Store"
|
78
|
+
- ".coveralls.yml"
|
64
79
|
- ".gitignore"
|
80
|
+
- ".travis.yml"
|
65
81
|
- Gemfile
|
66
82
|
- LICENSE.txt
|
67
83
|
- README.md
|
@@ -71,6 +87,13 @@ files:
|
|
71
87
|
- lib/windward.rb
|
72
88
|
- lib/windward/version.rb
|
73
89
|
- spec/spec_helper.rb
|
90
|
+
- spec/support/vcr_cassettes/Windward/Weather/should_get_new_windward_weather.yml
|
91
|
+
- spec/support/vcr_cassettes/Windward/Weather/should_return_a_hash_that_contains_a_previsions_hash_of_region.yml
|
92
|
+
- spec/support/vcr_cassettes/Windward/Weather/should_return_a_hash_with_slug_value_and_previsions_of_region.yml
|
93
|
+
- spec/support/vcr_cassettes/Windward/Weather/should_return_a_previsions_hash_of_region.yml
|
94
|
+
- spec/support/vcr_cassettes/Windward/Weather/should_return_only_previsions_hash_of_region.yml
|
95
|
+
- spec/support/vcr_cassettes/Windward/Weather/should_return_weather_of_region.yml
|
96
|
+
- spec/support/vcr_cassettes/Windward/Weather/should_returns_regions_list.yml
|
74
97
|
- spec/windward_spec.rb
|
75
98
|
- windward.gemspec
|
76
99
|
homepage: ''
|
@@ -99,4 +122,11 @@ specification_version: 4
|
|
99
122
|
summary: A parser for meteofrance.fr
|
100
123
|
test_files:
|
101
124
|
- spec/spec_helper.rb
|
125
|
+
- spec/support/vcr_cassettes/Windward/Weather/should_get_new_windward_weather.yml
|
126
|
+
- spec/support/vcr_cassettes/Windward/Weather/should_return_a_hash_that_contains_a_previsions_hash_of_region.yml
|
127
|
+
- spec/support/vcr_cassettes/Windward/Weather/should_return_a_hash_with_slug_value_and_previsions_of_region.yml
|
128
|
+
- spec/support/vcr_cassettes/Windward/Weather/should_return_a_previsions_hash_of_region.yml
|
129
|
+
- spec/support/vcr_cassettes/Windward/Weather/should_return_only_previsions_hash_of_region.yml
|
130
|
+
- spec/support/vcr_cassettes/Windward/Weather/should_return_weather_of_region.yml
|
131
|
+
- spec/support/vcr_cassettes/Windward/Weather/should_returns_regions_list.yml
|
102
132
|
- spec/windward_spec.rb
|