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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f895f62e1cc994558d1d583d1db92eda609113bf
4
- data.tar.gz: 714dc7b3a310b1d8f633ef842ba05c4abda87d26
3
+ metadata.gz: 76a0e30a14b36615e4051fe02acfe3c22f266db2
4
+ data.tar.gz: 167657c18fdc50df7ce398922679c51fca4c5b4b
5
5
  SHA512:
6
- metadata.gz: 7d4d590d5dbee75ff7fb8fd823f72bbb7aaae1a5553eccb9dbafa4f4023b8e22235f14f9ea23632a78ae856d126a6d79e5d5d8953f07df4af46caf2b1e693964
7
- data.tar.gz: 81327cfdd3e0d6cf14818dc4793a1a8f1c949391607db5debd4929a8087223c239210e1d887a89e07ab71be7faccb20d5ef1cffc975a17eeb33308b3b9451681
6
+ metadata.gz: 657ee9044430f617ce6fe9f096123230bf4b39aa0cad2ee239ac5fc7bc2c0abddb09b98490d6c0234dad7b3c4ffb7dea2a174607416f074b45ba1336cc358f36
7
+ data.tar.gz: b3b686a8a60106a95a21e9dcf5a31874ded6e2c1fbb74a0090f44402d4a8918304cb47d0390a1066dba32dba38eba0e1a36fff7448317dd2c2a6530933707729
@@ -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.1"
15
+ gem.version = "0.3.2"
16
16
 
17
17
  gem.add_runtime_dependency "activesupport"
18
18
  gem.add_runtime_dependency "tilt"
@@ -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 = if args.length == 0 || args.first.is_a?(Hash)
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
@@ -1,3 +1,3 @@
1
1
  module Curtain
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
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.1
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: 2014-10-17 00:00:00.000000000 Z
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.2.2
176
+ rubygems_version: 2.4.5
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: A template rendering framework