aemo 0.1.30 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aemo.rb +1 -1
- data/lib/aemo/market.rb +47 -0
- data/lib/aemo/market/interval.rb +3 -3
- data/lib/aemo/nem12.rb +14 -13
- data/lib/aemo/nmi.rb +9 -9
- data/lib/aemo/version.rb +1 -1
- data/spec/fixtures/Market/DATA201501_NSW1.csv +1489 -0
- data/spec/fixtures/Market/DATA201502_NSW1.csv +1345 -0
- data/spec/fixtures/{GRAPH_30NSW1.csv → Market/GRAPH_30NSW1.csv} +0 -0
- data/spec/fixtures/{GRAPH_5NSW1.csv → Market/GRAPH_5NSW1.csv} +0 -0
- data/spec/lib/aemo/market_spec.rb +14 -2
- data/spec/lib/aemo/nmi_spec.rb +1 -1
- data/spec/spec_helper.rb +8 -2
- metadata +12 -6
File without changes
|
File without changes
|
@@ -10,15 +10,27 @@ describe AEMO::Market do
|
|
10
10
|
# expect(MyParser.formats).to include('application/atom+xml' => :atom)
|
11
11
|
# end
|
12
12
|
|
13
|
-
describe '
|
13
|
+
describe '.current_dispatch' do
|
14
14
|
it 'has an array of data' do
|
15
15
|
expect(AEMO::Market.current_dispatch('NSW').class).to eq(Array)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
describe '
|
19
|
+
describe '.current_trading' do
|
20
20
|
it 'has an array of data' do
|
21
21
|
expect(AEMO::Market.current_trading('NSW').class).to eq(Array)
|
22
22
|
end
|
23
23
|
end
|
24
|
+
|
25
|
+
describe '.historic_trading_by_range' do
|
26
|
+
it 'has an array of data' do
|
27
|
+
expect(AEMO::Market.historic_trading_by_range('NSW', Date.parse('2015-01-01'), Date.parse('2015-02-28')).class).to eq(Array)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe '.historic_trading' do
|
32
|
+
it 'has an array of data' do
|
33
|
+
expect(AEMO::Market.historic_trading('NSW', 2015, 01).class).to eq(Array)
|
34
|
+
end
|
35
|
+
end
|
24
36
|
end
|
data/spec/lib/aemo/nmi_spec.rb
CHANGED
@@ -75,7 +75,7 @@ describe AEMO::NMI do
|
|
75
75
|
expect(AEMO::NMI.new('NM10000000')).to be_a(AEMO::NMI)
|
76
76
|
end
|
77
77
|
it 'should return a valid NMI with MSATS' do
|
78
|
-
expect(AEMO::NMI.new('NM10000000',
|
78
|
+
expect(AEMO::NMI.new('NM10000000', msats_detail: {})).to be_a(AEMO::NMI)
|
79
79
|
end
|
80
80
|
end
|
81
81
|
context 'invalid' do
|
data/spec/spec_helper.rb
CHANGED
@@ -23,10 +23,16 @@ RSpec.configure do |config|
|
|
23
23
|
# Market Data
|
24
24
|
stub_request(:get, 'http://www.nemweb.com.au/mms.GRAPHS/GRAPHS/GRAPH_5NSW1.csv')
|
25
25
|
.with(headers: { 'Accept' => '*/*', 'User-Agent' => 'Ruby' })
|
26
|
-
.to_return(status: 200, body: File.new('spec/fixtures/GRAPH_5NSW1.csv'), headers: csv_headers)
|
26
|
+
.to_return(status: 200, body: File.new('spec/fixtures/market/GRAPH_5NSW1.csv'), headers: csv_headers)
|
27
27
|
stub_request(:get, 'http://www.nemweb.com.au/mms.GRAPHS/GRAPHS/GRAPH_30NSW1.csv')
|
28
28
|
.with(headers: { 'Accept' => '*/*', 'User-Agent' => 'Ruby' })
|
29
|
-
.to_return(status: 200, body: File.new('spec/fixtures/GRAPH_30NSW1.csv'), headers: csv_headers)
|
29
|
+
.to_return(status: 200, body: File.new('spec/fixtures/market/GRAPH_30NSW1.csv'), headers: csv_headers)
|
30
|
+
stub_request(:get, 'http://www.nemweb.com.au/mms.GRAPHS/data/DATA201501_NSW1.csv')
|
31
|
+
.with(headers: { 'Accept' => '*/*', 'User-Agent' => 'Ruby' })
|
32
|
+
.to_return(status: 200, body: File.new('spec/fixtures/market/DATA201501_NSW1.csv'), headers: csv_headers)
|
33
|
+
stub_request(:get, 'http://www.nemweb.com.au/mms.GRAPHS/data/DATA201502_NSW1.csv')
|
34
|
+
.with(headers: { 'Accept' => '*/*', 'User-Agent' => 'Ruby' })
|
35
|
+
.to_return(status: 200, body: File.new('spec/fixtures/market/DATA201502_NSW1.csv'), headers: csv_headers)
|
30
36
|
|
31
37
|
# MSATS
|
32
38
|
stub_request(:get, %r{msats.prod.nemnet.net.au\/msats\/ws\/C4\/ER})
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aemo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Courtney
|
8
8
|
- Stuart Auld
|
9
|
+
- Neil Parikh
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2016-06-
|
13
|
+
date: 2016-06-24 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: json
|
@@ -312,6 +313,7 @@ description: Gem providing functionality for the Australian Energy Market Operat
|
|
312
313
|
email:
|
313
314
|
- jcourtney@cozero.com.au
|
314
315
|
- sauld@cozero.com.au
|
316
|
+
- nparikh@cozero.com.au
|
315
317
|
executables: []
|
316
318
|
extensions: []
|
317
319
|
extra_rdoc_files: []
|
@@ -334,14 +336,16 @@ files:
|
|
334
336
|
- lib/data/aemo-tni.xml
|
335
337
|
- lib/data/xml_to_json.rb
|
336
338
|
- spec/aemo_spec.rb
|
337
|
-
- spec/fixtures/GRAPH_30NSW1.csv
|
338
|
-
- spec/fixtures/GRAPH_5NSW1.csv
|
339
339
|
- spec/fixtures/MSATS/c4.xml
|
340
340
|
- spec/fixtures/MSATS/msats_limits.xml
|
341
341
|
- spec/fixtures/MSATS/nmi_details.xml
|
342
342
|
- spec/fixtures/MSATS/nmi_details.xml.zip
|
343
343
|
- spec/fixtures/MSATS/nmi_discovery_by_address.xml
|
344
344
|
- spec/fixtures/MSATS/participant_system_status.xml
|
345
|
+
- spec/fixtures/Market/DATA201501_NSW1.csv
|
346
|
+
- spec/fixtures/Market/DATA201502_NSW1.csv
|
347
|
+
- spec/fixtures/Market/GRAPH_30NSW1.csv
|
348
|
+
- spec/fixtures/Market/GRAPH_5NSW1.csv
|
345
349
|
- spec/fixtures/NEM12-Errors/NEM12#000000000000021#CNRGYMDP#NEMMCO
|
346
350
|
- spec/fixtures/NEM12-Errors/NEM12#000000000000022#CNRGYMDP#NEMMCO
|
347
351
|
- spec/fixtures/NEM12-Errors/NEM12#000000000000023#CNRGYMDP#NEMMCO
|
@@ -476,14 +480,16 @@ specification_version: 4
|
|
476
480
|
summary: Gem providing functionality for the Australian Energy Market Operator data
|
477
481
|
test_files:
|
478
482
|
- spec/aemo_spec.rb
|
479
|
-
- spec/fixtures/GRAPH_30NSW1.csv
|
480
|
-
- spec/fixtures/GRAPH_5NSW1.csv
|
481
483
|
- spec/fixtures/MSATS/c4.xml
|
482
484
|
- spec/fixtures/MSATS/msats_limits.xml
|
483
485
|
- spec/fixtures/MSATS/nmi_details.xml
|
484
486
|
- spec/fixtures/MSATS/nmi_details.xml.zip
|
485
487
|
- spec/fixtures/MSATS/nmi_discovery_by_address.xml
|
486
488
|
- spec/fixtures/MSATS/participant_system_status.xml
|
489
|
+
- spec/fixtures/Market/DATA201501_NSW1.csv
|
490
|
+
- spec/fixtures/Market/DATA201502_NSW1.csv
|
491
|
+
- spec/fixtures/Market/GRAPH_30NSW1.csv
|
492
|
+
- spec/fixtures/Market/GRAPH_5NSW1.csv
|
487
493
|
- spec/fixtures/NEM12-Errors/NEM12#000000000000021#CNRGYMDP#NEMMCO
|
488
494
|
- spec/fixtures/NEM12-Errors/NEM12#000000000000022#CNRGYMDP#NEMMCO
|
489
495
|
- spec/fixtures/NEM12-Errors/NEM12#000000000000023#CNRGYMDP#NEMMCO
|