kaiser-ruby 0.5 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/Gemfile.lock +1 -1
- data/lib/kaiser_ruby/rockstar_transform.rb +3 -3
- data/lib/kaiser_ruby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fc112c05db3c0d35fd18ff7002728b5870dd5d51cf75c97b1e70e281b4ee808
|
4
|
+
data.tar.gz: 18bdbed256f36c972a54d61f9531694e6f178bc4cd3172fbab1b8a1787dd4c6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 184a6cbcc1b4e67c82464c33aecdeea74ad1acd0a9e6b12de7e00497ba0f39245b1b3df46b3d08393bdeddecd09ec86d75fcb2e5e6049591e811ac2cde406135
|
7
|
+
data.tar.gz: f635f13bbc469431462190f2e2bf9ebfdc7d6b99314f0f367cf2f04c0e31c45ecd22e489ce54e72e0bfebfe2d22ed0523468f4d8f1b73990fe3cbe42eb4f994c
|
data/CHANGELOG.md
CHANGED
@@ -51,7 +51,9 @@ Other stuff:
|
|
51
51
|
- [x] Move nesting indentation from main module to transformer
|
52
52
|
- [x] Celsius to Fahrenheit example
|
53
53
|
|
54
|
-
0.5
|
54
|
+
# 0.5
|
55
|
+
|
56
|
+
- [x] Fixed converting decimals so "Conversion is lovestruck. lovestruck and essential seasick" results in "conversion = 0.0397" as one would expect.
|
55
57
|
|
56
58
|
Other stuff
|
57
59
|
|
data/Gemfile.lock
CHANGED
@@ -33,10 +33,10 @@ module KaiserRuby
|
|
33
33
|
rule(string_as_number: simple(:str)) do |context|
|
34
34
|
if context[:str].to_s.include?('.')
|
35
35
|
context[:str].to_s.gsub(/[^A-Za-z\s\.]/, '').split('.').map do |sub|
|
36
|
-
str_to_num(sub)
|
36
|
+
str_to_num(sub.strip)
|
37
37
|
end.join('.').to_f
|
38
38
|
else
|
39
|
-
str_to_num(context[:str])
|
39
|
+
str_to_num(context[:str]).to_i
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
@@ -218,7 +218,7 @@ module KaiserRuby
|
|
218
218
|
end
|
219
219
|
|
220
220
|
def self.str_to_num(string)
|
221
|
-
string.to_s.split(/\s+/).map { |e| e.length % 10 }.join
|
221
|
+
string.to_s.split(/\s+/).map { |e| e.length % 10 }.join
|
222
222
|
end
|
223
223
|
end
|
224
224
|
end
|
data/lib/kaiser_ruby/version.rb
CHANGED