trestle-auth 0.4.1 → 0.4.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f832127b8855a20f54f8864a8e85389953e7fa1c3ac62c6fe04f18b545ecbeeb
|
4
|
+
data.tar.gz: 824a202d4c14c5a6de29106d95873cb0a168dc98c13e69641b129d1be96d11e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84760577a9abb2bddc4fa050b611b00236d698433b1c85f8dad72c4eab783c0315099d058fc2219cad2806d450b3d976c3a0675cda26913e13f91c50758be446
|
7
|
+
data.tar.gz: d22504002dc580c1a8fcfac296dff35299510d063eb10e59dab2d3e0b76b624e93650162ae8032c6f1170ee583aa6bbf7d3b90fc73a03ae1d5ae92e00bda8c6e
|
@@ -52,12 +52,20 @@ module Trestle
|
|
52
52
|
path = File.expand_path(find_in_source_paths(path.to_s))
|
53
53
|
context = options.delete(:context) || instance_eval("binding")
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
content = capturable_erb.tap do |erb|
|
55
|
+
content = capturable_erb(path).tap do |erb|
|
58
56
|
erb.filename = path
|
59
57
|
end.result(context)
|
60
58
|
end
|
59
|
+
|
60
|
+
def capturable_erb(path)
|
61
|
+
match = ERB.version.match(/(\d+\.\d+\.\d+)/)
|
62
|
+
|
63
|
+
if match && match[1] >= "2.2.0" # Ruby 2.6+
|
64
|
+
CapturableERB.new(::File.binread(path), trim_mode: "-", eoutvar: "@output_buffer")
|
65
|
+
else
|
66
|
+
CapturableERB.new(::File.binread(path), nil, "-", "@output_buffer")
|
67
|
+
end
|
68
|
+
end
|
61
69
|
end
|
62
70
|
end
|
63
71
|
end
|
data/lib/trestle/auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trestle-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Pohlenz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trestle
|