compass-rails 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -11,7 +11,6 @@ end
11
11
 
12
12
  group :test do
13
13
  gem 'mocha'
14
- gem 'shoulda-context'
15
14
  gem "appraisal", :git => 'https://github.com/scottdavis/appraisal.git'
16
15
  gem 'rainbow'
17
16
  end
@@ -2,7 +2,7 @@
2
2
  require File.expand_path('../lib/compass-rails/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
- gem.authors = ["Scott Davis", "Chris Eppstein"]
5
+ gem.authors = ["Scott Davis", "Chris Eppstein", "Craig McNamara"]
6
6
  gem.email = ["jetviper21@gmail.com", "chris@eppsteins.net", "craig.mcnamara@gmail.com"]
7
7
  gem.description = %q{Integrate Compass into Rails 3.0 and up.}
8
8
  gem.summary = %q{Integrate Compass into Rails 3.0 and up.}
@@ -1,9 +1,17 @@
1
1
  require 'compass-rails/patches/sass_importer'
2
2
  require 'compass-rails/patches/sprite_importer'
3
+
3
4
  module Sass::Script::Functions
4
5
  def generated_image_url(path, only_path = nil)
6
+ cachebust_generated_images
5
7
  asset_url(path)
6
8
  end
9
+
10
+ def cachebust_generated_images
11
+ generated_images_path = Rails.root.join(Compass.configuration.generated_images_dir).to_s
12
+ sprockets_entries = options[:sprockets][:environment].send(:trail).instance_variable_get(:@entries)
13
+ sprockets_entries.delete(generated_images_path) if sprockets_entries.has_key? generated_images_path
14
+ end
7
15
  end
8
16
 
9
17
 
@@ -1,5 +1,5 @@
1
1
  module CompassRails
2
2
  unless defined?(::CompassRails::VERSION)
3
- VERSION = "1.1.1"
3
+ VERSION = "1.1.2"
4
4
  end
5
5
  end
@@ -30,18 +30,18 @@ module CompassRails
30
30
  debug("Touching File: #{file}".foreground(:green))
31
31
  ::FileUtils.touch(file)
32
32
  end
33
-
34
- def inject_into_file(file_name, replacment, position, anchor)
33
+
34
+ def inject_into_file(file_name, replacement, position, anchor)
35
35
  case position
36
36
  when :after
37
- replace(file_name, Regexp.escape(anchor), "#{anchor}#{replacment}")
37
+ replace(file_name, Regexp.escape(anchor), "#{anchor}#{replacement}")
38
38
  when :before
39
- replace(file_name, Regexp.escape(anchor), "#{replacment}#{anchor}")
39
+ replace(file_name, Regexp.escape(anchor), "#{replacement}#{anchor}")
40
40
  else
41
41
  raise Compass::FilesystemConflict.new("You need to specify :before or :after")
42
42
  end
43
43
  end
44
-
44
+
45
45
  def replace(destination, regexp, string)
46
46
  content = File.read(destination)
47
47
  content.gsub!(Regexp.new(regexp), string)
@@ -1,7 +1,6 @@
1
1
  require 'test/unit'
2
2
  require 'compass-rails'
3
3
  require 'rainbow'
4
- require 'shoulda-context'
5
4
  module CompassRails
6
5
  module Test
7
6
  ROOT_PATH = File.expand_path('../../', __FILE__)
metadata CHANGED
@@ -2,15 +2,16 @@
2
2
  name: compass-rails
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.1.1
5
+ version: 1.1.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Scott Davis
9
9
  - Chris Eppstein
10
+ - Craig McNamara
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2013-12-05 00:00:00.000000000 Z
14
+ date: 2013-12-06 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  version_requirements: !ruby/object:Gem::Requirement