compass-rails 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +0 -1
- data/compass-rails.gemspec +1 -1
- data/lib/compass-rails/patches/4_0.rb +8 -0
- data/lib/compass-rails/version.rb +1 -1
- data/test/helpers/file_helper.rb +5 -5
- data/test/test_helper.rb +0 -1
- metadata +3 -2
data/Gemfile
CHANGED
data/compass-rails.gemspec
CHANGED
@@ -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
|
|
data/test/helpers/file_helper.rb
CHANGED
@@ -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,
|
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}#{
|
37
|
+
replace(file_name, Regexp.escape(anchor), "#{anchor}#{replacement}")
|
38
38
|
when :before
|
39
|
-
replace(file_name, Regexp.escape(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)
|
data/test/test_helper.rb
CHANGED
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.
|
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-
|
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
|