itamae 1.1.21 → 1.1.22

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: f8ab8492929dca714931a8898845c203370215d0
4
- data.tar.gz: 1075296012cb00ad48506bea4e8101b76a3c6cfe
3
+ metadata.gz: 7efcc0396e05beaf599275ab88cf1b20ed65d47a
4
+ data.tar.gz: 9edcaac351f83ffbb98eef6cad3a1d195c0cb7c3
5
5
  SHA512:
6
- metadata.gz: a470b3e5f74bcbc0969bb682e694bca957340ca394fec1b25e796f37728027a820aad5d21902461e45b2225bc76a5e77d5257278c083870efea6e79309665b22
7
- data.tar.gz: 7ff44e211b70694e20c7f979987114fb2fb8e0aa93e68424630cad16c35ab7779226e72c07ab8e6b5b80fd0f54dcefd34b1cd2cea225742ceba3db9fa67f2b64
6
+ metadata.gz: 16b5b28f6080716683a502e8cb80be696fa3f92a6041741856fb0636a246eae76af79660f281c57deac34745864b29514c054d0df68378da81ca9c0eebf7542e
7
+ data.tar.gz: 76977772addd4da398b207f28e6be09cbfe59bdf9be33289b906c93e45e4f8171771eb1edfbb28d3dbd8b4e067b817e937902bb88e08fd5088db7d007ccfde1f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v1.1.22
2
+
3
+ Improvements
4
+
5
+ - `source :auto` accepts a template without .erb extention.
6
+
1
7
  ## v1.1.21
2
8
 
3
9
  Bugfixes
@@ -24,12 +24,14 @@ module Itamae
24
24
 
25
25
  searched_paths = []
26
26
  dirs.size.times do |i|
27
- path = ::File.join(@recipe.dir, source_file_dir, "#{dirs[i..-1].join("/")}#{source_file_ext}")
28
- if ::File.exist?(path)
29
- Logger.debug "#{path} is used as a source file."
30
- return path
31
- else
32
- searched_paths << path
27
+ source_file_exts.each do |ext|
28
+ path = ::File.join(@recipe.dir, source_file_dir, "#{dirs[i..-1].join("/")}#{ext}")
29
+ if ::File.exist?(path)
30
+ Logger.debug "#{path} is used as a source file."
31
+ return path
32
+ else
33
+ searched_paths << path
34
+ end
33
35
  end
34
36
  end
35
37
 
@@ -43,8 +45,8 @@ module Itamae
43
45
  "files"
44
46
  end
45
47
 
46
- def source_file_ext
47
- ""
48
+ def source_file_exts
49
+ [""]
48
50
  end
49
51
  end
50
52
  end
@@ -23,8 +23,8 @@ module Itamae
23
23
  "templates"
24
24
  end
25
25
 
26
- def source_file_ext
27
- ".erb"
26
+ def source_file_exts
27
+ [".erb", ""]
28
28
  end
29
29
 
30
30
  class RenderContext
@@ -1 +1 @@
1
- 1.1.21
1
+ 1.1.22
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.21
4
+ version: 1.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai