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 +4 -4
- data/lib/aemo/market.rb +1 -0
- data/lib/aemo/msats.rb +1 -0
- data/lib/aemo/nem12.rb +2 -2
- data/lib/aemo/time.rb +3 -3
- data/lib/aemo/version.rb +1 -1
- data/spec/spec_helper.rb +12 -12
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea699afbf970dfa72f1188990acfc13264b29d98e214c6085bc9685079790f1e
|
|
4
|
+
data.tar.gz: 9ceef79d54bdb445c9583b1220efa370ef819c249636a5d8a4edb452291ac9c2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7395b0db22261ee71ad2ddb3c29c995e148111a2078063a04eaa9fb061efc13d9c5f44721e2a1d4fafc8ca65ccf7617820bc8be2454c93c75ba41128c31c922c
|
|
7
|
+
data.tar.gz: af63516810c79d07494122ca103c004d89bfeeac50ca51a4d32c32b1af8d3fb29c26393606b7d7b4ae286f1a50617407a9bbe9accc9482d573a2d35a98a71833
|
data/lib/aemo/market.rb
CHANGED
data/lib/aemo/msats.rb
CHANGED
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
|
-
].
|
|
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
|
-
].
|
|
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 =
|
|
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 =
|
|
15
|
+
TIMESTAMP12_PATTERN = /\A\d{4}\d{2}\d{2}\d{2}\d{2}\z/
|
|
16
16
|
TIMESTAMP8 = '%Y%m%d'
|
|
17
|
-
TIMESTAMP8_PATTERN =
|
|
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
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
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: []
|