finitio 0.7.0.pre.rc4 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +42 -0
- data/Gemfile +1 -11
- data/Gemfile.lock +101 -54
- data/README.md +89 -13
- data/finitio.gemspec +9 -157
- data/lib/finitio.rb +7 -5
- data/lib/finitio/generation.rb +106 -0
- data/lib/finitio/generation/ad_type.rb +10 -0
- data/lib/finitio/generation/alias_type.rb +9 -0
- data/lib/finitio/generation/any_type.rb +11 -0
- data/lib/finitio/generation/builtin_type.rb +9 -0
- data/lib/finitio/generation/hash_based_type.rb +15 -0
- data/lib/finitio/generation/heuristic.rb +8 -0
- data/lib/finitio/generation/heuristic/constant.rb +30 -0
- data/lib/finitio/generation/heuristic/random.rb +52 -0
- data/lib/finitio/generation/rel_based_type.rb +13 -0
- data/lib/finitio/generation/seq_type.rb +13 -0
- data/lib/finitio/generation/set_type.rb +13 -0
- data/lib/finitio/generation/sub_type.rb +9 -0
- data/lib/finitio/generation/union_type.rb +10 -0
- data/lib/finitio/inference.rb +51 -0
- data/lib/finitio/json_schema.rb +16 -0
- data/lib/finitio/json_schema/ad_type.rb +11 -0
- data/lib/finitio/json_schema/alias_type.rb +9 -0
- data/lib/finitio/json_schema/any_type.rb +9 -0
- data/lib/finitio/json_schema/builtin_type.rb +27 -0
- data/lib/finitio/json_schema/hash_based_type.rb +25 -0
- data/lib/finitio/json_schema/rel_based_type.rb +13 -0
- data/lib/finitio/json_schema/seq_type.rb +12 -0
- data/lib/finitio/json_schema/set_type.rb +13 -0
- data/lib/finitio/json_schema/struct_type.rb +12 -0
- data/lib/finitio/json_schema/sub_type.rb +10 -0
- data/lib/finitio/json_schema/union_type.rb +11 -0
- data/lib/finitio/support.rb +18 -0
- data/lib/finitio/support/attribute.rb +8 -0
- data/lib/finitio/support/compilation.rb +18 -18
- data/lib/finitio/support/contract.rb +10 -2
- data/lib/finitio/support/fetch_scope.rb +19 -0
- data/lib/finitio/support/heading.rb +42 -1
- data/lib/finitio/syntax.rb +1 -1
- data/lib/finitio/syntax/lexer.citrus +1 -1
- data/lib/finitio/syntax/type.rb +2 -0
- data/lib/finitio/syntax/type/high_order_type_instantiation.rb +29 -0
- data/lib/finitio/syntax/type/high_order_vars.rb +16 -0
- data/lib/finitio/syntax/type/type_def.rb +11 -1
- data/lib/finitio/syntax/types.citrus +14 -1
- data/lib/finitio/system.rb +18 -4
- data/lib/finitio/type.rb +19 -0
- data/lib/finitio/type/ad_type.rb +9 -1
- data/lib/finitio/type/alias_type.rb +8 -0
- data/lib/finitio/type/any_type.rb +12 -0
- data/lib/finitio/type/builtin_type.rb +4 -0
- data/lib/finitio/type/collection_type.rb +15 -0
- data/lib/finitio/type/heading_based_type.rb +17 -0
- data/lib/finitio/type/high_order_type.rb +39 -0
- data/lib/finitio/type/multi_relation_type.rb +4 -0
- data/lib/finitio/type/multi_tuple_type.rb +4 -0
- data/lib/finitio/type/proxy_type.rb +10 -20
- data/lib/finitio/type/relation_type.rb +4 -0
- data/lib/finitio/type/seq_type.rb +1 -1
- data/lib/finitio/type/struct_type.rb +8 -0
- data/lib/finitio/type/sub_type.rb +8 -0
- data/lib/finitio/type/tuple_type.rb +4 -0
- data/lib/finitio/type/union_type.rb +19 -0
- data/lib/finitio/version.rb +2 -2
- data/spec/finitio/test_system.rb +0 -11
- data/spec/generation/test_generation.rb +169 -0
- data/spec/heading/test_looks_similar.rb +45 -0
- data/spec/heading/test_suppremum.rb +56 -0
- data/spec/inference/test_inference.rb +42 -0
- data/spec/json_schema/test_ad_type.rb +20 -0
- data/spec/json_schema/test_alias_type.rb +15 -0
- data/spec/json_schema/test_any_type.rb +11 -0
- data/spec/json_schema/test_builtin_type.rb +51 -0
- data/spec/json_schema/test_multi_relation_type.rb +58 -0
- data/spec/json_schema/test_multi_tuple_type.rb +50 -0
- data/spec/json_schema/test_relation_type.rb +30 -0
- data/spec/json_schema/test_seq_type.rb +18 -0
- data/spec/json_schema/test_set_type.rb +19 -0
- data/spec/json_schema/test_struct_type.rb +18 -0
- data/spec/json_schema/test_sub_type.rb +17 -0
- data/spec/json_schema/test_tuple_type.rb +26 -0
- data/spec/json_schema/test_union_type.rb +17 -0
- data/spec/regression/test_heading_extra_are_proxy_resolved.rb +41 -0
- data/spec/spec_helper.rb +32 -6
- data/spec/support/test_compare_attrs.rb +67 -0
- data/spec/syntax/test_compile.rb +57 -0
- data/spec/system/fixtures/system.fio +2 -0
- data/spec/{finitio → system/fixtures}/with-duplicates.fio +2 -1
- data/spec/system/test_check_and_warn.rb +55 -0
- data/spec/type/ad_type/test_initialize.rb +1 -8
- data/spec/type/relation_type/test_suppremum.rb +104 -0
- data/spec/type/seq_type/test_suppremum.rb +54 -0
- data/spec/type/set_type/test_suppremum.rb +54 -0
- data/spec/type/test_suppremum.rb +49 -0
- data/spec/type/test_unconstrained.rb +150 -0
- data/spec/type/tuple_type/test_suppremum.rb +119 -0
- data/spec/type/union_type/test_suppremum.rb +51 -0
- data/tasks/test.rake +1 -1
- metadata +203 -17
- data/spec/type/proxy_type/test_delegation.rb +0 -37
- data/spec/type/proxy_type/test_resolve.rb +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f1f480aeb4db3e1d01d3a5d17306557bde03f0bc6fe6525f919b4bf1419026f8
|
4
|
+
data.tar.gz: 910e20fadff426a69d4a42299290b198cfdbc36c238b54e6e7a0b2e4777d0798
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35105c22fb14360380bee7d2ac70d170ca46a5b6fd55c5e059bf1c38f96519157645fb2581a57013de2b56c8b5730fc9cd69afca79e4693f007219705ca525c9
|
7
|
+
data.tar.gz: d17223fc24cd31c0cb4d56846f45403243b3921362a9fba15b6bc17b29a332480e3b90780dc5b0c3214c3f2087f4a911aee0463ca88a59a616e619a51708d214
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,45 @@
|
|
1
|
+
# 0.10.0 - 2021/01/11
|
2
|
+
|
3
|
+
* Upgrade all dependencies.
|
4
|
+
|
5
|
+
* Ruby < 2.3 is no longer supported.
|
6
|
+
|
7
|
+
* Fix code and build under Ruby 3.0.
|
8
|
+
|
9
|
+
# 0.9.1 - 2020/12/24
|
10
|
+
|
11
|
+
* Fixes a bug where proxy types are not properly resolved when used
|
12
|
+
in a heading extra, e.g. `{ ...: Proxy }`
|
13
|
+
|
14
|
+
# 0.9.0 - 2020/12/16
|
15
|
+
|
16
|
+
* Add Type#to_json_schema that converts Finitio types to JSON schema
|
17
|
+
representations. This first implementation skips all constraints on sub types,
|
18
|
+
though. You need to explicitly require 'finitio/json_schema' to use it.
|
19
|
+
|
20
|
+
# 0.8.0 - 2019/10/21
|
21
|
+
|
22
|
+
* Add `Type#unconstrained` that returns a super type with all user specific
|
23
|
+
constraints removed on sub types, recursively on all non scalar types.
|
24
|
+
|
25
|
+
* Add high-order types, such as `Collection<T> = [T]`
|
26
|
+
|
27
|
+
* Add support for random data generation through `Finitio::Generation`.
|
28
|
+
Please `require 'finitio/generation'` to use it.
|
29
|
+
|
30
|
+
# 0.7.0 / 2019-02-28
|
31
|
+
|
32
|
+
* Implement (basic) @import feature, working with relative paths
|
33
|
+
and a standard library. The standard library systems are memoized
|
34
|
+
to avoid unnecessary parsing and compilation.
|
35
|
+
|
36
|
+
* `System#check_and_warn` allows discovering warnings, infos and
|
37
|
+
errors in system definitions, such as duplicate type definitions
|
38
|
+
and import overrides.
|
39
|
+
|
40
|
+
* WARN: Finitio::DEFAULT_SYSTEM is deprecated. Use @import
|
41
|
+
finitio/data instead.
|
42
|
+
|
1
43
|
# 0.6.1 / 2018-03-23
|
2
44
|
|
3
45
|
* Fix support for typed extra attributes, a KeyError was raised when
|
data/Gemfile
CHANGED
@@ -1,12 +1,2 @@
|
|
1
|
-
source '
|
2
|
-
|
1
|
+
source 'https://rubygems.org'
|
3
2
|
gemspec
|
4
|
-
|
5
|
-
group :development do
|
6
|
-
gem "rake", "~> 10.0"
|
7
|
-
gem "rspec", "~> 3.0"
|
8
|
-
gem "cucumber", "~> 1.3"
|
9
|
-
gem "path", "~> 1.3"
|
10
|
-
gem "awesome_print", "~> 1.2"
|
11
|
-
gem 'coveralls', require: false
|
12
|
-
end
|
data/Gemfile.lock
CHANGED
@@ -1,71 +1,118 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
finitio (0.
|
5
|
-
citrus (>=
|
4
|
+
finitio (0.10.0)
|
5
|
+
citrus (>= 3.0, < 4.0)
|
6
6
|
|
7
7
|
GEM
|
8
|
-
remote:
|
8
|
+
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
|
11
|
-
|
10
|
+
activesupport (5.2.4.4)
|
11
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
|
+
i18n (>= 0.7, < 2)
|
13
|
+
minitest (~> 5.1)
|
14
|
+
tzinfo (~> 1.1)
|
15
|
+
awesome_print (1.8.0)
|
16
|
+
builder (3.2.4)
|
12
17
|
citrus (3.0.2)
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
simplecov (
|
17
|
-
term-ansicolor (
|
18
|
-
thor (
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
18
|
+
concurrent-ruby (1.1.7)
|
19
|
+
coveralls (0.8.23)
|
20
|
+
json (>= 1.8, < 3)
|
21
|
+
simplecov (~> 0.16.1)
|
22
|
+
term-ansicolor (~> 1.3)
|
23
|
+
thor (>= 0.19.4, < 2.0)
|
24
|
+
tins (~> 1.6)
|
25
|
+
cucumber (4.1.0)
|
26
|
+
builder (~> 3.2, >= 3.2.3)
|
27
|
+
cucumber-core (~> 7.1, >= 7.1.0)
|
28
|
+
cucumber-create-meta (~> 1.0.0, >= 1.0.0)
|
29
|
+
cucumber-cucumber-expressions (~> 10.1, >= 10.1.0)
|
30
|
+
cucumber-gherkin (~> 14.0, >= 14.0.1)
|
31
|
+
cucumber-html-formatter (~> 7.0, >= 7.0.0)
|
32
|
+
cucumber-messages (~> 12.2, >= 12.2.0)
|
33
|
+
cucumber-wire (~> 3.1, >= 3.1.0)
|
34
|
+
diff-lcs (~> 1.3, >= 1.3, < 1.4)
|
35
|
+
multi_test (~> 0.1, >= 0.1.2)
|
36
|
+
sys-uname (~> 1.0, >= 1.0.2)
|
37
|
+
cucumber-core (7.1.0)
|
38
|
+
cucumber-gherkin (~> 14.0, >= 14.0.1)
|
39
|
+
cucumber-messages (~> 12.2, >= 12.2.0)
|
40
|
+
cucumber-tag-expressions (~> 2.0, >= 2.0.4)
|
41
|
+
cucumber-create-meta (1.0.0)
|
42
|
+
cucumber-messages (~> 12.2, >= 12.2.0)
|
43
|
+
sys-uname (~> 1.2, >= 1.2.1)
|
44
|
+
cucumber-cucumber-expressions (10.3.0)
|
45
|
+
cucumber-gherkin (14.2.0)
|
46
|
+
cucumber-messages (~> 12.4, >= 12.4.0)
|
47
|
+
cucumber-html-formatter (7.2.0)
|
48
|
+
cucumber-messages (~> 12.4, >= 12.4.0)
|
49
|
+
cucumber-messages (12.4.0)
|
50
|
+
protobuf-cucumber (~> 3.10, >= 3.10.8)
|
51
|
+
cucumber-tag-expressions (2.0.4)
|
52
|
+
cucumber-wire (3.1.0)
|
53
|
+
cucumber-core (~> 7.1, >= 7.1.0)
|
54
|
+
cucumber-cucumber-expressions (~> 10.1, >= 10.1.0)
|
55
|
+
cucumber-messages (~> 12.2, >= 12.2.0)
|
56
|
+
diff-lcs (1.3)
|
57
|
+
docile (1.3.4)
|
58
|
+
ffi (1.14.2)
|
59
|
+
i18n (1.8.7)
|
60
|
+
concurrent-ruby (~> 1.0)
|
61
|
+
json (2.5.1)
|
62
|
+
middleware (0.1.0)
|
63
|
+
minitest (5.14.3)
|
64
|
+
multi_json (1.15.0)
|
65
|
+
multi_test (0.1.2)
|
66
|
+
path (2.0.1)
|
67
|
+
protobuf-cucumber (3.10.8)
|
68
|
+
activesupport (>= 3.2)
|
69
|
+
middleware
|
70
|
+
thor
|
71
|
+
thread_safe
|
72
|
+
rake (13.0.3)
|
73
|
+
rspec (3.10.0)
|
74
|
+
rspec-core (~> 3.10.0)
|
75
|
+
rspec-expectations (~> 3.10.0)
|
76
|
+
rspec-mocks (~> 3.10.0)
|
77
|
+
rspec-core (3.10.1)
|
78
|
+
rspec-support (~> 3.10.0)
|
79
|
+
rspec-expectations (3.10.1)
|
43
80
|
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.
|
45
|
-
rspec-mocks (3.1
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
81
|
+
rspec-support (~> 3.10.0)
|
82
|
+
rspec-mocks (3.10.1)
|
83
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
84
|
+
rspec-support (~> 3.10.0)
|
85
|
+
rspec-support (3.10.1)
|
86
|
+
simplecov (0.16.1)
|
87
|
+
docile (~> 1.1)
|
88
|
+
json (>= 1.8, < 3)
|
89
|
+
simplecov-html (~> 0.10.0)
|
90
|
+
simplecov-html (0.10.2)
|
91
|
+
sync (0.5.0)
|
92
|
+
sys-uname (1.2.2)
|
93
|
+
ffi (~> 1.1)
|
94
|
+
term-ansicolor (1.7.1)
|
95
|
+
tins (~> 1.0)
|
96
|
+
thor (1.0.1)
|
97
|
+
thread_safe (0.3.6)
|
98
|
+
tins (1.26.0)
|
99
|
+
sync
|
100
|
+
tzinfo (1.2.9)
|
101
|
+
thread_safe (~> 0.1)
|
57
102
|
|
58
103
|
PLATFORMS
|
59
104
|
ruby
|
105
|
+
x86_64-darwin-18
|
60
106
|
|
61
107
|
DEPENDENCIES
|
62
|
-
awesome_print (~> 1.
|
63
|
-
coveralls
|
64
|
-
cucumber (~> 1
|
108
|
+
awesome_print (~> 1.8)
|
109
|
+
coveralls (~> 0.8)
|
110
|
+
cucumber (~> 4.1)
|
65
111
|
finitio!
|
66
|
-
|
67
|
-
|
112
|
+
multi_json (~> 1.15)
|
113
|
+
path (>= 2.0, < 3.0)
|
114
|
+
rake (~> 13.0)
|
68
115
|
rspec (~> 3.0)
|
69
116
|
|
70
117
|
BUNDLED WITH
|
71
|
-
|
118
|
+
2.2.4
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![Build Status](https://travis-ci.org/blambeau/finitio-rb.
|
1
|
+
[![Build Status](https://travis-ci.org/blambeau/finitio-rb.svg?branch=master)](https://travis-ci.org/blambeau/finitio-rb)
|
2
2
|
[![Dependency Status](https://gemnasium.com/blambeau/finitio-rb.png)](https://gemnasium.com/blambeau/finitio-rb)
|
3
3
|
[![Code Climate](https://codeclimate.com/github/blambeau/finitio-rb.png)](https://codeclimate.com/github/blambeau/finitio-rb)
|
4
4
|
[![Coverage Status](https://coveralls.io/repos/blambeau/finitio-rb/badge.png?branch=master)](https://coveralls.io/r/blambeau/finitio-rb)
|
@@ -19,7 +19,9 @@ require 'finitio'
|
|
19
19
|
require 'json'
|
20
20
|
|
21
21
|
# Let load a schema
|
22
|
-
schema = Finitio
|
22
|
+
schema = Finitio.system <<-FIO
|
23
|
+
@import finitio/data
|
24
|
+
|
23
25
|
{
|
24
26
|
name: String( s | s.strip.size > 0 ),
|
25
27
|
at: DateTime
|
@@ -98,6 +100,91 @@ module RgbContract
|
|
98
100
|
end
|
99
101
|
```
|
100
102
|
|
103
|
+
## Decompose complex system with imports
|
104
|
+
|
105
|
+
It is useful to decompose complex systems in many files using the import
|
106
|
+
feature. The latter works with relative file paths like this:
|
107
|
+
|
108
|
+
```
|
109
|
+
# child.fio
|
110
|
+
|
111
|
+
Posint = .Integer(i | i >= 0)
|
112
|
+
```
|
113
|
+
|
114
|
+
```
|
115
|
+
# parent.fio
|
116
|
+
@import ./child.fio
|
117
|
+
|
118
|
+
# Child's types are available inside the system, but not outside it, that
|
119
|
+
# is, imported types are not themselves exported
|
120
|
+
Byte = Posint(i | i <= 255 )
|
121
|
+
```
|
122
|
+
|
123
|
+
```
|
124
|
+
@import ./parent.fio
|
125
|
+
|
126
|
+
# This will work
|
127
|
+
HalfByte = Byte(i | i <= 128)
|
128
|
+
|
129
|
+
# But this will not: Posint is not defined
|
130
|
+
Posint(i | i <= 128)
|
131
|
+
```
|
132
|
+
|
133
|
+
See the next section about the standard library if you need to share types
|
134
|
+
without relying on relative paths.
|
135
|
+
|
136
|
+
## Standard library
|
137
|
+
|
138
|
+
Usual type definitions are already defined for simple data types, forming
|
139
|
+
Finitio's default system:
|
140
|
+
|
141
|
+
* Most ruby native (data) classes are already aliased to avoid explicit use of
|
142
|
+
builtins. In particular, `Integer`, `String`, etc.
|
143
|
+
|
144
|
+
* A `Boolean` union type also hides the TrueClass and FalseClass distinction.
|
145
|
+
|
146
|
+
* Date, Time and DateTime ADTs are also provided that perform common
|
147
|
+
conversions from JSON strings, through iso8601.
|
148
|
+
|
149
|
+
This system is best used through Finitio's so-called "standard library", e.g.
|
150
|
+
|
151
|
+
```
|
152
|
+
@import finitio/data
|
153
|
+
|
154
|
+
# String, Integer, Boolean, etc. are now available in this system
|
155
|
+
```
|
156
|
+
|
157
|
+
See `lib/finitio/stdlib/*.fio` for the precise definition of the standard library.
|
158
|
+
|
159
|
+
### Contributing to the standard library
|
160
|
+
|
161
|
+
Ruby gems may contribute to the standard library by specifying resolve paths.
|
162
|
+
We suggest the following system file structure inside your gem source code:
|
163
|
+
|
164
|
+
```
|
165
|
+
lib
|
166
|
+
myrubygem
|
167
|
+
myrubygem.rb
|
168
|
+
finitio
|
169
|
+
myrubygem
|
170
|
+
base.fio
|
171
|
+
advanced.fio
|
172
|
+
```
|
173
|
+
|
174
|
+
Registering the standard library path can then be done as follows:
|
175
|
+
|
176
|
+
```
|
177
|
+
# inside myrubygem.rb
|
178
|
+
Finitio.stdlib_path(File.expand_path('../../finitio', __FILE__))
|
179
|
+
```
|
180
|
+
|
181
|
+
Then, a Finitio schema will have access to the types defined in your extension:
|
182
|
+
|
183
|
+
```
|
184
|
+
@import myrubygem/base
|
185
|
+
@import myrubygem/advanced
|
186
|
+
```
|
187
|
+
|
101
188
|
## About representations
|
102
189
|
|
103
190
|
The `Rep` representation function mapping *Finitio* types to ruby classes is
|
@@ -135,14 +222,3 @@ Rep({{Ai => Ti}}) = Set<Hash<Symbol => Rep(Ti)>>
|
|
135
222
|
# specified. ADTs behave as Union types if no class is bound.
|
136
223
|
Rep(.Builtin <rep> ...) = Builtin
|
137
224
|
```
|
138
|
-
|
139
|
-
## About the default system
|
140
|
-
|
141
|
-
See `lib/finitio/Finitio/default.fio` for the precise definition of the default
|
142
|
-
system. In summary,
|
143
|
-
|
144
|
-
* Most ruby native (data) classes are already aliased to avoid explicit use of
|
145
|
-
builtins. In particular, `Integer`, `String`, etc.
|
146
|
-
* A `Boolean` union type also hides the TrueClass and FalseClass distinction.
|
147
|
-
* Date, Time and DateTime ADTs are also provided that perform common
|
148
|
-
conversions from JSON strings, through iso8601.
|
data/finitio.gemspec
CHANGED
@@ -1,186 +1,38 @@
|
|
1
|
-
# We require your library, mainly to have access to the VERSION number.
|
2
|
-
# Feel free to set $version manually.
|
3
1
|
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
|
4
2
|
require "finitio/version"
|
5
3
|
$version = Finitio::Version.to_s
|
6
4
|
|
7
|
-
#
|
8
|
-
# This is your Gem specification. Default values are provided so that your library
|
9
|
-
# should be correctly packaged given what you have described in the .noespec file.
|
10
|
-
#
|
11
5
|
Gem::Specification.new do |s|
|
12
|
-
|
13
|
-
################################################################### ABOUT YOUR GEM
|
14
|
-
|
15
|
-
# Gem name (required)
|
16
6
|
s.name = "finitio"
|
17
|
-
|
18
|
-
# Gem version (required)
|
19
7
|
s.version = $version
|
20
|
-
|
21
|
-
# A short summary of this gem
|
22
|
-
#
|
23
|
-
# This is displayed in `gem list -d`.
|
24
8
|
s.summary = "Finitio - in Ruby"
|
25
|
-
|
26
|
-
# A long description of this gem (required)
|
27
|
-
#
|
28
|
-
# The description should be more detailed than the summary. For example,
|
29
|
-
# you might wish to copy the entire README into the description.
|
30
9
|
s.description = "Implements the Finitio information language in Ruby."
|
31
|
-
|
32
|
-
# The URL of this gem home page (optional)
|
33
10
|
s.homepage = "https://github.com/blambeau/finitio"
|
34
|
-
|
35
|
-
# Gem publication date (required but auto)
|
36
|
-
#
|
37
|
-
# Today is automatically used by default, uncomment only if
|
38
|
-
# you know what you do!
|
39
|
-
#
|
40
|
-
# s.date = Time.now.strftime('%Y-%m-%d')
|
41
|
-
|
42
|
-
# The license(s) for the library. Each license must be a short name, no
|
43
|
-
# more than 64 characters.
|
44
|
-
#
|
45
|
-
# s.licences = %w{}
|
46
|
-
|
47
|
-
# The rubyforge project this gem lives under (optional)
|
48
|
-
#
|
49
|
-
# s.rubyforge_project = nil
|
50
|
-
|
51
|
-
################################################################### ABOUT THE AUTHORS
|
52
|
-
|
53
|
-
# The list of author names who wrote this gem.
|
54
|
-
#
|
55
|
-
# If you are providing multiple authors and multiple emails they should be
|
56
|
-
# in the same order.
|
57
|
-
#
|
58
11
|
s.authors = ["Bernard Lambeau"]
|
59
|
-
|
60
|
-
# Contact emails for this gem
|
61
|
-
#
|
62
|
-
# If you are providing multiple authors and multiple emails they should be
|
63
|
-
# in the same order.
|
64
|
-
#
|
65
|
-
# NOTE: Somewhat strangly this attribute is always singular!
|
66
|
-
# Don't replace by s.emails = ...
|
67
12
|
s.email = ["blambeau@gmail.com"]
|
68
|
-
|
69
|
-
################################################################### PATHS, FILES, BINARIES
|
70
|
-
|
71
|
-
# Paths in the gem to add to $LOAD_PATH when this gem is
|
72
|
-
# activated (required).
|
73
|
-
#
|
74
|
-
# The default 'lib' is typically sufficient.
|
75
13
|
s.require_paths = ["lib"]
|
76
|
-
|
77
|
-
# Files included in this gem.
|
78
|
-
#
|
79
|
-
# By default, we take all files included in the Manifest.txt file on root
|
80
|
-
# of the project. Entries of the manifest are interpreted as Dir[...]
|
81
|
-
# patterns so that lazy people may use wilcards like lib/**/*
|
82
|
-
#
|
83
14
|
here = File.expand_path(File.dirname(__FILE__))
|
84
15
|
s.files = File.readlines(File.join(here, 'Manifest.txt')).
|
85
16
|
inject([]){|files, pattern| files + Dir[File.join(here, pattern.strip)]}.
|
86
17
|
collect{|x| x[(1+here.size)..-1]}
|
87
18
|
|
88
|
-
# Test files included in this gem.
|
89
|
-
#
|
90
19
|
s.test_files = Dir["test/**/*"] + Dir["spec/**/*"]
|
91
|
-
|
92
|
-
# The path in the gem for executable scripts (optional)
|
93
|
-
#
|
94
20
|
s.bindir = "bin"
|
95
|
-
|
96
|
-
# Executables included in the gem.
|
97
|
-
#
|
98
21
|
s.executables = (Dir["bin/*"]).collect{|f| File.basename(f)}
|
99
|
-
|
100
|
-
################################################################### REQUIREMENTS & INSTALL
|
101
|
-
# Remember the gem version requirements operators and schemes:
|
102
|
-
# = Equals version
|
103
|
-
# != Not equal to version
|
104
|
-
# > Greater than version
|
105
|
-
# < Less than version
|
106
|
-
# >= Greater than or equal to
|
107
|
-
# <= Less than or equal to
|
108
|
-
# ~> Approximately greater than
|
109
|
-
#
|
110
|
-
# Don't forget to have a look at http://lmgtfy.com/?q=Ruby+Versioning+Policies
|
111
|
-
# for setting your gem version.
|
112
|
-
#
|
113
|
-
# For your requirements to other gems, remember that
|
114
|
-
# ">= 2.2.0" (optimistic: specify minimal version)
|
115
|
-
# ">= 2.2.0", "< 3.0" (pessimistic: not greater than the next major)
|
116
|
-
# "~> 2.2" (shortcut for ">= 2.2.0", "< 3.0")
|
117
|
-
# "~> 2.2.0" (shortcut for ">= 2.2.0", "< 2.3.0")
|
118
|
-
#
|
119
|
-
s.add_dependency("citrus", ">= 2.4", "< 4.0")
|
120
|
-
|
121
|
-
#
|
122
|
-
# One call to add_dependency('gem_name', 'gem version requirement') for each
|
123
|
-
# runtime dependency. These gems will be installed with your gem.
|
124
|
-
# One call to add_development_dependency('gem_name', 'gem version requirement')
|
125
|
-
# for each development dependency. These gems are required for developers
|
126
|
-
#
|
127
|
-
# We use Gemfile for development dependencies.
|
128
22
|
|
23
|
+
s.add_dependency("citrus", ">= 3.0", "< 4.0")
|
24
|
+
|
25
|
+
s.add_development_dependency("rake", "~> 13.0")
|
26
|
+
s.add_development_dependency("rspec", "~> 3.0")
|
27
|
+
s.add_development_dependency("cucumber", "~> 4.1")
|
28
|
+
s.add_development_dependency("path", ">= 2.0", "< 3.0")
|
29
|
+
s.add_development_dependency("awesome_print", "~> 1.8")
|
30
|
+
s.add_development_dependency("coveralls", "~> 0.8")
|
31
|
+
s.add_development_dependency("multi_json", "~> 1.15")
|
129
32
|
|
130
|
-
# The version of ruby required by this gem
|
131
|
-
#
|
132
|
-
# Uncomment and set this if your gem requires specific ruby versions.
|
133
|
-
#
|
134
|
-
# s.required_ruby_version = ">= 0"
|
135
|
-
|
136
|
-
# The RubyGems version required by this gem
|
137
|
-
#
|
138
|
-
# s.required_rubygems_version = ">= 0"
|
139
|
-
|
140
|
-
# The platform this gem runs on. See Gem::Platform for details.
|
141
|
-
#
|
142
|
-
# s.platform = nil
|
143
|
-
|
144
|
-
# Extensions to build when installing the gem.
|
145
|
-
#
|
146
|
-
# Valid types of extensions are extconf.rb files, configure scripts
|
147
|
-
# and rakefiles or mkrf_conf files.
|
148
|
-
#
|
149
33
|
s.extensions = []
|
150
|
-
|
151
|
-
# External (to RubyGems) requirements that must be met for this gem to work.
|
152
|
-
# It’s simply information for the user.
|
153
|
-
#
|
154
34
|
s.requirements = nil
|
155
|
-
|
156
|
-
# A message that gets displayed after the gem is installed
|
157
|
-
#
|
158
|
-
# Uncomment and set this if you want to say something to the user
|
159
|
-
# after gem installation
|
160
|
-
#
|
161
35
|
s.post_install_message = nil
|
162
|
-
|
163
|
-
################################################################### SECURITY
|
164
|
-
|
165
|
-
# The key used to sign this gem. See Gem::Security for details.
|
166
|
-
#
|
167
|
-
# s.signing_key = nil
|
168
|
-
|
169
|
-
# The certificate chain used to sign this gem. See Gem::Security for
|
170
|
-
# details.
|
171
|
-
#
|
172
|
-
# s.cert_chain = []
|
173
|
-
|
174
|
-
################################################################### RDOC
|
175
|
-
|
176
|
-
# An ARGV style array of options to RDoc
|
177
|
-
#
|
178
|
-
# See 'rdoc --help' about this
|
179
|
-
#
|
180
36
|
s.rdoc_options = []
|
181
|
-
|
182
|
-
# Extra files to add to RDoc such as README
|
183
|
-
#
|
184
37
|
s.extra_rdoc_files = Dir["README.md"] + Dir["CHANGELOG.md"] + Dir["LICENCE.md"]
|
185
|
-
|
186
38
|
end
|