rcap 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,9 @@
1
1
  = Change Log
2
2
 
3
+ === 1.2.4 - 4 December 2011
4
+
5
+ * Fixed parsing bug when creating Parameter and subclasses from XML
6
+
3
7
  == 1.2.3 - 10 November 2011
4
8
 
5
9
  * Fixed Time#utc_hours_offset to use localtime to preserve TZ info (Earle Clubb)
@@ -45,8 +45,8 @@ module RCAP
45
45
  end
46
46
 
47
47
  def self.from_xml_element( parameter_xml_element ) # :nodoc:
48
- Parameter.new( :name => RCAP.xpath_text( parameter_xml_element, self::NAME_XPATH, Alert::XMLNS ),
49
- :value => RCAP.xpath_text( parameter_xml_element, self::VALUE_XPATH, Alert::XMLNS ))
48
+ self.new( :name => RCAP.xpath_text( parameter_xml_element, self::NAME_XPATH, Alert::XMLNS ),
49
+ :value => RCAP.xpath_text( parameter_xml_element, self::VALUE_XPATH, Alert::XMLNS ))
50
50
  end
51
51
 
52
52
  # Two parameters are equivalent if they have the same name and value.
@@ -45,8 +45,8 @@ module RCAP
45
45
  end
46
46
 
47
47
  def self.from_xml_element( parameter_xml_element ) # :nodoc:
48
- Parameter.new( :name => RCAP.xpath_text( parameter_xml_element, NAME_XPATH, Alert::XMLNS ),
49
- :value => RCAP.xpath_text( parameter_xml_element, VALUE_XPATH, Alert::XMLNS ))
48
+ self.new( :name => RCAP.xpath_text( parameter_xml_element, NAME_XPATH, Alert::XMLNS ),
49
+ :value => RCAP.xpath_text( parameter_xml_element, VALUE_XPATH, Alert::XMLNS ))
50
50
  end
51
51
 
52
52
  # Two parameters are equivalent if they have the same name and value.
@@ -1,3 +1,3 @@
1
1
  module RCAP
2
- VERSION = '1.2.3'
2
+ VERSION = '1.2.4'
3
3
  end
@@ -13,6 +13,10 @@ describe( RCAP::CAP_1_0::EventCode ) do
13
13
  @event_code = RCAP::CAP_1_0::EventCode.from_xml_element( @event_code_xml_element )
14
14
  end
15
15
 
16
+ it( 'should parse into the correct class' ) do
17
+ @event_code.class.should == RCAP::CAP_1_0::EventCode
18
+ end
19
+
16
20
  it( 'should parse the name correctly' ) do
17
21
  @event_code.name.should == @original_event_code.name
18
22
  end
@@ -14,6 +14,10 @@ describe( RCAP::CAP_1_0::Geocode ) do
14
14
  @geocode = RCAP::CAP_1_0::Geocode.from_xml_element( @geocode_xml_element )
15
15
  end
16
16
 
17
+ it( 'should parse into the correct class' ) do
18
+ @geocode.class.should == RCAP::CAP_1_0::Geocode
19
+ end
20
+
17
21
  it( 'should parse the name correctly' ) do
18
22
  @geocode.name.should == @original_geocode.name
19
23
  end
@@ -13,6 +13,10 @@ describe( RCAP::CAP_1_0::Parameter ) do
13
13
  @parameter = RCAP::CAP_1_0::Parameter.from_xml_element( @parameter_xml_element )
14
14
  end
15
15
 
16
+ it( 'should parse into the correct class' ) do
17
+ @parameter.class.should == RCAP::CAP_1_0::Parameter
18
+ end
19
+
16
20
  it( 'should parse the name correctly' ) do
17
21
  @parameter.name.should == @original_parameter.name
18
22
  end
@@ -13,6 +13,10 @@ describe( RCAP::CAP_1_1::EventCode ) do
13
13
  @event_code = RCAP::CAP_1_1::EventCode.from_xml_element( @event_code_xml_element )
14
14
  end
15
15
 
16
+ it( 'should parse into the correct class' ) do
17
+ @event_code.class.should == RCAP::CAP_1_1::EventCode
18
+ end
19
+
16
20
  it( 'should parse the name correctly' ) do
17
21
  @event_code.name.should == @original_event_code.name
18
22
  end
@@ -14,6 +14,10 @@ describe( RCAP::CAP_1_1::Geocode ) do
14
14
  @geocode = RCAP::CAP_1_1::Geocode.from_xml_element( @geocode_xml_element )
15
15
  end
16
16
 
17
+ it( 'should parse into the correct class' ) do
18
+ @geocode.class.should == RCAP::CAP_1_1::Geocode
19
+ end
20
+
17
21
  it( 'should parse the name correctly' ) do
18
22
  @geocode.name.should == @original_geocode.name
19
23
  end
@@ -13,6 +13,10 @@ describe( RCAP::CAP_1_1::Parameter ) do
13
13
  @parameter = RCAP::CAP_1_1::Parameter.from_xml_element( @parameter_xml_element )
14
14
  end
15
15
 
16
+ it( 'should parse into the correct class' ) do
17
+ @parameter.class.should == RCAP::CAP_1_1::Parameter
18
+ end
19
+
16
20
  it( 'should parse the name correctly' ) do
17
21
  @parameter.name.should == @original_parameter.name
18
22
  end
@@ -13,6 +13,10 @@ describe( RCAP::CAP_1_2::EventCode ) do
13
13
  @event_code = RCAP::CAP_1_2::EventCode.from_xml_element( @event_code_xml_element )
14
14
  end
15
15
 
16
+ it( 'should parse into the correct class' ) do
17
+ @event_code.class.should == RCAP::CAP_1_2::EventCode
18
+ end
19
+
16
20
  it( 'should parse the name correctly' ) do
17
21
  @event_code.name.should == @original_event_code.name
18
22
  end
@@ -14,6 +14,10 @@ describe( RCAP::CAP_1_2::Geocode ) do
14
14
  @geocode = RCAP::CAP_1_2::Geocode.from_xml_element( @geocode_xml_element )
15
15
  end
16
16
 
17
+ it( 'should parse into the correct class' ) do
18
+ @geocode.class.should == RCAP::CAP_1_2::Geocode
19
+ end
20
+
17
21
  it( 'should parse the name correctly' ) do
18
22
  @geocode.name.should == @original_geocode.name
19
23
  end
@@ -13,6 +13,10 @@ describe( RCAP::CAP_1_2::Parameter ) do
13
13
  @parameter = RCAP::CAP_1_2::Parameter.from_xml_element( @parameter_xml_element )
14
14
  end
15
15
 
16
+ it( 'should parse into the correct class' ) do
17
+ @parameter.class.should == RCAP::CAP_1_2::Parameter
18
+ end
19
+
16
20
  it( 'should parse the name correctly' ) do
17
21
  @parameter.name.should == @original_parameter.name
18
22
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcap
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 3
10
- version: 1.2.3
9
+ - 4
10
+ version: 1.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Farrel Lifson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-10 00:00:00 Z
18
+ date: 2011-12-03 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: assistance