green-button-data 0.7.3 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f40f2b0b756b8e38f137a88d11f9141cbdbd4044
4
- data.tar.gz: 4219ff792b5ed5c71f02851af9e067a5e9c06daf
2
+ SHA256:
3
+ metadata.gz: dae9932c54c73c781f41c0ec66506aab91a2bba47b2678ccf79da0abe2db880b
4
+ data.tar.gz: 0057ee004bb027a412500746c11e1657fc2250e222a5580ad0ffa4918ac43f77
5
5
  SHA512:
6
- metadata.gz: b9faf8de1551b695fedc9957b35f6583f1fbd88c9ff147e1b607c66861ff0a9bd06bd20f6972016396f89fc2f04dcfc24feb495984a0005180882c8088c4e443
7
- data.tar.gz: 65ff4a92dd56d53eda5c2cf59c82f4c98e6064ba43095425fff1026fa82d06342b0e2e44bfbfbd14b60ed2ddcc211d99c44a421665d2cc1d057577cfb3f99711
6
+ metadata.gz: 8f86bf2c8c9681e08b177616b8ae3acd943d4abbd3743e79305f8948c54964c29cecb097ab077587bf4f10b7e6b2393f3c76b3a6f730a86e2dcf76f5686116e6
7
+ data.tar.gz: c2067cc14d5f95ef00adceb3ce90f5be83677e9e4b6c76dc43ef6240208f5053b2dfce7d5be3066d8c7ef6c55c589d2c2615f08269595185378160cf6c19ea2b
@@ -0,0 +1,93 @@
1
+ version: 2
2
+
3
+ test-steps: &test-steps
4
+ working_directory: ~/green-button-data
5
+ steps:
6
+ - checkout
7
+ - restore_cache:
8
+ keys:
9
+ - v1-gem-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
10
+ - v1-gem-cache-{{ arch }}-{{ .Branch }}
11
+ - v1-gem-cache-{{ arch }}
12
+ - run:
13
+ name: Install dependencies
14
+ command: bundle install
15
+ - save_cache:
16
+ paths:
17
+ - ~/.bundle
18
+ key: v1-gem-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
19
+ - run:
20
+ name: Run tests
21
+ command: rspec
22
+
23
+ jobs:
24
+ test-ruby-2.4:
25
+ docker:
26
+ - image: circleci/ruby:2.4
27
+ <<: *test-steps
28
+
29
+ test-ruby-2.5:
30
+ docker:
31
+ - image: circleci/ruby:2.5
32
+ <<: *test-steps
33
+
34
+ test-ruby-2.6:
35
+ docker:
36
+ - image: circleci/ruby:2.6
37
+ <<: *test-steps
38
+
39
+ build:
40
+ docker:
41
+ - image: circleci/ruby:2.4
42
+ working_directory: ~/green-button-data
43
+ steps:
44
+ - checkout
45
+ - run:
46
+ name: Build gem
47
+ command: gem build green-button-data.gemspec
48
+ - persist_to_workspace:
49
+ root: .
50
+ paths:
51
+ - green-button-data-*.gem
52
+
53
+ publish:
54
+ docker:
55
+ - image: circleci/ruby:2.4
56
+ working_directory: ~/green-button-data
57
+ steps:
58
+ - attach_workspace:
59
+ at: .
60
+ - run:
61
+ name: Login to RubyGems.org
62
+ command: |
63
+ mkdir ~/.gem; \
64
+ curl -u ${RUBYGEMS_USER}:${RUBYGEMS_PASS} https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; \
65
+ chmod 0600 ~/.gem/credentials
66
+ - run:
67
+ name: Publish to RubyGems.org
68
+ command: gem push green-button-data-${CIRCLE_TAG:1}.gem
69
+
70
+ workflows:
71
+ version: 2
72
+ tests:
73
+ jobs:
74
+ - test-ruby-2.4
75
+ - test-ruby-2.5
76
+ - test-ruby-2.6
77
+ release:
78
+ jobs:
79
+ - build:
80
+ filters:
81
+ branches:
82
+ ignore: /.*/
83
+ tags:
84
+ only: /v\d+(\.\d+){0,2}/
85
+ - publish:
86
+ context: ruby gem
87
+ requires:
88
+ - build
89
+ filters:
90
+ branches:
91
+ ignore: /.*/
92
+ tags:
93
+ only: /v\d+(\.\d+){0,2}/
@@ -0,0 +1,17 @@
1
+ Fixes # .
2
+
3
+ ## Changes
4
+
5
+ -
6
+ -
7
+ -
8
+
9
+ ## Pull request requirements checklist
10
+
11
+ Please ensure all of the requirements below are met. PRs that do not meet these
12
+ requirements will not be approved.
13
+
14
+ - [ ] Is there a description of the changes in this pull request?
15
+ - [ ] Are tests written for the changes?
16
+ - [ ] Are breaking changes documented?
17
+
@@ -0,0 +1,84 @@
1
+ # Code of Conduct
2
+
3
+ ## 1. Purpose
4
+
5
+ A primary goal of Green Button Data is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).
6
+
7
+ This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.
8
+
9
+ We invite all those who participate in Green Button Data to help us create safe and positive experiences for everyone.
10
+
11
+ ## 2. Open Source Citizenship
12
+
13
+ A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.
14
+
15
+ Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.
16
+
17
+ If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.
18
+
19
+ ## 3. Expected Behavior
20
+
21
+ The following behaviors are expected and requested of all community members:
22
+
23
+ * Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
24
+ * Exercise consideration and respect in your speech and actions.
25
+ * Attempt collaboration before conflict.
26
+ * Refrain from demeaning, discriminatory, or harassing behavior and speech.
27
+ * Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
28
+ * Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
29
+
30
+ ## 4. Unacceptable Behavior
31
+
32
+ The following behaviors are considered harassment and are unacceptable within our community:
33
+
34
+ * Violence, threats of violence or violent language directed against another person.
35
+ * Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
36
+ * Posting or displaying sexually explicit or violent material.
37
+ * Posting or threatening to post other people’s personally identifying information ("doxing").
38
+ * Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
39
+ * Inappropriate photography or recording.
40
+ * Inappropriate physical contact. You should have someone’s consent before touching them.
41
+ * Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
42
+ * Deliberate intimidation, stalking or following (online or in person).
43
+ * Advocating for, or encouraging, any of the above behavior.
44
+ * Sustained disruption of community events, including talks and presentations.
45
+
46
+ ## 5. Consequences of Unacceptable Behavior
47
+
48
+ Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated.
49
+
50
+ Anyone asked to stop unacceptable behavior is expected to comply immediately.
51
+
52
+ If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).
53
+
54
+ ## 6. Reporting Guidelines
55
+
56
+ If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. opensource@verdigris.co.
57
+
58
+
59
+
60
+ Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.
61
+
62
+ ## 7. Addressing Grievances
63
+
64
+ If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify Verdigris Technologies, Inc. with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
65
+
66
+
67
+
68
+ ## 8. Scope
69
+
70
+ We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues–online and in-person–as well as in all one-on-one communications pertaining to community business.
71
+
72
+ This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members.
73
+
74
+ ## 9. Contact info
75
+
76
+ opensource@verdigris.co
77
+
78
+ ## 10. License and attribution
79
+
80
+ This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
81
+
82
+ Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
83
+
84
+ Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/)
@@ -0,0 +1,27 @@
1
+ Pull request guidelines
2
+ -----------------------
3
+
4
+ - Changes should have corresponding unit and/or integration tests.
5
+ - Affected public classes and functions should have accurate documentation.
6
+ - Source code formatting should be hygienic:
7
+ - Use 2-space indentation.
8
+ - Do not use hard tabs.
9
+ - No trailing or inconsistent whitespace.
10
+ - No exceptionally long lines.
11
+ - Variable names should be clear but concise.
12
+ - Commit history should be relatively hygienic:
13
+ - Roughly one commit per logical change.
14
+ - Log messages are clear and understandable.
15
+ - Few (or no) "merge" commits.
16
+ - Hint: `git rebase -i` is great for cleaning up a branch.
17
+
18
+
19
+ Pull requests for branches that are still in development should be prefixed with WIP:
20
+ so that they don't get accidently merged. Remove WIP: once the pull request is
21
+ considered finalized and ready to be reviewed and merged.
22
+
23
+ License
24
+ -------
25
+
26
+ By contributing code to Green Button Data, you are agreeing to release it under the
27
+ [Simplified BSD License](https://raw.githubusercontent.com/VerdigrisTech/green-button-data/master/LICENSE.txt).
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source 'https://rubygems.org/'
2
2
 
3
3
  gemspec
4
4
 
5
- group :deveopment do
5
+ group :development do
6
6
  gem 'guard-rspec', require: false
7
7
  end
8
8
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- green-button-data (0.7.2)
4
+ green-button-data (1.0.0)
5
5
  faraday (~> 0.11)
6
6
  nokogiri (~> 1.8)
7
7
  sax-machine (~> 1.3)
@@ -9,82 +9,86 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- addressable (2.3.8)
13
- codecov (0.1.0)
12
+ addressable (2.6.0)
13
+ public_suffix (>= 2.0.2, < 4.0)
14
+ codecov (0.1.14)
14
15
  json
15
16
  simplecov
16
17
  url
17
- coderay (1.1.0)
18
- crack (0.4.2)
18
+ coderay (1.1.2)
19
+ crack (0.4.3)
19
20
  safe_yaml (~> 1.0.0)
20
- diff-lcs (1.2.5)
21
- docile (1.1.5)
22
- faraday (0.13.1)
21
+ diff-lcs (1.3)
22
+ docile (1.3.1)
23
+ faraday (0.17.0)
23
24
  multipart-post (>= 1.2, < 3)
24
- ffi (1.9.10)
25
+ ffi (1.10.0)
25
26
  formatador (0.2.5)
26
- guard (2.13.0)
27
+ guard (2.15.0)
27
28
  formatador (>= 0.2.4)
28
- listen (>= 2.7, <= 4.0)
29
- lumberjack (~> 1.0)
29
+ listen (>= 2.7, < 4.0)
30
+ lumberjack (>= 1.0.12, < 2.0)
30
31
  nenv (~> 0.1)
31
32
  notiffany (~> 0.0)
32
33
  pry (>= 0.9.12)
33
34
  shellany (~> 0.0)
34
35
  thor (>= 0.18.1)
35
36
  guard-compat (1.2.1)
36
- guard-rspec (4.5.0)
37
+ guard-rspec (4.7.3)
37
38
  guard (~> 2.1)
38
39
  guard-compat (~> 1.1)
39
40
  rspec (>= 2.99.0, < 4.0)
40
- json (1.8.6)
41
- listen (3.0.3)
42
- rb-fsevent (>= 0.9.3)
43
- rb-inotify (>= 0.9)
44
- lumberjack (1.0.9)
45
- method_source (0.8.2)
46
- mini_portile2 (2.3.0)
47
- multipart-post (2.0.0)
48
- nenv (0.2.0)
49
- nokogiri (1.8.1)
50
- mini_portile2 (~> 2.3.0)
51
- notiffany (0.0.7)
41
+ hashdiff (0.3.8)
42
+ json (2.3.1)
43
+ listen (3.1.5)
44
+ rb-fsevent (~> 0.9, >= 0.9.4)
45
+ rb-inotify (~> 0.9, >= 0.9.7)
46
+ ruby_dep (~> 1.2)
47
+ lumberjack (1.0.13)
48
+ method_source (0.9.2)
49
+ mini_portile2 (2.4.0)
50
+ multipart-post (2.1.1)
51
+ nenv (0.3.0)
52
+ nokogiri (1.10.8)
53
+ mini_portile2 (~> 2.4.0)
54
+ notiffany (0.1.1)
52
55
  nenv (~> 0.1)
53
56
  shellany (~> 0.0)
54
- pry (0.10.1)
57
+ pry (0.12.2)
55
58
  coderay (~> 1.1.0)
56
- method_source (~> 0.8.1)
57
- slop (~> 3.4)
58
- rb-fsevent (0.9.5)
59
- rb-inotify (0.9.5)
60
- ffi (>= 0.5.0)
61
- rspec (3.3.0)
62
- rspec-core (~> 3.3.0)
63
- rspec-expectations (~> 3.3.0)
64
- rspec-mocks (~> 3.3.0)
65
- rspec-core (3.3.2)
66
- rspec-support (~> 3.3.0)
67
- rspec-expectations (3.3.1)
59
+ method_source (~> 0.9.0)
60
+ public_suffix (3.0.3)
61
+ rb-fsevent (0.10.3)
62
+ rb-inotify (0.10.0)
63
+ ffi (~> 1.0)
64
+ rspec (3.8.0)
65
+ rspec-core (~> 3.8.0)
66
+ rspec-expectations (~> 3.8.0)
67
+ rspec-mocks (~> 3.8.0)
68
+ rspec-core (3.8.0)
69
+ rspec-support (~> 3.8.0)
70
+ rspec-expectations (3.8.2)
68
71
  diff-lcs (>= 1.2.0, < 2.0)
69
- rspec-support (~> 3.3.0)
70
- rspec-mocks (3.3.2)
72
+ rspec-support (~> 3.8.0)
73
+ rspec-mocks (3.8.0)
71
74
  diff-lcs (>= 1.2.0, < 2.0)
72
- rspec-support (~> 3.3.0)
73
- rspec-support (3.3.0)
75
+ rspec-support (~> 3.8.0)
76
+ rspec-support (3.8.0)
77
+ ruby_dep (1.5.0)
74
78
  safe_yaml (1.0.4)
75
79
  sax-machine (1.3.2)
76
80
  shellany (0.0.1)
77
- simplecov (0.10.0)
78
- docile (~> 1.1.0)
79
- json (~> 1.8)
81
+ simplecov (0.16.1)
82
+ docile (~> 1.1)
83
+ json (>= 1.8, < 3)
80
84
  simplecov-html (~> 0.10.0)
81
- simplecov-html (0.10.0)
82
- slop (3.6.0)
83
- thor (0.19.1)
85
+ simplecov-html (0.10.2)
86
+ thor (0.20.3)
84
87
  url (0.3.2)
85
- webmock (1.21.0)
88
+ webmock (1.24.6)
86
89
  addressable (>= 2.3.6)
87
90
  crack (>= 0.3.2)
91
+ hashdiff
88
92
 
89
93
  PLATFORMS
90
94
  ruby
@@ -98,4 +102,4 @@ DEPENDENCIES
98
102
  webmock (~> 1.21)
99
103
 
100
104
  BUNDLED WITH
101
- 1.14.6
105
+ 1.16.6
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015, Verdigris Technologies Inc.
1
+ Copyright (c) 2020, Verdigris Technologies Inc.
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  [![Gem Version](https://img.shields.io/gem/v/green-button-data.svg)](https://rubygems.org/gems/green-button-data)
4
4
  [![CI Results](https://img.shields.io/circleci/project/VerdigrisTech/green-button-data.svg)](https://circleci.com/gh/VerdigrisTech/green-button-data)
5
- [![Dependencies](https://img.shields.io/gemnasium/VerdigrisTech/green-button-data.svg)](https://gemnasium.com/VerdigrisTech/green-button-data)
6
5
  [![Code Climate](https://img.shields.io/codeclimate/maintainability/VerdigrisTech/green-button-data.svg)](https://codeclimate.com/github/VerdigrisTech/green-button-data)
7
6
  [![Code Coverage](https://img.shields.io/codecov/c/github/VerdigrisTech/green-button-data.svg)](https://codecov.io/github/VerdigrisTech/green-button-data)
8
7
 
@@ -334,4 +333,20 @@ Verdigris Technologies Inc. assumes NO RESPONSIBILITY OR LIABILITY
334
333
  UNDER ANY CIRCUMSTANCES for usage of this software. See the [LICENSE.txt](https://raw.githubusercontent.com/VerdigrisTech/green-button-data/master/LICENSE.txt)
335
334
  file for detailed legal information.
336
335
 
337
- Copyright © 2015, [Verdigris Technologies Inc](http://verdigris.co). All rights reserved.
336
+ ## 📣 We’re Hiring!
337
+
338
+ Do you have passion for solving challenging engineering problems? You may just be the right fit at Verdigris! We are hiring software engineers for our [Mountain View, California, USA](verdigris-location) office.
339
+
340
+ ### Open Positions
341
+
342
+ * [Product Manager](https://jobs.lever.co/verdigris/bd472be8-df8e-48e9-952a-ad803c44c02f?source=GitHub) — [Apply](https://jobs.lever.co/verdigris/bd472be8-df8e-48e9-952a-ad803c44c02f/apply?source=GitHub)
343
+ * [Technical Lead - Software Engineer](https://jobs.lever.co/verdigris/c65cd690-a7bd-4ab6-ab16-16a34888181b?source=GitHub) — [Apply](https://jobs.lever.co/verdigris/c65cd690-a7bd-4ab6-ab16-16a34888181b/apply?source=GitHub)
344
+
345
+ For more information, check out our [Careers](verdigris-careers) page.
346
+
347
+ ---
348
+
349
+ <sub>Copyright © 2015-2020, [Verdigris Technologies Inc](https://verdigris.co). All rights reserved.</sub>
350
+
351
+ [verdigris-location]: https://www.google.com/maps/place/Verdigris+Technologies/@37.4105674,-122.0605774,17z
352
+ [verdigris-careers]: https://verdigris.co/careers
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.name = 'green-button-data'
5
5
  s.version = GreenButtonData::VERSION
6
6
 
7
- s.authors = ['Andrew Jo', 'Orlando Lee']
7
+ s.authors = ['Andrew Jo', 'Orlando Lee', 'Edward Breen']
8
8
  s.email = 'engineering@verdigris.co'
9
9
  s.homepage = 'http://verdigris.co'
10
10
  s.licenses = ['BSD-2-Clause']
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.require_paths = ['lib']
23
23
 
24
24
  s.platform = Gem::Platform::RUBY
25
- s.required_ruby_version = '>= 2.1.0'
25
+ s.required_ruby_version = '>= 2.4.0'
26
26
 
27
27
  s.add_dependency 'nokogiri', '~> 1.8'
28
28
  s.add_dependency 'sax-machine', '~> 1.3'
@@ -1,6 +1,10 @@
1
1
  Fixnum.class_eval do
2
- unless 0.respond_to? :digits
3
- def digits(base = 10)
2
+ if 0.respond_to? :digits
3
+ def num_digits(base = 10)
4
+ self.digits.count
5
+ end
6
+ else
7
+ def num_digits(base = 10)
4
8
  num = self.abs
5
9
  if num == 0
6
10
  1
@@ -56,6 +56,10 @@ module GreenButtonData
56
56
  as: :service_location
57
57
  element :'ns0:CustomerAgreement', class: CustomerAgreement,
58
58
  as: :customer_agreement
59
+
60
+ # Special case for SCE namespacing
61
+ element :'cust:CustomerAgreement', class: CustomerAgreement,
62
+ as: :customer_agreement
59
63
  end
60
64
  end
61
65
  end
@@ -1,20 +1,29 @@
1
1
  module GreenButtonData
2
2
  module Parser
3
3
  class CostAdditionalDetailLastPeriod < SummaryMeasurement
4
- element :note
5
- element :itemKind, class: Integer, as: :item_kind
6
4
  element :amount, class: Integer, as: :amount
5
+ element :itemKind, class: Integer, as: :item_kind
6
+ element :itemPeriod, class: Interval, as: :item_period
7
+ element :note
8
+ element :unitCost, class: Integer, as: :unit_cost
7
9
 
8
10
  # ESPI Namespacing
9
- element :'espi:note', as: :note
11
+ element :'espi:amount', class: Integer, as: :amount
10
12
  element :'espi:itemKind', class: Integer, as: :item_kind
13
+ element :'espi:itemPeriod', class: Interval, as: :item_period
14
+ element :'espi:note', as: :note
15
+ element :'espi:unitCost', class: Integer, as: :unit_cost
11
16
 
12
17
  # Special case for PG&E generic namespacing
13
- element :'ns0:note', as: :note
18
+ element :'ns0:amount', class: Integer, as: :amount
14
19
  element :'ns0:itemKind', class: Integer, as: :item_kind
20
+ element :'ns0:itemPeriod', class: Interval, as: :item_period
21
+ element :'ns0:note', as: :note
22
+ element :'ns0:unitCost', class: Integer, as: :unit_cost
15
23
 
16
- # Special case for SCE generic namespacing
17
- element :'ns0:amount', class: Integer, as: :amount
24
+ def cost
25
+ @amount / 100_000.0 if @amount.class == Fixnum
26
+ end
18
27
  end
19
28
  end
20
29
  end
@@ -10,6 +10,9 @@ module GreenButtonData
10
10
 
11
11
  # Special case for PG&E generic namespacing
12
12
  element :'ns0:name', as: :customer_agreement_id
13
+
14
+ # Special case for SCE namespacing
15
+ element :'cust:name', as: :customer_agreement_id
13
16
  end
14
17
  end
15
18
  end
@@ -42,6 +42,14 @@ module GreenButtonData
42
42
  element :'ns1:content', class: Content, as: :content
43
43
  element :'ns1:published', as: :published
44
44
  element :'ns1:updated', as: :updated
45
+
46
+ element :'ns2:id', as: :entry_id
47
+ element :'ns2:link', as: :up, value: :href, with: { rel: 'up' }
48
+ element :'ns2:link', as: :self, value: :href, with: { rel: 'self' }
49
+ elements :'ns2:link', as: :related, value: :href, with: { rel: 'related' }
50
+ element :'ns2:content', class: Content, as: :content
51
+ element :'ns2:published', as: :published
52
+ element :'ns2:updated', as: :updated
45
53
  end
46
54
  end
47
55
  end
@@ -42,6 +42,15 @@ module GreenButtonData
42
42
  element :'ns1:links', as: :links, value: :href
43
43
  elements :'ns1:entry', class: Entry, as: :entries
44
44
  element :'ns1:updated', as: :updated
45
+
46
+ element :'ns2:id', as: :feed_id
47
+ element :'ns2:title', as: :title
48
+ element :'ns2:subtitle', as: :description
49
+ element :'ns2:link', as: :url, value: :href, with: { type: 'text/html' }
50
+ element :'ns2:link', as: :feed_url, value: :href, with: { rel: 'self' }
51
+ element :'ns2:links', as: :links, value: :href
52
+ elements :'ns2:entry', class: Entry, as: :entries
53
+ element :'ns2:updated', as: :updated
45
54
  end
46
55
  end
47
56
  end
@@ -27,8 +27,8 @@ module GreenButtonData
27
27
  address_general + ',' + town_detail_info
28
28
  end
29
29
 
30
- element :town_detail, class: TownDetail, as: :town_detail
31
- element :street_detail, class: StreetDetail, as: :town_detail
30
+ element :townDetail, class: TownDetail, as: :town_detail
31
+ element :streetDetail, class: StreetDetail, as: :street_detail
32
32
 
33
33
 
34
34
  # ESPI Namespacing
@@ -3,7 +3,7 @@ module GreenButtonData
3
3
  class ServiceLocation
4
4
  include SAXMachine
5
5
 
6
- element :main_address, class: MainAddress, as: :main_address
6
+ element :mainAddress, class: MainAddress, as: :main_address
7
7
 
8
8
  # ESPI Namespacing
9
9
  element :'espi:mainAddress', class: MainAddress, as: :main_address
@@ -3,7 +3,7 @@ module GreenButtonData
3
3
  class StreetDetail
4
4
  include SAXMachine
5
5
 
6
- element :address_general, as: :address_general
6
+ element :addressGeneral, as: :address_general
7
7
 
8
8
  # ESPI Namespacing
9
9
  element :'espi:addressGeneral', as: :address_general
@@ -3,7 +3,7 @@ module GreenButtonData
3
3
  class TownDetail
4
4
  include SAXMachine
5
5
 
6
- element :state_or_province, as: :state_or_province
6
+ element :stateOrProvince, as: :state_or_province
7
7
  element :code, as: :code
8
8
  element :name, as: :name
9
9
 
@@ -25,9 +25,9 @@ module GreenButtonData
25
25
  #
26
26
  # * +epoch+ - Amount of seconds/milliseconds/microseconds since 1970-01-01
27
27
  def normalize_epoch(epoch)
28
- if epoch.digits >= 15
28
+ if epoch.num_digits >= 15
29
29
  epoch / 100000
30
- elsif epoch.digits >= 13
30
+ elsif epoch.num_digits >= 13
31
31
  epoch / 1000
32
32
  else
33
33
  epoch
@@ -1,3 +1,3 @@
1
1
  module GreenButtonData
2
- VERSION = '0.7.3'
2
+ VERSION = '1.0.3'
3
3
  end
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: green-button-data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Jo
8
8
  - Orlando Lee
9
+ - Edward Breen
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2017-12-09 00:00:00.000000000 Z
13
+ date: 2020-08-10 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: nokogiri
@@ -103,9 +104,13 @@ executables: []
103
104
  extensions: []
104
105
  extra_rdoc_files: []
105
106
  files:
107
+ - ".circleci/config.yml"
106
108
  - ".codeclimate.yml"
109
+ - ".github/pull_request_template.md"
107
110
  - ".gitignore"
108
111
  - ".rspec"
112
+ - CODE_OF_CONDUCT.md
113
+ - CONTRIBUTING.md
109
114
  - Gemfile
110
115
  - Gemfile.lock
111
116
  - Guardfile
@@ -191,15 +196,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
191
196
  requirements:
192
197
  - - ">="
193
198
  - !ruby/object:Gem::Version
194
- version: 2.1.0
199
+ version: 2.4.0
195
200
  required_rubygems_version: !ruby/object:Gem::Requirement
196
201
  requirements:
197
202
  - - ">="
198
203
  - !ruby/object:Gem::Version
199
204
  version: '0'
200
205
  requirements: []
201
- rubyforge_project:
202
- rubygems_version: 2.6.11
206
+ rubygems_version: 3.0.3
203
207
  signing_key:
204
208
  specification_version: 4
205
209
  summary: Client and parser for Green Button API