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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b64f9d0eb45e48301e2b937366229e63bc339af3
4
- data.tar.gz: 39656e4d86ac0d4f3496101643105fba58fdf4a6
3
+ metadata.gz: eff1d9d8e44d8af2a98286288aec951a38720666
4
+ data.tar.gz: 6092bd5bbe56c2061083f0b335305ca0665e5fa1
5
5
  SHA512:
6
- metadata.gz: 3fe73155548f5bca71d6fab4049809fe354c8c6b205f9e26001595dd6454920a3c3fdbcab7b224a6069336ab25c3d38090f19133ba4665b523d63ca120ca0b6f
7
- data.tar.gz: f6f4ab23ae9c2771d2eb702725e54dce515885319e13b442e02db549af99a349014cb45b17e370125e79b2f412005cd239e919c4ab266839cba9ab8aca49e1ce
6
+ metadata.gz: 43a42aef2eccd54531eb14186ceda1b480d06568cb6ccc91fd516be7f9fe9ff11a162dc2db8668d48c0b61e81f2844e9936f2799292f48392d6c0979af776dff
7
+ data.tar.gz: 52079fa8a4a2a6c32913681088059f216769098ff1e5553b8d3b38ff074695616a52e635b6ca1265ccaba743c1e86df4ac805be9bd89ff479a475c8c13a75ace
@@ -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, path, annotations ]
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
- # These will eventually be different
24
- title = desc = "send file: #{path}"
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
@@ -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
 
@@ -40,7 +40,7 @@ module Skylight
40
40
 
41
41
  cat, title, desc, annot = normalize(trace, name, payload)
42
42
 
43
- if cat != :skip && error = annot[:skylight_error]
43
+ if cat != :skip && error = annot.delete(:skylight_error)
44
44
  @instrumenter.error(*error)
45
45
  end
46
46
 
@@ -1,4 +1,4 @@
1
1
  module Skylight
2
- VERSION = '0.2.0.beta.1'
2
+ VERSION = '0.2.0.beta.2'
3
3
  end
4
4
 
@@ -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
- String = %Q<#{StartString}(?:[^']|'')*'>
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.1
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-10-30 00:00:00.000000000 Z
11
+ date: 2013-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport