typical 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -4
- data/lib/typical/dsl.rb +7 -4
- data/lib/typical/type/list.rb +0 -1
- data/lib/typical/type/reference.rb +0 -2
- data/lib/typical/type/union.rb +0 -2
- data/lib/typical/version.rb +1 -1
- data/typical.gemspec +0 -1
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb05176839c8513b4234f98ff421ae047fd046e3
|
4
|
+
data.tar.gz: f5758f4801b2995bd4556c15d000f16f734edeea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b2d8c2f47c4b2cda1437ea1db8e42202994c6b9b348757871681459559d3cc40eb7e42faac49e473d0446a8c2dffe37e74436f2843c8e7506892f06d5ad733c
|
7
|
+
data.tar.gz: d3de8660f195d962fa0db053c80fcf31d231590f70429800ec9a7c3b6b253c883165e6074fa68c5ca4215881d87536391fbbb5826c3125e106920dae899469f2
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
typical (0.1.
|
4
|
+
typical (0.1.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -9,8 +9,6 @@ GEM
|
|
9
9
|
ansi (1.5.0)
|
10
10
|
builder (3.2.3)
|
11
11
|
minitest (5.10.2)
|
12
|
-
minitest-around (0.4.0)
|
13
|
-
minitest (~> 5.0)
|
14
12
|
minitest-focus (1.1.2)
|
15
13
|
minitest (>= 4, < 6)
|
16
14
|
minitest-reporters (1.1.14)
|
@@ -30,7 +28,6 @@ PLATFORMS
|
|
30
28
|
DEPENDENCIES
|
31
29
|
bundler (~> 1.14)
|
32
30
|
minitest (~> 5.0)
|
33
|
-
minitest-around (~> 0.4)
|
34
31
|
minitest-focus
|
35
32
|
minitest-reporters
|
36
33
|
minitest-sprint
|
data/lib/typical/dsl.rb
CHANGED
@@ -2,10 +2,12 @@ require "typical/type"
|
|
2
2
|
|
3
3
|
module Typical
|
4
4
|
module DSL
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
module Define
|
6
|
+
private def define_scalar_type(mod, name = nil)
|
7
|
+
name ||= mod.name.split("::").last
|
8
|
+
define_method("#{name}!") { Type.new(mod) }
|
9
|
+
define_method("#{name}?") { Type.new(mod) | null }
|
10
|
+
end
|
9
11
|
end
|
10
12
|
|
11
13
|
BUILTIN_SCALAR_TYPES = [
|
@@ -19,6 +21,7 @@ module Typical
|
|
19
21
|
Time,
|
20
22
|
].freeze
|
21
23
|
|
24
|
+
extend Define
|
22
25
|
BUILTIN_SCALAR_TYPES.each do |klass|
|
23
26
|
define_scalar_type(klass)
|
24
27
|
end
|
data/lib/typical/type/list.rb
CHANGED
data/lib/typical/type/union.rb
CHANGED
data/lib/typical/version.rb
CHANGED
data/typical.gemspec
CHANGED
@@ -21,7 +21,6 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.14"
|
22
22
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
23
|
spec.add_development_dependency "minitest", "~> 5.0"
|
24
|
-
spec.add_development_dependency "minitest-around", "~> 0.4"
|
25
24
|
spec.add_development_dependency "minitest-reporters"
|
26
25
|
spec.add_development_dependency "minitest-sprint"
|
27
26
|
spec.add_development_dependency "minitest-focus"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: typical
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Durán
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '5.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: minitest-around
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0.4'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0.4'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: minitest-reporters
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|