silicon 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd1808042898a077bd8f8c0b8d17c4587ced6256
|
4
|
+
data.tar.gz: 26ba1b428a0d9ed27cf7b3ef0659608847ea1cf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47ae3077a06e9525257cc42cffa675574c1f5bfd66387a2233f55722235781003e9aff6df55eafd4a515f4ef4aac86211c388bbe50ff7d6ac05c9317a2a022ea
|
7
|
+
data.tar.gz: a095fcf274a8e27b80077857ea408fdf303ae3c53a2a6c9faaada252248fb8c97f6f2ef5967662f6a3008c827c6a16041afc4525f172e41ba22c02693b3d14a6
|
@@ -1,13 +1,21 @@
|
|
1
1
|
module Syntax
|
2
2
|
class Command < Treetop::Runtime::SyntaxNode
|
3
|
-
attr_reader :name
|
3
|
+
attr_reader :name, :result_name
|
4
4
|
|
5
5
|
def parse
|
6
6
|
@is_async = text_value.start_with? '=*'
|
7
7
|
@is_parallel = text_value.start_with? '=>'
|
8
8
|
@is_sequential = text_value.start_with? '*>'
|
9
9
|
|
10
|
-
|
10
|
+
full_name = text_value.sub('*>', '').sub('=*', '').sub('=>', '')
|
11
|
+
|
12
|
+
if full_name.include? '@'
|
13
|
+
parts = full_name.split('@')
|
14
|
+
@result_name = parts[0]
|
15
|
+
@name = parts[1]
|
16
|
+
else
|
17
|
+
@name = full_name
|
18
|
+
end
|
11
19
|
|
12
20
|
self
|
13
21
|
end
|
@@ -6,6 +6,7 @@ require_relative 'syntax/primitives/http_verb'
|
|
6
6
|
require_relative 'syntax/primitives/http_status'
|
7
7
|
require_relative 'syntax/primitives/parameter'
|
8
8
|
require_relative 'syntax/primitives/path'
|
9
|
+
require_relative 'syntax/primitives/result_name'
|
9
10
|
|
10
11
|
require_relative 'syntax/action'
|
11
12
|
require_relative 'syntax/actions'
|
data/lib/silicon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: silicon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Kalinkin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hypo
|
@@ -245,6 +245,7 @@ files:
|
|
245
245
|
- lib/silicon/routing/syntax/primitives/indent.rb
|
246
246
|
- lib/silicon/routing/syntax/primitives/parameter.rb
|
247
247
|
- lib/silicon/routing/syntax/primitives/path.rb
|
248
|
+
- lib/silicon/routing/syntax/primitives/result_name.rb
|
248
249
|
- lib/silicon/routing/syntax/respond.rb
|
249
250
|
- lib/silicon/routing/syntax/route.rb
|
250
251
|
- lib/silicon/routing/syntax/sections.rb
|