aemo 0.7.1 → 0.7.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7aa903b03da21b8850f3edf73e22e95365c5cca0d586dd26be1af6572edf08c4
4
- data.tar.gz: '0628f6ad1e3fededf28d5c09e838654836a5e2b0d6860106e0fcd536cbcab114'
3
+ metadata.gz: ea699afbf970dfa72f1188990acfc13264b29d98e214c6085bc9685079790f1e
4
+ data.tar.gz: 9ceef79d54bdb445c9583b1220efa370ef819c249636a5d8a4edb452291ac9c2
5
5
  SHA512:
6
- metadata.gz: d4ed45a247e81eb2c1c9c5f094267104eeaf8eab63d746efb72ffeb1e2c052f406d5df6109d23e3cf9b4c4f4730799e253dce59fc6178058872e314422b782f9
7
- data.tar.gz: ed624dc27652b135c2c7bdfabab86d25c231857542ddd16b12947d976ab10a3ef86f0155341c664c00fe8ef9714cd4f15b4c42c0730ffa68b8f7d0d3af692e9c
6
+ metadata.gz: 7395b0db22261ee71ad2ddb3c29c995e148111a2078063a04eaa9fb061efc13d9c5f44721e2a1d4fafc8ca65ccf7617820bc8be2454c93c75ba41128c31c922c
7
+ data.tar.gz: af63516810c79d07494122ca103c004d89bfeeac50ca51a4d32c32b1af8d3fb29c26393606b7d7b4ae286f1a50617407a9bbe9accc9482d573a2d35a98a71833
data/lib/aemo/market.rb CHANGED
@@ -8,6 +8,7 @@ module AEMO
8
8
  # @since 0.1.0
9
9
  module Market
10
10
  include HTTParty
11
+
11
12
  base_uri 'www.nemweb.com.au'
12
13
 
13
14
  # Class Methods
data/lib/aemo/msats.rb CHANGED
@@ -20,6 +20,7 @@ module AEMO
20
20
 
21
21
  # We like to party
22
22
  include HTTParty
23
+
23
24
  # We like to debug
24
25
  # debug_output $stdout
25
26
 
data/lib/aemo/nem12.rb CHANGED
@@ -123,7 +123,7 @@ module AEMO
123
123
  default_nem12_100,
124
124
  nem12s.map(&:to_nem12_200_csv),
125
125
  default_nem12_900
126
- ].flatten.join
126
+ ].join
127
127
  end
128
128
  end
129
129
 
@@ -408,7 +408,7 @@ module AEMO
408
408
  to_nem12_100_csv,
409
409
  to_nem12_200_csv,
410
410
  to_nem12_900_csv
411
- ].flatten.join
411
+ ].join
412
412
  end
413
413
 
414
414
  # Output the AEMO::NEM12 to a valid NEM12 100 row CSV string.
data/lib/aemo/time.rb CHANGED
@@ -10,11 +10,11 @@ module AEMO
10
10
  module Time
11
11
  NEMTIMEZONE = 'Australia/Brisbane'
12
12
  TIMESTAMP14 = '%Y%m%d%H%M%S'
13
- TIMESTAMP14_PATTERN = /^\d{4}\d{2}\d{2}\d{2}\d{2}\d{2}$/
13
+ TIMESTAMP14_PATTERN = /\A\d{4}\d{2}\d{2}\d{2}\d{2}\d{2}\z/
14
14
  TIMESTAMP12 = '%Y%m%d%H%M'
15
- TIMESTAMP12_PATTERN = /^\d{4}\d{2}\d{2}\d{2}\d{2}$/
15
+ TIMESTAMP12_PATTERN = /\A\d{4}\d{2}\d{2}\d{2}\d{2}\z/
16
16
  TIMESTAMP8 = '%Y%m%d'
17
- TIMESTAMP8_PATTERN = /^\d{4}\d{2}\d{2}$/
17
+ TIMESTAMP8_PATTERN = /\A\d{4}\d{2}\d{2}\z/
18
18
 
19
19
  class << self
20
20
  # Format a time to a timestamp 14.
data/lib/aemo/version.rb CHANGED
@@ -23,7 +23,7 @@
23
23
  # @author Joel Courtney <euphemize@gmail.com>
24
24
  module AEMO
25
25
  # aemo version
26
- VERSION = '0.7.1'
26
+ VERSION = '0.7.2'
27
27
 
28
28
  # aemo version split amongst different revisions
29
29
  MAJOR_VERSION, MINOR_VERSION, REVISION = VERSION.split('.').map(&:to_i)
data/spec/spec_helper.rb CHANGED
@@ -45,43 +45,43 @@ RSpec.configure do |config|
45
45
  .to_return(status: 200, body: File.new('spec/fixtures/Market/DATA201502_NSW1.csv'), headers: csv_headers)
46
46
 
47
47
  # MSATS
48
- stub_request(:get, %r{msats.prod.nemnet.net.au/msats/ws/C4/ER})
48
+ stub_request(:get, %r{msats\.prod\.nemnet\.net\.au/msats/ws/C4/ER})
49
49
  .with(headers: { 'Accept' => ['text/xml'], 'Content-Type' => 'text/xml' })
50
50
  .to_return(status: 200, body: File.new('spec/fixtures/MSATS/c4.xml'), headers: xml_headers)
51
- stub_request(:get, %r{msats.prod.nemnet.net.au/msats/ws/MSATSLimits/ER})
51
+ stub_request(:get, %r{msats\.prod\.nemnet\.net\.au/msats/ws/MSATSLimits/ER})
52
52
  .with(headers: { 'Accept' => ['text/xml'], 'Content-Type' => 'text/xml' })
