skylight-core 3.1.4 → 3.1.5

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
  SHA256:
3
- metadata.gz: df3ec461ddd41697f525347a5321300d4c4fd414466405edf173bd8224f8422d
4
- data.tar.gz: b8d4602521b419866e94d1799639331e49fa256e550af7806cdc4a5e6aa057cd
3
+ metadata.gz: b1bff6f694c07d0d3b51b9c6e204c0b8a773975f400bd0267b7bdcd8196f26f3
4
+ data.tar.gz: 1187010fff1083dbfab549871ff5d69f68227e3dc6dc94e66f0807cfeff3b2a0
5
5
  SHA512:
6
- metadata.gz: ddda351c0978c6f3114ecc7fe2dc1a05ea38754931cdf7574c3534112c35928a862bfe99ee740a18d678e78976d6066cc6b81eaeb531ded763679a511b773c90
7
- data.tar.gz: 6513777f0659db9ea52c9b29487358efa45a9642170cabb76f4b82d8efca467f8ee38e5980ba3ce7ee5f934f9192d78fc54950a20c709f27dab7f9782832e9f4
6
+ metadata.gz: 037f6038e8f7c9608b1a0096cd63708c331f90340e50de56a6975909b49dc71daf5c6f334716e5ed345114aa1db8e1c8c42e43784d34c150215610b6a48e4dc6
7
+ data.tar.gz: 19d2b4f48531891e4924522fd5df46a5d7a6abb021768f4b8d3ac5d2810252387f03b712573b0ded27af1f3447280aba7910fb4acf1e2a259c57a557d728e6e1
@@ -6,11 +6,18 @@ module Skylight::Core
6
6
  ::ActionView::TemplateRenderer.class_eval do
7
7
  alias render_with_layout_without_sk render_with_layout
8
8
 
9
- def render_with_layout(path, locals, *args, &block) #:nodoc:
9
+ def render_with_layout(*args, &block) #:nodoc:
10
+ path, locals = case args.length
11
+ when 2
12
+ args
13
+ when 4
14
+ [args[1], args[3]]
15
+ end
16
+
10
17
  layout = nil
11
18
 
12
19
  if path
13
- if ::ActionView.gem_version >= Gem::Version.new('5.x')
20
+ if ::ActionView::VERSION::MAJOR >= 5
14
21
  layout = find_layout(path, locals.keys, [formats.first])
15
22
  else
16
23
  layout = find_layout(path, locals.keys)
@@ -19,10 +26,10 @@ module Skylight::Core
19
26
 
20
27
  if layout
21
28
  instrument(:template, :identifier => layout.identifier) do
22
- render_with_layout_without_sk(path, locals, *args, &block)
29
+ render_with_layout_without_sk(*args, &block)
23
30
  end
24
31
  else
25
- render_with_layout_without_sk(path, locals, *args, &block)
32
+ render_with_layout_without_sk(*args, &block)
26
33
  end
27
34
  end
28
35
  end
@@ -1,6 +1,6 @@
1
1
  module Skylight
2
2
  module Core
3
- VERSION = '3.1.4'
3
+ VERSION = '3.1.5'
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skylight-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.4
4
+ version: 3.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tilde, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-24 00:00:00.000000000 Z
11
+ date: 2019-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -267,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
267
267
  - !ruby/object:Gem::Version
268
268
  version: '0'
269
269
  requirements: []
270
- rubygems_version: 3.0.2
270
+ rubygems_version: 3.0.3
271
271
  signing_key:
272
272
  specification_version: 4
273
273
  summary: The core methods of the Skylight profiler.