ichiban 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/ichiban/file.rb CHANGED
@@ -120,7 +120,10 @@ module Ichiban
120
120
  deps.each do |dep|
121
121
  # dep is a path relative to the project root
122
122
  if File.exists?(File.join(Ichiban.project_root, dep))
123
- Ichiban::HTMLFile.new(dep).update
123
+ # Ignore partial templates
124
+ unless File.basename(dep).start_with?('_')
125
+ Ichiban::HTMLFile.new(dep).update
126
+ end
124
127
  else
125
128
  Dependencies.delete_dep('.layout_dependencies.json', dep)
126
129
  end
@@ -25,7 +25,7 @@ module Ichiban
25
25
 
26
26
  ctx = Ichiban::HTMLCompiler::Context.new(ivars_for_ctx)
27
27
 
28
- inner_html = Eruby.new(File.read(@html_file.abs)).evaluate(ctx)
28
+ inner_html = Eruby.new(File.read(@html_file.abs), :filename => @html_file.abs).evaluate(ctx)
29
29
 
30
30
  # Compile Markdown if necessary
31
31
  if (@html_file.abs.end_with?('.markdown') or @html_file.abs.end_with?('.md'))
@@ -35,8 +35,8 @@ module Ichiban
35
35
  # This is how Ichiban knows to re-run the script when one of the files changes. Pass in a path
36
36
  # relative to the project root.
37
37
  #
38
- # However, you don't need to declare dependencies for the templates the script uses. Those will\
39
- # automatically be tracked.
38
+ # However, you don't need to declare dependencies for the files in the html directory that the
39
+ # script uses. Those will automatically be tracked.
40
40
  def depends_on(ind_path)
41
41
  if ind_path.start_with?('/')
42
42
  raise(ArgumentError, 'depends_on must be passed a path relative to the project root, e.g. "data/employees.xml"')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ichiban
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: