Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
Let the people know what file path failed the compile
Browse files Browse the repository at this point in the history
  • Loading branch information
pboling committed Feb 12, 2013
1 parent 6cc90a5 commit 77cf93a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/requirejs/rails/builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
module Requirejs::Rails
class Builder
# config should be an instance of Requirejs::Rails::Config

def initialize(config)
@config = config
end
def build

def build
@config.tmp_dir
end

def digest_for(path)
Rails.application.assets.file_digest(path).hexdigest
rescue StandardError => e
raise ArgumentError, "digest_for(#{path}) failed with #{e.class}: #{e.message}\n#{e.backtrace[0..4].join("\n")}"
end

def generate_rjs_driver
Expand All @@ -26,4 +28,4 @@ def generate_rjs_driver
end
end
end
end
end

0 comments on commit 77cf93a

Please sign in to comment.