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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fec1d393ae0367779ee0f751d01ba63a5900451e60577ddd5b22561f66d36f8
4
- data.tar.gz: e82013bff9756f24aa4a4df025c18bfb847a769ae34afa177f8bdd694afbaea9
3
+ metadata.gz: 0fc112c05db3c0d35fd18ff7002728b5870dd5d51cf75c97b1e70e281b4ee808
4
+ data.tar.gz: 18bdbed256f36c972a54d61f9531694e6f178bc4cd3172fbab1b8a1787dd4c6f
5
5
  SHA512:
6
- metadata.gz: 04ad1c0bc40b029eb1c2fa44593bfb66140fbe8893b535723564948f7f4e0506cfb4015517413aa3e66d652d75cb84e21d47863c372db0cfb70dbbeaafb0d967
7
- data.tar.gz: ccf85b08e73b29f02c69694bd56152ee62cd8609776ef04d0e67f866cf635c7086186680e1108f0a3d90c5e965f0df9f18399eaf0920c1444685b07975143422
6
+ metadata.gz: 184a6cbcc1b4e67c82464c33aecdeea74ad1acd0a9e6b12de7e00497ba0f39245b1b3df46b3d08393bdeddecd09ec86d75fcb2e5e6049591e811ac2cde406135
7
+ data.tar.gz: f635f13bbc469431462190f2e2bf9ebfdc7d6b99314f0f367cf2f04c0e31c45ecd22e489ce54e72e0bfebfe2d22ed0523468f4d8f1b73990fe3cbe42eb4f994c
@@ -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
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kaiser-ruby (0.5)
4
+ kaiser-ruby (0.5.1)
5
5
  parslet (~> 1.8)
6
6
  thor (~> 0.20)
7
7
 
@@ -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.to_i
221
+ string.to_s.split(/\s+/).map { |e| e.length % 10 }.join
222
222
  end
223
223
  end
224
224
  end
@@ -1,3 +1,3 @@
1
1
  module KaiserRuby
2
- VERSION = "0.5"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaiser-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.5'
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Ruszkiewicz