compass-rails 2.0.0 → 2.0.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +64 -0
- data/Gemfile +1 -2
- data/README.md +2 -1
- data/Rakefile +1 -1
- data/compass-rails.gemspec +1 -1
- data/gemfiles/rails31.gemfile +0 -1
- data/gemfiles/rails32.gemfile +0 -1
- data/gemfiles/rails40.gemfile +0 -1
- data/lib/compass-rails/patches/3_1.rb +1 -10
- data/lib/compass-rails/patches/4_0.rb +9 -18
- data/lib/compass-rails/patches/compass.rb +1 -1
- data/lib/compass-rails/version.rb +1 -1
- data/lib/compass-rails.rb +18 -14
- metadata +7 -8
- data/changelog.markdown +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b3db69cd3f6e7ae24f00b4c4a62dc0de7812ce9
|
4
|
+
data.tar.gz: 99d55fb02db28aaff700d3503d28b98e02fdb921
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b9a899fb6aa8a8f05720ddacd9f0e18df6e300ea8da15ff6b742a7d21b5cd46da36efc9d535b6c7ff06f07c6c91b2270d6fd95988bcec29e00d3edd7a06f9ec
|
7
|
+
data.tar.gz: 53baf588260989ae998fe741dcad4221e595314016f328a9dc74afdfaee7547ca679910829a4c47cc13599a618362a6c39694427f95132a0fc71dd5a7104a49b
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# Change log
|
2
|
+
|
3
|
+
## 2.0.0 - 2014-07-10
|
4
|
+
### Added
|
5
|
+
- Support for Rails 4.2
|
6
|
+
- Allow newer sass-rails with Sass 3.3 support (see #160).
|
7
|
+
|
8
|
+
### Removed
|
9
|
+
- Rails 3.0 support.
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
- Properly bust the cache on image sprites within a sub-directory that
|
13
|
+
are imported with a wildcard (see #166).
|
14
|
+
|
15
|
+
## 1.1.7 - 2014-03-18
|
16
|
+
### Fixed
|
17
|
+
- Locked Sprockets version to 2.11.0 (see #146).
|
18
|
+
|
19
|
+
## 1.1.6 - 2014-03-11
|
20
|
+
### Fixed
|
21
|
+
- Leave bundle selection to rails environment.
|
22
|
+
|
23
|
+
## 1.1.5 - 2014-03-11
|
24
|
+
### Added
|
25
|
+
- Support for Ruby 2.1.0.
|
26
|
+
|
27
|
+
### Fixed
|
28
|
+
- Fixed `rails_loaded?` for when Rails is defined but no application is actually loaded.
|
29
|
+
|
30
|
+
## 1.1.4 - 2014-03-18
|
31
|
+
### Changed
|
32
|
+
- Simplified README.
|
33
|
+
|
34
|
+
## 1.1.3 - 2013-12-27
|
35
|
+
### Fixed
|
36
|
+
- No longer assuming asset pipeline is running when generating sprites.
|
37
|
+
|
38
|
+
## 1.1.2 - 2013-12-06
|
39
|
+
### Fixed
|
40
|
+
- Reverted fix for `generated_image_url` introduced in 1.1.0.
|
41
|
+
|
42
|
+
## 1.1.1 - 2013-12-05
|
43
|
+
### Added
|
44
|
+
- Support for Compass versions greater than 0.12.2.
|
45
|
+
|
46
|
+
## 1.1.0 - 2013-12-05
|
47
|
+
### Added
|
48
|
+
- Rails 4 support.
|
49
|
+
- Ruby 2.0 support.
|
50
|
+
|
51
|
+
### Fixed
|
52
|
+
- Allow compass-rails without asset pipeline on Rails 3.2.
|
53
|
+
- Fix `generated_image_url` when `generated_images_dir` is set.
|
54
|
+
|
55
|
+
### Removed
|
56
|
+
- Support for Ruby 1.8.7 and 1.9.2.
|
57
|
+
- Support for Rails 2.3.
|
58
|
+
|
59
|
+
## 1.0.3 - 2012-06-26
|
60
|
+
### Added
|
61
|
+
- Bumped Compass version to 0.12.2.
|
62
|
+
|
63
|
+
### Fixed
|
64
|
+
- `FixedStaticCompiler` hack so sprite source files dont show up in manifest.
|
data/Gemfile
CHANGED
@@ -4,14 +4,13 @@ source 'https://rubygems.org'
|
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
group :assets do
|
7
|
-
gem "compass", '~> 0.13.alpha.0'
|
8
7
|
gem "compass-rails", :path=>"."
|
9
8
|
gem 'compass-blueprint'
|
10
9
|
end
|
11
10
|
|
12
11
|
group :test do
|
13
12
|
gem 'mocha'
|
14
|
-
gem "appraisal"
|
13
|
+
gem "appraisal"
|
15
14
|
gem 'rainbow'
|
16
15
|
end
|
17
16
|
|
data/README.md
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
[](https://travis-ci.org/Compass/compass-rails)
|
6
6
|
[](https://codeclimate.com/github/Compass/compass-rails)
|
7
|
+
[](http://badge.fury.io/rb/compass-rails)
|
7
8
|
|
8
9
|
Compass rails is an adapter for the [Compass Stylesheet Authoring
|
9
10
|
Framework](http://compass-style.org) for [Ruby on Rails](http://rubyonrails.org/).
|
@@ -54,7 +55,7 @@ Use `application.css` to require files that use compass features. Ex:
|
|
54
55
|
|
55
56
|
If you have a compass configuration file (recommended) then you can
|
56
57
|
use the [Compass configuration
|
57
|
-
reference](http://compass-style.org/help/
|
58
|
+
reference](http://compass-style.org/help/documentation/configuration-reference/)
|
58
59
|
as is. If you choose to configure compass from your rails configuration
|
59
60
|
files, then you should understand that the compass configuration
|
60
61
|
options explained there will be methods and properties on the `config.compass`
|
data/Rakefile
CHANGED
data/compass-rails.gemspec
CHANGED
data/gemfiles/rails31.gemfile
CHANGED
data/gemfiles/rails32.gemfile
CHANGED
data/gemfiles/rails40.gemfile
CHANGED
@@ -1,17 +1,8 @@
|
|
1
1
|
require 'compass-rails/patches/compass'
|
2
2
|
require 'compass-rails/patches/static_compiler'
|
3
3
|
|
4
|
-
|
4
|
+
Compass::Core::SassExtensions::Functions::Urls::GeneratedImageUrl.module_eval do
|
5
5
|
def generated_image_url(path, only_path = nil)
|
6
6
|
asset_url(path, Sass::Script::String.new("image"))
|
7
7
|
end
|
8
8
|
end
|
9
|
-
|
10
|
-
module Sass::Script::Functions
|
11
|
-
include Compass::RailsImageFunctionPatch
|
12
|
-
end
|
13
|
-
|
14
|
-
# Wierd that this has to be re-included to pick up sub-modules. Ruby bug?
|
15
|
-
class Sass::Script::Functions::EvaluationContext
|
16
|
-
include Sass::Script::Functions
|
17
|
-
end
|
@@ -2,7 +2,7 @@ require 'compass-rails/patches/compass'
|
|
2
2
|
require 'compass-rails/patches/sass_importer'
|
3
3
|
require 'compass-rails/patches/sprite_importer'
|
4
4
|
|
5
|
-
|
5
|
+
Compass::Core::SassExtensions::Functions::Urls::GeneratedImageUrl.module_eval do
|
6
6
|
def generated_image_url(path, only_path = nil)
|
7
7
|
pathobject = Pathname.new(path.to_s)
|
8
8
|
subdirectory = pathobject.dirname.to_s
|
@@ -13,10 +13,10 @@ module Sass::Script::Functions
|
|
13
13
|
|
14
14
|
def cachebust_generated_images(image_path, subdirectory = nil)
|
15
15
|
generated_images_path = Rails.root.join(Compass.configuration.generated_images_dir).to_s
|
16
|
-
if subdirectory.nil?
|
17
|
-
|
16
|
+
if subdirectory.nil?
|
17
|
+
bust_cache_path = generated_images_path
|
18
18
|
else
|
19
|
-
|
19
|
+
bust_cache_path = generated_images_path + "/" + subdirectory
|
20
20
|
end
|
21
21
|
bust_image_stat_path = generated_images_path + "/" + image_path.to_s
|
22
22
|
|
@@ -24,22 +24,13 @@ module Sass::Script::Functions
|
|
24
24
|
|
25
25
|
# sprockets_entries.delete(generated_images_path) if sprockets_entries.has_key? generated_images_path
|
26
26
|
if sprockets_entries.has_key? generated_images_path
|
27
|
-
|
27
|
+
# sprockets_entries.delete(generated_images_path)
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
# Delete the entries (directories) which cache the files/dirs in a directory
|
30
|
+
options[:sprockets][:environment].send(:trail).instance_variable_get(:@entries).delete(bust_cache_path)
|
31
31
|
|
32
|
-
|
33
|
-
|
32
|
+
# Delete the stats (file/dir info) which cache the what kind of file/dir each image is
|
33
|
+
options[:sprockets][:environment].send(:trail).instance_variable_get(:@stats).delete(bust_image_stat_path)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
37
|
-
|
38
|
-
module Sass::Script::Functions
|
39
|
-
include Compass::RailsImageFunctionPatch
|
40
|
-
end
|
41
|
-
|
42
|
-
# Wierd that this has to be re-included to pick up sub-modules. Ruby bug?
|
43
|
-
class Sass::Script::Functions::EvaluationContext
|
44
|
-
include Sass::Script::Functions
|
45
|
-
end
|
data/lib/compass-rails.rb
CHANGED
@@ -14,17 +14,20 @@ module CompassRails
|
|
14
14
|
return true if rails_loaded?
|
15
15
|
return if defined?(::Rails) && ::Rails.respond_to?(:application) && !::Rails.application.nil?
|
16
16
|
|
17
|
-
|
18
|
-
|
17
|
+
rails_path = Dir.pwd
|
18
|
+
if File.exists?(File.join(rails_path, 'config', 'application.rb'))
|
19
19
|
raise 'Rails application not found' if rails_config_path == '/'
|
20
20
|
rails_config_path = File.join(rails_config_path, '..')
|
21
|
+
#load the rails config
|
22
|
+
require "#{rails_config_path}/config/application.rb"
|
23
|
+
require 'sass-rails'
|
24
|
+
require 'sprockets/railtie'
|
25
|
+
@app ||= ::Rails.application.initialize!
|
26
|
+
require 'rails/engine'
|
27
|
+
return true
|
21
28
|
end
|
22
|
-
|
23
|
-
|
24
|
-
require 'sass-rails'
|
25
|
-
require 'sprockets/railtie'
|
26
|
-
require 'rails/engine'
|
27
|
-
@app ||= ::Rails.application.initialize!
|
29
|
+
|
30
|
+
false
|
28
31
|
end
|
29
32
|
|
30
33
|
|
@@ -226,11 +229,12 @@ module CompassRails
|
|
226
229
|
|
227
230
|
end
|
228
231
|
|
229
|
-
|
230
|
-
Compass.
|
231
|
-
|
232
|
-
require "compass-rails/patches"
|
233
|
-
require "compass-rails/railties"
|
234
|
-
require "compass-rails/installer"
|
232
|
+
if defined?(::Rails)
|
233
|
+
Compass::AppIntegration.register(:rails, "::CompassRails")
|
234
|
+
Compass.add_configuration(CompassRails.boot_config)
|
235
235
|
|
236
|
+
require "compass-rails/patches"
|
237
|
+
require "compass-rails/railties"
|
238
|
+
require "compass-rails/installer"
|
239
|
+
end
|
236
240
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compass-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Davis
|
@@ -10,22 +10,22 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-10-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: compass
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - "
|
19
|
+
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 1.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- - "
|
26
|
+
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 1.0.0
|
29
29
|
description: Integrate Compass into Rails 3.0 and up.
|
30
30
|
email:
|
31
31
|
- jetviper21@gmail.com
|
@@ -38,12 +38,12 @@ files:
|
|
38
38
|
- ".gitignore"
|
39
39
|
- ".travis.yml"
|
40
40
|
- Appraisals
|
41
|
+
- CHANGELOG.md
|
41
42
|
- Gemfile
|
42
43
|
- Guardfile
|
43
44
|
- LICENSE
|
44
45
|
- README.md
|
45
46
|
- Rakefile
|
46
|
-
- changelog.markdown
|
47
47
|
- compass-rails.gemspec
|
48
48
|
- gemfiles/rails31.gemfile
|
49
49
|
- gemfiles/rails32.gemfile
|
@@ -113,4 +113,3 @@ test_files:
|
|
113
113
|
- test/integrations/rails_40_test.rb
|
114
114
|
- test/test_helper.rb
|
115
115
|
- test/units/.gitkeep
|
116
|
-
has_rdoc:
|