skiplan_client 0.0.1 → 0.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
- NjYzZDVjMzRkNGNmN2VjNzNjZDNiYTU1NTE5MDkzNGM1MzViNTQ4Zg==
4
+ YTI4NjRiYTc4MjQ2NDQ4ODU5Y2I2ODhhZTVhYjcxYWZlYmNjMzMzZQ==
5
5
  data.tar.gz: !binary |-
6
- MDIyNGYzMDFhY2ExNjljYzY3Y2ZhM2EwYzNhMTNhYjZjZTlmOTg5Mg==
6
+ ZTA2Y2QyYzVmY2M2YWVmMzY1Y2UyZDZkYzQxMGVlMjkyZDQ2MTI3Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzgzOTczM2QzOWQ5MDdmOTMwMThlMWM5MWQxNGE0ZGQ5MGU2NzE1YzMwMmM3
10
- MmVlYjhjM2QxZGI3NmJhOWViOWQzNDgzOTMxMjUwNDdmYTllZDc1ODI2ZjZi
11
- NzlmYTk5MmE3ZTQ5OTNmZTdlYTZmMzM3NTQ2ZmI1ODM1ZTQxZWI=
9
+ MGQ1Mzc4NmFmNGJkMjkyYmQxZDcwMWRhMGYxOWU4Yjg5ODYyNmUwZTVhNDFh
10
+ ZDExYTczNzg4MDhlNGNjY2E3OWNjYzY4ZGMzYzFkOGI2ZTIxYjUyMjQzNjg2
11
+ M2ZhYjRlZDk2ZDUyZjJkOTg3OGU3MDIwNTc1NGE2NzQ1NDMzMWI=
12
12
  data.tar.gz: !binary |-
13
- NWViNGY5NDY2N2VjOGE5ZDZmNjUxN2FmODIzZjllYWUzNDQyMjc2MDNlMGQ2
14
- MDEzZDE1MzIwYzE2OTAzNGM2NTJkNzc2ZGE0M2M0MmIzYjM0NTgxNTQ1OTFi
15
- ZjM2MWQ4MWZiZjA3ODgyZDhiNGJjMzE1ZTQ1YjQxMDQzZjNmYjQ=
13
+ NDhhM2ViMGE2NzkzY2ZhNzA5YzY3ZWFiY2VmYWFiZDEzNmFlNWYwYjI3ZTY0
14
+ ZWFkOGI1Zjg3MzJjZDA5OTQ0ZTU3NDUzNzE4NGNkYzgwNjM1NWQ1ZDU3YTI0
15
+ NmFiZGQyNzkxYzUxMDgxNDlkOTllOGE1MDljYWZjNGEwMDRiNmY=
@@ -22,11 +22,19 @@ module SkiplanClient
22
22
  ciel_id_auj_apm = xml.xpath('//ZONE[@nom="CHINAILLON"]/CIEL_ID_APM').text
23
23
  ciel_id_dem_mat = xml.xpath('//ZONE[@nom="J+1"]/CIEL_ID').text
24
24
  ciel_id_dem_apm = xml.xpath('//ZONE[@nom="J+1"]/CIEL_ID_APM').text
25
+ auj_temp_matin = doc.xpath('//ZONE[@nom="CHINAILLON"]/TEMPERATURE').text
26
+ auj_temp_apm = doc.xpath('//ZONE[@nom="CHINAILLON"]/TEMPERATURE_APM').text
27
+ dem_temp_matin = doc.xpath('//ZONE[@nom="J+1"]/TEMPERATURE').text
28
+ dem_temp_apm = doc.xpath('//ZONE[@nom="J+1"]/TEMPERATURE_APM').text
25
29
 
26
30
  @info = WeatherObject.new(:auj_ciel_id_matin => ciel_id_auj_mat,
27
31
  :auj_ciel_id_apm => ciel_id_auj_apm,
28
32
  :dem_ciel_id_matin => ciel_id_dem_mat,
29
- :dem_ciel_id_apm => ciel_id_dem_apm)
33
+ :dem_ciel_id_apm => ciel_id_dem_apm,
34
+ :auj_temp_matin => auj_temp_matin,
35
+ :auj_temp_apm => auj_temp_apm,
36
+ :dem_temp_matin => dem_temp_matin,
37
+ :dem_temp_apm => dem_temp_apm)
30
38
  @info
31
39
  end
32
40
  end
@@ -1,3 +1,3 @@
1
1
  module SkiplanClient
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -35,7 +35,11 @@ class WeatherObject
35
35
  :auj_ciel_id_matin,
36
36
  :auj_ciel_id_apm,
37
37
  :dem_ciel_id_matin,
38
- :dem_ciel_id_apm
38
+ :dem_ciel_id_apm,
39
+ :auj_temp_matin,
40
+ :auj_temp_apm,
41
+ :dem_temp_matin,
42
+ :dem_temp_apm
39
43
 
40
44
  def initialize(attributes = {})
41
45
  @nom = attributes[:name]
@@ -74,6 +78,10 @@ class WeatherObject
74
78
  @auj_ciel_id_apm = attributes[:auj_ciel_id_apm]
75
79
  @dem_ciel_id_matin = attributes[:dem_ciel_id_matin]
76
80
  @dem_ciel_id_apm = attributes[:dem_ciel_id_apm]
81
+ @auj_temp_matin = attributes[:auj_temp_matin]
82
+ @auj_temp_apm = attributes[:auj_temp_apm]
83
+ @dem_temp_matin = attributes[:dem_temp_matin]
84
+ @dem_temp_apm = attributes[:dem_temp_apm]
77
85
 
78
86
  end
79
87
  end
@@ -12,7 +12,12 @@ class WeatherObjectTest < Test::Unit::TestCase
12
12
  hash_result = {:auj_ciel_id_matin => 'id_ciel_test1',
13
13
  :auj_ciel_id_apm => 'id_ciel_test2',
14
14
  :dem_ciel_id_matin => 'id_ciel_test3',
15
- :dem_ciel_id_apm => 'id_ciel_test4'}
15
+ :dem_ciel_id_apm => 'id_ciel_test4',
16
+ :auj_temp_matin => 'auj_temp_matin',
17
+ :auj_temp_apm => 'auj_temp_apm',
18
+ :dem_temp_matin => 'dem_temp_matin',
19
+ :dem_temp_apm => 'dem_temp_apm'
20
+ }
16
21
 
17
22
  @weather_object = WeatherObject.new(hash_result)
18
23
 
@@ -20,6 +25,10 @@ class WeatherObjectTest < Test::Unit::TestCase
20
25
  assert_equal 'id_ciel_test2', @weather_object.auj_ciel_id_apm
21
26
  assert_equal 'id_ciel_test3', @weather_object.dem_ciel_id_matin
22
27
  assert_equal 'id_ciel_test4', @weather_object.dem_ciel_id_apm
28
+ assert_equal 'auj_temp_matin', @weather_object.auj_temp_matin
29
+ assert_equal 'auj_temp_apm', @weather_object.auj_temp_apm
30
+ assert_equal 'dem_temp_matin', @weather_object.dem_temp_matin
31
+ assert_equal 'dem_temp_apm', @weather_object.dem_temp_apm
23
32
 
24
33
  end
25
34
  end
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.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - SimonRonzani