functio 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/CHANGELOG.md +9 -0
- data/COPYING +674 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +79 -0
- data/README.md +109 -0
- data/Rakefile +47 -0
- data/bin/fn +28 -0
- data/features/expression_evaluation.feature +58 -0
- data/features/function_creation.feature +74 -0
- data/features/function_deletion.feature +37 -0
- data/features/function_list.feature +35 -0
- data/features/function_use.feature +56 -0
- data/features/help_option.feature +13 -0
- data/features/step_definitions/steps.rb +36 -0
- data/features/support/env.rb +41 -0
- data/features/support/functio_world.rb +45 -0
- data/features/version_option.feature +19 -0
- data/functio.gemspec +43 -0
- data/lib/functio.rb +24 -0
- data/lib/functio/data_storage.rb +90 -0
- data/lib/functio/errors.rb +47 -0
- data/lib/functio/expression.rb +61 -0
- data/lib/functio/formatted_num.rb +39 -0
- data/lib/functio/functio_cli.rb +111 -0
- data/lib/functio/function.rb +104 -0
- data/lib/functio/function_repository.rb +73 -0
- data/lib/functio/version.rb +23 -0
- data/test/doubles/expression_double.rb +33 -0
- data/test/doubles/function_double.rb +34 -0
- data/test/doubles/storage_double.rb +36 -0
- data/test/doubles/test_expression_double.rb +30 -0
- data/test/doubles/test_function_double.rb +30 -0
- data/test/doubles/test_storage_double.rb +30 -0
- data/test/expression_interface_test.rb +30 -0
- data/test/interface_test_helper.rb +25 -0
- data/test/license_test_helper.rb +49 -0
- data/test/storable_interface_test.rb +30 -0
- data/test/storage_interface_test.rb +30 -0
- data/test/test_data_storage.rb +127 -0
- data/test/test_expression.rb +89 -0
- data/test/test_formatted_num.rb +56 -0
- data/test/test_function.rb +142 -0
- data/test/test_function_repository.rb +97 -0
- data/test/test_helper.rb +22 -0
- data/test/test_licenses_compatibility.rb +29 -0
- metadata +140 -0
@@ -0,0 +1,89 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (C) 2016 Cassiano Rocha Kuplich
|
3
|
+
#
|
4
|
+
# This file is part of Functio.
|
5
|
+
#
|
6
|
+
# Functio is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
8
|
+
# the Free Software Foundation, either version 3 of the License, or
|
9
|
+
# (at your option) any later version.
|
10
|
+
#
|
11
|
+
# Functio is distributed in the hope that it will be useful,
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
# GNU General Public License for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU General Public License
|
17
|
+
# along with Functio. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
#++
|
19
|
+
|
20
|
+
require 'test_helper'
|
21
|
+
require 'functio/errors'
|
22
|
+
require 'functio/expression'
|
23
|
+
require 'expression_interface_test'
|
24
|
+
|
25
|
+
class TestExpression < Minitest::Test # :nodoc:
|
26
|
+
include ExpressionInterfaceTest
|
27
|
+
|
28
|
+
def setup
|
29
|
+
@object = Expression.new('42')
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_instantiate_with_invalid_expressions
|
33
|
+
exprs = ['1 +', '3 $ 5', '1 2 3', '#@!', '', ' ', ' ']
|
34
|
+
exprs.each do |expr|
|
35
|
+
assert_raises(InvalidExpressionError) { Expression.new(expr) }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_instantiate_with_division_by_zero
|
40
|
+
exprs = ['1 / 0', '1 / (1 - 1)']
|
41
|
+
exprs.each do |expr|
|
42
|
+
assert_raises(DivisionByZeroError) do
|
43
|
+
Expression.new(expr)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def test_evaluate_expressions_with_no_variables
|
49
|
+
tests = { '1 + 1' => 2, '3.14 * 2' => 6.28, '42' => 42, '2 * (3 + 5)' => 16,
|
50
|
+
'-2 + 1' => -1 }
|
51
|
+
tests.each do |expr, expected|
|
52
|
+
assert_equal(expected, Expression.new(expr).evaluate)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def test_evaluate_expressions_with_variables
|
57
|
+
tests = { ['a + b', { a: 1, b: 2 }] => 3,
|
58
|
+
['x * y', { x: 2, y: 3.14 }] => 6.28,
|
59
|
+
['const', { const: 42 }] => 42 }
|
60
|
+
tests.each do |inputs, expected|
|
61
|
+
expression = Expression.new(inputs[0])
|
62
|
+
assert_equal(expected, expression.evaluate(inputs[1]))
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_evaluate_with_wrong_list_of_variables
|
67
|
+
tests = { 'x' => {}, 'a + b' => { a: 1 }, 'x + y' => { y: 1 },
|
68
|
+
'y' => { x: 1 } }
|
69
|
+
tests.each do |expr, vars|
|
70
|
+
expression = Expression.new(expr)
|
71
|
+
assert_nil(expression.evaluate(vars))
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def test_evaluate_division_by_zero
|
76
|
+
expression = Expression.new('1 / x')
|
77
|
+
assert_raises(DivisionByZeroError) do
|
78
|
+
expression.evaluate(x: 0)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def test_variables
|
83
|
+
tests = { 'a + b' => %w(a b), 'x' => ['x'], 'b / (a + b) * c' => %w(b a c),
|
84
|
+
'42' => [] }
|
85
|
+
tests.each do |expr, expected|
|
86
|
+
assert_equal(expected, Expression.new(expr).variables)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (C) 2016 Cassiano Rocha Kuplich
|
3
|
+
#
|
4
|
+
# This file is part of Functio.
|
5
|
+
#
|
6
|
+
# Functio is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
8
|
+
# the Free Software Foundation, either version 3 of the License, or
|
9
|
+
# (at your option) any later version.
|
10
|
+
#
|
11
|
+
# Functio is distributed in the hope that it will be useful,
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
# GNU General Public License for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU General Public License
|
17
|
+
# along with Functio. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
#++
|
19
|
+
|
20
|
+
require 'test_helper'
|
21
|
+
require 'bigdecimal'
|
22
|
+
require 'functio/formatted_num'
|
23
|
+
|
24
|
+
class TestFormattedNum < Minitest::Test # :nodoc:
|
25
|
+
def test_fixnum_format
|
26
|
+
test_data = [[123, '123'], [0, '0'], [-123, '-123']]
|
27
|
+
test_data.each do |input, expected|
|
28
|
+
assert_instance_of(Fixnum, input)
|
29
|
+
assert_equal(expected, FormattedNum.new(input).to_s)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_bignum_to_string
|
34
|
+
test_data = [
|
35
|
+
[12_345_678_901_234_567_890, '12345678901234567890'],
|
36
|
+
[-12_345_678_901_234_567_890, '-12345678901234567890']
|
37
|
+
]
|
38
|
+
test_data.each do |input, expected|
|
39
|
+
assert_instance_of(Bignum, input)
|
40
|
+
assert_equal(expected, FormattedNum.new(input).to_s)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_bigdecimal_to_string
|
45
|
+
test_data = [
|
46
|
+
[BigDecimal.new('3.14'), '3.14'],
|
47
|
+
[BigDecimal.new('-3.14'), '-3.14'],
|
48
|
+
[BigDecimal.new('1234567.8901234567890'), '1234567.890123456789'],
|
49
|
+
[BigDecimal.new('0.00000001'), '0.00000001']
|
50
|
+
]
|
51
|
+
test_data.each do |input, expected|
|
52
|
+
assert_instance_of(BigDecimal, input)
|
53
|
+
assert_equal(expected, FormattedNum.new(input).to_s)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,142 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (C) 2016 Cassiano Rocha Kuplich
|
3
|
+
#
|
4
|
+
# This file is part of Functio.
|
5
|
+
#
|
6
|
+
# Functio is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
8
|
+
# the Free Software Foundation, either version 3 of the License, or
|
9
|
+
# (at your option) any later version.
|
10
|
+
#
|
11
|
+
# Functio is distributed in the hope that it will be useful,
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
# GNU General Public License for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU General Public License
|
17
|
+
# along with Functio. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
#++
|
19
|
+
|
20
|
+
require 'test_helper'
|
21
|
+
require 'doubles/expression_double'
|
22
|
+
require 'functio/errors'
|
23
|
+
require 'functio/function'
|
24
|
+
require 'storable_interface_test'
|
25
|
+
|
26
|
+
class TestFunction < Minitest::Test # :nodoc:
|
27
|
+
include StorableInterfaceTest
|
28
|
+
|
29
|
+
def setup
|
30
|
+
@object = Function.new(name: 'test', expression: ExpressionDouble.new)
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_build_function
|
34
|
+
function = Function.build(name: 'succ', definition: 'x + 1')
|
35
|
+
assert_instance_of(Function, function)
|
36
|
+
assert_equal('succ', function.name)
|
37
|
+
assert_equal('x + 1', function.definition)
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_build_with_invalid_name
|
41
|
+
['1abc', 'ab c', '+!@#'].each do |name|
|
42
|
+
ex = assert_raises(InvalidFunctionError) do
|
43
|
+
Function.build(name: name, definition: 'x + 1')
|
44
|
+
end
|
45
|
+
assert_equal('name must be alphanumeric and begin with a letter',
|
46
|
+
ex.message)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def test_build_with_too_long_name
|
51
|
+
ex = assert_raises(InvalidFunctionError) do
|
52
|
+
Function.build(name: 'abcdefghijklmnopqrstu', definition: 'x + 1')
|
53
|
+
end
|
54
|
+
assert_equal(
|
55
|
+
"name size can't be greater than #{Function::MAX_NAME_SIZE} characters",
|
56
|
+
ex.message)
|
57
|
+
end
|
58
|
+
|
59
|
+
def test_build_with_invalid_definition
|
60
|
+
ex = assert_raises(InvalidFunctionError) do
|
61
|
+
Function.build(name: 'invalid', definition: 'x +')
|
62
|
+
end
|
63
|
+
assert_equal('definition must be a valid expression', ex.message)
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_build_with_division_by_zero
|
67
|
+
ex = assert_raises(DivisionByZeroError) do
|
68
|
+
Function.build(name: 'divbyzero', definition: '1 / 0')
|
69
|
+
end
|
70
|
+
assert_equal('division by zero', ex.message)
|
71
|
+
end
|
72
|
+
|
73
|
+
def test_instantiate_with_invalid_name
|
74
|
+
['1abc', 'ab c', '+!@#'].each do |name|
|
75
|
+
ex = assert_raises(InvalidFunctionError) do
|
76
|
+
expr_stub = ExpressionDouble.new(expression: 'a * b')
|
77
|
+
Function.new(name: name, expression: expr_stub)
|
78
|
+
end
|
79
|
+
assert_equal('name must be alphanumeric and begin with a letter',
|
80
|
+
ex.message)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def test_instantiate_with_too_long_name
|
85
|
+
ex = assert_raises(InvalidFunctionError) do
|
86
|
+
expr_stub = ExpressionDouble.new(expression: 'a * b')
|
87
|
+
Function.new(name: 'abcdefghijklmnopqrstu', expression: expr_stub)
|
88
|
+
end
|
89
|
+
assert_equal(
|
90
|
+
"name size can't be greater than #{Function::MAX_NAME_SIZE} characters",
|
91
|
+
ex.message)
|
92
|
+
end
|
93
|
+
|
94
|
+
def test_attributes
|
95
|
+
expr_stub = ExpressionDouble.new(expression: 'a * b')
|
96
|
+
function = Function.new(name: 'test', expression: expr_stub)
|
97
|
+
assert_equal({ name: 'test', definition: 'a * b' }, function.attributes)
|
98
|
+
end
|
99
|
+
|
100
|
+
def test_equals_operator
|
101
|
+
add = function('add', 'a + b')
|
102
|
+
assert add == function('add', 'a + b')
|
103
|
+
refute add == function('sum', 'a + b')
|
104
|
+
refute add == function('add', 'x + y')
|
105
|
+
refute add == function('sum', 'x + y')
|
106
|
+
end
|
107
|
+
|
108
|
+
def test_function_params
|
109
|
+
expr_stub = ExpressionDouble.new(variables: %w(x y z))
|
110
|
+
function = Function.new(name: 'test', expression: expr_stub)
|
111
|
+
assert_equal(%w(x y z), function.params)
|
112
|
+
end
|
113
|
+
|
114
|
+
def test_use_function
|
115
|
+
expr_stub = ExpressionDouble.new(evaluate: -> { 42 })
|
116
|
+
function = Function.new(name: 'test', expression: expr_stub)
|
117
|
+
assert_equal(42, function.use('x' => 1))
|
118
|
+
end
|
119
|
+
|
120
|
+
def test_use_with_invalid_args
|
121
|
+
expr_stub = ExpressionDouble.new(evaluate: -> { nil })
|
122
|
+
function = Function.new(name: 'test', expression: expr_stub)
|
123
|
+
assert_equal(nil, function.use('x' => 1))
|
124
|
+
assert_equal(nil, function.use)
|
125
|
+
end
|
126
|
+
|
127
|
+
def test_use_with_division_by_zero
|
128
|
+
expr_stub = ExpressionDouble.new(evaluate: lambda do
|
129
|
+
raise DivisionByZeroError, 'division by zero'
|
130
|
+
end)
|
131
|
+
function = Function.new(name: 'test', expression: expr_stub)
|
132
|
+
ex = assert_raises(DivisionByZeroError) { function.use }
|
133
|
+
assert_equal('division by zero', ex.message)
|
134
|
+
end
|
135
|
+
|
136
|
+
private
|
137
|
+
|
138
|
+
def function(name, definition)
|
139
|
+
expr = ExpressionDouble.new(expression: definition)
|
140
|
+
Function.new(name: name, expression: expr)
|
141
|
+
end
|
142
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (C) 2016 Cassiano Rocha Kuplich
|
3
|
+
#
|
4
|
+
# This file is part of Functio.
|
5
|
+
#
|
6
|
+
# Functio is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
8
|
+
# the Free Software Foundation, either version 3 of the License, or
|
9
|
+
# (at your option) any later version.
|
10
|
+
#
|
11
|
+
# Functio is distributed in the hope that it will be useful,
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
# GNU General Public License for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU General Public License
|
17
|
+
# along with Functio. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
#++
|
19
|
+
|
20
|
+
require 'test_helper'
|
21
|
+
require 'doubles/function_double'
|
22
|
+
require 'doubles/storage_double'
|
23
|
+
require 'functio/function_repository'
|
24
|
+
|
25
|
+
class TestFunctionRepository < Minitest::Test # :nodoc:
|
26
|
+
def test_add_new_function
|
27
|
+
storage_mock = Minitest::Mock.new
|
28
|
+
def storage_mock.find(_fields)
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
storage_mock.expect :store, :return, [{ name: 'test', definition: 'a + b' }]
|
32
|
+
repo = FunctionRepository.new(storage: storage_mock)
|
33
|
+
function = FunctionDouble.build(name: 'test', definition: 'a + b')
|
34
|
+
|
35
|
+
assert repo.add(function)
|
36
|
+
|
37
|
+
storage_mock.verify
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_add_function_with_existent_id
|
41
|
+
storage_double = StorageDouble.new(
|
42
|
+
find: { name: 'test', definition: 'a * b' })
|
43
|
+
repo = FunctionRepository.new(storage: storage_double)
|
44
|
+
function = FunctionDouble.build(name: 'test', definition: 'a + b')
|
45
|
+
|
46
|
+
refute repo.add(function)
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_get_all_functions
|
50
|
+
stored = [{ name: 'add', definition: 'a + b' },
|
51
|
+
{ name: 'sub', definition: 'a - b' }]
|
52
|
+
storage_double = StorageDouble.new(all: stored)
|
53
|
+
repo = FunctionRepository.new(storage: storage_double,
|
54
|
+
function_class: FunctionDouble)
|
55
|
+
expected = [FunctionDouble.build(stored[0]),
|
56
|
+
FunctionDouble.build(stored[1])]
|
57
|
+
assert_equal(expected, repo.all)
|
58
|
+
end
|
59
|
+
|
60
|
+
def test_get_all_with_empty_repository
|
61
|
+
storage_double = StorageDouble.new(all: [])
|
62
|
+
repo = FunctionRepository.new(storage: storage_double,
|
63
|
+
function_class: FunctionDouble)
|
64
|
+
assert_equal([], repo.all)
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_find_function
|
68
|
+
record = { name: 'test', definition: 'a + b' }
|
69
|
+
storage_double = StorageDouble.new(find: record)
|
70
|
+
repo = FunctionRepository.new(storage: storage_double,
|
71
|
+
function_class: FunctionDouble)
|
72
|
+
assert_equal(FunctionDouble.build(record), repo.find('test'))
|
73
|
+
end
|
74
|
+
|
75
|
+
def test_find_inexistent_function
|
76
|
+
storage_double = StorageDouble.new(find: nil)
|
77
|
+
repo = FunctionRepository.new(storage: storage_double,
|
78
|
+
function_class: FunctionDouble)
|
79
|
+
assert_equal(nil, repo.find('test'))
|
80
|
+
end
|
81
|
+
|
82
|
+
def test_delete_function
|
83
|
+
storage_mock = Minitest::Mock.new
|
84
|
+
storage_mock.expect :delete, true, [{ name: 'test' }]
|
85
|
+
repo = FunctionRepository.new(storage: storage_mock)
|
86
|
+
|
87
|
+
assert repo.delete('test')
|
88
|
+
storage_mock.verify
|
89
|
+
end
|
90
|
+
|
91
|
+
def test_delete_inexistent_function
|
92
|
+
storage_double = StorageDouble.new(delete: false)
|
93
|
+
repo = FunctionRepository.new(storage: storage_double)
|
94
|
+
|
95
|
+
refute repo.delete('test')
|
96
|
+
end
|
97
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (C) 2016 Cassiano Rocha Kuplich
|
3
|
+
#
|
4
|
+
# This file is part of Functio.
|
5
|
+
#
|
6
|
+
# Functio is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
8
|
+
# the Free Software Foundation, either version 3 of the License, or
|
9
|
+
# (at your option) any later version.
|
10
|
+
#
|
11
|
+
# Functio is distributed in the hope that it will be useful,
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
# GNU General Public License for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU General Public License
|
17
|
+
# along with Functio. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
#++
|
19
|
+
|
20
|
+
require 'minitest/autorun'
|
21
|
+
|
22
|
+
include Functio
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (C) 2016 Cassiano Rocha Kuplich
|
3
|
+
#
|
4
|
+
# This file is part of Functio.
|
5
|
+
#
|
6
|
+
# Functio is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
8
|
+
# the Free Software Foundation, either version 3 of the License, or
|
9
|
+
# (at your option) any later version.
|
10
|
+
#
|
11
|
+
# Functio is distributed in the hope that it will be useful,
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
# GNU General Public License for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU General Public License
|
17
|
+
# along with Functio. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
#++
|
19
|
+
|
20
|
+
require 'license_test_helper'
|
21
|
+
|
22
|
+
class TestLicensesCompatibility < Minitest::Test # :nodoc:
|
23
|
+
def test_licenses_compatibility
|
24
|
+
validator = Papers::LicenseValidator.new
|
25
|
+
|
26
|
+
assert validator.valid?,
|
27
|
+
"License validation failed:\n#{validator.errors.join("\n")}"
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: functio
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Cassiano Kuplich
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-05-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: dentaku
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 2.0.7
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.0'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 2.0.7
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: thor
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0.19'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0.19'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: bundler
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.11'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '1.11'
|
61
|
+
description: |
|
62
|
+
Functio is a calculator that allows you to create and manage functions for your
|
63
|
+
recurrent calculations.
|
64
|
+
email: crkuplich@openmailbox.org
|
65
|
+
executables:
|
66
|
+
- fn
|
67
|
+
extensions: []
|
68
|
+
extra_rdoc_files: []
|
69
|
+
files:
|
70
|
+
- ".gitignore"
|
71
|
+
- CHANGELOG.md
|
72
|
+
- COPYING
|
73
|
+
- Gemfile
|
74
|
+
- Gemfile.lock
|
75
|
+
- README.md
|
76
|
+
- Rakefile
|
77
|
+
- bin/fn
|
78
|
+
- features/expression_evaluation.feature
|
79
|
+
- features/function_creation.feature
|
80
|
+
- features/function_deletion.feature
|
81
|
+
- features/function_list.feature
|
82
|
+
- features/function_use.feature
|
83
|
+
- features/help_option.feature
|
84
|
+
- features/step_definitions/steps.rb
|
85
|
+
- features/support/env.rb
|
86
|
+
- features/support/functio_world.rb
|
87
|
+
- features/version_option.feature
|
88
|
+
- functio.gemspec
|
89
|
+
- lib/functio.rb
|
90
|
+
- lib/functio/data_storage.rb
|
91
|
+
- lib/functio/errors.rb
|
92
|
+
- lib/functio/expression.rb
|
93
|
+
- lib/functio/formatted_num.rb
|
94
|
+
- lib/functio/functio_cli.rb
|
95
|
+
- lib/functio/function.rb
|
96
|
+
- lib/functio/function_repository.rb
|
97
|
+
- lib/functio/version.rb
|
98
|
+
- test/doubles/expression_double.rb
|
99
|
+
- test/doubles/function_double.rb
|
100
|
+
- test/doubles/storage_double.rb
|
101
|
+
- test/doubles/test_expression_double.rb
|
102
|
+
- test/doubles/test_function_double.rb
|
103
|
+
- test/doubles/test_storage_double.rb
|
104
|
+
- test/expression_interface_test.rb
|
105
|
+
- test/interface_test_helper.rb
|
106
|
+
- test/license_test_helper.rb
|
107
|
+
- test/storable_interface_test.rb
|
108
|
+
- test/storage_interface_test.rb
|
109
|
+
- test/test_data_storage.rb
|
110
|
+
- test/test_expression.rb
|
111
|
+
- test/test_formatted_num.rb
|
112
|
+
- test/test_function.rb
|
113
|
+
- test/test_function_repository.rb
|
114
|
+
- test/test_helper.rb
|
115
|
+
- test/test_licenses_compatibility.rb
|
116
|
+
homepage: https://gitlab.com/functio/functio
|
117
|
+
licenses:
|
118
|
+
- GPL-3.0+
|
119
|
+
metadata: {}
|
120
|
+
post_install_message:
|
121
|
+
rdoc_options: []
|
122
|
+
require_paths:
|
123
|
+
- lib
|
124
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: 2.1.9
|
129
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
requirements: []
|
135
|
+
rubyforge_project:
|
136
|
+
rubygems_version: 2.4.8
|
137
|
+
signing_key:
|
138
|
+
specification_version: 4
|
139
|
+
summary: Turn your recurrent calculations into functions
|
140
|
+
test_files: []
|