skiplan_client 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94773202512f28a9b5ec221e91ebb45151f3bb4d
|
4
|
+
data.tar.gz: a8bfcec5b4e3959556bbbc4998475adb0410ad47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fae8e1a71257d9ed055592f5bc7f8ec1a835027c5e79b5fa8084d710f0312dc22454afa416d54214daa2984e599288f0470f4cadee3589f75bbf6ad2b14afa30
|
7
|
+
data.tar.gz: 3ea1a3c7d5a1c195a68c991e2f19ff5228d5b5dc4a1e2f39994269bd67d93516a71261f67c6f73fcb5b3aaf7229182dfbc92f64bfca7664d9fcbadcf61540f3b
|
data/data/lumi_response.xml
CHANGED
@@ -565,6 +565,13 @@
|
|
565
565
|
<PLAGE prd_id="4" pgh_id="" heuredeb="" heurefin=""/>
|
566
566
|
</PLAGES>
|
567
567
|
</PISTE>
|
568
|
+
<Liaison nom="FICTIVE" etat="O">
|
569
|
+
<PLAGES>
|
570
|
+
<PLAGE ent_id="1" prd_id="1" pgh_id="1" heuredeb="09:25" heurefin="16:35"/>
|
571
|
+
<PLAGE ent_id="1" prd_id="2" pgh_id="1" heuredeb="09:25" heurefin="16:35"/>
|
572
|
+
<PLAGE ent_id="1" prd_id="3" pgh_id="1" heuredeb="09:25" heurefin="16:35"/>
|
573
|
+
</PLAGES>
|
574
|
+
</Liaison>
|
568
575
|
</SECTEUR>
|
569
576
|
<SECTEUR nom="ALPIN JOYERE">
|
570
577
|
<REMONTEE nom="TC LA JOYERE" etat="F" type="TC" msg="Ferm??e pour la saison " attente="0" longueur="0" heuredeb="00:00" heurefin="23:59" heuredebmod="00:00" heurefinmod="23:59">
|
data/lib/skiplan_client/zone.rb
CHANGED
@@ -8,6 +8,7 @@ class Zone
|
|
8
8
|
normalized_attrs = attributes.dup
|
9
9
|
normalized_attrs['REMONTEE'] = [normalized_attrs['REMONTEE']] if normalized_attrs['REMONTEE'].is_a?(Hash)
|
10
10
|
normalized_attrs['PISTE'] = [normalized_attrs['PISTE']] if normalized_attrs['PISTE'].is_a?(Hash)
|
11
|
+
normalized_attrs['Liaison'] = [normalized_attrs['Liaison']] if normalized_attrs['Liaison'].is_a?(Hash)
|
11
12
|
self.attributes = normalized_attrs
|
12
13
|
end
|
13
14
|
|
@@ -23,6 +24,10 @@ class Zone
|
|
23
24
|
@PISTE
|
24
25
|
end
|
25
26
|
|
27
|
+
def connections
|
28
|
+
@Liaison
|
29
|
+
end
|
30
|
+
|
26
31
|
def ratio(array_field = [])
|
27
32
|
open_entries = array_field.select {|r| r['etat'] == 'O'}
|
28
33
|
"#{open_entries.length}/#{array_field.length}"
|
@@ -71,6 +71,7 @@ class SkiplanClientTest < Test::Unit::TestCase
|
|
71
71
|
ac_zone = zones['ALPIN CHINAILLON']
|
72
72
|
assert_equal 10, ac_zone.skilifts.count
|
73
73
|
assert_equal 16, ac_zone.slopes.count
|
74
|
+
assert_equal 1, ac_zone.connections.count
|
74
75
|
|
75
76
|
single_entry_zone = zones['PIETONS']
|
76
77
|
assert_equal 1, single_entry_zone.slopes.count
|
@@ -11,7 +11,9 @@ class ZoneTest < Test::Unit::TestCase
|
|
11
11
|
'REMONTEE' => [{'nom' => 'TS LA FLORIA', 'etat' => 'O', 'type' => 'TS', 'msg' => 'Fermee pour la saison', 'heuredeb' => '09:00', 'heurefin' => '16:45'},
|
12
12
|
{'nom' => 'TK LE STADE', 'etat' => 'F', 'type' => 'TK', 'msg' => 'Fermee pour la saison', 'heuredeb' => '09:00', 'heurefin' => '16:00'}],
|
13
13
|
'PISTE' => [{'nom' => 'LA SERPENTINE', 'etat' => 'F', 'type' => 'A', 'msg' => 'Piste de retour au Village', 'niveau' => 'V', 'entretien_num' => '1'},
|
14
|
-
{'nom' => 'LE VENAY', 'etat' => 'O', 'type' => 'A', 'msg' => '', 'niveau' => 'V', 'entretien_num' => '0'}]
|
14
|
+
{'nom' => 'LE VENAY', 'etat' => 'O', 'type' => 'A', 'msg' => '', 'niveau' => 'V', 'entretien_num' => '0'}],
|
15
|
+
'Liaison' => [{'nom' => 'DOUCYCOMBELOUVIERE', 'etat' => 'F'}, {'nom' => 'ST FRANCOIS', 'etat' => 'O'}]
|
16
|
+
|
15
17
|
}
|
16
18
|
@zone = Zone.new(attributes)
|
17
19
|
end
|
@@ -22,6 +24,7 @@ class ZoneTest < Test::Unit::TestCase
|
|
22
24
|
{'nom' => 'TK LE STADE', 'etat' => 'F', 'type' => 'TK', 'msg' => 'Fermee pour la saison', 'heuredeb' => '09:00', 'heurefin' => '16:00'}], @zone.skilifts
|
23
25
|
assert_equal [{'nom' => 'LA SERPENTINE', 'etat' => 'F', 'type' => 'A', 'msg' => 'Piste de retour au Village', 'niveau' => 'V', 'entretien_num' => '1'},
|
24
26
|
{'nom' => 'LE VENAY', 'etat' => 'O', 'type' => 'A', 'msg' => '', 'niveau' => 'V', 'entretien_num' => '0'}], @zone.slopes
|
27
|
+
assert_equal [{'nom' => 'DOUCYCOMBELOUVIERE', 'etat' => 'F'}, {'nom' => 'ST FRANCOIS', 'etat' => 'O'}], @zone.connections
|
25
28
|
end
|
26
29
|
|
27
30
|
should 'store an array of slopes even when only one slope is present' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skiplan_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SimonRonzani
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-12-
|
12
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|