green-button-data 0.2.1 → 0.3.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/README.md +116 -8
- data/green-button-data.gemspec +6 -1
- data/lib/green-button-data.rb +26 -1
- data/lib/green-button-data/application_information.rb +112 -0
- data/lib/green-button-data/authorization.rb +35 -0
- data/lib/green-button-data/configuration.rb +133 -0
- data/lib/green-button-data/core_ext.rb +1 -0
- data/lib/green-button-data/core_ext/string.rb +35 -0
- data/lib/green-button-data/dst.rb +57 -0
- data/lib/green-button-data/entry.rb +87 -0
- data/lib/green-button-data/feed.rb +5 -0
- data/lib/green-button-data/fetchable.rb +242 -0
- data/lib/green-button-data/interval_block.rb +38 -0
- data/lib/green-button-data/local_time_parameters.rb +31 -0
- data/lib/green-button-data/meter_reading.rb +4 -0
- data/lib/green-button-data/model_collection.rb +33 -0
- data/lib/green-button-data/parser/application_information.rb +2 -11
- data/lib/green-button-data/parser/authorization.rb +0 -4
- data/lib/green-button-data/parser/interval.rb +8 -4
- data/lib/green-button-data/parser/interval_reading.rb +4 -1
- data/lib/green-button-data/parser/local_time_parameters.rb +0 -57
- data/lib/green-button-data/parser/summary_measurement.rb +12 -0
- data/lib/green-button-data/reading_type.rb +82 -0
- data/lib/green-button-data/relations.rb +24 -0
- data/lib/green-button-data/usage_point.rb +27 -0
- data/lib/green-button-data/usage_summary.rb +36 -0
- data/lib/green-button-data/utilities.rb +27 -0
- data/lib/green-button-data/version.rb +1 -1
- data/spec/fixtures.rb +5 -0
- data/spec/fixtures/ESPIReadingType.xml +23 -535
- data/spec/fixtures/ESPIReadingTypes.xml +535 -0
- data/spec/fixtures/ESPIUsagePoint.xml +3 -3
- data/spec/fixtures/ESPIUsagePointMeterReading.xml +13 -0
- data/spec/fixtures/ESPIUsagePointMeterReadings.xml +21 -0
- data/spec/fixtures/ESPIUsagePoints.xml +822 -0
- data/spec/lib/green-button-data/application_information_spec.rb +389 -0
- data/spec/lib/green-button-data/authorization_spec.rb +91 -0
- data/spec/{green-button-data → lib/green-button-data}/core_ext/date_spec.rb +0 -0
- data/spec/{green-button-data → lib/green-button-data}/core_ext/fixnum_spec.rb +0 -0
- data/spec/lib/green-button-data/local_time_parameters_spec.rb +106 -0
- data/spec/{green-button-data → lib/green-button-data}/parser/application_information_spec.rb +4 -4
- data/spec/{green-button-data → lib/green-button-data}/parser/authorization_spec.rb +0 -12
- data/spec/{green-button-data → lib/green-button-data}/parser/entry_spec.rb +1 -1
- data/spec/{green-button-data → lib/green-button-data}/parser/interval_block_spec.rb +4 -4
- data/spec/{green-button-data → lib/green-button-data}/parser/local_time_parameter_spec.rb +0 -0
- data/spec/{green-button-data → lib/green-button-data}/parser/reading_type_spec.rb +0 -0
- data/spec/{green-button-data → lib/green-button-data}/parser/usage_point_spec.rb +0 -0
- data/spec/{green-button-data → lib/green-button-data}/parser/usage_summary_spec.rb +0 -0
- data/spec/lib/green-button-data/reading_type_spec.rb +127 -0
- data/spec/lib/green-button-data/usage_point_spec.rb +167 -0
- data/spec/{green-button-data → lib/green-button-data}/utilities_spec.rb +1 -1
- data/spec/spec_helper.rb +5 -0
- metadata +70 -17
data/spec/spec_helper.rb
CHANGED
@@ -10,9 +10,14 @@ if ENV['CI'] == 'true'
|
|
10
10
|
end
|
11
11
|
|
12
12
|
require File.expand_path(File.dirname(__FILE__) + '/../lib/green-button-data')
|
13
|
+
require 'webmock/rspec'
|
13
14
|
require 'fixtures'
|
14
15
|
require 'support/custom_expectations/warn_expectation'
|
15
16
|
|
17
|
+
# Disable network connections
|
18
|
+
WebMock.disable_net_connect! allow_localhost: true,
|
19
|
+
allow: /codecov/
|
20
|
+
|
16
21
|
SAXMachine.handler = ENV['HANDLER'].to_sym if ENV['HANDLER']
|
17
22
|
|
18
23
|
RSpec.configure do |c|
|
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.3.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-
|
11
|
+
date: 2015-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.9'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.9'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rspec
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +66,20 @@ dependencies:
|
|
52
66
|
- - ~>
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: webmock
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.21'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.21'
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
84
|
name: guard
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +94,9 @@ dependencies:
|
|
66
94
|
- - ~>
|
67
95
|
- !ruby/object:Gem::Version
|
68
96
|
version: '2.13'
|
69
|
-
description:
|
97
|
+
description: Green Button Data is a Ruby gem that can consume Green Button APIs and
|
98
|
+
parse the Green Button data XML schema very quickly. It uses an event-driven SAX
|
99
|
+
parser which parses XML data without building an entire DOM in memory.
|
70
100
|
email: engineering@verdigris.co
|
71
101
|
executables: []
|
72
102
|
extensions: []
|
@@ -81,10 +111,15 @@ files:
|
|
81
111
|
- Rakefile
|
82
112
|
- green-button-data.gemspec
|
83
113
|
- lib/green-button-data.rb
|
114
|
+
- lib/green-button-data/application_information.rb
|
115
|
+
- lib/green-button-data/authorization.rb
|
116
|
+
- lib/green-button-data/configuration.rb
|
84
117
|
- lib/green-button-data/core_ext.rb
|
85
118
|
- lib/green-button-data/core_ext/date.rb
|
86
119
|
- lib/green-button-data/core_ext/fixnum.rb
|
120
|
+
- lib/green-button-data/core_ext/string.rb
|
87
121
|
- lib/green-button-data/dst.rb
|
122
|
+
- lib/green-button-data/entry.rb
|
88
123
|
- lib/green-button-data/enumerations.rb
|
89
124
|
- lib/green-button-data/enumerations/accumulation.rb
|
90
125
|
- lib/green-button-data/enumerations/authorization_status.rb
|
@@ -106,6 +141,11 @@ files:
|
|
106
141
|
- lib/green-button-data/enumerations/unit_multiplier.rb
|
107
142
|
- lib/green-button-data/enumerations/unit_symbol.rb
|
108
143
|
- lib/green-button-data/feed.rb
|
144
|
+
- lib/green-button-data/fetchable.rb
|
145
|
+
- lib/green-button-data/interval_block.rb
|
146
|
+
- lib/green-button-data/local_time_parameters.rb
|
147
|
+
- lib/green-button-data/meter_reading.rb
|
148
|
+
- lib/green-button-data/model_collection.rb
|
109
149
|
- lib/green-button-data/parser.rb
|
110
150
|
- lib/green-button-data/parser/application_information.rb
|
111
151
|
- lib/green-button-data/parser/authorization.rb
|
@@ -122,6 +162,10 @@ files:
|
|
122
162
|
- lib/green-button-data/parser/summary_measurement.rb
|
123
163
|
- lib/green-button-data/parser/usage_point.rb
|
124
164
|
- lib/green-button-data/parser/usage_summary.rb
|
165
|
+
- lib/green-button-data/reading_type.rb
|
166
|
+
- lib/green-button-data/relations.rb
|
167
|
+
- lib/green-button-data/usage_point.rb
|
168
|
+
- lib/green-button-data/usage_summary.rb
|
125
169
|
- lib/green-button-data/utilities.rb
|
126
170
|
- lib/green-button-data/version.rb
|
127
171
|
- spec/fixtures.rb
|
@@ -131,7 +175,11 @@ files:
|
|
131
175
|
- spec/fixtures/ESPIIntervalBlock.xml
|
132
176
|
- spec/fixtures/ESPILocalTimeParameters.xml
|
133
177
|
- spec/fixtures/ESPIReadingType.xml
|
178
|
+
- spec/fixtures/ESPIReadingTypes.xml
|
134
179
|
- spec/fixtures/ESPIUsagePoint.xml
|
180
|
+
- spec/fixtures/ESPIUsagePointMeterReading.xml
|
181
|
+
- spec/fixtures/ESPIUsagePointMeterReadings.xml
|
182
|
+
- spec/fixtures/ESPIUsagePoints.xml
|
135
183
|
- spec/fixtures/ESPIUsageSummaries.xml
|
136
184
|
- spec/fixtures/ESPIUsageSummary.xml
|
137
185
|
- spec/fixtures/PGEApplicationInformation.xml
|
@@ -142,17 +190,22 @@ files:
|
|
142
190
|
- spec/fixtures/PGEUsagePoint.xml
|
143
191
|
- spec/fixtures/PGEUsageSummaries.xml
|
144
192
|
- spec/fixtures/PGEUsageSummary.xml
|
145
|
-
- spec/green-button-data/
|
146
|
-
- spec/green-button-data/
|
147
|
-
- spec/green-button-data/
|
148
|
-
- spec/green-button-data/
|
149
|
-
- spec/green-button-data/
|
150
|
-
- spec/green-button-data/parser/
|
151
|
-
- spec/green-button-data/parser/
|
152
|
-
- spec/green-button-data/parser/
|
153
|
-
- spec/green-button-data/parser/
|
154
|
-
- spec/green-button-data/parser/
|
155
|
-
- spec/green-button-data/
|
193
|
+
- spec/lib/green-button-data/application_information_spec.rb
|
194
|
+
- spec/lib/green-button-data/authorization_spec.rb
|
195
|
+
- spec/lib/green-button-data/core_ext/date_spec.rb
|
196
|
+
- spec/lib/green-button-data/core_ext/fixnum_spec.rb
|
197
|
+
- spec/lib/green-button-data/local_time_parameters_spec.rb
|
198
|
+
- spec/lib/green-button-data/parser/application_information_spec.rb
|
199
|
+
- spec/lib/green-button-data/parser/authorization_spec.rb
|
200
|
+
- spec/lib/green-button-data/parser/entry_spec.rb
|
201
|
+
- spec/lib/green-button-data/parser/interval_block_spec.rb
|
202
|
+
- spec/lib/green-button-data/parser/local_time_parameter_spec.rb
|
203
|
+
- spec/lib/green-button-data/parser/reading_type_spec.rb
|
204
|
+
- spec/lib/green-button-data/parser/usage_point_spec.rb
|
205
|
+
- spec/lib/green-button-data/parser/usage_summary_spec.rb
|
206
|
+
- spec/lib/green-button-data/reading_type_spec.rb
|
207
|
+
- spec/lib/green-button-data/usage_point_spec.rb
|
208
|
+
- spec/lib/green-button-data/utilities_spec.rb
|
156
209
|
- spec/spec_helper.rb
|
157
210
|
- spec/support/custom_expectations/warn_expectation.rb
|
158
211
|
homepage: http://verdigris.co
|
@@ -165,17 +218,17 @@ require_paths:
|
|
165
218
|
- lib
|
166
219
|
required_ruby_version: !ruby/object:Gem::Requirement
|
167
220
|
requirements:
|
168
|
-
- - '>='
|
221
|
+
- - ! '>='
|
169
222
|
- !ruby/object:Gem::Version
|
170
223
|
version: 1.9.3
|
171
224
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
225
|
requirements:
|
173
|
-
- - '>='
|
226
|
+
- - ! '>='
|
174
227
|
- !ruby/object:Gem::Version
|
175
228
|
version: '0'
|
176
229
|
requirements: []
|
177
230
|
rubyforge_project:
|
178
|
-
rubygems_version: 2.
|
231
|
+
rubygems_version: 2.2.2
|
179
232
|
signing_key:
|
180
233
|
specification_version: 4
|
181
234
|
summary: Parser for Green Button data format
|