rcap 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,9 @@
1
1
  = Change Log
2
2
 
3
+ == 1.0.1 - 22 April 2011
4
+
5
+ * Added RCAP::Alert.from_h
6
+
3
7
  == 1.0.0 - 6 April 2011
4
8
 
5
9
  * Added CAP 1.2 Support
data/lib/rcap/alert.rb CHANGED
@@ -30,12 +30,15 @@ module RCAP
30
30
 
31
31
  def self.from_json( json_string )
32
32
  json_hash = JSON.parse( json_string )
33
+ self.from_h( json_hash )
34
+ end
33
35
 
34
- case json_hash[ JSON_CAP_VERSION_KEY ]
36
+ def self.from_h( hash )
37
+ case hash[ JSON_CAP_VERSION_KEY ]
35
38
  when CAP_1_1::Alert::CAP_VERSION
36
- CAP_1_1::Alert.from_h( json_hash )
39
+ CAP_1_1::Alert.from_h( hash )
37
40
  else
38
- CAP_1_2::Alert.from_h( json_hash )
41
+ CAP_1_2::Alert.from_h( hash )
39
42
  end
40
43
  end
41
44
  end
data/lib/rcap/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RCAP
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 0
9
- version: 1.0.0
8
+ - 1
9
+ version: 1.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Farrel Lifson
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-04-06 00:00:00 +02:00
17
+ date: 2011-04-22 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency