ci_power 0.0.9 → 0.0.10

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.
@@ -24,10 +24,19 @@ module CiPower
24
24
  data.each do |method_name, length|
25
25
  field = method(method_name).call
26
26
  field = field.to_s unless field.is_a? String
27
+ # Workaround for special characters problem
28
+ if field.scan(/./mu).size < field.size
29
+ length = adjust_length(field, length)
30
+ end
27
31
  line << field.ljust(length)
28
32
  end
29
33
  end
30
34
  line
31
35
  end
36
+
37
+ def adjust_length(string, length)
38
+ difference = string.size - string.scan(/./mu).size
39
+ length += difference
40
+ end
32
41
  end
33
42
  end
@@ -1,3 +1,3 @@
1
1
  module CiPower
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: ci_power
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.9
5
+ version: 0.0.10
6
6
  platform: ruby
7
7
  authors:
8
8
  - Maik Duff
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-01-19 00:00:00 +01:00
13
+ date: 2012-01-20 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency