deas-nm 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +8 -0
- data/deas-nm.gemspec +2 -2
- data/lib/deas-nm.rb +2 -1
- data/lib/deas-nm/version.rb +1 -1
- data/test/unit/template_engine_tests.rb +5 -0
- metadata +10 -10
data/README.md
CHANGED
@@ -62,6 +62,14 @@ c.template_source "/path/to/templates" do |s|
|
|
62
62
|
end
|
63
63
|
```
|
64
64
|
|
65
|
+
Nm doesn't cache templates by default. To enable caching, pass a `'cache'` option when registering:
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
c.template_source "/path/to/templates" do |s|
|
69
|
+
s.engine 'nm', Deas::Nm::TemplateEngine, 'cache' => true
|
70
|
+
end
|
71
|
+
```
|
72
|
+
|
65
73
|
## Installation
|
66
74
|
|
67
75
|
Add this line to your application's Gemfile:
|
data/deas-nm.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
|
21
21
|
gem.add_development_dependency("assert", ["~> 2.12"])
|
22
22
|
|
23
|
-
gem.add_dependency("deas", ["~> 0.
|
24
|
-
gem.add_dependency("nm", ["~> 0.
|
23
|
+
gem.add_dependency("deas", ["~> 0.30"])
|
24
|
+
gem.add_dependency("nm", ["~> 0.5"])
|
25
25
|
|
26
26
|
end
|
data/lib/deas-nm.rb
CHANGED
data/lib/deas-nm/version.rb
CHANGED
@@ -39,6 +39,11 @@ class Deas::Nm::TemplateEngine
|
|
39
39
|
assert_equal handler_local, engine.nm_handler_local
|
40
40
|
end
|
41
41
|
|
42
|
+
should "pass any given cache option to the Nm source" do
|
43
|
+
engine = Deas::Nm::TemplateEngine.new('cache' => true)
|
44
|
+
assert_kind_of Hash, engine.nm_source.cache
|
45
|
+
end
|
46
|
+
|
42
47
|
should "use 'logger' as the logger local name by default" do
|
43
48
|
assert_equal 'logger', subject.nm_logger_local
|
44
49
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deas-nm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 4
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.4.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kelly Redding
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2015-
|
19
|
+
date: 2015-02-04 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
requirement: &id001 !ruby/object:Gem::Requirement
|
@@ -39,11 +39,11 @@ dependencies:
|
|
39
39
|
requirements:
|
40
40
|
- - ~>
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
hash:
|
42
|
+
hash: 55
|
43
43
|
segments:
|
44
44
|
- 0
|
45
|
-
-
|
46
|
-
version: "0.
|
45
|
+
- 30
|
46
|
+
version: "0.30"
|
47
47
|
type: :runtime
|
48
48
|
name: deas
|
49
49
|
version_requirements: *id002
|
@@ -54,11 +54,11 @@ dependencies:
|
|
54
54
|
requirements:
|
55
55
|
- - ~>
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
hash:
|
57
|
+
hash: 1
|
58
58
|
segments:
|
59
59
|
- 0
|
60
|
-
-
|
61
|
-
version: "0.
|
60
|
+
- 5
|
61
|
+
version: "0.5"
|
62
62
|
type: :runtime
|
63
63
|
name: nm
|
64
64
|
version_requirements: *id003
|