litl 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 +3 -3
- data/lib/lit/builder/object.rb +2 -1
- data/lib/lit/request_deserializer.rb +2 -1
- data/lib/lit/serializer.rb +2 -1
- data/lib/lit/type_checker.rb +4 -0
- data/lib/lit/version.rb +1 -1
- data/litl.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68bb57bc7df0262dfadaab96a834ae23fb7dd48c0e5131a693f31029cfbb5ccf
|
4
|
+
data.tar.gz: 7b45dc299cf2f13f66811be2afda5eb87f843e59c2aeecd5a0ca6b8507a276fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb70eb5b2e4f071ed19366c795ad5e5ae124336353b8b32ac17543aa30282f582ff08c81b598b98b9beff5876fb21885c09eef4ab8d5695eca0bafe5b8f9c6c7
|
7
|
+
data.tar.gz: 869ccbdca4f870c66f94eb763aa35114d88259e7f1e55986e39a6465738d2bf8d083e82ff0a8a981775782232cbb076c99e82293bfc597e966259c08b794f38e
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
litl (0.1.
|
5
|
-
litl-parser (= 0.1.
|
4
|
+
litl (0.1.1)
|
5
|
+
litl-parser (= 0.1.1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
@@ -19,7 +19,7 @@ GEM
|
|
19
19
|
docile (1.3.2)
|
20
20
|
jaro_winkler (1.5.4)
|
21
21
|
json (2.3.0)
|
22
|
-
litl-parser (0.1.
|
22
|
+
litl-parser (0.1.1)
|
23
23
|
method_source (0.9.2)
|
24
24
|
parallel (1.19.1)
|
25
25
|
parser (2.7.0.4)
|
data/lib/lit/builder/object.rb
CHANGED
@@ -143,7 +143,8 @@ module LIT
|
|
143
143
|
elsif type == AST::Type::Primitive::String ||
|
144
144
|
type == AST::Type::Primitive::Integer ||
|
145
145
|
type == AST::Type::Primitive::Float ||
|
146
|
-
type == AST::Type::Primitive::Boolean
|
146
|
+
type == AST::Type::Primitive::Boolean ||
|
147
|
+
type == AST::Type::Primitive::Unit
|
147
148
|
Module.new
|
148
149
|
elsif type.is_a?(AST::Type::Alias)
|
149
150
|
target_module = @target_module
|
@@ -36,7 +36,8 @@ module LIT
|
|
36
36
|
elsif type == AST::Type::Primitive::String ||
|
37
37
|
type == AST::Type::Primitive::Integer ||
|
38
38
|
type == AST::Type::Primitive::Float ||
|
39
|
-
type == AST::Type::Primitive::Boolean
|
39
|
+
type == AST::Type::Primitive::Boolean ||
|
40
|
+
type == AST::Type::Primitive::Unit
|
40
41
|
payload
|
41
42
|
else
|
42
43
|
deserialize(type::TYPE, payload)
|
data/lib/lit/serializer.rb
CHANGED
data/lib/lit/type_checker.rb
CHANGED
@@ -48,6 +48,10 @@ module LIT
|
|
48
48
|
unless value == true || value == false
|
49
49
|
raise TypeError, "expected #{value} to be a Boolean"
|
50
50
|
end
|
51
|
+
elsif type == AST::Type::Primitive::Unit
|
52
|
+
unless value.nil?
|
53
|
+
raise TypeError, "expected #{value} to be a Unit (nil)"
|
54
|
+
end
|
51
55
|
elsif type.is_a?(AST::Type::Primitive::Option)
|
52
56
|
if value.is_a?(::LIT::Object::Option::Some)
|
53
57
|
check_primitive_type!(type.type, value.value)
|
data/lib/lit/version.rb
CHANGED
data/litl.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
27
|
spec.require_paths = %w[lib]
|
28
28
|
|
29
|
-
spec.add_dependency "litl-parser",
|
29
|
+
spec.add_dependency "litl-parser", LIT::VERSION
|
30
30
|
|
31
31
|
spec.add_development_dependency "bundler", "~> 2.1"
|
32
32
|
spec.add_development_dependency "rake", "~> 13.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: litl
|
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
|
- Alexander
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-07-
|
12
|
+
date: 2020-07-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: litl-parser
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.1.
|
20
|
+
version: 0.1.1
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.1.
|
27
|
+
version: 0.1.1
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: bundler
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|