deas-nm 0.5.1 → 0.5.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
  SHA512:
3
- data.tar.gz: cf38b20964548ee3ba398d91412d768b48663a38fda1d4d661b204aa105166e5e8f81961cc37b2fd83b8646aafaf09cfa71a3f4a59666614cdfd780683dc47e8
4
- metadata.gz: 7347aacc6f5efa94ce17943cc90a61352fe22ba0e4d2b3dbb24237426ea26bd207a795095ecc24734d6c7ad7507530e3508f197f0523cd6580c9993cbb87de68
3
+ metadata.gz: 15f1545a230a863ab2fc2ab3f5eb72f77c0225580ade4eeba3c10c261762f877b5b90a725d0087b98afc0d8d336cac4d4b58b5b44db1027fae6dc2dc424689d0
4
+ data.tar.gz: 8008534b39d682e28b2a62674391e0b24e994de9eee8a7c726728c6fc8f21c19a8cab3c3f22f64b4f246026d00ebcb060280876250a6771b4931486d499517e9
5
5
  SHA1:
6
- data.tar.gz: 85285bd674dd5eac71873660e6acb70c0b1def7a
7
- metadata.gz: be29fcc2fd3ab1382c7f48d6da245eb89e413209
6
+ metadata.gz: 7240c957edc173f2aeecf46d08b3f82f2b9cbde6
7
+ data.tar.gz: 5e6e8f735e1abf2655ea2a7a80c1162702d60f25
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
20
20
 
21
21
  gem.add_development_dependency("assert", ["~> 2.15.1"])
22
22
 
23
- gem.add_dependency("deas", ["~> 0.39.2"])
24
- gem.add_dependency("nm", ["~> 0.5.1"])
23
+ gem.add_dependency("deas", ["~> 0.40.0"])
24
+ gem.add_dependency("nm", ["~> 0.5.2"])
25
25
 
26
26
  end
@@ -13,6 +13,7 @@ module Deas::Nm
13
13
  def nm_source
14
14
  @nm_source ||= Nm::Source.new(self.source_path, {
15
15
  :cache => self.opts['cache'],
16
+ :ext => self.opts['ext'],
16
17
  :locals => { self.nm_logger_local => self.logger }
17
18
  })
18
19
  end
@@ -1,4 +1,4 @@
1
1
  module Deas; end
2
2
  module Deas::Nm
3
- VERSION = "0.5.1"
3
+ VERSION = "0.5.2"
4
4
  end
@@ -0,0 +1,4 @@
1
+ # This files is just to provide a conflict when rendering. If deas-nm isn't
2
+ # passing an extension down to nm then nm will try and render this file which
3
+ # will error.
4
+ raise "oops - trying to render wrong template"
@@ -14,7 +14,8 @@ class Deas::Nm::TemplateEngine
14
14
 
15
15
  @engine = Deas::Nm::TemplateEngine.new({
16
16
  'source_path' => TEST_SUPPORT_PATH,
17
- 'serializer' => proc{ |obj, template_name| obj.to_s }
17
+ 'ext' => 'nm',
18
+ 'serializer' => proc{ |obj, template_name| obj.to_s }
18
19
  })
19
20
  end
20
21
  subject{ @engine }
@@ -10,7 +10,8 @@ class Deas::Nm::TemplateEngine
10
10
  desc "Deas::Nm::TemplateEngine"
11
11
  setup do
12
12
  @engine = Deas::Nm::TemplateEngine.new({
13
- 'source_path' => TEST_SUPPORT_PATH
13
+ 'source_path' => TEST_SUPPORT_PATH,
14
+ 'ext' => 'nm'
14
15
  })
15
16
  end
16
17
  subject{ @engine }
@@ -44,6 +45,12 @@ class Deas::Nm::TemplateEngine
44
45
  assert_kind_of Hash, engine.nm_source.cache
45
46
  end
46
47
 
48
+ should "pass any given ext option to the Nm source" do
49
+ ext = Factory.string
50
+ engine = Deas::Nm::TemplateEngine.new('ext' => ext)
51
+ assert_equal ".#{ext}", engine.nm_source.ext
52
+ end
53
+
47
54
  should "use 'logger' as the logger local name by default" do
48
55
  assert_equal 'logger', subject.nm_logger_local
49
56
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deas-nm
3
3
  version: &id003 !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Redding
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2016-04-05 00:00:00 Z
13
+ date: 2016-04-11 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: assert
@@ -29,7 +29,7 @@ dependencies:
29
29
  requirements:
30
30
  - - ~>
31
31
  - !ruby/object:Gem::Version
32
- version: 0.39.2
32
+ version: 0.40.0
33
33
  type: :runtime
34
34
  version_requirements: *id002
35
35
  - !ruby/object:Gem::Dependency
@@ -63,6 +63,7 @@ files:
63
63
  - test/helper.rb
64
64
  - test/support/_partial.json.nm
65
65
  - test/support/factory.rb
66
+ - test/support/template.json.aaa
66
67
  - test/support/template.json.nm
67
68
  - test/support/template_partial.json.nm
68
69
  - test/system/template_engine_tests.rb
@@ -98,6 +99,7 @@ test_files:
98
99
  - test/helper.rb
99
100
  - test/support/_partial.json.nm
100
101
  - test/support/factory.rb
102
+ - test/support/template.json.aaa
101
103
  - test/support/template.json.nm
102
104
  - test/support/template_partial.json.nm
103
105
  - test/system/template_engine_tests.rb