roger_style_guide 0.1.0 → 0.1.1

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: 98bf55e4dc2bffd8851fbaeabcd31a7a2571ea52
4
- data.tar.gz: dffab5ce3db854d9b124835b625e7a499f4b25a9
3
+ metadata.gz: f1552321c45c294600ff1ac9ede732cff4a7e8a2
4
+ data.tar.gz: 50d9cba16e9184beaeb96c317c68aef15eb18d24
5
5
  SHA512:
6
- metadata.gz: 912505750d1ba054035deba579085b2c386552b24232a83709557b4ff2124334c3807e1c281b95b6878f9bf22252818017847354cc2fdb688b5ada42654b19d5
7
- data.tar.gz: f3dd6cd5fea0992eb85da5aaa8edeba3d0beeef52af399f409c517191a2b63662d8e9a0f56e89ed56f803c3628fdd70676cee98d1c3e31038b6d9f133216c982
6
+ metadata.gz: 5d79398e55a63c09c46a63109e1329ba34a61ceb91d29c835d13e97eb7c980cfe8388af411c6e455834236acfb204d0c1128dc08787911ac974707486feb4aad
7
+ data.tar.gz: 10a568c43fd8c148b163f83beba24cd2b6950c60df83490d8ef367e4d4000c60b4cdcf2a3ab72e986e98c68c9a699d91a0f7b0e9409c645c9016f098f8db0a51
@@ -4,8 +4,14 @@ module RogerStyleGuide::Templates::Mustache
4
4
  # Mustach template wrapper which handles partial
5
5
  # resolving.
6
6
  class MustacheTemplate < ::Mustache
7
+ attr_reader :template_context
8
+
7
9
  def render(template, data, template_context = nil)
8
- @template_context = template_context
10
+ if template_context
11
+ @template_context = template_context
12
+ elsif data.respond_to?(:template_context)
13
+ @template_context = data.template_context
14
+ end
9
15
  super(template, data)
10
16
  end
11
17
 
@@ -1,4 +1,4 @@
1
1
  # RogerStyleGuide Version
2
2
  module RogerStyleGuide
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roger_style_guide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flurin Egger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-29 00:00:00.000000000 Z
11
+ date: 2016-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roger