parse_p1 0.1.2 → 0.1.3
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/CHANGELOG +4 -1
- data/lib/parse_p1/electricity.rb +4 -4
- data/lib/parse_p1/version.rb +1 -1
- data/test/parse_p1_IskraMT171_meter_test.rb +12 -12
- data/test/parse_p1_landisgyr_e350_test.rb +12 -12
- data/test/parse_p1_test.rb +12 -12
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3dd2f4ba31b21b70fec7cbcf76210c924220250
|
4
|
+
data.tar.gz: 86c401fd3c42cfbbad396c8ec0913e069e6b547e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 486d8c85117127a101f00ba0ab79966752f23f1874bccbfaae617fb02180ce227e44b797c0decf5ad29750ca85c59a5cb15b8588f2d1d33391581d1bb8b5f9fa
|
7
|
+
data.tar.gz: d3459f8d2a61aa60cf4f0f31e15ac164b36db6d1681690075521b40bb26abf5e2cd5a4f51cbd517fb7d4179ded7a00b29cadcab1324d096329ce3f659d83eccb
|
data/CHANGELOG
CHANGED
data/lib/parse_p1/electricity.rb
CHANGED
@@ -18,19 +18,19 @@ module ParseP1
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def electra_import_low
|
21
|
-
get_electricity('1-0:1.8.
|
21
|
+
get_electricity('1-0:1.8.2')
|
22
22
|
end
|
23
23
|
|
24
24
|
def electra_import_normal
|
25
|
-
get_electricity('1-0:1.8.
|
25
|
+
get_electricity('1-0:1.8.1')
|
26
26
|
end
|
27
27
|
|
28
28
|
def electra_export_low
|
29
|
-
get_electricity('1-0:2.8.
|
29
|
+
get_electricity('1-0:2.8.2')
|
30
30
|
end
|
31
31
|
|
32
32
|
def electra_export_normal
|
33
|
-
get_electricity('1-0:2.8.
|
33
|
+
get_electricity('1-0:2.8.1')
|
34
34
|
end
|
35
35
|
|
36
36
|
#Only for backward compatibility
|
data/lib/parse_p1/version.rb
CHANGED
@@ -45,27 +45,27 @@ class TestParseP1_IskraMT171Meter < Test::Unit::TestCase
|
|
45
45
|
end
|
46
46
|
|
47
47
|
#F9 (3,3)
|
48
|
-
should 'return imported electricty with
|
49
|
-
assert_equal 477.462, @p1.electricity(:type => :import, :tariff => :
|
50
|
-
assert_equal 477.462, @p1.
|
48
|
+
should 'return imported electricty with normal tarif' do
|
49
|
+
assert_equal 477.462, @p1.electricity(:type => :import, :tariff => :normal)
|
50
|
+
assert_equal 477.462, @p1.electra_import_normal
|
51
51
|
end
|
52
52
|
|
53
53
|
#F9 (3,3)
|
54
|
-
should 'return imported electricty with
|
55
|
-
assert_equal 546.069, @p1.electricity(:type => :import, :tariff => :
|
56
|
-
assert_equal 546.069, @p1.
|
54
|
+
should 'return imported electricty with low tarif' do
|
55
|
+
assert_equal 546.069, @p1.electricity(:type => :import, :tariff => :low)
|
56
|
+
assert_equal 546.069, @p1.electra_import_low
|
57
57
|
end
|
58
58
|
|
59
59
|
#F9 (3,3)
|
60
|
-
should 'return electricty produced by client
|
61
|
-
assert_equal 13.172, @p1.electricity(:type => :export, :tariff => :
|
62
|
-
assert_equal 13.172, @p1.
|
60
|
+
should 'return electricty produced by client normal tarif' do
|
61
|
+
assert_equal 13.172, @p1.electricity(:type => :export, :tariff => :normal)
|
62
|
+
assert_equal 13.172, @p1.electra_export_normal
|
63
63
|
end
|
64
64
|
|
65
65
|
#F9 (3,3)
|
66
|
-
should 'return electricty produced by client
|
67
|
-
assert_equal 31.349, @p1.electricity(:type => :export, :tariff => :
|
68
|
-
assert_equal 31.349, @p1.
|
66
|
+
should 'return electricty produced by client low tarif' do
|
67
|
+
assert_equal 31.349, @p1.electricity(:type => :export, :tariff => :low)
|
68
|
+
assert_equal 31.349, @p1.electra_export_low
|
69
69
|
end
|
70
70
|
|
71
71
|
context 'Actual data' do
|
@@ -38,27 +38,27 @@ class TestParseP1LandisGyrE350 < Test::Unit::TestCase
|
|
38
38
|
end
|
39
39
|
|
40
40
|
#F9 (3,3)
|
41
|
-
should 'return imported electricty with
|
42
|
-
assert_equal 2622.819, @p1.electricity(:type => :import, :tariff => :
|
43
|
-
assert_equal 2622.819, @p1.
|
41
|
+
should 'return imported electricty with normal tarif' do
|
42
|
+
assert_equal 2622.819, @p1.electricity(:type => :import, :tariff => :normal)
|
43
|
+
assert_equal 2622.819, @p1.electra_import_normal
|
44
44
|
end
|
45
45
|
|
46
46
|
#F9 (3,3)
|
47
|
-
should 'return imported electricty with
|
48
|
-
assert_equal 1693.579, @p1.electricity(:type => :import, :tariff => :
|
49
|
-
assert_equal 1693.579, @p1.
|
47
|
+
should 'return imported electricty with low tarif' do
|
48
|
+
assert_equal 1693.579, @p1.electricity(:type => :import, :tariff => :low)
|
49
|
+
assert_equal 1693.579, @p1.electra_import_low
|
50
50
|
end
|
51
51
|
|
52
52
|
#F9 (3,3)
|
53
|
-
should 'return electricty produced by client
|
54
|
-
assert_equal 79.439, @p1.electricity(:type => :export, :tariff => :
|
55
|
-
assert_equal 79.439, @p1.
|
53
|
+
should 'return electricty produced by client normal tarif' do
|
54
|
+
assert_equal 79.439, @p1.electricity(:type => :export, :tariff => :normal)
|
55
|
+
assert_equal 79.439, @p1.electra_export_normal
|
56
56
|
end
|
57
57
|
|
58
58
|
#F9 (3,3)
|
59
|
-
should 'return electricty produced by client
|
60
|
-
assert_equal 215.374, @p1.electricity(:type => :export, :tariff => :
|
61
|
-
assert_equal 215.374, @p1.
|
59
|
+
should 'return electricty produced by client low tarif' do
|
60
|
+
assert_equal 215.374, @p1.electricity(:type => :export, :tariff => :low)
|
61
|
+
assert_equal 215.374, @p1.electra_export_low
|
62
62
|
end
|
63
63
|
|
64
64
|
context 'Actual data' do
|
data/test/parse_p1_test.rb
CHANGED
@@ -47,27 +47,27 @@ class TestParseP1 < Test::Unit::TestCase
|
|
47
47
|
end
|
48
48
|
|
49
49
|
#F9 (3,3)
|
50
|
-
should 'return imported electricty with
|
51
|
-
assert_equal 136.787, @p1.electricity(:type => :import, :tariff => :
|
52
|
-
assert_equal 136.787, @p1.
|
50
|
+
should 'return imported electricty with normal tarif' do
|
51
|
+
assert_equal 136.787, @p1.electricity(:type => :import, :tariff => :normal)
|
52
|
+
assert_equal 136.787, @p1.electra_import_normal
|
53
53
|
end
|
54
54
|
|
55
55
|
#F9 (3,3)
|
56
|
-
should 'return imported electricty with
|
57
|
-
assert_equal 131.849, @p1.electricity(:type => :import, :tariff => :
|
58
|
-
assert_equal 131.849, @p1.
|
56
|
+
should 'return imported electricty with low tarif' do
|
57
|
+
assert_equal 131.849, @p1.electricity(:type => :import, :tariff => :low)
|
58
|
+
assert_equal 131.849, @p1.electra_import_low
|
59
59
|
end
|
60
60
|
|
61
61
|
#F9 (3,3)
|
62
|
-
should 'return electricty produced by client
|
63
|
-
assert_equal 2.345, @p1.electricity(:type => :export, :tariff => :
|
64
|
-
assert_equal 2.345, @p1.
|
62
|
+
should 'return electricty produced by client normal tarif' do
|
63
|
+
assert_equal 2.345, @p1.electricity(:type => :export, :tariff => :normal)
|
64
|
+
assert_equal 2.345, @p1.electra_export_normal
|
65
65
|
end
|
66
66
|
|
67
67
|
#F9 (3,3)
|
68
|
-
should 'return electricty produced by client
|
69
|
-
assert_equal 54.976, @p1.electricity(:type => :export, :tariff => :
|
70
|
-
assert_equal 54.976, @p1.
|
68
|
+
should 'return electricty produced by client low tarif' do
|
69
|
+
assert_equal 54.976, @p1.electricity(:type => :export, :tariff => :low)
|
70
|
+
assert_equal 54.976, @p1.electra_export_low
|
71
71
|
end
|
72
72
|
|
73
73
|
context 'Actual data' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parse_p1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Oxener
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
123
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.4.
|
124
|
+
rubygems_version: 2.4.6
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: Parsing P1 Companion Standard used by Dutch Smart Meters
|