parsecs 0.8.1 → 0.9.0

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: e8566c9f69bf89c5eb77d4b9e7261d8b4dea1c06281799e3e7c22b1ab588a1c2
4
- data.tar.gz: e41c5e300b313bb0ab6d1e875f5fca27d2df2c1d13c3768c09c6adb8d887658a
3
+ metadata.gz: 60a45f7bed4f8e37362535038632693c74a4aad9d4efd7294d65a2455e218e05
4
+ data.tar.gz: 91f3e5ef94961ad9a7020f425f9cd4ce5a295d2b5c17215e3dffeaf7a252498c
5
5
  SHA512:
6
- metadata.gz: 93bccbda2ca5c35be69c69022c84cfa5ed7edc4b34efa54ee724597a5b7a7dddd9be881fd1b46347df66b82a3caaa0f1f289338862012738d1c9cf09594023c5
7
- data.tar.gz: 57811de74f4ef11cbc3c710f12816278d535fcdd6753e225496ec21fee15fb0f3fbf714a87e7d051531a53f5b2f7489b2ad03bedb3c22af13b43b1fe895dd33d
6
+ metadata.gz: a507bc067a5cd679c909fe2f582962f8d52050b0a869ce4de18f177a5724d985f807864867df3ac3ebab3e595da243227b84aeb5e211654b5137ae688c05463c
7
+ data.tar.gz: 81dad90965c2e7c822844762c27053b1f6615bc8d049ab0d6589222bbd59ca21ce0e9b788cf7ddf1b0616488889ee89e5c04d64fb05fdd0d97f21328cd0d5001
@@ -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 = 'f83b631eff678b9c6bf1c2d31e524c1b587cb048'.freeze
41
+ COMMIT = '8acd8d964531f1b78ef905ccdace7b7b038e9d8d'.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.8.1'.freeze
9
+ VERSION = '0.9.0'.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
@@ -60,6 +60,12 @@ class TestParsec < Minitest::Test
60
60
  assert_equal(5, parser.eval_equation('number("5")'))
61
61
  assert_equal('Hello', parser.eval_equation('left("Hello World", 5)'))
62
62
  assert_equal('World', parser.eval_equation('right("Hello World", 5)'))
63
+ assert_equal('<a href=\"http://foo.bar\">Title</a>', parser.eval_equation('link("Title", "http://foo.bar")'))
64
+ assert_equal('<a href=\"#\">Title</a>', parser.eval_equation('link("Title", "#")'))
65
+ assert_equal('<a href=\"/test\">Test title</a>', parser.eval_equation('link("Test title", "/test")'))
66
+ assert_raises(SyntaxError) { parser.eval_equation_with_type('link()') }
67
+ assert_raises(SyntaxError) { parser.eval_equation_with_type('link(1, 2, 3)') }
68
+ assert_raises(SyntaxError) { parser.eval_equation_with_type('link(1, "2")') }
63
69
  end
64
70
 
65
71
  def test_complex_string_manipulation
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.8.1
4
+ version: 0.9.0
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: 2020-10-06 00:00:00.000000000 Z
13
+ date: 2021-03-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - swig
83
83
  - cmake
84
- rubygems_version: 3.1.4
84
+ rubygems_version: 3.0.9
85
85
  signing_key:
86
86
  specification_version: 4
87
87
  summary: A gem to evaluate equations using muparserx C++ library