parse_p1 0.1.2 → 0.1.3

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: 12b21367683c263e498f20a990a933b034900eca
4
- data.tar.gz: b9e91fcb0d9c93554155479125a6e8cb637abbc0
3
+ metadata.gz: c3dd2f4ba31b21b70fec7cbcf76210c924220250
4
+ data.tar.gz: 86c401fd3c42cfbbad396c8ec0913e069e6b547e
5
5
  SHA512:
6
- metadata.gz: ed469bf8177e2cb80c41d161bb62a6dda3e707900dd326ef801815bace4abe5e1c5acff809ce6ba2f99993afad29de0966ca33934f4b9de6e6df7e8924af9744
7
- data.tar.gz: 098e6dc7fb7e446fde5814731e3e647284ba227bc6d05ea9f50a27ba237fd3d4c728be596c6a942d2b878a0d1d877aae2b850c2754aac5da366bcb5d08fc9ae9
6
+ metadata.gz: 486d8c85117127a101f00ba0ab79966752f23f1874bccbfaae617fb02180ce227e44b797c0decf5ad29750ca85c59a5cb15b8588f2d1d33391581d1bb8b5f9fa
7
+ data.tar.gz: d3459f8d2a61aa60cf4f0f31e15ac164b36db6d1681690075521b40bb26abf5e2cd5a4f51cbd517fb7d4179ded7a00b29cadcab1324d096329ce3f659d83eccb
data/CHANGELOG CHANGED
@@ -1,4 +1,7 @@
1
- * 0.1.2
1
+ * 0.1.3
2
+ Now with correct normal and low electricity values (were switched after the major refactor 0.1.1)
3
+
4
+ * 0.1.2 (Flawed)
2
5
  Remove dependency on awesome_print
3
6
 
4
7
  * 0.1.1 (Flawed)
@@ -18,19 +18,19 @@ module ParseP1
18
18
  end
19
19
 
20
20
  def electra_import_low
21
- get_electricity('1-0:1.8.1')
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.2')
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.1')
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.2')
33
+ get_electricity('1-0:2.8.1')
34
34
  end
35
35
 
36
36
  #Only for backward compatibility
@@ -1,3 +1,3 @@
1
1
  module ParseP1
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -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 low tarif' do
49
- assert_equal 477.462, @p1.electricity(:type => :import, :tariff => :low)
50
- assert_equal 477.462, @p1.electra_import_low
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 normal tarif' do
55
- assert_equal 546.069, @p1.electricity(:type => :import, :tariff => :normal)
56
- assert_equal 546.069, @p1.electra_import_normal
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 low tarif' do
61
- assert_equal 13.172, @p1.electricity(:type => :export, :tariff => :low)
62
- assert_equal 13.172, @p1.electra_export_low
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 normal tarif' do
67
- assert_equal 31.349, @p1.electricity(:type => :export, :tariff => :normal)
68
- assert_equal 31.349, @p1.electra_export_normal
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 low tarif' do
42
- assert_equal 2622.819, @p1.electricity(:type => :import, :tariff => :low)
43
- assert_equal 2622.819, @p1.electra_import_low
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 normal tarif' do
48
- assert_equal 1693.579, @p1.electricity(:type => :import, :tariff => :normal)
49
- assert_equal 1693.579, @p1.electra_import_normal
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 low tarif' do
54
- assert_equal 79.439, @p1.electricity(:type => :export, :tariff => :low)
55
- assert_equal 79.439, @p1.electra_export_low
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 normal tarif' do
60
- assert_equal 215.374, @p1.electricity(:type => :export, :tariff => :normal)
61
- assert_equal 215.374, @p1.electra_export_normal
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
@@ -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 low tarif' do
51
- assert_equal 136.787, @p1.electricity(:type => :import, :tariff => :low)
52
- assert_equal 136.787, @p1.electra_import_low
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 normal tarif' do
57
- assert_equal 131.849, @p1.electricity(:type => :import, :tariff => :normal)
58
- assert_equal 131.849, @p1.electra_import_normal
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 low tarif' do
63
- assert_equal 2.345, @p1.electricity(:type => :export, :tariff => :low)
64
- assert_equal 2.345, @p1.electra_export_low
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 normal tarif' do
69
- assert_equal 54.976, @p1.electricity(:type => :export, :tariff => :normal)
70
- assert_equal 54.976, @p1.electra_export_normal
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.2
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-16 00:00:00.000000000 Z
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.5
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