Skip to content

Commit

Permalink
Opal::Server should not search for an index.html path unless specified
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Jan 12, 2014
1 parent bf01576 commit 8514670
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -108,6 +108,8 @@

* Support '<' and '>' as matching pairs in string boundrys `%q<hi>`.

* `Opal::Server` no longer searches for an index file if not specified.

## 0.5.5 2013-11-25

* Fix regression: add `%i[foo bar]` style words back to lexer
Expand Down
8 changes: 0 additions & 8 deletions lib/opal/sprockets/server.rb
Expand Up @@ -128,19 +128,11 @@ def html
if @index_path
raise "index does not exist: #{@index_path}" unless File.exist?(@index_path)
Tilt.new(@index_path).render(self)
elsif index = search_html_path
Tilt.new(index).render(self)
else
::ERB.new(SOURCE).result binding
end
end

def search_html_path
%w[index.html index.html.haml index.html.erb].find do |path|
File.exist? path
end
end

def javascript_include_tag source
if @server.debug
assets = @server.sprockets[source].to_a
Expand Down

0 comments on commit 8514670

Please sign in to comment.