green-button-data 0.4.2 → 0.5.0
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 +13 -5
- data/lib/green-button-data/parser/cost_additional_detail_last_period.rb +38 -0
- data/lib/green-button-data/parser/usage_summary.rb +15 -6
- data/lib/green-button-data/parser.rb +1 -0
- data/lib/green-button-data/usage_summary.rb +3 -1
- data/lib/green-button-data/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MGY5ZWIwYjc2ODMxMDk0NjM2NTA5OTkyNzJhODhiNWQ1ZGE0MWM0Yw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MDQ0MTJkOTc0OWI3OTkyNjc5MmQ1NzE2NWUzYzAwZGFhMjBhMDZiMA==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NGU2MmY5NDYwZTAzN2VhZGIxNzliYzVmYmQzYWMwOGVjMDkxNjY0NDE5Yjkw
|
10
|
+
ZmM2MTIxMmRmNTM4MzdlYjI2NWI1MDUxYzMzNzM2ZWRmODRiYTdlZjg2MGQw
|
11
|
+
OWFjMDI4ZDJlYzZhMGFmZmEwYTAwMTVlYTVhNGRiOGEyOTA5MmE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YjY0YWQ5ZGFkN2RjODFiNDcxMjlkNWM5N2U0M2UwYjNjZDJkYWViMzBlZWRj
|
14
|
+
OTNjN2M2MjQ3ZmVjY2MyMmU0ZjBhMWJkMDJiMGI5MmI5ZWEwNzdlNjJhMTNm
|
15
|
+
ZDNkY2FkZWM3M2UzN2I2YjBiMjQ5OGFmN2Y3ZjJlZjQzMjlmNDI=
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module GreenButtonData
|
2
|
+
module Parser
|
3
|
+
class CostAdditionalDetailLastPeriod
|
4
|
+
include SAXMachine
|
5
|
+
|
6
|
+
element :powerOfTenMultiplier, class: Integer,
|
7
|
+
as: :power_of_ten_multiplier
|
8
|
+
element :uom, class: Integer
|
9
|
+
element :value, class: Integer
|
10
|
+
element :note
|
11
|
+
element :itemKind, class: Integer, as: :item_kind
|
12
|
+
|
13
|
+
def value
|
14
|
+
@value
|
15
|
+
end
|
16
|
+
|
17
|
+
def note
|
18
|
+
@note
|
19
|
+
end
|
20
|
+
|
21
|
+
# ESPI Namespacing
|
22
|
+
element :'espi:powerOfTenMultiplier', class: Integer,
|
23
|
+
as: :power_of_ten_multiplier
|
24
|
+
element :'espi:uom', class: Integer, as: :uom
|
25
|
+
element :'espi:value', class: Integer, as: :value
|
26
|
+
element :'espi:note', as: :note
|
27
|
+
element :'espi:itemKind', class: Integer, as: :item_kind
|
28
|
+
|
29
|
+
# Special case for PG&E generic namespacing
|
30
|
+
element :'ns0:powerOfTenMultiplier', class: Integer,
|
31
|
+
as: :power_of_ten_multiplier
|
32
|
+
element :'ns0:uom', class: Integer, as: :uom
|
33
|
+
element :'ns0:value', class: Integer, as: :value
|
34
|
+
element :'ns0:note', as: :note
|
35
|
+
element :'ns0:itemKind', class: Integer, as: :item_kind
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -10,8 +10,9 @@ module GreenButtonData
|
|
10
10
|
element :billToDate, class: Integer, as: :bill_to_date
|
11
11
|
element :costAdditionalLastPeriod, class: Integer,
|
12
12
|
as: :cost_additional_last_period
|
13
|
-
|
14
|
-
|
13
|
+
elements :costAdditionalDetailLastPeriod,
|
14
|
+
class: CostAdditionalDetailLastPeriod,
|
15
|
+
as: :cost_additional_detail_last_periods
|
15
16
|
element :currency, class: Integer
|
16
17
|
element :overallConsumptionLastPeriod, class: SummaryMeasurement,
|
17
18
|
as: :overall_consumption_last_period
|
@@ -36,6 +37,8 @@ module GreenButtonData
|
|
36
37
|
element :ratchetDemandPeriod, class: Interval, as: :ratchet_demand_period
|
37
38
|
element :statusTimeStamp, class: Integer, as: :status_time_stamp
|
38
39
|
element :commodity, class: Integer
|
40
|
+
element :readCycle, as: :read_cycle
|
41
|
+
element :tariffProfile, as: :tariff
|
39
42
|
|
40
43
|
def currency
|
41
44
|
CURRENCY[@currency]
|
@@ -59,8 +62,9 @@ module GreenButtonData
|
|
59
62
|
element :'espi:billToDate', class: Integer, as: :bill_to_date
|
60
63
|
element :'espi:costAdditionalLastPeriod', class: Integer,
|
61
64
|
as: :cost_additional_last_period
|
62
|
-
|
63
|
-
|
65
|
+
elements :'espi:costAdditionalDetailLastPeriod',
|
66
|
+
class: CostAdditionalDetailLastPeriod,
|
67
|
+
as: :cost_additional_detail_last_periods
|
64
68
|
element :'espi:currency', class: Integer, as: :currency
|
65
69
|
element :'espi:overallConsumptionLastPeriod', class: SummaryMeasurement,
|
66
70
|
as: :overall_consumption_last_period
|
@@ -89,6 +93,8 @@ module GreenButtonData
|
|
89
93
|
as: :ratchet_demand_period
|
90
94
|
element :'espi:statusTimeStamp', class: Integer, as: :status_time_stamp
|
91
95
|
element :'espi:commodity', class: Integer, as: :commodity
|
96
|
+
element :'espi:readCycle', as: :read_cycle
|
97
|
+
element :'espi:tariffProfile', as: :tariff
|
92
98
|
|
93
99
|
# Special case for PG&E which uses generic namespacing
|
94
100
|
element :'ns0:billingPeriod', class: Interval, as: :billing_period
|
@@ -96,8 +102,9 @@ module GreenButtonData
|
|
96
102
|
element :'ns0:billToDate', class: Integer, as: :bill_to_date
|
97
103
|
element :'ns0:costAdditionalLastPeriod', class: Integer,
|
98
104
|
as: :cost_additional_last_period
|
99
|
-
|
100
|
-
|
105
|
+
elements :'ns0:costAdditionalDetailLastPeriod',
|
106
|
+
class: CostAdditionalDetailLastPeriod,
|
107
|
+
as: :cost_additional_detail_last_periods
|
101
108
|
element :'ns0:currency', class: Integer, as: :currency
|
102
109
|
element :'ns0:overallConsumptionLastPeriod', class: SummaryMeasurement,
|
103
110
|
as: :overall_consumption_last_period
|
@@ -126,6 +133,8 @@ module GreenButtonData
|
|
126
133
|
as: :ratchet_demand_period
|
127
134
|
element :'ns0:statusTimeStamp', class: Integer, as: :status_time_stamp
|
128
135
|
element :'ns0:commodity', class: Integer, as: :commodity
|
136
|
+
element :'ns0:readCycle', as: :read_cycle
|
137
|
+
element :'ns0:tariffProfile', as: :tariff
|
129
138
|
end
|
130
139
|
end
|
131
140
|
end
|
@@ -8,6 +8,7 @@ require 'green-button-data/parser/service_category'
|
|
8
8
|
require 'green-button-data/parser/local_time_parameters'
|
9
9
|
require 'green-button-data/parser/reading_type'
|
10
10
|
require 'green-button-data/parser/summary_measurement'
|
11
|
+
require 'green-button-data/parser/cost_additional_detail_last_period'
|
11
12
|
require 'green-button-data/parser/usage_point'
|
12
13
|
require 'green-button-data/parser/usage_summary'
|
13
14
|
require 'green-button-data/parser/content'
|
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.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Jo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -151,6 +151,7 @@ files:
|
|
151
151
|
- lib/green-button-data/parser/application_information.rb
|
152
152
|
- lib/green-button-data/parser/authorization.rb
|
153
153
|
- lib/green-button-data/parser/content.rb
|
154
|
+
- lib/green-button-data/parser/cost_additional_detail_last_period.rb
|
154
155
|
- lib/green-button-data/parser/entry.rb
|
155
156
|
- lib/green-button-data/parser/feed.rb
|
156
157
|
- lib/green-button-data/parser/interval.rb
|
@@ -179,17 +180,17 @@ require_paths:
|
|
179
180
|
- lib
|
180
181
|
required_ruby_version: !ruby/object:Gem::Requirement
|
181
182
|
requirements:
|
182
|
-
- - '>='
|
183
|
+
- - ! '>='
|
183
184
|
- !ruby/object:Gem::Version
|
184
185
|
version: 1.9.3
|
185
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
187
|
requirements:
|
187
|
-
- - '>='
|
188
|
+
- - ! '>='
|
188
189
|
- !ruby/object:Gem::Version
|
189
190
|
version: '0'
|
190
191
|
requirements: []
|
191
192
|
rubyforge_project:
|
192
|
-
rubygems_version: 2.
|
193
|
+
rubygems_version: 2.2.2
|
193
194
|
signing_key:
|
194
195
|
specification_version: 4
|
195
196
|
summary: Parser for Green Button data format
|