parsecs 0.9.2 → 0.9.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
  SHA256:
3
- metadata.gz: 872f4306482aab0ddea0dcc751284936637fe5693c3910f75a59ad8504f21114
4
- data.tar.gz: e218fdce7f8449d8366429d45075f99e29acf2fef37a42b78bb383366c980b39
3
+ metadata.gz: 66e5451ec9d950983f9e0900e1913e2619e7d88f2fee21eec4972c9311b7d74f
4
+ data.tar.gz: 161e65bff7e6d2b281e18ad0fa3ba4815f34ee81484329cbd2724f2eaeffaf9a
5
5
  SHA512:
6
- metadata.gz: c6852a76f55edeace33df216bcaf65e6491c7f6ef40dee3ff2d2c144d08ec659bc7b2e682ef0ca3589d75302a7ceff5b153b0d7950842391faeaa86b95d1c9d5
7
- data.tar.gz: 37358e63b4cfb396dccca6da93172ebc6f097f74b0f85bf12b7083d0e0cf449e25afc93cf323f8e8b7360d4d303a3989835ef19af8095f93ba74f857032b9d7d
6
+ metadata.gz: cab3eb621af78fa5a565adc603096f35850aa112778a5d55261f57bdd2042633c09821411e7e0083c9b2e2641382e7e0a030cf459a31552ae29ca3dc267444ec
7
+ data.tar.gz: 25d5f3bc6ffb401ef09320d75ebaaa989527c7720064adc9d4839ac75e17f63feb946a3530a24d8d8f9dd67104cc6115d7ea009d58933c7171ab27b8d7f1c832
@@ -38,7 +38,7 @@ libs.each do |lib|
38
38
  end
39
39
 
40
40
  GIT_REPOSITORY = 'https://github.com/niltonvasques/equations-parser.git'.freeze
41
- COMMIT = '8942cecb71bec402c0487ab77fec97759ff82fdb'.freeze
41
+ COMMIT = 'd35b30205dd08f80ceb01df003a376c95a715bb6'.freeze
42
42
 
43
43
  Dir.chdir(BASEDIR) do
44
44
  system('git init')
data/lib/parsec.rb CHANGED
@@ -6,7 +6,7 @@ module Parsec
6
6
  class Parsec
7
7
  using StringToBooleanRefinements
8
8
 
9
- VERSION = '0.9.2'.freeze
9
+ VERSION = '0.9.3'.freeze
10
10
 
11
11
  # evaluates the equation and returns only the result
12
12
  def self.eval_equation(equation)
data/test/test_parsec.rb CHANGED
@@ -204,6 +204,15 @@ class TestParsec < Minitest::Test
204
204
  assert_equal('4', parsec.eval_equation('string("4")'))
205
205
  end
206
206
 
207
+ def test_number_cast
208
+ parsec = Parsec::Parsec
209
+ assert_equal(4, parsec.eval_equation('number(4)'))
210
+ assert_equal(4.5, parsec.eval_equation('number(4.5)'))
211
+ assert_equal(1, parsec.eval_equation('number(true)'))
212
+ assert_equal(0, parsec.eval_equation('number(false)'))
213
+ assert_equal(4, parsec.eval_equation('number("4")'))
214
+ end
215
+
207
216
  def test_default_value
208
217
  parsec = Parsec::Parsec
209
218
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parsecs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nilton Vasques
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-03-19 00:00:00.000000000 Z
13
+ date: 2021-04-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest