green-button-data 0.1.2 → 0.2.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 +8 -8
- data/lib/green-button-data.rb +0 -32
- data/lib/green-button-data/enumerations.rb +20 -0
- data/lib/green-button-data/parser.rb +16 -0
- data/lib/green-button-data/parser/content.rb +13 -0
- data/lib/green-button-data/parser/summary_measurement.rb +39 -0
- data/lib/green-button-data/parser/usage_summary.rb +131 -0
- data/lib/green-button-data/version.rb +1 -1
- data/spec/fixtures.rb +5 -1
- data/spec/fixtures/ESPIElectricPowerUsageSummary.xml +41 -0
- data/spec/fixtures/ESPIUsageSummaries.xml +41 -0
- data/spec/fixtures/ESPIUsageSummary.xml +33 -0
- data/spec/fixtures/PGEUsageSummaries.xml +81 -0
- data/spec/fixtures/PGEUsageSummary.xml +25 -0
- data/spec/green-button-data/parser/usage_summary_spec.rb +96 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGExMTcyMDliNmY4NzY3ZDllYzg5ZGY3YTU4NGI5YmY0MjhiZGZlOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NGI3NDIyMjVkOWRhOTlhZTAyMGFhOTdmYTNiZTA4YzQxNDQyMzBjNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmI4YTcxZWY3ZjcwOTk3MGYxMzYyMTI5YzIxZjljZWZlZTg3MjRlMDYxNDE0
|
10
|
+
ODBkODZjMGNjYzU0OTQ2NTVjYmRmMDJmNjU5MDFjZGUwZGY3NTQyN2UzODAy
|
11
|
+
Mzg2ZGQ1OGUwNWJiNGY2ZTc2Y2I2YzQ4YzA5Y2EzZmE1ZGE4Mjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NmY5OWI3YTU0YWY3NTRmYzQ4MGNhNDJmYTJkZTVkNjIwNTlhMmFmNGZkYzY3
|
14
|
+
NDYxNTFjMjBjZGMyNGM4YjY0YjE5NDI1NDc0YWNmYWNjNjYyZTVlMDA4ZWU0
|
15
|
+
YTkwM2FmZWFiNjNmMThmMjNlODg2ZjlmOTdjNDlkNThjYjFlZDY=
|
data/lib/green-button-data.rb
CHANGED
@@ -3,40 +3,8 @@ require 'sax-machine'
|
|
3
3
|
require 'green-button-data/core_ext'
|
4
4
|
require 'green-button-data/dst'
|
5
5
|
require 'green-button-data/enumerations'
|
6
|
-
require 'green-button-data/enumerations/accumulation'
|
7
|
-
require 'green-button-data/enumerations/authorization_status'
|
8
|
-
require 'green-button-data/enumerations/commodity'
|
9
|
-
require 'green-button-data/enumerations/currency'
|
10
|
-
require 'green-button-data/enumerations/data_custodian_application_status'
|
11
|
-
require 'green-button-data/enumerations/data_qualifier'
|
12
|
-
require 'green-button-data/enumerations/espi_service_status'
|
13
|
-
require 'green-button-data/enumerations/flow_direction'
|
14
|
-
require 'green-button-data/enumerations/measurement'
|
15
|
-
require 'green-button-data/enumerations/phase_code'
|
16
|
-
require 'green-button-data/enumerations/quality_of_reading'
|
17
|
-
require 'green-button-data/enumerations/service'
|
18
|
-
require 'green-button-data/enumerations/third_party_application_status'
|
19
|
-
require 'green-button-data/enumerations/third_party_application_type'
|
20
|
-
require 'green-button-data/enumerations/third_party_application_use'
|
21
|
-
require 'green-button-data/enumerations/time_attribute'
|
22
|
-
require 'green-button-data/enumerations/time_period_of_interest'
|
23
|
-
require 'green-button-data/enumerations/unit_multiplier'
|
24
|
-
require 'green-button-data/enumerations/unit_symbol'
|
25
6
|
require 'green-button-data/utilities'
|
26
7
|
require 'green-button-data/parser'
|
27
|
-
require 'green-button-data/parser/rational_number'
|
28
|
-
require 'green-button-data/parser/interval'
|
29
|
-
require 'green-button-data/parser/interval_reading'
|
30
|
-
require 'green-button-data/parser/interval_block'
|
31
|
-
require 'green-button-data/parser/authorization'
|
32
|
-
require 'green-button-data/parser/application_information'
|
33
|
-
require 'green-button-data/parser/service_category'
|
34
|
-
require 'green-button-data/parser/local_time_parameters'
|
35
|
-
require 'green-button-data/parser/reading_type'
|
36
|
-
require 'green-button-data/parser/usage_point'
|
37
|
-
require 'green-button-data/parser/content'
|
38
|
-
require 'green-button-data/parser/entry'
|
39
|
-
require 'green-button-data/parser/feed'
|
40
8
|
require 'green-button-data/feed'
|
41
9
|
|
42
10
|
module GreenButtonData
|
@@ -1,3 +1,23 @@
|
|
1
|
+
require 'green-button-data/enumerations/accumulation'
|
2
|
+
require 'green-button-data/enumerations/authorization_status'
|
3
|
+
require 'green-button-data/enumerations/commodity'
|
4
|
+
require 'green-button-data/enumerations/currency'
|
5
|
+
require 'green-button-data/enumerations/data_custodian_application_status'
|
6
|
+
require 'green-button-data/enumerations/data_qualifier'
|
7
|
+
require 'green-button-data/enumerations/espi_service_status'
|
8
|
+
require 'green-button-data/enumerations/flow_direction'
|
9
|
+
require 'green-button-data/enumerations/measurement'
|
10
|
+
require 'green-button-data/enumerations/phase_code'
|
11
|
+
require 'green-button-data/enumerations/quality_of_reading'
|
12
|
+
require 'green-button-data/enumerations/service'
|
13
|
+
require 'green-button-data/enumerations/third_party_application_status'
|
14
|
+
require 'green-button-data/enumerations/third_party_application_type'
|
15
|
+
require 'green-button-data/enumerations/third_party_application_use'
|
16
|
+
require 'green-button-data/enumerations/time_attribute'
|
17
|
+
require 'green-button-data/enumerations/time_period_of_interest'
|
18
|
+
require 'green-button-data/enumerations/unit_multiplier'
|
19
|
+
require 'green-button-data/enumerations/unit_symbol'
|
20
|
+
|
1
21
|
module GreenButtonData
|
2
22
|
module Enumerations
|
3
23
|
end
|
@@ -1,2 +1,18 @@
|
|
1
|
+
require 'green-button-data/parser/rational_number'
|
2
|
+
require 'green-button-data/parser/interval'
|
3
|
+
require 'green-button-data/parser/interval_reading'
|
4
|
+
require 'green-button-data/parser/interval_block'
|
5
|
+
require 'green-button-data/parser/authorization'
|
6
|
+
require 'green-button-data/parser/application_information'
|
7
|
+
require 'green-button-data/parser/service_category'
|
8
|
+
require 'green-button-data/parser/local_time_parameters'
|
9
|
+
require 'green-button-data/parser/reading_type'
|
10
|
+
require 'green-button-data/parser/summary_measurement'
|
11
|
+
require 'green-button-data/parser/usage_point'
|
12
|
+
require 'green-button-data/parser/usage_summary'
|
13
|
+
require 'green-button-data/parser/content'
|
14
|
+
require 'green-button-data/parser/entry'
|
15
|
+
require 'green-button-data/parser/feed'
|
16
|
+
|
1
17
|
module GreenButtonData::Parser
|
2
18
|
end
|
@@ -6,21 +6,33 @@ module GreenButtonData
|
|
6
6
|
element :ApplicationInformation, class: ApplicationInformation,
|
7
7
|
as: :application_information
|
8
8
|
element :Authorization, class: Authorization, as: :authorization
|
9
|
+
element :ElectricPowerUsageSummary, class: UsageSummary,
|
10
|
+
as: :electric_power_usage_summary do |electric_power_usage_summary|
|
11
|
+
warn "[DEPRECATED] ElectricPowerUsageSummary element is deprecated by OpenESPI Green Button Data standards. Please migrate to UsageSummary in the future."
|
12
|
+
electric_power_usage_summary
|
13
|
+
end
|
9
14
|
element :IntervalBlock, class: IntervalBlock, as: :interval_block
|
10
15
|
element :LocalTimeParameters, class: LocalTimeParameters,
|
11
16
|
as: :local_time_parameters
|
12
17
|
element :ReadingType, class: ReadingType, as: :reading_type
|
13
18
|
element :UsagePoint, class: UsagePoint, as: :usage_point
|
19
|
+
element :UsageSummary, class: UsageSummary, as: :usage_summary
|
14
20
|
|
15
21
|
# ESPI Namespacing
|
16
22
|
element :'espi:ApplicationInformation', class: ApplicationInformation,
|
17
23
|
as: :application_information
|
18
24
|
element :'espi:Authorization', class: Authorization, as: :authorization
|
25
|
+
element :'espi:ElectricPowerUsageSummary', class: UsageSummary,
|
26
|
+
as: :electric_power_usage_summary do |electric_power_usage_summary|
|
27
|
+
warn "[DEPRECATED] ElectricPowerUsageSummary element is deprecated by OpenESPI Green Button Data standards. Please migrate to UsageSummary in the future."
|
28
|
+
electric_power_usage_summary
|
29
|
+
end
|
19
30
|
element :'espi:IntervalBlock', class: IntervalBlock, as: :interval_block
|
20
31
|
element :'espi:LocalTimeParameters', class: LocalTimeParameters,
|
21
32
|
as: :local_time_parameters
|
22
33
|
element :'espi:ReadingType', class: ReadingType, as: :reading_type
|
23
34
|
element :'espi:UsagePoint', class: UsagePoint, as: :usage_point
|
35
|
+
element :'espi:UsageSummary', class: UsageSummary, as: :usage_summary
|
24
36
|
|
25
37
|
# Special case for PG&E generic namespaces
|
26
38
|
element :'ns0:ApplicationInformation', class: ApplicationInformation,
|
@@ -31,6 +43,7 @@ module GreenButtonData
|
|
31
43
|
as: :local_time_parameters
|
32
44
|
element :'ns0:ReadingType', class: ReadingType, as: :reading_type
|
33
45
|
element :'ns0:UsagePoint', class: UsagePoint, as: :usage_point
|
46
|
+
element :'ns0:UsageSummary', class: UsageSummary, as: :usage_summary
|
34
47
|
end
|
35
48
|
end
|
36
49
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module GreenButtonData
|
2
|
+
module Parser
|
3
|
+
class SummaryMeasurement
|
4
|
+
include SAXMachine
|
5
|
+
include Enumerations
|
6
|
+
|
7
|
+
element :powerOfTenMultiplier, class: Integer,
|
8
|
+
as: :power_of_ten_multiplier
|
9
|
+
element :timeStamp, as: :time_stamp
|
10
|
+
element :uom, class: Integer
|
11
|
+
element :value, class: Integer
|
12
|
+
element :readingTypeRef, as: :reading_type_ref
|
13
|
+
|
14
|
+
def power_of_ten_multiplier
|
15
|
+
UNIT_MULTIPLIER[@power_of_ten_multiplier]
|
16
|
+
end
|
17
|
+
|
18
|
+
def uom
|
19
|
+
UNIT_SYMBOL[@uom]
|
20
|
+
end
|
21
|
+
|
22
|
+
# ESPI Namespacing
|
23
|
+
element :'espi:powerOfTenMultiplier', class: Integer,
|
24
|
+
as: :power_of_ten_multiplier
|
25
|
+
element :'espi:timeStamp', as: :time_stamp
|
26
|
+
element :'espi:uom', class: Integer, as: :uom
|
27
|
+
element :'espi:value', class: Integer, as: :value
|
28
|
+
element :'espi:readingTypeRef', as: :reading_type_ref
|
29
|
+
|
30
|
+
# Special case for PG&E generic namespacing
|
31
|
+
element :'ns0:powerOfTenMultiplier', class: Integer,
|
32
|
+
as: :power_of_ten_multiplier
|
33
|
+
element :'ns0:timeStamp', as: :time_stamp
|
34
|
+
element :'ns0:uom', class: Integer, as: :uom
|
35
|
+
element :'ns0:value', class: Integer, as: :value
|
36
|
+
element :'ns0:readingTypeRef', as: :reading_type_ref
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,131 @@
|
|
1
|
+
module GreenButtonData
|
2
|
+
module Parser
|
3
|
+
class UsageSummary
|
4
|
+
include SAXMachine
|
5
|
+
include Enumerations
|
6
|
+
include Utilities
|
7
|
+
|
8
|
+
element :billingPeriod, class: Interval, as: :billing_period
|
9
|
+
element :billLastPeriod, class: Integer, as: :bill_last_period
|
10
|
+
element :billToDate, class: Integer, as: :bill_to_date
|
11
|
+
element :costAdditionalLastPeriod, class: Integer,
|
12
|
+
as: :cost_additional_last_period
|
13
|
+
element :costAdditionalDetailLastPeriod, class: Integer,
|
14
|
+
as: :cost_additional_detail_last_period
|
15
|
+
element :currency, class: Integer
|
16
|
+
element :overallConsumptionLastPeriod, class: SummaryMeasurement,
|
17
|
+
as: :overall_consumption_last_period
|
18
|
+
element :currentBillingPeriodOverAllConsumption,
|
19
|
+
class: SummaryMeasurement,
|
20
|
+
as: :current_billing_period_over_all_consumption
|
21
|
+
element :currentDayLastYearNetConsumption, class: SummaryMeasurement,
|
22
|
+
as: :current_day_last_year_net_consumption
|
23
|
+
element :currentDayNetConsumption, class: SummaryMeasurement,
|
24
|
+
as: :current_day_net_consumption
|
25
|
+
element :currentDayOverallConsumption, class: SummaryMeasurement,
|
26
|
+
as: :current_day_overall_consumption
|
27
|
+
element :peakDemand, class: SummaryMeasurement, as: :peak_demand
|
28
|
+
element :previousDayLastYearOverallConsumption, class: SummaryMeasurement,
|
29
|
+
as: :previous_day_last_year_overall_consumption
|
30
|
+
element :previousDayNetConsumption, class: SummaryMeasurement,
|
31
|
+
as: :previous_day_net_consumption
|
32
|
+
element :previousDayOverallConsumption, class: SummaryMeasurement,
|
33
|
+
as: :previous_day_overall_consumption
|
34
|
+
element :qualityOfReading, class: Integer, as: :quality_of_reading
|
35
|
+
element :ratchetDemand, class: SummaryMeasurement, as: :ratchet_demand
|
36
|
+
element :ratchetDemandPeriod, class: Interval, as: :ratchet_demand_period
|
37
|
+
element :statusTimeStamp, class: Integer, as: :status_time_stamp
|
38
|
+
element :commodity, class: Integer
|
39
|
+
|
40
|
+
def currency
|
41
|
+
CURRENCY[@currency]
|
42
|
+
end
|
43
|
+
|
44
|
+
def quality_of_reading
|
45
|
+
QUALITY_OF_READING[@quality_of_reading]
|
46
|
+
end
|
47
|
+
|
48
|
+
def commodity
|
49
|
+
COMMODITY[@commodity]
|
50
|
+
end
|
51
|
+
|
52
|
+
def status_time_stamp
|
53
|
+
Time.at(normalize_epoch(@status_time_stamp)).utc.to_datetime
|
54
|
+
end
|
55
|
+
|
56
|
+
# ESPI Namespacing
|
57
|
+
element :'espi:billingPeriod', class: Interval, as: :billing_period
|
58
|
+
element :'espi:billLastPeriod', class: Integer, as: :bill_last_period
|
59
|
+
element :'espi:billToDate', class: Integer, as: :bill_to_date
|
60
|
+
element :'espi:costAdditionalLastPeriod', class: Integer,
|
61
|
+
as: :cost_additional_last_period
|
62
|
+
element :'espi:costAdditionalDetailLastPeriod', class: Integer,
|
63
|
+
as: :cost_additional_detail_last_period
|
64
|
+
element :'espi:currency', class: Integer, as: :currency
|
65
|
+
element :'espi:overallConsumptionLastPeriod', class: SummaryMeasurement,
|
66
|
+
as: :overall_consumption_last_period
|
67
|
+
element :'espi:currentBillingPeriodOverAllConsumption',
|
68
|
+
class: SummaryMeasurement,
|
69
|
+
as: :current_billing_period_over_all_consumption
|
70
|
+
element :'espi:currentDayLastYearNetConsumption',
|
71
|
+
class: SummaryMeasurement,
|
72
|
+
as: :current_day_last_year_net_consumption
|
73
|
+
element :'espi:currentDayNetConsumption', class: SummaryMeasurement,
|
74
|
+
as: :current_day_net_consumption
|
75
|
+
element :currentDayOverallConsumption, class: SummaryMeasurement,
|
76
|
+
as: :current_day_overall_consumption
|
77
|
+
element :'espi:peakDemand', class: SummaryMeasurement, as: :peak_demand
|
78
|
+
element :'espi:previousDayLastYearOverallConsumption',
|
79
|
+
class: SummaryMeasurement,
|
80
|
+
as: :previous_day_last_year_overall_consumption
|
81
|
+
element :'espi:previousDayNetConsumption', class: SummaryMeasurement,
|
82
|
+
as: :previous_day_net_consumption
|
83
|
+
element :'espi:previousDayOverallConsumption', class: SummaryMeasurement,
|
84
|
+
as: :previous_day_overall_consumption
|
85
|
+
element :'espi:qualityOfReading', class: Integer, as: :quality_of_reading
|
86
|
+
element :'espi:ratchetDemand', class: SummaryMeasurement,
|
87
|
+
as: :ratchet_demand
|
88
|
+
element :'espi:ratchetDemandPeriod', class: Interval,
|
89
|
+
as: :ratchet_demand_period
|
90
|
+
element :'espi:statusTimeStamp', class: Integer, as: :status_time_stamp
|
91
|
+
element :'espi:commodity', class: Integer, as: :commodity
|
92
|
+
|
93
|
+
# Special case for PG&E which uses generic namespacing
|
94
|
+
element :'ns0:billingPeriod', class: Interval, as: :billing_period
|
95
|
+
element :'ns0:billLastPeriod', class: Integer, as: :bill_last_period
|
96
|
+
element :'ns0:billToDate', class: Integer, as: :bill_to_date
|
97
|
+
element :'ns0:costAdditionalLastPeriod', class: Integer,
|
98
|
+
as: :cost_additional_last_period
|
99
|
+
element :'ns0:costAdditionalDetailLastPeriod', class: Integer,
|
100
|
+
as: :cost_additional_detail_last_period
|
101
|
+
element :'ns0:currency', class: Integer, as: :currency
|
102
|
+
element :'ns0:overallConsumptionLastPeriod', class: SummaryMeasurement,
|
103
|
+
as: :overall_consumption_last_period
|
104
|
+
element :'ns0:currentBillingPeriodOverAllConsumption',
|
105
|
+
class: SummaryMeasurement,
|
106
|
+
as: :current_billing_period_over_all_consumption
|
107
|
+
element :'ns0:currentDayLastYearNetConsumption',
|
108
|
+
class: SummaryMeasurement,
|
109
|
+
as: :current_day_last_year_net_consumption
|
110
|
+
element :'ns0:currentDayNetConsumption', class: SummaryMeasurement,
|
111
|
+
as: :current_day_net_consumption
|
112
|
+
element :currentDayOverallConsumption, class: SummaryMeasurement,
|
113
|
+
as: :current_day_overall_consumption
|
114
|
+
element :'ns0:peakDemand', class: SummaryMeasurement, as: :peak_demand
|
115
|
+
element :'ns0:previousDayLastYearOverallConsumption',
|
116
|
+
class: SummaryMeasurement,
|
117
|
+
as: :previous_day_last_year_overall_consumption
|
118
|
+
element :'ns0:previousDayNetConsumption', class: SummaryMeasurement,
|
119
|
+
as: :previous_day_net_consumption
|
120
|
+
element :'ns0:previousDayOverallConsumption', class: SummaryMeasurement,
|
121
|
+
as: :previous_day_overall_consumption
|
122
|
+
element :'ns0:qualityOfReading', class: Integer, as: :quality_of_reading
|
123
|
+
element :'ns0:ratchetDemand', class: SummaryMeasurement,
|
124
|
+
as: :ratchet_demand
|
125
|
+
element :'ns0:ratchetDemandPeriod', class: Interval,
|
126
|
+
as: :ratchet_demand_period
|
127
|
+
element :'ns0:statusTimeStamp', class: Integer, as: :status_time_stamp
|
128
|
+
element :'ns0:commodity', class: Integer, as: :commodity
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
data/spec/fixtures.rb
CHANGED
@@ -2,16 +2,20 @@ module Fixtures
|
|
2
2
|
FIXTURES = {
|
3
3
|
espi_application_information: "ESPIApplicationInformation.xml",
|
4
4
|
espi_authorization: "ESPIAuthorization.xml",
|
5
|
+
espi_electric_power_usage_summary: "ESPIElectricPowerUsageSummary.xml",
|
5
6
|
espi_interval_block: "ESPIIntervalBlock.xml",
|
6
7
|
espi_local_time_parameters: "ESPILocalTimeParameters.xml",
|
7
8
|
espi_reading_type: "ESPIReadingType.xml",
|
8
9
|
espi_usage_point: "ESPIUsagePoint.xml",
|
10
|
+
espi_usage_summaries: "ESPIUsageSummaries.xml",
|
9
11
|
pge_application_information: "PGEApplicationInformation.xml",
|
10
12
|
pge_authorization: "PGEAuthorization.xml",
|
11
13
|
pge_interval_block: "PGEIntervalBlock.xml",
|
12
14
|
pge_local_time_parameters: "PGELocalTimeParameters.xml",
|
13
15
|
pge_reading_type: "PGEReadingType.xml",
|
14
|
-
pge_usage_point: "PGEUsagePoint.xml"
|
16
|
+
pge_usage_point: "PGEUsagePoint.xml",
|
17
|
+
pge_usage_summaries: "PGEUsageSummaries.xml",
|
18
|
+
pge_usage_summary: "PGEUsageSummary.xml"
|
15
19
|
}
|
16
20
|
|
17
21
|
##
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<?xml-stylesheet type="text/xsl" href="GreenButtonDataStyleSheet.xslt"?>
|
3
|
+
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
4
|
+
<id>urn:uuid:177d2bf1-264e-462d-9529-35de03737bd3</id>
|
5
|
+
<title>Green Button Usage Feed</title>
|
6
|
+
<updated>2015-08-20T19:52:40Z</updated>
|
7
|
+
<link href="https://services.greenbuttondata.org//DataCustodian/espi/1_1/resource/Subscription/5/UsagePoint/1/ElectricPowerUsageSummary" rel="self"/>
|
8
|
+
<entry xmlns:espi="http://naesb.org/espi" xmlns="http://www.w3.org/2005/Atom">
|
9
|
+
<id>urn:uuid:923a7143-263e-421b-bea2-e41b7e240013</id>
|
10
|
+
<link href="https://services.greenbuttondata.org//DataCustodian/espi/1_1/resource/Subscription/5/UsagePoint/1/ElectricPowerUsageSummary" rel="up"/>
|
11
|
+
<link href="https://services.greenbuttondata.org//DataCustodian/espi/1_1/resource/Subscription/5/UsagePoint/1/ElectricPowerUsageSummary/1" rel="self"/>
|
12
|
+
<title>Usage Summary</title>
|
13
|
+
<content>
|
14
|
+
<espi:ElectricPowerUsageSummary>
|
15
|
+
<espi:billingPeriod>
|
16
|
+
<espi:duration>2419200</espi:duration>
|
17
|
+
<espi:start>1391230800</espi:start>
|
18
|
+
</espi:billingPeriod>
|
19
|
+
<espi:billLastPeriod>6752000</espi:billLastPeriod>
|
20
|
+
<espi:billToDate>4807000</espi:billToDate>
|
21
|
+
<espi:costAdditionalLastPeriod>0</espi:costAdditionalLastPeriod>
|
22
|
+
<espi:currency>840</espi:currency>
|
23
|
+
<espi:overallConsumptionLastPeriod>
|
24
|
+
<espi:powerOfTenMultiplier>0</espi:powerOfTenMultiplier>
|
25
|
+
<espi:uom>72</espi:uom>
|
26
|
+
<espi:value>625716</espi:value>
|
27
|
+
</espi:overallConsumptionLastPeriod>
|
28
|
+
<espi:currentBillingPeriodOverAllConsumption>
|
29
|
+
<espi:powerOfTenMultiplier>0</espi:powerOfTenMultiplier>
|
30
|
+
<espi:timeStamp>1395374400</espi:timeStamp>
|
31
|
+
<espi:uom>72</espi:uom>
|
32
|
+
<espi:value>447993</espi:value>
|
33
|
+
</espi:currentBillingPeriodOverAllConsumption>
|
34
|
+
<espi:qualityOfReading>14</espi:qualityOfReading>
|
35
|
+
<espi:statusTimeStamp>1395374400</espi:statusTimeStamp>
|
36
|
+
</espi:ElectricPowerUsageSummary>
|
37
|
+
</content>
|
38
|
+
<published>2014-03-01T05:00:00Z</published>
|
39
|
+
<updated>2014-03-01T05:00:00Z</updated>
|
40
|
+
</entry>
|
41
|
+
</feed>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<?xml-stylesheet type="text/xsl" href="GreenButtonDataStyleSheet.xslt"?>
|
3
|
+
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
4
|
+
<id>urn:uuid:177d2bf1-264e-462d-9529-35de03737bd3</id>
|
5
|
+
<title>Green Button Usage Feed</title>
|
6
|
+
<updated>2015-08-20T19:52:40Z</updated>
|
7
|
+
<link href="https://services.greenbuttondata.org//DataCustodian/espi/1_1/resource/Subscription/5/UsagePoint/1/ElectricPowerUsageSummary" rel="self"/>
|
8
|
+
<entry xmlns:espi="http://naesb.org/espi" xmlns="http://www.w3.org/2005/Atom">
|
9
|
+
<id>urn:uuid:923a7143-263e-421b-bea2-e41b7e240013</id>
|
10
|
+
<link href="https://services.greenbuttondata.org//DataCustodian/espi/1_1/resource/Subscription/5/UsagePoint/1/ElectricPowerUsageSummary" rel="up"/>
|
11
|
+
<link href="https://services.greenbuttondata.org//DataCustodian/espi/1_1/resource/Subscription/5/UsagePoint/1/ElectricPowerUsageSummary/1" rel="self"/>
|
12
|
+
<title>Usage Summary</title>
|
13
|
+
<content>
|
14
|
+
<espi:UsageSummary>
|
15
|
+
<espi:billingPeriod>
|
16
|
+
<espi:duration>2419200</espi:duration>
|
17
|
+
<espi:start>1391230800</espi:start>
|
18
|
+
</espi:billingPeriod>
|
19
|
+
<espi:billLastPeriod>6752000</espi:billLastPeriod>
|
20
|
+
<espi:billToDate>4807000</espi:billToDate>
|
21
|
+
<espi:costAdditionalLastPeriod>0</espi:costAdditionalLastPeriod>
|
22
|
+
<espi:currency>840</espi:currency>
|
23
|
+
<espi:overallConsumptionLastPeriod>
|
24
|
+
<espi:powerOfTenMultiplier>0</espi:powerOfTenMultiplier>
|
25
|
+
<espi:uom>72</espi:uom>
|
26
|
+
<espi:value>625716</espi:value>
|
27
|
+
</espi:overallConsumptionLastPeriod>
|
28
|
+
<espi:currentBillingPeriodOverAllConsumption>
|
29
|
+
<espi:powerOfTenMultiplier>0</espi:powerOfTenMultiplier>
|
30
|
+
<espi:timeStamp>1395374400</espi:timeStamp>
|
31
|
+
<espi:uom>72</espi:uom>
|
32
|
+
<espi:value>447993</espi:value>
|
33
|
+
</espi:currentBillingPeriodOverAllConsumption>
|
34
|
+
<espi:qualityOfReading>14</espi:qualityOfReading>
|
35
|
+
<espi:statusTimeStamp>1395374400</espi:statusTimeStamp>
|
36
|
+
</espi:UsageSummary>
|
37
|
+
</content>
|
38
|
+
<published>2014-03-01T05:00:00Z</published>
|
39
|
+
<updated>2014-03-01T05:00:00Z</updated>
|
40
|
+
</entry>
|
41
|
+
</feed>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<entry xmlns:espi="http://naesb.org/espi" xmlns="http://www.w3.org/2005/Atom">
|
2
|
+
<id>urn:uuid:923a7143-263e-421b-bea2-e41b7e240013</id>
|
3
|
+
<link href="https://services.greenbuttondata.org//DataCustodian/espi/1_1/resource/Subscription/5/UsagePoint/1/ElectricPowerUsageSummary" rel="up"/>
|
4
|
+
<link href="https://services.greenbuttondata.org//DataCustodian/espi/1_1/resource/Subscription/5/UsagePoint/1/ElectricPowerUsageSummary/1" rel="self"/>
|
5
|
+
<title>Usage Summary</title>
|
6
|
+
<content>
|
7
|
+
<espi:UsageSummary>
|
8
|
+
<espi:billingPeriod>
|
9
|
+
<espi:duration>2419200</espi:duration>
|
10
|
+
<espi:start>1391230800</espi:start>
|
11
|
+
</espi:billingPeriod>
|
12
|
+
<espi:billLastPeriod>6752000</espi:billLastPeriod>
|
13
|
+
<espi:billToDate>4807000</espi:billToDate>
|
14
|
+
<espi:costAdditionalLastPeriod>0</espi:costAdditionalLastPeriod>
|
15
|
+
<espi:currency>840</espi:currency>
|
16
|
+
<espi:overallConsumptionLastPeriod>
|
17
|
+
<espi:powerOfTenMultiplier>0</espi:powerOfTenMultiplier>
|
18
|
+
<espi:uom>72</espi:uom>
|
19
|
+
<espi:value>625716</espi:value>
|
20
|
+
</espi:overallConsumptionLastPeriod>
|
21
|
+
<espi:currentBillingPeriodOverAllConsumption>
|
22
|
+
<espi:powerOfTenMultiplier>0</espi:powerOfTenMultiplier>
|
23
|
+
<espi:timeStamp>1395374400</espi:timeStamp>
|
24
|
+
<espi:uom>72</espi:uom>
|
25
|
+
<espi:value>447993</espi:value>
|
26
|
+
</espi:currentBillingPeriodOverAllConsumption>
|
27
|
+
<espi:qualityOfReading>14</espi:qualityOfReading>
|
28
|
+
<espi:statusTimeStamp>1395374400</espi:statusTimeStamp>
|
29
|
+
</espi:UsageSummary>
|
30
|
+
</content>
|
31
|
+
<published>2014-03-01T05:00:00Z</published>
|
32
|
+
<updated>2014-03-01T05:00:00Z</updated>
|
33
|
+
</entry>
|
@@ -0,0 +1,81 @@
|
|
1
|
+
<ns1:feed xmlns:ns1="http://www.w3.org/2005/Atom">
|
2
|
+
<ns1:id xsi:type="ns1:idType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">69012c37-7172-4c83-91d7-d2e0ed54cedc</ns1:id>
|
3
|
+
<ns1:title type="text" xsi:type="ns1:textType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Green Button Usage Feed</ns1:title>
|
4
|
+
<ns1:updated xsi:type="ns1:dateTimeType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2015-08-20T22:32:37.982Z</ns1:updated>
|
5
|
+
<ns1:link href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/LocalTimeParameters" rel="self" xsi:type="ns1:linkType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
|
6
|
+
<ns1:entry>
|
7
|
+
<ns1:id xsi:type="ns1:idType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">d79c8624-1166-4f7c-b479-c73a5f98866a</ns1:id>
|
8
|
+
<ns1:link href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/Subscription/1/UsagePoint/1/UsageSummary" rel="up" xsi:type="ns1:linkType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
|
9
|
+
<ns1:link href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/Subscription/1/UsagePoint/1/UsageSummary/1,436,684,400,000" rel="self" xsi:type="ns1:linkType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
|
10
|
+
<ns1:title type="text" xsi:type="ns1:textType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">UsageSummary_1436684400000</ns1:title>
|
11
|
+
<ns1:published xsi:type="ns1:dateTimeType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2015-08-20T22:32:37.976Z</ns1:published>
|
12
|
+
<ns1:updated xsi:type="ns1:dateTimeType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2015-08-20T22:32:37.978Z</ns1:updated>
|
13
|
+
<ns1:content xsi:type="ns1:contentType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
14
|
+
<ns0:UsageSummary xmlns:ns0="http://naesb.org/espi">
|
15
|
+
<ns0:billingPeriod>
|
16
|
+
<ns0:duration>2505600</ns0:duration>
|
17
|
+
<ns0:start>1434006000</ns0:start>
|
18
|
+
</ns0:billingPeriod>
|
19
|
+
<ns0:overallConsumptionLastPeriod>
|
20
|
+
<ns0:powerOfTenMultiplier>-3</ns0:powerOfTenMultiplier>
|
21
|
+
<ns0:uom>72</ns0:uom>
|
22
|
+
<ns0:value>146000000</ns0:value>
|
23
|
+
<ns0:readingTypeRef>https://api.pge.com/GreenButtonConnect/espi/1_1/resource/ReadingType/NzI6bnVsbDpudWxsOjQ=</ns0:readingTypeRef>
|
24
|
+
</ns0:overallConsumptionLastPeriod>
|
25
|
+
<ns0:qualityOfReading>17</ns0:qualityOfReading>
|
26
|
+
<ns0:statusTimeStamp>1440109957976</ns0:statusTimeStamp>
|
27
|
+
<ns0:commodity>1</ns0:commodity>
|
28
|
+
</ns0:UsageSummary>
|
29
|
+
</ns1:content>
|
30
|
+
</ns1:entry>
|
31
|
+
<ns1:entry>
|
32
|
+
<ns1:id xsi:type="ns1:idType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">7a83a6b0-8e12-4b5e-b1ea-6707e0ee4a3e</ns1:id>
|
33
|
+
<ns1:link href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/Subscription/1/UsagePoint/1/UsageSummary" rel="up" xsi:type="ns1:linkType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
|
34
|
+
<ns1:link href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/Subscription/1/UsagePoint/1/UsageSummary/1,434,092,400,000" rel="self" xsi:type="ns1:linkType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
|
35
|
+
<ns1:title type="text" xsi:type="ns1:textType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">UsageSummary_1434092400000</ns1:title>
|
36
|
+
<ns1:published xsi:type="ns1:dateTimeType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2015-08-20T22:32:37.979Z</ns1:published>
|
37
|
+
<ns1:updated xsi:type="ns1:dateTimeType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2015-08-20T22:32:37.979Z</ns1:updated>
|
38
|
+
<ns1:content xsi:type="ns1:contentType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
39
|
+
<ns0:UsageSummary xmlns:ns0="http://naesb.org/espi">
|
40
|
+
<ns0:billingPeriod>
|
41
|
+
<ns0:duration>2592000</ns0:duration>
|
42
|
+
<ns0:start>1431414000</ns0:start>
|
43
|
+
</ns0:billingPeriod>
|
44
|
+
<ns0:overallConsumptionLastPeriod>
|
45
|
+
<ns0:powerOfTenMultiplier>-3</ns0:powerOfTenMultiplier>
|
46
|
+
<ns0:uom>72</ns0:uom>
|
47
|
+
<ns0:value>128000000</ns0:value>
|
48
|
+
<ns0:readingTypeRef>https://api.pge.com/GreenButtonConnect/espi/1_1/resource/ReadingType/NzI6bnVsbDpudWxsOjQ=</ns0:readingTypeRef>
|
49
|
+
</ns0:overallConsumptionLastPeriod>
|
50
|
+
<ns0:qualityOfReading>17</ns0:qualityOfReading>
|
51
|
+
<ns0:statusTimeStamp>1440109957979</ns0:statusTimeStamp>
|
52
|
+
<ns0:commodity>1</ns0:commodity>
|
53
|
+
</ns0:UsageSummary>
|
54
|
+
</ns1:content>
|
55
|
+
</ns1:entry>
|
56
|
+
<ns1:entry>
|
57
|
+
<ns1:id xsi:type="ns1:idType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">9dc44d9b-e352-426e-b4b8-7324eda7ba47</ns1:id>
|
58
|
+
<ns1:link href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/Subscription/1/UsagePoint/1/UsageSummary" rel="up" xsi:type="ns1:linkType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
|
59
|
+
<ns1:link href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/Subscription/1/UsagePoint/1/UsageSummary/1,431,586,800,000" rel="self" xsi:type="ns1:linkType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
|
60
|
+
<ns1:title type="text" xsi:type="ns1:textType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">UsageSummary_1431586800000</ns1:title>
|
61
|
+
<ns1:published xsi:type="ns1:dateTimeType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2015-08-20T22:32:37.98Z</ns1:published>
|
62
|
+
<ns1:updated xsi:type="ns1:dateTimeType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2015-08-20T22:32:37.981Z</ns1:updated>
|
63
|
+
<ns1:content xsi:type="ns1:contentType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
64
|
+
<ns0:UsageSummary xmlns:ns0="http://naesb.org/espi">
|
65
|
+
<ns0:billingPeriod>
|
66
|
+
<ns0:duration>1123200</ns0:duration>
|
67
|
+
<ns0:start>1430290800</ns0:start>
|
68
|
+
</ns0:billingPeriod>
|
69
|
+
<ns0:overallConsumptionLastPeriod>
|
70
|
+
<ns0:powerOfTenMultiplier>-3</ns0:powerOfTenMultiplier>
|
71
|
+
<ns0:uom>72</ns0:uom>
|
72
|
+
<ns0:value>55000000</ns0:value>
|
73
|
+
<ns0:readingTypeRef>https://api.pge.com/GreenButtonConnect/espi/1_1/resource/ReadingType/NzI6bnVsbDpudWxsOjQ=</ns0:readingTypeRef>
|
74
|
+
</ns0:overallConsumptionLastPeriod>
|
75
|
+
<ns0:qualityOfReading>17</ns0:qualityOfReading>
|
76
|
+
<ns0:statusTimeStamp>1440109957980</ns0:statusTimeStamp>
|
77
|
+
<ns0:commodity>1</ns0:commodity>
|
78
|
+
</ns0:UsageSummary>
|
79
|
+
</ns1:content>
|
80
|
+
</ns1:entry>
|
81
|
+
</ns1:feed>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<ns1:entry>
|
2
|
+
<ns1:id xsi:type="ns1:idType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">d79c8624-1166-4f7c-b479-c73a5f98866a</ns1:id>
|
3
|
+
<ns1:link href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/Subscription/1/UsagePoint/1/UsageSummary" rel="up" xsi:type="ns1:linkType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
|
4
|
+
<ns1:link href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/Subscription/1/UsagePoint/1/UsageSummary/1,436,684,400,000" rel="self" xsi:type="ns1:linkType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
|
5
|
+
<ns1:title type="text" xsi:type="ns1:textType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">UsageSummary_1436684400000</ns1:title>
|
6
|
+
<ns1:published xsi:type="ns1:dateTimeType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2015-08-20T22:32:37.976Z</ns1:published>
|
7
|
+
<ns1:updated xsi:type="ns1:dateTimeType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2015-08-20T22:32:37.978Z</ns1:updated>
|
8
|
+
<ns1:content xsi:type="ns1:contentType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
9
|
+
<ns0:UsageSummary xmlns:ns0="http://naesb.org/espi">
|
10
|
+
<ns0:billingPeriod>
|
11
|
+
<ns0:duration>2505600</ns0:duration>
|
12
|
+
<ns0:start>1434006000</ns0:start>
|
13
|
+
</ns0:billingPeriod>
|
14
|
+
<ns0:overallConsumptionLastPeriod>
|
15
|
+
<ns0:powerOfTenMultiplier>-3</ns0:powerOfTenMultiplier>
|
16
|
+
<ns0:uom>72</ns0:uom>
|
17
|
+
<ns0:value>146000000</ns0:value>
|
18
|
+
<ns0:readingTypeRef>https://api.pge.com/GreenButtonConnect/espi/1_1/resource/ReadingType/NzI6bnVsbDpudWxsOjQ=</ns0:readingTypeRef>
|
19
|
+
</ns0:overallConsumptionLastPeriod>
|
20
|
+
<ns0:qualityOfReading>17</ns0:qualityOfReading>
|
21
|
+
<ns0:statusTimeStamp>1440109957976</ns0:statusTimeStamp>
|
22
|
+
<ns0:commodity>1</ns0:commodity>
|
23
|
+
</ns0:UsageSummary>
|
24
|
+
</ns1:content>
|
25
|
+
</ns1:entry>
|
@@ -0,0 +1,96 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe GreenButtonData::Parser::UsageSummary do
|
4
|
+
let(:feed) { GreenButtonData::Feed }
|
5
|
+
|
6
|
+
context "espi namespace" do
|
7
|
+
let :usage_summary do
|
8
|
+
feed.parse(espi_usage_summaries).entries.first.content.usage_summary
|
9
|
+
end
|
10
|
+
|
11
|
+
subject { usage_summary }
|
12
|
+
|
13
|
+
it "should parse billing period" do
|
14
|
+
expect(subject.billing_period).to be_an GreenButtonData::Parser::Interval
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should parse bill last period" do
|
18
|
+
expect(subject.bill_last_period).to eq 6752000
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should parse bill to date" do
|
22
|
+
expect(subject.bill_to_date).to eq 4807000
|
23
|
+
end
|
24
|
+
|
25
|
+
it "should parse cost additional last period" do
|
26
|
+
expect(subject.cost_additional_last_period).to eq 0
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should parse currency" do
|
30
|
+
expect(subject.currency).to eq :usd
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should parse overall consumption last period" do
|
34
|
+
expect(subject.overall_consumption_last_period).
|
35
|
+
to be_a GreenButtonData::Parser::SummaryMeasurement
|
36
|
+
end
|
37
|
+
|
38
|
+
it "should parse current billing period overall consumption" do
|
39
|
+
expect(subject.current_billing_period_over_all_consumption).
|
40
|
+
to be_a GreenButtonData::Parser::SummaryMeasurement
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should parse quality of reading" do
|
44
|
+
expect(subject.quality_of_reading).to eq :raw
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should parse status timestamp" do
|
48
|
+
expect(subject.status_time_stamp).to eq DateTime.new 2014, 3, 21, 4
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
context "PG&E namespace" do
|
53
|
+
let :usage_summary do
|
54
|
+
feed.parse(pge_usage_summaries).entries.first.content.usage_summary
|
55
|
+
end
|
56
|
+
|
57
|
+
subject { usage_summary }
|
58
|
+
|
59
|
+
it "should parse billing period" do
|
60
|
+
expect(subject.billing_period).to be_a GreenButtonData::Parser::Interval
|
61
|
+
end
|
62
|
+
|
63
|
+
it "should parse overall consumption last period" do
|
64
|
+
expect(subject.overall_consumption_last_period).
|
65
|
+
to be_a GreenButtonData::Parser::SummaryMeasurement
|
66
|
+
end
|
67
|
+
|
68
|
+
it "should parse quality of reading" do
|
69
|
+
expect(subject.quality_of_reading).
|
70
|
+
to eq :validated
|
71
|
+
end
|
72
|
+
|
73
|
+
it "should parse status time stamp" do
|
74
|
+
expect(subject.status_time_stamp).
|
75
|
+
to eq DateTime.new 2015, 8, 20, 22, 32, 37
|
76
|
+
end
|
77
|
+
|
78
|
+
it "should parse commodity" do
|
79
|
+
expect(subject.commodity).to eq :electricity_secondary_metered
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
context "deprecated element name" do
|
84
|
+
let :electric_power_usage_summary do
|
85
|
+
feed.parse(espi_electric_power_usage_summary).entries.first.content.electric_power_usage_summary
|
86
|
+
end
|
87
|
+
|
88
|
+
subject { electric_power_usage_summary }
|
89
|
+
|
90
|
+
it "should raise deprecation warnings" do
|
91
|
+
expect {
|
92
|
+
subject
|
93
|
+
}.to warn("[DEPRECATED] ElectricPowerUsageSummary element is deprecated by OpenESPI Green Button Data standards. Please migrate to UsageSummary in the future.")
|
94
|
+
end
|
95
|
+
end
|
96
|
+
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.
|
4
|
+
version: 0.2.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: 2015-08-
|
11
|
+
date: 2015-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -119,22 +119,29 @@ files:
|
|
119
119
|
- lib/green-button-data/parser/rational_number.rb
|
120
120
|
- lib/green-button-data/parser/reading_type.rb
|
121
121
|
- lib/green-button-data/parser/service_category.rb
|
122
|
+
- lib/green-button-data/parser/summary_measurement.rb
|
122
123
|
- lib/green-button-data/parser/usage_point.rb
|
124
|
+
- lib/green-button-data/parser/usage_summary.rb
|
123
125
|
- lib/green-button-data/utilities.rb
|
124
126
|
- lib/green-button-data/version.rb
|
125
127
|
- spec/fixtures.rb
|
126
128
|
- spec/fixtures/ESPIApplicationInformation.xml
|
127
129
|
- spec/fixtures/ESPIAuthorization.xml
|
130
|
+
- spec/fixtures/ESPIElectricPowerUsageSummary.xml
|
128
131
|
- spec/fixtures/ESPIIntervalBlock.xml
|
129
132
|
- spec/fixtures/ESPILocalTimeParameters.xml
|
130
133
|
- spec/fixtures/ESPIReadingType.xml
|
131
134
|
- spec/fixtures/ESPIUsagePoint.xml
|
135
|
+
- spec/fixtures/ESPIUsageSummaries.xml
|
136
|
+
- spec/fixtures/ESPIUsageSummary.xml
|
132
137
|
- spec/fixtures/PGEApplicationInformation.xml
|
133
138
|
- spec/fixtures/PGEAuthorization.xml
|
134
139
|
- spec/fixtures/PGEIntervalBlock.xml
|
135
140
|
- spec/fixtures/PGELocalTimeParameters.xml
|
136
141
|
- spec/fixtures/PGEReadingType.xml
|
137
142
|
- spec/fixtures/PGEUsagePoint.xml
|
143
|
+
- spec/fixtures/PGEUsageSummaries.xml
|
144
|
+
- spec/fixtures/PGEUsageSummary.xml
|
138
145
|
- spec/green-button-data/core_ext/date_spec.rb
|
139
146
|
- spec/green-button-data/core_ext/fixnum_spec.rb
|
140
147
|
- spec/green-button-data/parser/application_information_spec.rb
|
@@ -144,6 +151,7 @@ files:
|
|
144
151
|
- spec/green-button-data/parser/local_time_parameter_spec.rb
|
145
152
|
- spec/green-button-data/parser/reading_type_spec.rb
|
146
153
|
- spec/green-button-data/parser/usage_point_spec.rb
|
154
|
+
- spec/green-button-data/parser/usage_summary_spec.rb
|
147
155
|
- spec/green-button-data/utilities_spec.rb
|
148
156
|
- spec/spec_helper.rb
|
149
157
|
- spec/support/custom_expectations/warn_expectation.rb
|