Permalink
Browse files

removed source_files and made more readable

  • Loading branch information...
1 parent b995e61 commit e41013174845854d165a6509a2b1f4ddf08f459c @pferdefleisch committed May 12, 2011
Showing with 7 additions and 7 deletions.
  1. +6 −6 lib/guard/sprockets.rb
  2. +1 −1 lib/guard/sprockets/version.rb
View
12 lib/guard/sprockets.rb
@@ -25,13 +25,13 @@ def run_on_change(paths)
private
def sprocketize(path)
- parts = path.split('/')
- file = parts.pop
- parts.pop
- @destination ||= parts.join('/')
+ parts = path.split('/')
+ file = parts.pop
+ source_dir = "#{parts[0...-1].join('/')}/*"
+ destination = parts[1..-1].join('/')
+ @destination ||= destination
secretary = ::Sprockets::Secretary.new(
:asset_root => "#{parts.first}",
- :load_path => ["#{parts.join('/')}/src/*"],
:source_files => ["#{path}"],
:interpolate_constants => false
)
@@ -44,4 +44,4 @@ def sprocketize(path)
UI.info "Sprockets creating file #{@destination}/#{file}"
end
end
-end
+end
View
2 lib/guard/sprockets/version.rb
@@ -1,6 +1,6 @@
# encoding: utf-8
module Guard
module Sprockets
- VERSION = '0.1.3'
+ VERSION = '0.1.4'
end
end

0 comments on commit e410131

Please sign in to comment.