compass-rails 2.0.0 → 4.0.0

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.
Files changed (49) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.travis.yml +23 -4
  4. data/Appraisals +18 -9
  5. data/CHANGELOG.md +82 -0
  6. data/Gemfile +4 -8
  7. data/README.md +14 -12
  8. data/Rakefile +4 -23
  9. data/compass-rails.gemspec +3 -2
  10. data/gemfiles/rails52.gemfile +20 -0
  11. data/gemfiles/rails60.gemfile +21 -0
  12. data/gemfiles/rails_edge.gemfile +21 -0
  13. data/lib/compass-rails.rb +16 -125
  14. data/lib/compass-rails/patches.rb +0 -3
  15. data/lib/compass-rails/patches/3_1.rb +3 -12
  16. data/lib/compass-rails/patches/4_0.rb +23 -29
  17. data/lib/compass-rails/patches/compass.rb +3 -3
  18. data/lib/compass-rails/patches/importer.rb +10 -12
  19. data/lib/compass-rails/patches/sass_importer.rb +67 -7
  20. data/lib/compass-rails/patches/sprite_importer.rb +4 -4
  21. data/lib/compass-rails/railties.rb +1 -3
  22. data/lib/compass-rails/railties/3_1.rb +5 -12
  23. data/lib/compass-rails/railties/4_0.rb +11 -9
  24. data/lib/compass-rails/version.rb +1 -3
  25. data/test/compass_rails_spec.rb +58 -0
  26. data/test/fixtures/assets/images/letters/a.png +0 -0
  27. data/test/fixtures/assets/images/letters/b.png +0 -0
  28. data/test/fixtures/assets/images/numbers/sprite-1.png +0 -0
  29. data/test/fixtures/assets/images/numbers/sprite-2.png +0 -0
  30. data/test/fixtures/assets/stylesheets/application.css.scss +23 -0
  31. data/test/fixtures/assets/stylesheets/partials/_partial_1.scss +3 -0
  32. data/test/fixtures/assets/stylesheets/partials/_partial_2.scss +3 -0
  33. data/test/helpers/command_helper.rb +2 -15
  34. data/test/helpers/debug_helper.rb +1 -1
  35. data/test/helpers/file_helper.rb +2 -17
  36. data/test/helpers/rails_helper.rb +37 -38
  37. data/test/helpers/rails_project.rb +30 -70
  38. data/test/test_helper.rb +8 -3
  39. metadata +55 -24
  40. data/changelog.markdown +0 -11
  41. data/gemfiles/rails31.gemfile +0 -23
  42. data/gemfiles/rails32.gemfile +0 -23
  43. data/gemfiles/rails40.gemfile +0 -23
  44. data/lib/compass-rails/installer.rb +0 -30
  45. data/test/integrations/.gitkeep +0 -0
  46. data/test/integrations/rails_31_test.rb +0 -46
  47. data/test/integrations/rails_32_test.rb +0 -46
  48. data/test/integrations/rails_40_test.rb +0 -46
  49. data/test/units/.gitkeep +0 -0
