aemo 0.1.12 → 0.1.14

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: 92d7980222ef5ac4fe8069ed6e8d25f20316ccaf
4
- data.tar.gz: 52235d036694de9e10cbc58f7b3af6ea990e051f
3
+ metadata.gz: 55b1d416d39ba3d49361f5ee2f3d024f60d56820
4
+ data.tar.gz: 95c401f11e4b3786a1ca242c23a86f83c25ffe1a
5
5
  SHA512:
6
- metadata.gz: 2004c469b5fe394b2952109e905733c3991bb8cd1abac17760fb2568bdbf479eb3e8dc10d7f1d96ce3b29191b21c359b612e9379d8a1b3ff9a9c01b7227a3e9f
7
- data.tar.gz: 5a8fffba1cb8c3360721c78cb926ac17a167b3195e47900749f0fd30bc4d44c70e0f0145b394326fe9956ec6c1df076f67c81739e7763c0dc2804da1a4b14e76
6
+ metadata.gz: 5e6dcf774f34e228c0bd0484fc06b0ee8eba5b60a8adb42c217699cdd1947afd927be87e3a70ce227f69cab8fdd0b6f34ed2da2c0cc523bccd27f33a1e42a809
7
+ data.tar.gz: 2b992ea03bb9656a194fd297d97ee77b253528f71d94d4005b71fbbbe77024b4ca3111f9504dbe24a3be718236718dc824d135fc13b7f7aa12537ad063165822
@@ -3,9 +3,9 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'aemo'
6
- s.version = '0.1.12'
6
+ s.version = '0.1.14'
7
7
  s.platform = Gem::Platform::RUBY
8
- s.date = '2015-02-26'
8
+ s.date = '2015-03-23'
9
9
  s.summary = 'AEMO Gem'
10
10
  s.description = 'Gem providing functionality for the Australian Energy Market Operator data'
11
11
  s.authors = ['Joel Courtney']
@@ -469,7 +469,7 @@ module AEMO
469
469
  # Turns the flag to a string
470
470
  #
471
471
  # @param [Hash] the object of a flag
472
- # @return [String] a hyphenated string for the flag
472
+ # @return [nil,String] a hyphenated string for the flag or nil
473
473
  def flag_to_s(flag)
474
474
  flag_to_s = []
475
475
  unless flag.nil?
@@ -477,7 +477,7 @@ module AEMO
477
477
  flag_to_s << METHOD_FLAGS[flag[:method_flag]][:short_descriptor] unless METHOD_FLAGS[flag[:method_flag]].nil?
478
478
  flag_to_s << REASON_CODES[flag[:reason_code]] unless REASON_CODES[flag[:reason_code]].nil?
479
479
  end
480
- flag_to_s.join(" - ")
480
+ (flag_to_s.length > 0) ? flag_to_s.join(" - ") : nil
481
481
  end
482
482
 
483
483
  # @return [Array] array of a NEM12 file a given Meter + Data Stream for easy reading
@@ -494,15 +494,17 @@ module AEMO
494
494
  def update_from_msats!
495
495
  # Update local cache
496
496
  @msats_detail = raw_msats_nmi_detail
497
- # Set the details
498
- @tni = @msats_detail['MasterData']['TransmissionNodeIdentifier']
499
- @dlf = @msats_detail['MasterData']['DistributionLossFactorCode']
500
- @customer_classification_code = @msats_detail['MasterData']['CustomerClassificationCode']
501
- @customer_threshold_code = @msats_detail['MasterData']['CustomerThresholdCode']
502
- @jurisdiction_code = @msats_detail['MasterData']['JurisdictionCode']
503
- @classification_code = @msats_detail['MasterData']['NMIClassificationCode']
504
- @status = @msats_detail['MasterData']['Status']
505
- @address = @msats_detail['MasterData']['Address']
497
+ # Set the details if there are any
498
+ unless @msats_detail['MasterData'].nil?
499
+ @tni = @msats_detail['MasterData']['TransmissionNodeIdentifier']
500
+ @dlf = @msats_detail['MasterData']['DistributionLossFactorCode']
501
+ @customer_classification_code = @msats_detail['MasterData']['CustomerClassificationCode']
502
+ @customer_threshold_code = @msats_detail['MasterData']['CustomerThresholdCode']
503
+ @jurisdiction_code = @msats_detail['MasterData']['JurisdictionCode']
504
+ @classification_code = @msats_detail['MasterData']['NMIClassificationCode']
505
+ @status = @msats_detail['MasterData']['Status']
506
+ @address = @msats_detail['MasterData']['Address']
507
+ end
506
508
  @meters ||= []
507
509
  @roles ||= {}
508
510
  @data_streams ||= []
@@ -22,7 +22,7 @@
22
22
  # @author Joel Courtney <euphemize@gmail.com>
23
23
  module AEMO
24
24
  # aemo version
25
- VERSION = '0.1.12'
25
+ VERSION = '0.1.14'
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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aemo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Courtney
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-26 00:00:00.000000000 Z
11
+ date: 2015-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json