green-button-data 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- OGExMTcyMDliNmY4NzY3ZDllYzg5ZGY3YTU4NGI5YmY0MjhiZGZlOA==
5
- data.tar.gz: !binary |-
6
- NGI3NDIyMjVkOWRhOTlhZTAyMGFhOTdmYTNiZTA4YzQxNDQyMzBjNw==
2
+ SHA1:
3
+ metadata.gz: 943fa4496c7abd93c91c099eecc7f8da6f7b1183
4
+ data.tar.gz: 686f00fc33360e511ec3db4a79f901397dcf39d1
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NmI4YTcxZWY3ZjcwOTk3MGYxMzYyMTI5YzIxZjljZWZlZTg3MjRlMDYxNDE0
10
- ODBkODZjMGNjYzU0OTQ2NTVjYmRmMDJmNjU5MDFjZGUwZGY3NTQyN2UzODAy
11
- Mzg2ZGQ1OGUwNWJiNGY2ZTc2Y2I2YzQ4YzA5Y2EzZmE1ZGE4Mjk=
12
- data.tar.gz: !binary |-
13
- NmY5OWI3YTU0YWY3NTRmYzQ4MGNhNDJmYTJkZTVkNjIwNTlhMmFmNGZkYzY3
14
- NDYxNTFjMjBjZGMyNGM4YjY0YjE5NDI1NDc0YWNmYWNjNjYyZTVlMDA4ZWU0
15
- YTkwM2FmZWFiNjNmMThmMjNlODg2ZjlmOTdjNDlkNThjYjFlZDY=
6
+ metadata.gz: c7f6738ec44e9a2a3d2fcff1abfb89e87f814782675fc4d734a8bc9fc99c8177aec1b7f906931a07b5e44bf73dc483b68a9973d4850417ce0863a8d3a7e85465
7
+ data.tar.gz: e1113a4af39451f38be1eeacfc7841772302d141159b10bc4f91cc00129971e4b81b10243c022f0d1f66303b0e80b8afa1843e1810ec7000208660d71c829f80
@@ -50,6 +50,7 @@ module GreenButtonData
50
50
  70 => :A2s,
51
51
  71 => :VAh,
52
52
  72 => :Wh,
53
+ 73 => :VAhr,
53
54
  74 => :V_per_Hz,
54
55
  75 => :Hz_per_sec,
55
56
  76 => :char,
@@ -2,16 +2,27 @@ module GreenButtonData
2
2
  module Parser
3
3
  class IntervalReading
4
4
  include SAXMachine
5
+ include Enumerations
5
6
 
6
7
  element :cost, class: Integer
8
+ element :quality, class: Integer
7
9
  element :timePeriod, class: Interval, as: :time_period
8
10
  element :value, class: Integer
9
11
  element :consumptionTier, class: Integer, as: :consumption_tier
10
12
  element :tou, class: Integer
11
13
  element :cpp, class: Integer
12
14
 
15
+ def quality
16
+ if @quality.is_a? Numeric
17
+ QUALITY_OF_READING[@quality]
18
+ else
19
+ @quality
20
+ end
21
+ end
22
+
13
23
  # Standard ESPI namespacing
14
24
  element :'espi:cost', class: Integer, as: :cost
25
+ element :'espi:quality', class: Integer, as: :quality
15
26
  element :'espi:timePeriod', class: Interval, as: :time_period
16
27
  element :'espi:value', class: Integer, as: :value
17
28
  element :'espi:consumptionTier', class: Integer, as: :consumption_tier
@@ -20,6 +31,7 @@ module GreenButtonData
20
31
 
21
32
  # Special case for PG&E which uses generic namespacing
22
33
  element :'ns0:cost', class: Integer, as: :cost
34
+ element :'ns0:quality', class: Integer, as: :quality
23
35
  element :'ns0:timePeriod', class: Interval, as: :time_period
24
36
  element :'ns0:value', class: Integer, as: :value
25
37
  element :'ns0:consumptionTier', class: Integer, as: :consumption_tier
@@ -1,3 +1,3 @@
1
1
  module GreenButtonData
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: green-button-data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Jo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-20 00:00:00.000000000 Z
11
+ date: 2015-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -165,17 +165,17 @@ require_paths:
165
165
  - lib
166
166
  required_ruby_version: !ruby/object:Gem::Requirement
167
167
  requirements:
168
- - - ! '>='
168
+ - - '>='
169
169
  - !ruby/object:Gem::Version
170
170
  version: 1.9.3
171
171
  required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  requirements:
173
- - - ! '>='
173
+ - - '>='
174
174
  - !ruby/object:Gem::Version
175
175
  version: '0'
176
176
  requirements: []
177
177
  rubyforge_project:
178
- rubygems_version: 2.2.2
178
+ rubygems_version: 2.4.6
179
179
  signing_key:
180
180
  specification_version: 4
181
181
  summary: Parser for Green Button data format