rubyhtmlapp 0.0.4 → 0.0.5

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: d0f5688ccfaed49b594b240fdd426a0d6a31e6d1
4
- data.tar.gz: fafaab8ae29358f4bec6a9330692026f91c9553b
3
+ metadata.gz: d7c7b1e73ca1e3257928028192f45f4fcfeff433
4
+ data.tar.gz: 18c856b58081d421e5c289a36edd2d5026ab1120
5
5
  SHA512:
6
- metadata.gz: 1bcee26f2e8a2d590c0c6a471a0cb94206c2256995e6265877e1cdd8b9f4802abf6923cf36cc0d224d860780a1c13960059700edf6e2676493811f478b53fc32
7
- data.tar.gz: 15478db0e37a66c3381cfed7a09cf8174837226d68b8fa8ab1d1407abd8feaf221ea02297667096d8ed25d5a7ca7b246ca9d2fd670efd71cc4e838533ed570d7
6
+ metadata.gz: 150f2ba84b699a081ae6e8bd43af602556517cbfde9eec174b1a29e70db96437fd7d1b933132feaea621fddc62982d57542ec054c8988d8186001d2718c707ab
7
+ data.tar.gz: a8cd7bbf1158f60ee2cb50ab3e9ba055a4d8ed483f9b2863ca3e991097cc580a331fb08f2e50e269ecaf784147e3de2b5145d9f680feb491eabc73ad2ddd99a3
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ *~
@@ -5,12 +5,12 @@ require 'find'
5
5
  module RubyHtmlApp
6
6
  module Helpers
7
7
  def render(partial, locals={}, &block)
8
- Tilt.new(find_f(@partial_path, "_#{partial}.html*")).render(self, locals, &block)
8
+ Tilt.new(find_f(@partial_path, /_#{partial}.html[a-z\.0-9]*$/i)).render(self, locals, &block)
9
9
  end
10
10
 
11
11
  def include_dir(dir, locals={}, &block)
12
12
  html = ""
13
- find_f_each(File.join(@partial_path, dir), "*.html*") do |f|
13
+ find_f_each(File.join(@partial_path, dir), /[0-9a-z]{1}\.html[a-z\.0-9]*$/i) do |f|
14
14
  html.concat(Tilt.new(f).render(self, locals, &block))
15
15
  end
16
16
  return html
@@ -23,14 +23,14 @@ module RubyHtmlApp
23
23
 
24
24
  def find_f(path, pattern)
25
25
  Find.find(path) do |f|
26
- return f if File.fnmatch?(pattern, File.basename(f))
26
+ return f if File.basename(f).match(pattern)
27
27
  end
28
28
  nil
29
29
  end
30
30
 
31
31
  def find_f_each(path, pattern)
32
32
  Find.find(path) do |f|
33
- yield(f) if File.fnmatch?(pattern, File.basename(f))
33
+ yield(f) if File.basename(f).match(pattern)
34
34
  end
35
35
  end
36
36
  end
@@ -1,3 +1,3 @@
1
1
  module RubyHtmlApp
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyhtmlapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Curtis Bissonnette
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-14 00:00:00.000000000 Z
11
+ date: 2013-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler