Skip to content

Commit

Permalink
Merge branch 'master' of github.com:metaskills/less-rails
Browse files Browse the repository at this point in the history
Conflicts:
	CHANGELOG.md
	lib/less/rails/import_processor.rb
  • Loading branch information
metaskills committed Feb 16, 2012
2 parents a6477f9 + 2fc8a68 commit aca5148
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -3,6 +3,8 @@ rvm:
- 1.9.2
- 1.9.3
- ree
before_install:
- gem update --system
gemfile:
- Gemfile.rails-3.1
- Gemfile.rails-3.2
7 changes: 6 additions & 1 deletion CHANGELOG.md
@@ -1,11 +1,16 @@
CHANGELOG
=========

2.1.4 - (unreleased)
2.1.6 - (unreleased)

* Nested imports recursively declare sprockets dependencies. Fixes #26.


2.1.4, 2.1.5 - 01/31/2012

* More friendly import processor with missing files. Fixes #13.


2.1.3 - 01/23/2012

* Make sure vendor/assets/stylesheets .less files work.
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
@@ -1,4 +1,4 @@
eval File.read('Gemfile.rails-3.1')
eval File.read('Gemfile.rails-3.2')

group :test do
if RUBY_PLATFORM =~ /darwin/
Expand Down
13 changes: 7 additions & 6 deletions lib/less/rails/import_processor.rb
Expand Up @@ -15,12 +15,13 @@ def evaluate(scope, locals, &block)
def depend_on(scope, data)
import_paths = data.scan(IMPORT_SCANNER).flatten.compact.uniq
import_paths.each do |path|
asset = scope.environment[path]
if asset && asset.pathname.to_s.ends_with?('.less')
scope.depend_on_asset(asset.pathname)
d = File.read asset.pathname
depend_on scope, d
end
pathname = begin
scope.resolve(path)
rescue Sprockets::FileNotFound
nil
end
scope.depend_on(path) if pathname && pathname.to_s.ends_with?('.less')
depend_on scope, File.read(pathname) if pathname
end
data
end
Expand Down
2 changes: 1 addition & 1 deletion lib/less/rails/version.rb
@@ -1,5 +1,5 @@
module Less
module Rails
VERSION = "2.1.3"
VERSION = "2.1.5"
end
end

0 comments on commit aca5148

Please sign in to comment.