aemo 0.1.26 → 0.1.27

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: a491b25a3fd50cf6332ee249fd99998b6c17c708
4
- data.tar.gz: 6c797355efdba09226319f67f570d1f87d5e821a
3
+ metadata.gz: b1fd45c318e16565e909a6d11a72da6269d66378
4
+ data.tar.gz: 6fd484904e983d654a81a3432fe2c98b2f9f4b4e
5
5
  SHA512:
6
- metadata.gz: e6586af76a0cf381a0c1dc9683382e9c35447effbb91714a35826e446c9d13b742230eb62cbf05587d2c9dd0a2ae822fe22c12e6b62f4ab9cec61a2902440e49
7
- data.tar.gz: e5996af7589ff5aaa0a4a4060726659d4b44eb880c44cf97fd5c917387a9636458f9d158cd8aeec363c8d121514dbf287ae0fb5db6e181e3ab9cfcece2b225d0
6
+ metadata.gz: 2574715d16d64abc06e9cf641685f8fd72f7b70bf4e38ff405d2611bf12fb3daa8d7cff57fdd9d504ea04e181115e4ef8ecfa02ffadc0fb1415267180aceeff6
7
+ data.tar.gz: e355c2c6a20ceb7f310f230c4dd8304aa54d7fd993b2e2095bd896c9fceaa0f012ea17f38be41cf29e62dc2705811bf43c3cb1cf7eb1ff85f4ea4bb4990ae9fe
@@ -23,7 +23,14 @@ module AEMO
23
23
  values = []
24
24
  if response.response.code == '200'
25
25
  CSV.parse(response.body, :headers => true, :converters => :numeric) do |row|
26
- row = row.to_h
26
+ puts "row(#{row.class})(respond_to?:#{row.respond_to?(:to_hash)}): #{row.inspect}"
27
+ if row.respond_to?(:to_h)
28
+ row = row.to_h
29
+ elsif row.respond_to?(:to_hash)
30
+ row = row.to_hash
31
+ else
32
+ raise NoMethodError, "cannot convert #{row.class} to Hash"
33
+ end
27
34
  values.push AEMO::Market::Interval.new(row['SETTLEMENTDATE'],row)
28
35
  end
29
36
  end
@@ -22,7 +22,7 @@
22
22
  # @author Joel Courtney <euphemize@gmail.com>
23
23
  module AEMO
24
24
  # aemo version
25
- VERSION = '0.1.26'
25
+ VERSION = '0.1.27'
26
26
 
27
27
  # aemo version split amongst different revisions
28
28
  MAJOR_VERSION, MINOR_VERSION, REVISION = VERSION.split('.').map(&:to_i)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aemo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.26
4
+ version: 0.1.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Courtney