data/changelog.markdown DELETED
@@ -1,11 +0,0 @@
1
- # Compass Rails
2
-
3
- ## 2.0.alpha.0
4
-
5
- * Removed rails 2.x support
6
- * Added Alpha support for rails 4
7
-
8
- ## 1.0.3
9
-
10
- * StaticCompiler hack so sprite source files dont show up in manifest
11
- * Compass version bump to 0.12.2
@@ -1,23 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rb-fsevent", :require=>false
6
- gem "ruby_gntp", :require=>false
7
- gem "guard"
8
- gem "guard-test"
9
- gem "rails", "3.1.3"
10
- gem "sass-rails"
11
-
12
- group :assets do
13
- gem "compass", "~> 0.13.alpha.0"
14
- gem "compass-rails", :path=>".."
15
- gem "compass-blueprint"
16
- end
17
- group :test do
18
- gem "mocha"
19
- gem "appraisal", :git=>"https://github.com/scottdavis/appraisal.git"
20
- gem "rainbow"
21
- end
22
-
23
- gemspec :path=>"../"
@@ -1,23 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rb-fsevent", :require=>false
6
- gem "ruby_gntp", :require=>false
7
- gem "guard"
8
- gem "guard-test"
9
- gem "rails", "~> 3.2"
10
- gem "sass-rails"
11
-
12
- group :assets do
13
- gem "compass", "~> 0.13.alpha.0"
14
- gem "compass-rails", :path=>".."
15
- gem "compass-blueprint"
16
- end
17
- group :test do
18
- gem "mocha"
19
- gem "appraisal", :git=>"https://github.com/scottdavis/appraisal.git"
20
- gem "rainbow"
21
- end
22
-
23
- gemspec :path=>"../"
@@ -1,23 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rb-fsevent", :require=>false
6
- gem "ruby_gntp", :require=>false
7
- gem "guard"
8
- gem "guard-test"
9
- gem "rails", "~> 4.0.0"
10
- gem "sass-rails"
11
-
12
- group :assets do
13
- gem "compass", "~> 0.13.alpha.0"
14
- gem "compass-rails", :path=>".."
15
- gem "compass-blueprint"
16
- end
17
- group :test do
18
- gem "mocha"
19
- gem "appraisal", :git=>"https://github.com/scottdavis/appraisal.git"
20
- gem "rainbow"
21
- end
22
-
23
- gemspec :path=>"../"
@@ -1,30 +0,0 @@
1
- module CompassRails
2
- class Installer < Compass::Installers::ManifestInstaller
3
-
4
- SASS_FILE_REGEX = %r{(.*)(?:\.css)?\.(sass|scss)}
5
-
6
- def completed_configuration
7
- @completed_configuration ||= CompassRails.configuration
8
- end
9
-
10
- def install_stylesheet(from, to, options)
11
- if CompassRails.rails_loaded? && CompassRails.asset_pipeline_enabled?
12
- _, name, ext = SASS_FILE_REGEX.match(to).to_a
13
- to = "#{name}.css.#{ext}"
14
- end
15
- super(from, to, options)
16
- end
17
-
18
- def write_configuration_files
19
- config_file = CompassRails.root.join('config', 'compass.rb')
20
- unless config_file.exist?
21
- write_file config_file.to_s, CompassRails.configuration.serialize
22
- end
23
- end
24
-
25
- def prepare
26
- write_configuration_files
27
- end
28
-
29
- end
30
- end
File without changes
@@ -1,46 +0,0 @@
1
- require 'test_helper'
2
-
3
- class Rails31Test < Test::Unit::TestCase
4
- include CompassRails::Test::RailsHelpers
5
-
6
- RAILS_VERSION = RAILS_3_1
7
-
8
- def test_rails_app_created
9
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
10
- assert project.boots?
11
- end
12
- end
13
-
14
- def test_installs_compass
15
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
16
- project.run_compass('init')
17
- assert project.has_config?
18
- assert project.has_screen_file?
19
- assert project.has_compass_import?
20
- end
21
- end
22
-
23
- def test_compass_compile
24
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
25
- project.run_compass('init')
26
- project.run_compass('compile')
27
- assert project.directory.join('public/assets/screen.css').exist?
28
- end
29
- end
30
-
31
- def test_install_blueprint
32
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
33
- project.run_compass('init')
34
- project.run_compass('install blueprint --force')
35
- assert project.directory.join('app/assets/stylesheets/partials').directory?
36
- end
37
- end
38
-
39
- def test_compass_preferred_syntax
40
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
41
- project.set_rails('sass.preferred_syntax', :sass)
42
- project.run_compass('init')
43
- assert project.directory.join('app/assets/stylesheets/screen.css.sass').exist?
44
- end
45
- end
46
- end
@@ -1,46 +0,0 @@
1
- require 'test_helper'
2
-
3
- class Rails32Test < Test::Unit::TestCase
4
- include CompassRails::Test::RailsHelpers
5
-
6
- RAILS_VERSION = RAILS_3_2
7
-
8
- def test_rails_app_created
9
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
10
- assert project.boots?
11
- end
12
- end
13
-
14
- def test_installs_compass
15
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
16
- project.run_compass('init')
17
- assert project.has_config?
18
- assert project.has_screen_file?
19
- assert project.has_compass_import?
20
- end
21
- end
22
-
23
- def test_compass_compile
24
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
25
- project.run_compass('init')
26
- project.run_compass('compile')
27
- assert project.directory.join('public/assets/screen.css').exist?
28
- end
29
- end
30
-
31
- def test_install_blueprint
32
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
33
- project.run_compass('init')
34
- project.run_compass('install blueprint --force')
35
- assert project.directory.join('app/assets/stylesheets/partials').directory?
36
- end
37
- end
38
-
39
- def test_compass_preferred_syntax
40
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
41
- project.set_rails('sass.preferred_syntax', :sass)
42
- project.run_compass('init')
43
- assert project.directory.join('app/assets/stylesheets/screen.css.sass').exist?
44
- end
45
- end
46
- end
@@ -1,46 +0,0 @@
1
- require 'test_helper'
2
-
3
- class Rails40Test < Test::Unit::TestCase
4
- include CompassRails::Test::RailsHelpers
5
-
6
- RAILS_VERSION = RAILS_4_0
7
-
8
- def test_rails_app_created
9
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
10
- assert project.boots?
11
- end
12
- end
13
-
14
- def test_installs_compass
15
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
16
- project.run_compass('init')
17
- assert project.has_config?
18
- assert project.has_screen_file?
19
- assert project.has_compass_import?
20
- end
21
- end
22
-
23
- def test_compass_compile
24
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
25
- project.run_compass('init')
26
- project.run_compass('compile')
27
- assert project.directory.join('public/assets/screen.css').exist?
28
- end
29
- end
30
-
31
- def test_install_blueprint
32
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
33
- project.run_compass('init')
34
- project.run_compass('install blueprint --force')
35
- assert project.directory.join('app/assets/stylesheets/partials').directory?
36
- end
37
- end
38
-
39
- def test_compass_preferred_syntax
40
- within_rails_app('test_railtie', RAILS_VERSION) do |project|
41
- project.set_rails('sass.preferred_syntax', :sass)
42
- project.run_compass('init')
43
- assert project.directory.join('app/assets/stylesheets/screen.css.sass').exist?
44
- end
45
- end
46
- end
data/test/units/.gitkeep DELETED
File without changes