deas-erubis 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/deas-erubis.gemspec +3 -3
- data/lib/deas-erubis/source.rb +5 -1
- data/lib/deas-erubis/version.rb +1 -1
- data/test/helper.rb +9 -0
- data/test/unit/source_tests.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 05e87846e97f40eef052aca4ee79b73b030b94f6
|
4
|
-
data.tar.gz: e10a30275cb69eb9c806632f6c4f14a1eff92cd8
|
5
2
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66f4c5101b45fe0e4742278694e16786b03da1fefb72d3d300d6748cfb5b2d7155ad6c0d683bb20802fd878b008fdeada59a6573e4c3fbc21fb02d50fab85d02
|
4
|
+
data.tar.gz: 12f730c5a530028dfd53c35d17add2172579c9fbfe1aae907811d657e2ad5a1457caa39bbf435cc036177653a6866c71d740d568dad7b406b409a37784ac4c9b
|
5
|
+
SHA1:
|
6
|
+
metadata.gz: c111edaaadbc0c9873e9696da2955898bbffde23
|
7
|
+
data.tar.gz: b604c286bc55ec33c883fec4ddba0e3971bf44c6
|
data/deas-erubis.gemspec
CHANGED
@@ -18,10 +18,10 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
19
|
gem.require_paths = ["lib"]
|
20
20
|
|
21
|
-
gem.add_development_dependency("assert", ["~> 2.
|
21
|
+
gem.add_development_dependency("assert", ["~> 2.16.1"])
|
22
22
|
|
23
|
-
gem.add_dependency("deas", ["~> 0.
|
23
|
+
gem.add_dependency("deas", ["~> 0.41.0"])
|
24
24
|
gem.add_dependency("erubis")
|
25
|
-
gem.add_dependency("much-plugin", ["~> 0.
|
25
|
+
gem.add_dependency("much-plugin", ["~> 0.2.0"])
|
26
26
|
|
27
27
|
end
|
data/lib/deas-erubis/source.rb
CHANGED
@@ -60,7 +60,11 @@ module Deas::Erubis
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def source_file_path(name)
|
63
|
-
Dir.glob(self.root.join(
|
63
|
+
Dir.glob(self.root.join(source_file_glob_string(name))).first
|
64
|
+
end
|
65
|
+
|
66
|
+
def source_file_glob_string(name)
|
67
|
+
!@ext.nil? && name.end_with?(@ext) ? name : "#{name}*#{@ext}"
|
64
68
|
end
|
65
69
|
|
66
70
|
def build_context_class(opts)
|
data/lib/deas-erubis/version.rb
CHANGED
data/test/helper.rb
CHANGED
@@ -15,3 +15,12 @@ TEMPLATE_CACHE_ROOT = ROOT.join('tmp/templates')
|
|
15
15
|
require 'pry'
|
16
16
|
|
17
17
|
require 'test/support/factory'
|
18
|
+
|
19
|
+
# 1.8.7 backfills
|
20
|
+
|
21
|
+
# Array#sample
|
22
|
+
if !(a = Array.new).respond_to?(:sample) && a.respond_to?(:choice)
|
23
|
+
class Array
|
24
|
+
alias_method :sample, :choice
|
25
|
+
end
|
26
|
+
end
|
data/test/unit/source_tests.rb
CHANGED
@@ -128,7 +128,7 @@ class Deas::Erubis::Source
|
|
128
128
|
class RenderTests < InitTests
|
129
129
|
desc "`render` method"
|
130
130
|
setup do
|
131
|
-
@template_name = ['basic', 'basic_alt'].
|
131
|
+
@template_name = ['basic', 'basic_alt'].sample
|
132
132
|
@file_locals = {
|
133
133
|
'name' => Factory.string,
|
134
134
|
'local1' => Factory.integer
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deas-erubis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
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-
|
13
|
+
date: 2016-06-15 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: assert
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 2.
|
22
|
+
version: 2.16.1
|
23
23
|
type: :development
|
24
24
|
version_requirements: *id001
|
25
25
|
- !ruby/object:Gem::Dependency
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.
|
32
|
+
version: 0.41.0
|
33
33
|
type: :runtime
|
34
34
|
version_requirements: *id002
|
35
35
|
- !ruby/object:Gem::Dependency
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.
|
53
|
+
version: 0.2.0
|
54
54
|
type: :runtime
|
55
55
|
version_requirements: *id004
|
56
56
|
description: Deas template engine for rendering erb templates using Erubis
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
requirements: []
|
113
113
|
|
114
114
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.
|
115
|
+
rubygems_version: 2.6.4
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: Deas template engine for rendering erb templates using Erubis
|