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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 05e87846e97f40eef052aca4ee79b73b030b94f6
4
- data.tar.gz: e10a30275cb69eb9c806632f6c4f14a1eff92cd8
5
2
  SHA512:
6
- metadata.gz: 3126c4599310a15840838be33c4396349b5712fbaecbf6151ff2a81b300d5d1f677c3f873b50f5bb4c84c5f489ca0680d54b01c147acdd065052b3c9a4e578bb
7
- data.tar.gz: 659d77c67276550f8942c06cfe7f6d6180f669fcaba94e635e4067f5f832813daf62eef516490d6a9a91b6b33fe5aafe0b8acd9c733127f5629344b437fe373a
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.15.1"])
21
+ gem.add_development_dependency("assert", ["~> 2.16.1"])
22
22
 
23
- gem.add_dependency("deas", ["~> 0.40.0"])
23
+ gem.add_dependency("deas", ["~> 0.41.0"])
24
24
  gem.add_dependency("erubis")
25
- gem.add_dependency("much-plugin", ["~> 0.1.0"])
25
+ gem.add_dependency("much-plugin", ["~> 0.2.0"])
26
26
 
27
27
  end
@@ -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(name.end_with?(@ext) ? name : "#{name}*#{@ext}")).first
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)
@@ -1,4 +1,4 @@
1
1
  module Deas; end
2
2
  module Deas::Erubis
3
- VERSION = "0.5.2"
3
+ VERSION = "0.5.3"
4
4
  end
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
@@ -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'].choice
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.2
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-04-11 00:00:00 Z
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.15.1
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.40.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.1.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.5.1
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