hesabu 0.1.6 → 0.1.7

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: 431f06d479e890cf49a1cf8fb1f9a166b66a88aee4b6200be1c540996fecf4fd
4
- data.tar.gz: e6d8a83f61a8e986658b6c574c0b51c5365787819f0fb2bff9331b7cdf3ba07b
3
+ metadata.gz: ae87461c4c8e2a1a7bd4b13814ccab50b295c57a226b5f8c50a61b0dd31344ad
4
+ data.tar.gz: f26f095104916c345da79875a91eceb3743b05dc130817c7df22fceb22798098
5
5
  SHA512:
6
- metadata.gz: c22ea9e78df743ee0ea74d8fb3fc22291fe12fdd1cd7235d94e608c72627c665d9982c2e803eede67320cf42e453741682313d8a4aa87f59a449638d37187e8d
7
- data.tar.gz: 96761de748fed74701bc6aa799ec99ff309c77da03521111cd0a4960874552d7018bd5998c883cb2a41a6d826d2ec8fa3415b0ad70ff419c41c93f373370ddcd
6
+ metadata.gz: d41395bedb1e1dd67c3d02ef60b476f6f009c1d0d5c33ad82bb645c259081db83decbb24cee420d98250ec13a9d11bed6b8c35bbdee0d0787ee32ee15816854b
7
+ data.tar.gz: 4cc1f679ba535715822c2d12dfb7a116a46ab2c33fc8c8c820806f66dbc865b65caac769e7bc879bcda792e6f2a26b257f6a8f54d279a51bbfa846ceadbdd588
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hesabu (0.1.5)
4
+ hesabu (0.1.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/hesabu/errors.rb CHANGED
@@ -2,14 +2,7 @@
2
2
  module Hesabu
3
3
  class Error < StandardError
4
4
  attr_accessor :errors
5
- def iniatialize(message)
6
- super(message)
7
- @errors = errors
8
- end
9
5
  end
10
6
  class ArgumentError < Error
11
- def iniatialize(message)
12
- super(message)
13
- end
14
7
  end
15
8
  end
data/lib/hesabu/solver.rb CHANGED
@@ -14,6 +14,7 @@ module Hesabu
14
14
  end
15
15
 
16
16
  def solve!
17
+ return {} if @equations.empty?
17
18
  result = nil
18
19
  IO.popen(HESABUCLI, mode = "r+") do |io|
19
20
  io.write @equations.to_json
@@ -14,7 +14,6 @@ module Hesabu
14
14
  return value.to_i if value.to_i == value
15
15
  return value
16
16
  end
17
- value = value.str if value.is_a?(::Parslet::Slice)
18
17
  if value.is_a?(::String)
19
18
  number = value[/\A-?\d*\.?\d+\z/]
20
19
  if number
@@ -1,3 +1,3 @@
1
1
  module Hesabu
2
- VERSION = "0.1.6".freeze
2
+ VERSION = "0.1.7".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hesabu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stéphan Mestach
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-09 00:00:00.000000000 Z
11
+ date: 2018-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler