parsecs 0.3.1 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/libnativemath/extconf.rb +1 -1
- data/lib/parsec.rb +1 -1
- data/test/test_parsec.rb +3 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 219c85823eeec9cf36a7623ce522c5059b7fb0d2b4e19fdff86bbf7a4fa0a763
|
4
|
+
data.tar.gz: c2f6a125b730db44fa8aefeb507287e913389be64d18806ea5e6e237fd6d1e8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20b7f32e0dfa829c70db84c18885ff623f980045633bf8488ffcafdaa305f274d896a6a8cff01e564a3c5f969207ac8379d70010acde07255d9e5c5a76ab993a
|
7
|
+
data.tar.gz: cba4799932c699f0bccf18f0db670440a757d3c721fcde1018106211ea5b25ae853d1aa43d5aef43f4ade5371468430075191509b29bdfe797cb3769e88ee99d
|
@@ -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 = '
|
41
|
+
COMMIT = '65ff99e53961d86f14d214e49154ae26c94ec221'.freeze
|
42
42
|
|
43
43
|
Dir.chdir(BASEDIR) do
|
44
44
|
system('git init')
|
data/lib/parsec.rb
CHANGED
data/test/test_parsec.rb
CHANGED
@@ -57,6 +57,7 @@ class TestParsec < Minitest::Test
|
|
57
57
|
assert_equal('test string', parser.eval_equation('tolower("TEST STRING")'))
|
58
58
|
assert_equal('Hello World', parser.eval_equation('concat("Hello ", "World")'))
|
59
59
|
assert_equal(5, parser.eval_equation('str2number("5")'))
|
60
|
+
assert_equal(5, parser.eval_equation('number("5")'))
|
60
61
|
assert_equal('Hello', parser.eval_equation('left("Hello World", 5)'))
|
61
62
|
assert_equal('World', parser.eval_equation('right("Hello World", 5)'))
|
62
63
|
end
|
@@ -84,6 +85,8 @@ class TestParsec < Minitest::Test
|
|
84
85
|
assert_equal(0.55, parsec.eval_equation('avg(1,2,3,4,5,6,7,8,9,10) / 10'))
|
85
86
|
assert_equal(5, parsec.eval_equation('round(4.62)'))
|
86
87
|
assert_equal(4.63, parsec.eval_equation('round_decimal(4.625, 2)'))
|
88
|
+
assert_equal('5', parsec.eval_equation('string(5)'))
|
89
|
+
assert_equal('5.123', parsec.eval_equation('string(5.123)'))
|
87
90
|
end
|
88
91
|
|
89
92
|
def test_newlines_remotion
|
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.
|
4
|
+
version: 0.4.1
|
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: 2019-02-
|
13
|
+
date: 2019-02-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: minitest
|
@@ -82,7 +82,7 @@ requirements:
|
|
82
82
|
- swig
|
83
83
|
- cmake
|
84
84
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.7.
|
85
|
+
rubygems_version: 2.7.6
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: A gem to evaluate equations using muparserx C++ library
|