53
53
  .to_return(status: 200, body: File.new('spec/fixtures/MSATS/msats_limits.xml'), headers: xml_headers)
54
- stub_request(:get, %r{msats.prod.nemnet.net.au/msats/ws/NMIDetail/ER})
54
+ stub_request(:get, %r{msats\.prod\.nemnet\.net\.au/msats/ws/NMIDetail/ER})
55
55
  .with(headers: { 'Accept' => ['text/xml'], 'Content-Type' => 'text/xml' })
56
56
  .to_return(status: 200, body: File.new('spec/fixtures/MSATS/nmi_details.xml'), headers: xml_headers)
57
- stub_request(:get, %r{msats.prod.nemnet.net.au/msats/ws/NMIDiscovery/ER})
57
+ stub_request(:get, %r{msats\.prod\.nemnet\.net\.au/msats/ws/NMIDiscovery/ER})
58
58
  .with(headers: { 'Accept' => ['text/xml'], 'Content-Type' => 'text/xml' })
59
59
  .to_return(status: 200, body: File.new('spec/fixtures/MSATS/nmi_discovery_by_address.xml'), headers: xml_headers)
60
- stub_request(:get, %r{msats.prod.nemnet.net.au/msats/ws/ParticipantSystemStatus/ER})
60
+ stub_request(:get, %r{msats\.prod\.nemnet\.net\.au/msats/ws/ParticipantSystemStatus/ER})
61
61
  .with(headers: { 'Accept' => 'text/xml', 'Content-Type' => 'text/xml' })
62
62
  .to_return(status: 200, body: File.new('spec/fixtures/MSATS/participant_system_status.xml'), headers: xml_headers)
63
63
  # MSATS ERRORS
64
64
  # Invalid MSATS User
65
- stub_request(:get, %r{msats.prod.nemnet.net.au/msats/ws/C4/NOTER})
65
+ stub_request(:get, %r{msats\.prod\.nemnet\.net\.au/msats/ws/C4/NOTER})
66
66
  .with(headers: { 'Accept' => ['text/xml'], 'Content-Type' => 'text/xml' })
67
67
  .to_return(status: 404, body: '', headers: xml_headers)
68
- stub_request(:get, %r{msats.prod.nemnet.net.au/msats/ws/MSATSLimits/NOTER})
68
+ stub_request(:get, %r{msats\.prod\.nemnet\.net\.au/msats/ws/MSATSLimits/NOTER})
69
69
  .with(headers: { 'Accept' => ['text/xml'], 'Content-Type' => 'text/xml' })
70
70
  .to_return(status: 404, body: '', headers: xml_headers)
71
- stub_request(:get, %r{msats.prod.nemnet.net.au/msats/ws/NMIDetail/NOTER})
71
+ stub_request(:get, %r{msats\.prod\.nemnet\.net\.au/msats/ws/NMIDetail/NOTER})
72
72
  .with(headers: { 'Accept' => ['text/xml'], 'Content-Type' => 'text/xml' })
73
73
  .to_return(status: 404, body: '', headers: xml_headers)
74
- stub_request(:get, %r{msats.prod.nemnet.net.au/msats/ws/NMIDiscovery/NOTER})
74
+ stub_request(:get, %r{msats\.prod\.nemnet\.net\.au/msats/ws/NMIDiscovery/NOTER})
75
75
  .with(headers: { 'Accept' => ['text/xml'], 'Content-Type' => 'text/xml' })
76
76
  .to_return(status: 404, body: '', headers: xml_headers)
77
- stub_request(:get, %r{msats.prod.nemnet.net.au/msats/ws/ParticipantSystemStatus/NOTER})
77
+ stub_request(:get, %r{msats\.prod\.nemnet\.net\.au/msats/ws/ParticipantSystemStatus/NOTER})
78
78
  .with(headers: { 'Accept' => 'text/xml', 'Content-Type' => 'text/xml' })
79
79
  .to_return(status: 404, body: '', headers: xml_headers)
80
80
  # Data errors
81
- stub_request(:get, %r{msats.prod.nemnet.net.au/msats/ws/C4/ER\?.+?NMI=4001234566.+?})
81
+ stub_request(:get, %r{msats\.prod\.nemnet\.net\.au/msats/ws/C4/ER\?.+?NMI=4001234566.+?})
82
82
  .with(headers: { 'Accept' => ['text/xml'], 'Content-Type' => 'text/xml' })
83
83
  .to_return(status: 404, body: '', headers: xml_headers)
84
- stub_request(:get, %r{msats.prod.nemnet.net.au/msats/ws/NMIDetail/ER\?.+?nmi=4001234566.+?})
84
+ stub_request(:get, %r{msats\.prod\.nemnet\.net\.au/msats/ws/NMIDetail/ER\?.+?nmi=4001234566.+?})
85
85
  .with(headers: { 'Accept' => ['text/xml'], 'Content-Type' => 'text/xml' })
86
86
  .to_return(status: 404, body: '', headers: xml_headers)
87
87
  end
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.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Courtney
@@ -319,7 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
319
319
  - !ruby/object:Gem::Version
320
320
  version: '0'
321
321
  requirements: []
322
- rubygems_version: 3.6.7
322
+ rubygems_version: 3.6.9
323
323
  specification_version: 4
324
324
  summary: Gem providing functionality for the Australian Energy Market Operator data
325
325
  test_files: []