ce-greenbutton 0.1.4 → 0.1.5

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
2
  SHA1:
3
- metadata.gz: 906fe50b8501f38ec91414f0e62ffe15d6e9ea5f
4
- data.tar.gz: b77b2665cc6ed79b418e9783f7b134e085d8bfff
3
+ metadata.gz: e02ea138af90eae3c4f7c0dd7fe0598013f3c0e4
4
+ data.tar.gz: 7b80b4a3e2775c28bc940b585c6bd1ba93641717
5
5
  SHA512:
6
- metadata.gz: 77c0d9aef72842c7fc1e17ca4541657b2f9c30952d12b45f6fb738edd23efa0a725fc5610bfa865e7152d64f27ca290aa143698c6605873e7add7b4374fe77c2
7
- data.tar.gz: d52089bd010669b8f17c68d48e1fa555478ab6fac0cd10e348e49a15072b648a59cbb56105157574366c179643c87648762f23dfeb3938255e41bf1e3ee23d02
6
+ metadata.gz: 50755016e85cfc5656fc26e2fc058e33f71d91d578b3a495171214a4df0ec0f387da5f6674c442ed41c328484579e27c6d85d068a491aad502d991deaf499d10
7
+ data.tar.gz: ea548d78a9a0cb1ae4081c13506dc95937d1d360fdc9aaa1f0de6d091ce304bcd91fbaf9c374242defc854f8606206e113dd07550925f4795f3ab3e0737459d0
@@ -1,3 +1,3 @@
1
1
  module GreenButton
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -102,7 +102,7 @@ module GreenButton
102
102
  params.length > 0
103
103
  data = open(resource_url,
104
104
  'Authorization' => "Bearer #{access_token}")
105
- parse_data(access_token, data) #Return
105
+ parse_data(data) #Return
106
106
  end
107
107
 
108
108
  # Public: Downloads and parses the GreenButton data, hosted in a FTP server.
@@ -132,13 +132,12 @@ module GreenButton
132
132
 
133
133
  # Parses the given greenbutton data to the corresponding ruby objects.
134
134
  #
135
- # user_id - identifies the owner of the data.
136
135
  # data - The source GreenButton xml data, can be string, or any stream returning
137
136
  # from a call to open(uri)
138
137
  #
139
138
  # Returns the parsed array of gb_data_description
140
139
  private
141
- def self.parse_data(user_id = nil, data)
140
+ def self.parse_data(data)
142
141
  # get ApplicationInformation
143
142
  app_info = GreenButton::Parser::GbApplicationInformation.
144
143
  parse(open(@application_information_url,
@@ -157,7 +156,7 @@ module GreenButton
157
156
  gb_data_description = @interpreters[usage_point.kind]
158
157
  .get_gb_data_description(entry, feed)
159
158
  gb_data_description.custodian = app_info.data_custodian_id
160
- gb_data_description.user_id = user_id unless user_id.nil?
159
+ gb_data_description.user_id = /.*\/(\d+)\/UsagePoint\/\d+/.match(entry.self)[1]
161
160
  gb << gb_data_description
162
161
  end
163
162
 
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ce-greenbutton
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ahmed.seddiq
8
- - bradon.jahner
8
+ - brandon.jahner
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []