curtain 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/curtain.gemspec +1 -1
- data/lib/curtain/rendering.rb +9 -5
- data/lib/curtain/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76a0e30a14b36615e4051fe02acfe3c22f266db2
|
4
|
+
data.tar.gz: 167657c18fdc50df7ce398922679c51fca4c5b4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 657ee9044430f617ce6fe9f096123230bf4b39aa0cad2ee239ac5fc7bc2c0abddb09b98490d6c0234dad7b3c4ffb7dea2a174607416f074b45ba1336cc358f36
|
7
|
+
data.tar.gz: b3b686a8a60106a95a21e9dcf5a31874ded6e2c1fbb74a0090f44402d4a8918304cb47d0390a1066dba32dba38eba0e1a36fff7448317dd2c2a6530933707729
|
data/curtain.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
|
|
12
12
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
13
13
|
gem.name = "curtain"
|
14
14
|
gem.require_paths = ["lib"]
|
15
|
-
gem.version = "0.3.
|
15
|
+
gem.version = "0.3.2"
|
16
16
|
|
17
17
|
gem.add_runtime_dependency "activesupport"
|
18
18
|
gem.add_runtime_dependency "tilt"
|
data/lib/curtain/rendering.rb
CHANGED
@@ -28,11 +28,7 @@ module Curtain
|
|
28
28
|
# @return [String] The result of rendering the template
|
29
29
|
# @see #default_template_name
|
30
30
|
def render(*args)
|
31
|
-
name =
|
32
|
-
self.class.template
|
33
|
-
else
|
34
|
-
args.first.to_s
|
35
|
-
end
|
31
|
+
name = get_template_name(*args)
|
36
32
|
|
37
33
|
locals = args.last.is_a?(Hash) ? args.last : {}
|
38
34
|
|
@@ -55,5 +51,13 @@ module Curtain
|
|
55
51
|
ensure
|
56
52
|
@output_buffer = orig_buffer
|
57
53
|
end
|
54
|
+
|
55
|
+
def get_template_name(*args)
|
56
|
+
if args.length == 0 || args.first.is_a?(Hash)
|
57
|
+
self.class.template
|
58
|
+
else
|
59
|
+
args.first.to_s
|
60
|
+
end
|
61
|
+
end
|
58
62
|
end
|
59
63
|
end
|
data/lib/curtain/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: curtain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
173
|
version: '0'
|
174
174
|
requirements: []
|
175
175
|
rubyforge_project:
|
176
|
-
rubygems_version: 2.
|
176
|
+
rubygems_version: 2.4.5
|
177
177
|
signing_key:
|
178
178
|
specification_version: 4
|
179
179
|
summary: A template rendering framework
|