skylight 0.2.0.beta.1 → 0.2.0.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/skylight/normalizers.rb +7 -4
- data/lib/skylight/normalizers/send_file.rb +6 -2
- data/lib/skylight/railtie.rb +1 -1
- data/lib/skylight/subscriber.rb +1 -1
- data/lib/skylight/version.rb +1 -1
- data/lib/sql_lexer/lexer.rb +7 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eff1d9d8e44d8af2a98286288aec951a38720666
|
4
|
+
data.tar.gz: 6092bd5bbe56c2061083f0b335305ca0665e5fa1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43a42aef2eccd54531eb14186ceda1b480d06568cb6ccc91fd516be7f9fe9ff11a162dc2db8668d48c0b61e81f2844e9936f2799292f48392d6c0979af776dff
|
7
|
+
data.tar.gz: 52079fa8a4a2a6c32913681088059f216769098ff1e5553b8d3b38ff074695616a52e635b6ca1265ccaba743c1e86df4ac805be9bd89ff479a475c8c13a75ace
|
data/lib/skylight/normalizers.rb
CHANGED
@@ -46,14 +46,16 @@ module Skylight
|
|
46
46
|
|
47
47
|
def normalize_render(category, payload, annotations)
|
48
48
|
if path = payload[:identifier]
|
49
|
-
title = relative_path(path)
|
49
|
+
title = relative_path(path, annotations)
|
50
50
|
path = nil if path == title
|
51
51
|
end
|
52
52
|
|
53
|
-
[ category, title,
|
53
|
+
[ category, title, nil, annotations ]
|
54
54
|
end
|
55
55
|
|
56
|
-
def relative_path(path)
|
56
|
+
def relative_path(path, annotations)
|
57
|
+
return path if Pathname.new(path).relative?
|
58
|
+
|
57
59
|
root = @paths.find { |p| path.start_with?(p) }
|
58
60
|
|
59
61
|
if root
|
@@ -61,7 +63,8 @@ module Skylight
|
|
61
63
|
relative = relative[1..-1] if relative.start_with?("/")
|
62
64
|
relative
|
63
65
|
else
|
64
|
-
path
|
66
|
+
annotations[:skylight_error] = ["absolute_path", path]
|
67
|
+
"Absolute Path"
|
65
68
|
end
|
66
69
|
end
|
67
70
|
end
|
@@ -20,8 +20,12 @@ module Skylight
|
|
20
20
|
disposition: normalize_disposition(payload),
|
21
21
|
status: normalize_status(payload) }
|
22
22
|
|
23
|
-
|
24
|
-
|
23
|
+
title = "send file"
|
24
|
+
|
25
|
+
# depending on normalization, we probably want this to eventually
|
26
|
+
# include the full path, but we need to make sure we have a good
|
27
|
+
# deduping strategy first.
|
28
|
+
desc = nil
|
25
29
|
|
26
30
|
[ "app.controller.send_file", title, desc, annotations ]
|
27
31
|
end
|
data/lib/skylight/railtie.rb
CHANGED
@@ -43,7 +43,7 @@ module Skylight
|
|
43
43
|
configure_logging(config, app)
|
44
44
|
|
45
45
|
config['agent.sockfile_path'] = tmp
|
46
|
-
config['normalizers.render.view_paths'] = existent_paths(app.config.paths["app/views"])
|
46
|
+
config['normalizers.render.view_paths'] = existent_paths(app.config.paths["app/views"]) + [Rails.root.to_s]
|
47
47
|
config.validate!
|
48
48
|
config
|
49
49
|
|
data/lib/skylight/subscriber.rb
CHANGED
data/lib/skylight/version.rb
CHANGED
data/lib/sql_lexer/lexer.rb
CHANGED
@@ -18,13 +18,13 @@ module SqlLexer
|
|
18
18
|
OptWS = %Q<[#{WS}]*>
|
19
19
|
|
20
20
|
InOp = %q<IN>
|
21
|
-
SpecialOps = %Q<#{InOp}>
|
21
|
+
SpecialOps = %Q<#{InOp}(?=[#{WS}])>
|
22
22
|
|
23
23
|
StartQuotedID = %Q<">
|
24
24
|
StartTickedID = %Q<`>
|
25
25
|
StartString = %Q<'>
|
26
26
|
StartDigit = %q<[\p{Digit}\.]>
|
27
|
-
StartBind = %Q<#{StartString}|#{StartDigit}|#{SpecialOps}>
|
27
|
+
StartBind = %Q<#{StartString}|#{StartDigit}|#{SpecialOps}|N(?=ULL(?:[#{WS}]|#{OpPart}))>
|
28
28
|
StartNonBind = %Q<#{StartQuotedID}|#{StartTickedID}|\\$(?=\\p{Digit})>
|
29
29
|
TableNext = %Q<(#{OptWS}((?=#{StartQuotedID})|(?=#{StartTickedID}))|[#{WS}]+(?=[#{StartID}]))>
|
30
30
|
StartAnyId = %Q<"#{StartID}>
|
@@ -39,7 +39,8 @@ module SqlLexer
|
|
39
39
|
NonBind = %Q<#{ID}|#{Op}|#{QuotedID}|#{TickedID}|#{Placeholder}>
|
40
40
|
QuotedTable = %Q<#{TickedID}|#{QuotedID}>
|
41
41
|
|
42
|
-
|
42
|
+
StringBody = %q<(?:''|\x5C'|[^'])*>
|
43
|
+
String = %Q<#{StartString}#{StringBody}'>
|
43
44
|
|
44
45
|
Digits = %q<\p{Digit}+>
|
45
46
|
OptDigits = %q<\p{Digit}*>
|
@@ -51,6 +52,8 @@ module SqlLexer
|
|
51
52
|
|
52
53
|
Number = %Q<#{HeadDecimal}|#{TailDecimal}|#{ExpDecimal}|#{Digits}>
|
53
54
|
|
55
|
+
Null = %Q<NULL(?=(?:[#{WS}]|#{OpPart}))>
|
56
|
+
|
54
57
|
TkWS = %r<[#{WS}]+>
|
55
58
|
TkOptWS = %r<[#{WS}]*>
|
56
59
|
TkOp = %r<[#{OpPart}]>
|
@@ -63,7 +66,7 @@ module SqlLexer
|
|
63
66
|
TkFromTable = %r<FROM#{TableNext}>i
|
64
67
|
TkID = %r<#{ID}>
|
65
68
|
TkEnd = %r<;?[#{WS}]*>
|
66
|
-
TkBind = %r<#{String}|#{Number}>
|
69
|
+
TkBind = %r<#{String}|#{Number}|#{Null}>
|
67
70
|
TkIn = %r<#{InOp}>i
|
68
71
|
TkSpecialOp = %r<#{SpecialOps}>i
|
69
72
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skylight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.beta.
|
4
|
+
version: 0.2.0.beta.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tilde, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|