sass-rails 3.2.6 → 4.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +11 -6
- data/CHANGELOG.md +6 -0
- data/Gemfile +2 -8
- data/README.markdown +1 -1
- data/Rakefile +17 -0
- data/lib/sass/rails.rb +1 -6
- data/lib/sass/rails/helpers.rb +18 -40
- data/lib/sass/rails/importer.rb +23 -85
- data/lib/sass/rails/railtie.rb +1 -17
- data/lib/sass/rails/version.rb +1 -1
- data/sass-rails.gemspec +9 -7
- data/sass-rails.gemspec.erb +27 -0
- data/test/fixtures/alternate_config_project/app/assets/stylesheets/application.css.scss +2 -2
- data/test/fixtures/alternate_config_project/config/environments/development.rb +1 -2
- data/test/fixtures/alternate_config_project/config/environments/test.rb +1 -2
- data/test/fixtures/engine_project/engine_project.gemspec +2 -2
- data/test/fixtures/engine_project/test/dummy/config/environments/development.rb +0 -3
- data/test/fixtures/engine_project/test/dummy/config/environments/test.rb +0 -3
- data/test/fixtures/sass_project/Gemfile +1 -1
- data/test/fixtures/sass_project/config/environments/development.rb +0 -3
- data/test/fixtures/sass_project/config/environments/test.rb +0 -3
- data/test/fixtures/scss_project/Gemfile +1 -1
- data/test/fixtures/scss_project/app/assets/stylesheets/application.css.scss +2 -2
- data/test/fixtures/scss_project/config/environments/development.rb +1 -2
- data/test/fixtures/scss_project/config/environments/test.rb +0 -3
- data/test/sass_rails_logger_test.rb +2 -2
- data/test/sass_rails_test.rb +37 -28
- data/test/support/sass_rails_test_case.rb +3 -4
- data/test/test_helper.rb +1 -3
- metadata +53 -21
- checksums.yaml +0 -7
- data/lib/sass/rails/template_handlers.rb +0 -117
data/.travis.yml
CHANGED
@@ -1,12 +1,17 @@
|
|
1
|
+
language: ruby
|
1
2
|
rvm:
|
2
|
-
- 1.8.7
|
3
|
-
- 1.9.2
|
4
3
|
- 1.9.3
|
5
|
-
|
6
|
-
- jruby
|
7
|
-
- rbx
|
4
|
+
before_install: gem install bundler
|
8
5
|
script: bundle exec rake test
|
9
6
|
notifications:
|
10
7
|
email: false
|
8
|
+
irc:
|
9
|
+
on_success: change
|
10
|
+
on_failure: always
|
11
|
+
channels:
|
12
|
+
- "irc.freenode.org#rails-contrib"
|
11
13
|
campfire:
|
12
|
-
|
14
|
+
on_success: change
|
15
|
+
on_failure: always
|
16
|
+
rooms:
|
17
|
+
- secure: "CGWvthGkBKNnTnk9YSmf9AXKoiRI33fCl5D3jU4nx3cOPu6kv2R9nMjt9EAo\nOuS4Q85qNSf4VNQ2cUPNiNYSWQ+XiTfivKvDUw/QW9r1FejYyeWarMsSBWA+\n0fADjF1M2dkDIVLgYPfwoXEv7l+j654F1KLKB69F0F/netwP9CQ="
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -3,15 +3,9 @@ source "http://rubygems.org"
|
|
3
3
|
# Specify your gem's dependencies in sass-rails.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
#
|
7
|
-
gem "rails", :
|
6
|
+
# Track Rails master
|
7
|
+
gem "rails", github: 'rails/rails', branch: 'master'
|
8
8
|
|
9
9
|
gem "sqlite3"
|
10
10
|
|
11
11
|
gem "sfl", "~> 2.0"
|
12
|
-
gem "mocha"
|
13
|
-
|
14
|
-
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
|
15
|
-
# gem 'ruby-debug'
|
16
|
-
# gem 'ruby-debug19'
|
17
|
-
|
data/README.markdown
CHANGED
data/Rakefile
CHANGED
@@ -10,3 +10,20 @@ Rake::TestTask.new(:test) do |t|
|
|
10
10
|
t.verbose = false
|
11
11
|
end
|
12
12
|
|
13
|
+
desc 'Default: run unit tests.'
|
14
|
+
task :default => :test
|
15
|
+
|
16
|
+
specname = "sass-rails.gemspec"
|
17
|
+
deps = `git ls-files`.split("\n") - [specname]
|
18
|
+
|
19
|
+
file specname => deps do
|
20
|
+
files = `git ls-files`.split("\n")
|
21
|
+
test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
22
|
+
executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
23
|
+
|
24
|
+
require 'erb'
|
25
|
+
|
26
|
+
File.open specname, 'w:utf-8' do |f|
|
27
|
+
f.write ERB.new(File.read("#{specname}.erb")).result(binding)
|
28
|
+
end
|
29
|
+
end
|
data/lib/sass/rails.rb
CHANGED
@@ -1,16 +1,11 @@
|
|
1
1
|
module Sass
|
2
|
-
autoload :Script, 'sass/rails/helpers'
|
3
|
-
|
4
2
|
module Rails
|
5
3
|
autoload :CssCompressor, 'sass/rails/compressor'
|
6
|
-
autoload :Importer, 'sass/rails/importer'
|
7
4
|
autoload :Logger, 'sass/rails/logger'
|
8
|
-
autoload :Resolver, 'sass/rails/template_handlers'
|
9
|
-
autoload :SassTemplate, 'sass/rails/template_handlers'
|
10
|
-
autoload :ScssTemplate, 'sass/rails/template_handlers'
|
11
5
|
end
|
12
6
|
end
|
13
7
|
|
14
8
|
require 'sass/rails/version'
|
15
9
|
require 'sass/rails/helpers'
|
10
|
+
require 'sass/rails/importer'
|
16
11
|
require 'sass/rails/railtie'
|
data/lib/sass/rails/helpers.rb
CHANGED
@@ -1,52 +1,30 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
module Helpers
|
1
|
+
require 'sprockets/sass_functions'
|
2
|
+
require 'active_support/deprecation'
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
def asset_path(asset, kind)
|
11
|
-
Sass::Script::String.new(public_path(asset.value, kind.value), true)
|
12
|
-
end
|
13
|
-
|
14
|
-
def asset_url(asset, kind)
|
15
|
-
Sass::Script::String.new(%Q{url(#{public_path(asset.value, kind.value)})})
|
16
|
-
end
|
17
|
-
|
18
|
-
[:image, :video, :audio, :javascript, :stylesheet, :font].each do |asset_class|
|
19
|
-
class_eval %Q{
|
20
|
-
def #{asset_class}_path(asset)
|
21
|
-
Sass::Script::String.new(resolver.#{asset_class}_path(asset.value), true)
|
22
|
-
end
|
23
|
-
def #{asset_class}_url(asset)
|
24
|
-
Sass::Script::String.new("url(" + resolver.#{asset_class}_path(asset.value) + ")")
|
25
|
-
end
|
26
|
-
}, __FILE__, __LINE__ - 6
|
27
|
-
end
|
4
|
+
module Sprockets
|
5
|
+
module SassFunctions
|
6
|
+
if instance_methods.map(&:to_sym).include?(:asset_path)
|
7
|
+
undef_method :asset_path
|
8
|
+
end
|
28
9
|
|
29
|
-
|
10
|
+
def asset_path(path, kind = nil)
|
11
|
+
ActiveSupport::Deprecation.warn "asset_path with two arguments is deprecated. Use asset_path(#{path}) instead." if kind
|
30
12
|
|
31
|
-
|
32
|
-
options[:custom][:resolver]
|
13
|
+
Sass::Script::String.new(sprockets_context.asset_path(path.value), :string)
|
33
14
|
end
|
34
15
|
|
35
|
-
|
36
|
-
|
16
|
+
if instance_methods.map(&:to_sym).include?(:asset_url)
|
17
|
+
undef_method :asset_url
|
37
18
|
end
|
38
19
|
|
39
|
-
def
|
40
|
-
|
41
|
-
|
20
|
+
def asset_url(path, kind = nil)
|
21
|
+
ActiveSupport::Deprecation.warn "asset_url with two arguments is deprecated. Use asset_url(#{path}) instead." if kind
|
22
|
+
|
23
|
+
Sass::Script::String.new("url(" + sprockets_context.asset_path(path.value) + ")")
|
42
24
|
end
|
43
|
-
end
|
44
|
-
end
|
45
25
|
|
46
|
-
|
47
|
-
|
48
|
-
module Functions
|
49
|
-
include Sass::Rails::Helpers
|
26
|
+
def asset_data_url(path)
|
27
|
+
Sass::Script::String.new("url(" + sprockets_context.asset_data_uri(path.value) + ")")
|
50
28
|
end
|
51
29
|
end
|
52
30
|
end
|
data/lib/sass/rails/importer.rb
CHANGED
@@ -1,80 +1,41 @@
|
|
1
|
-
require 'sprockets'
|
1
|
+
require 'sprockets/sass_importer'
|
2
2
|
|
3
|
-
module
|
4
|
-
class
|
3
|
+
module Sprockets
|
4
|
+
class SassImporter < Sass::Importers::Filesystem
|
5
5
|
GLOB = /\*|\[.+\]/
|
6
|
-
PARTIAL = /^_/
|
7
|
-
HAS_EXTENSION = /\.css(.s[ac]ss)?$/
|
8
6
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
attr_reader :context
|
16
|
-
|
17
|
-
def initialize(context)
|
18
|
-
@context = context
|
19
|
-
@resolver = Resolver.new(context)
|
20
|
-
end
|
21
|
-
|
22
|
-
def sass_file?(filename)
|
23
|
-
filename = filename.to_s
|
24
|
-
SASS_EXTENSIONS.keys.any?{|ext| filename[ext]}
|
25
|
-
end
|
26
|
-
|
27
|
-
def syntax(filename)
|
28
|
-
filename = filename.to_s
|
29
|
-
SASS_EXTENSIONS.each {|ext, syntax| return syntax if filename[(ext.size+2)..-1][ext]}
|
30
|
-
nil
|
7
|
+
def extensions
|
8
|
+
{
|
9
|
+
"css" => :scss,
|
10
|
+
"css.sass" => :sass,
|
11
|
+
"css.scss" => :scss
|
12
|
+
}.merge!(super)
|
31
13
|
end
|
32
14
|
|
33
|
-
def
|
34
|
-
name = Pathname.new(name)
|
35
|
-
if base_pathname && base_pathname.to_s.size > 0
|
36
|
-
root = Pathname.new(context.root_path)
|
37
|
-
name = base_pathname.relative_path_from(root).join(name)
|
38
|
-
end
|
39
|
-
partial_name = name.dirname.join("_#{name.basename}")
|
40
|
-
@resolver.resolve(name) || @resolver.resolve(partial_name)
|
41
|
-
end
|
42
|
-
|
43
|
-
def find_relative(name, base, options)
|
44
|
-
base_pathname = Pathname.new(base)
|
15
|
+
def find_relative_with_glob(name, base, options)
|
45
16
|
if name =~ GLOB
|
46
|
-
glob_imports(name,
|
47
|
-
elsif pathname = resolve(name, base_pathname.dirname)
|
48
|
-
context.depend_on(pathname)
|
49
|
-
if sass_file?(pathname)
|
50
|
-
Sass::Engine.new(pathname.read, options.merge(:filename => pathname.to_s, :importer => self, :syntax => syntax(pathname)))
|
51
|
-
else
|
52
|
-
Sass::Engine.new(@resolver.process(pathname), options.merge(:filename => pathname.to_s, :importer => self, :syntax => :scss))
|
53
|
-
end
|
17
|
+
glob_imports(name, Pathname.new(base), options)
|
54
18
|
else
|
55
|
-
|
19
|
+
find_relative_without_glob(name, base, options)
|
56
20
|
end
|
57
21
|
end
|
22
|
+
alias_method :find_relative_without_glob, :find_relative
|
23
|
+
alias_method :find_relative, :find_relative_with_glob
|
58
24
|
|
59
|
-
def
|
25
|
+
def find_with_glob(name, options)
|
60
26
|
if name =~ GLOB
|
61
27
|
nil # globs must be relative
|
62
|
-
elsif pathname = resolve(name)
|
63
|
-
context.depend_on(pathname)
|
64
|
-
if sass_file?(pathname)
|
65
|
-
Sass::Engine.new(pathname.read, options.merge(:filename => pathname.to_s, :importer => self, :syntax => syntax(pathname)))
|
66
|
-
else
|
67
|
-
Sass::Engine.new(@resolver.process(pathname), options.merge(:filename => pathname.to_s, :importer => self, :syntax => :scss))
|
68
|
-
end
|
69
28
|
else
|
70
|
-
|
29
|
+
find_without_glob(name, options)
|
71
30
|
end
|
72
31
|
end
|
32
|
+
alias_method :find_without_glob, :find
|
33
|
+
alias_method :find, :find_with_glob
|
73
34
|
|
74
35
|
def each_globbed_file(glob, base_pathname, options)
|
75
36
|
Dir["#{base_pathname}/#{glob}"].sort.each do |filename|
|
76
37
|
next if filename == options[:filename]
|
77
|
-
yield filename if File.directory?(filename) || context.asset_requirable?(filename)
|
38
|
+
yield filename if File.directory?(filename) || @context.asset_requirable?(filename)
|
78
39
|
end
|
79
40
|
end
|
80
41
|
|
@@ -82,9 +43,9 @@ module Sass::Rails
|
|
82
43
|
contents = ""
|
83
44
|
each_globbed_file(glob, base_pathname.dirname, options) do |filename|
|
84
45
|
if File.directory?(filename)
|
85
|
-
context.depend_on(filename)
|
86
|
-
elsif context.asset_requirable?(filename)
|
87
|
-
context.depend_on(filename)
|
46
|
+
@context.depend_on(filename)
|
47
|
+
elsif @context.asset_requirable?(filename)
|
48
|
+
@context.depend_on(filename)
|
88
49
|
contents << "@import #{Pathname.new(filename).relative_path_from(base_pathname.dirname).to_s.inspect};\n"
|
89
50
|
end
|
90
51
|
end
|
@@ -95,28 +56,5 @@ module Sass::Rails
|
|
95
56
|
:syntax => :scss
|
96
57
|
))
|
97
58
|
end
|
98
|
-
|
99
|
-
def mtime(name, options)
|
100
|
-
if name =~ GLOB && options[:filename]
|
101
|
-
mtime = nil
|
102
|
-
each_globbed_file(name, Pathname.new(options[:filename]).dirname, options) do |p|
|
103
|
-
mtime ||= File.mtime(p)
|
104
|
-
mtime = [mtime, File.mtime(p)].max
|
105
|
-
end
|
106
|
-
mtime
|
107
|
-
elsif pathname = resolve(name)
|
108
|
-
pathname.mtime
|
109
|
-
end
|
110
|
-
end
|
111
|
-
|
112
|
-
def key(name, options)
|
113
|
-
["Sprockets:" + File.dirname(File.expand_path(name)), File.basename(name)]
|
114
|
-
end
|
115
|
-
|
116
|
-
def to_s
|
117
|
-
"Sass::Rails::Importer(#{context.pathname})"
|
118
|
-
end
|
119
|
-
|
120
59
|
end
|
121
|
-
|
122
|
-
end
|
60
|
+
end
|
data/lib/sass/rails/railtie.rb
CHANGED
@@ -28,17 +28,6 @@ module Sass::Rails
|
|
28
28
|
# to the rails generate command
|
29
29
|
config.app_generators.stylesheet_engine config.sass.preferred_syntax
|
30
30
|
|
31
|
-
config.before_initialize do |app|
|
32
|
-
require 'sass'
|
33
|
-
|
34
|
-
if app.config.assets.enabled
|
35
|
-
require 'sprockets'
|
36
|
-
Sprockets::Engines #force autoloading
|
37
|
-
Sprockets.register_engine '.sass', Sass::Rails::SassTemplate
|
38
|
-
Sprockets.register_engine '.scss', Sass::Rails::ScssTemplate
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
31
|
# Remove the sass middleware if it gets inadvertently enabled by applications.
|
43
32
|
config.after_initialize do |app|
|
44
33
|
app.config.middleware.delete(Sass::Plugin::Rack) if defined?(Sass::Plugin::Rack)
|
@@ -62,16 +51,11 @@ module Sass::Rails
|
|
62
51
|
config.sass.full_exception = app.config.consider_all_requests_local
|
63
52
|
end
|
64
53
|
|
65
|
-
if app.assets
|
66
|
-
app.assets.context_class.extend(SassContext)
|
67
|
-
app.assets.context_class.sass_config = app.config.sass
|
68
|
-
end
|
69
|
-
|
70
54
|
Sass.logger = app.config.sass.logger
|
71
55
|
end
|
72
56
|
|
73
57
|
initializer :setup_compression, :group => :all do |app|
|
74
|
-
|
58
|
+
unless Rails.env.development?
|
75
59
|
# Use compressed style if none specified
|
76
60
|
app.config.sass.style ||= :compressed
|
77
61
|
app.config.assets.css_compressor ||= CssCompressor.new(:style => app.config.sass.style)
|
data/lib/sass/rails/version.rb
CHANGED
data/sass-rails.gemspec
CHANGED
@@ -8,18 +8,20 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ["wycats", "chriseppstein"]
|
10
10
|
s.email = ["wycats@gmail.com", "chris@eppsteins.net"]
|
11
|
-
s.homepage = ""
|
11
|
+
s.homepage = "https://github.com/rails/sass-rails"
|
12
12
|
s.summary = %q{Sass adapter for the Rails asset pipeline.}
|
13
13
|
s.description = %q{Sass adapter for the Rails asset pipeline.}
|
14
|
+
s.license = %q{MIT}
|
14
15
|
|
15
16
|
s.rubyforge_project = "sass-rails"
|
16
17
|
|
17
|
-
s.add_runtime_dependency 'sass',
|
18
|
-
s.add_runtime_dependency 'railties',
|
19
|
-
s.add_runtime_dependency 'tilt',
|
18
|
+
s.add_runtime_dependency 'sass', '>= 3.1.10'
|
19
|
+
s.add_runtime_dependency 'railties', '>= 4.0.0.beta', '< 5.0'
|
20
|
+
s.add_runtime_dependency 'tilt', '~> 1.3'
|
21
|
+
s.add_runtime_dependency 'sprockets-rails', '~> 2.0.0.rc0'
|
20
22
|
|
21
|
-
s.files = `git ls-files`.split("\n")
|
22
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
23
|
-
s.executables =
|
23
|
+
s.files = [".gitignore",".travis.yml","CHANGELOG.md","Gemfile","MIT-LICENSE","README.markdown","Rakefile","lib/rails/generators/sass/assets/assets_generator.rb","lib/rails/generators/sass/assets/templates/stylesheet.css.sass","lib/rails/generators/sass/scaffold/scaffold_generator.rb","lib/rails/generators/sass_scaffold.rb","lib/rails/generators/scss/assets/assets_generator.rb","lib/rails/generators/scss/assets/templates/stylesheet.css.scss","lib/rails/generators/scss/scaffold/scaffold_generator.rb","lib/sass-rails.rb","lib/sass/rails.rb","lib/sass/rails/compressor.rb","lib/sass/rails/helpers.rb","lib/sass/rails/importer.rb","lib/sass/rails/logger.rb","lib/sass/rails/railtie.rb","lib/sass/rails/version.rb","sass-rails.gemspec","sass-rails.gemspec.erb","test/fixtures/alternate_config_project/.gitignore","test/fixtures/alternate_config_project/Gemfile","test/fixtures/alternate_config_project/README","test/fixtures/alternate_config_project/Rakefile","test/fixtures/alternate_config_project/app/assets/images/1x1.png","test/fixtures/alternate_config_project/app/assets/images/rails.png","test/fixtures/alternate_config_project/app/assets/javascripts/application.js","test/fixtures/alternate_config_project/app/assets/stylesheets/_top_level_partial.css.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/application.css.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/css_application.css","test/fixtures/alternate_config_project/app/assets/stylesheets/globbed/globbed.css.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/globbed/nested/nested_glob.css.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_sass_import.css.sass","test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_scss_import.css.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_without_css_ext.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/_relative_sass.css.sass","test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/_relative_scss.css.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/relative_not_a_partial.css.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/another_plain.css","test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/plain.css","test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/second_level.css.scss","test/fixtures/alternate_config_project/app/controllers/application_controller.rb","test/fixtures/alternate_config_project/app/helpers/application_helper.rb","test/fixtures/alternate_config_project/app/mailers/.gitkeep","test/fixtures/alternate_config_project/app/models/.gitkeep","test/fixtures/alternate_config_project/app/views/layouts/application.html.erb","test/fixtures/alternate_config_project/config.ru","test/fixtures/alternate_config_project/config/application.rb","test/fixtures/alternate_config_project/config/boot.rb","test/fixtures/alternate_config_project/config/database.yml","test/fixtures/alternate_config_project/config/environment.rb","test/fixtures/alternate_config_project/config/environments/development.rb","test/fixtures/alternate_config_project/config/environments/production.rb","test/fixtures/alternate_config_project/config/environments/test.rb","test/fixtures/alternate_config_project/config/initializers/backtrace_silencers.rb","test/fixtures/alternate_config_project/config/initializers/inflections.rb","test/fixtures/alternate_config_project/config/initializers/mime_types.rb","test/fixtures/alternate_config_project/config/initializers/secret_token.rb","test/fixtures/alternate_config_project/config/initializers/session_store.rb","test/fixtures/alternate_config_project/config/initializers/wrap_parameters.rb","test/fixtures/alternate_config_project/config/locales/en.yml","test/fixtures/alternate_config_project/config/routes.rb","test/fixtures/alternate_config_project/db/seeds.rb","test/fixtures/alternate_config_project/doc/README_FOR_APP","test/fixtures/alternate_config_project/lib/tasks/.gitkeep","test/fixtures/alternate_config_project/log/.gitkeep","test/fixtures/alternate_config_project/public/404.html","test/fixtures/alternate_config_project/public/422.html","test/fixtures/alternate_config_project/public/500.html","test/fixtures/alternate_config_project/public/favicon.ico","test/fixtures/alternate_config_project/public/index.html","test/fixtures/alternate_config_project/public/robots.txt","test/fixtures/alternate_config_project/script/rails","test/fixtures/alternate_config_project/vendor/assets/stylesheets/.gitkeep","test/fixtures/alternate_config_project/vendor/plugins/.gitkeep","test/fixtures/engine_project/.gitignore","test/fixtures/engine_project/Gemfile","test/fixtures/engine_project/README.rdoc","test/fixtures/engine_project/Rakefile","test/fixtures/engine_project/app/assets/images/engine_project/.gitkeep","test/fixtures/engine_project/app/assets/javascripts/engine_project/application.js","test/fixtures/engine_project/app/assets/stylesheets/engine_project/application.css","test/fixtures/engine_project/app/controllers/engine_project/application_controller.rb","test/fixtures/engine_project/app/helpers/engine_project/application_helper.rb","test/fixtures/engine_project/app/views/layouts/engine_project/application.html.erb","test/fixtures/engine_project/config/routes.rb","test/fixtures/engine_project/db/seeds.rb","test/fixtures/engine_project/engine_project.gemspec","test/fixtures/engine_project/lib/engine_project.rb","test/fixtures/engine_project/lib/engine_project/engine.rb","test/fixtures/engine_project/lib/engine_project/version.rb","test/fixtures/engine_project/lib/tasks/engine_project_tasks.rake","test/fixtures/engine_project/script/rails","test/fixtures/engine_project/test/dummy/Rakefile","test/fixtures/engine_project/test/dummy/app/assets/javascripts/application.js","test/fixtures/engine_project/test/dummy/app/assets/stylesheets/application.css","test/fixtures/engine_project/test/dummy/app/controllers/application_controller.rb","test/fixtures/engine_project/test/dummy/app/helpers/application_helper.rb","test/fixtures/engine_project/test/dummy/app/mailers/.gitkeep","test/fixtures/engine_project/test/dummy/app/models/.gitkeep","test/fixtures/engine_project/test/dummy/app/views/layouts/application.html.erb","test/fixtures/engine_project/test/dummy/config.ru","test/fixtures/engine_project/test/dummy/config/application.rb","test/fixtures/engine_project/test/dummy/config/boot.rb","test/fixtures/engine_project/test/dummy/config/database.yml","test/fixtures/engine_project/test/dummy/config/environment.rb","test/fixtures/engine_project/test/dummy/config/environments/development.rb","test/fixtures/engine_project/test/dummy/config/environments/production.rb","test/fixtures/engine_project/test/dummy/config/environments/test.rb","test/fixtures/engine_project/test/dummy/config/initializers/backtrace_silencers.rb","test/fixtures/engine_project/test/dummy/config/initializers/inflections.rb","test/fixtures/engine_project/test/dummy/config/initializers/mime_types.rb","test/fixtures/engine_project/test/dummy/config/initializers/secret_token.rb","test/fixtures/engine_project/test/dummy/config/initializers/session_store.rb","test/fixtures/engine_project/test/dummy/config/initializers/wrap_parameters.rb","test/fixtures/engine_project/test/dummy/config/locales/en.yml","test/fixtures/engine_project/test/dummy/config/routes.rb","test/fixtures/engine_project/test/dummy/db/seeds.rb","test/fixtures/engine_project/test/dummy/lib/assets/.gitkeep","test/fixtures/engine_project/test/dummy/log/.gitkeep","test/fixtures/engine_project/test/dummy/public/404.html","test/fixtures/engine_project/test/dummy/public/422.html","test/fixtures/engine_project/test/dummy/public/500.html","test/fixtures/engine_project/test/dummy/public/favicon.ico","test/fixtures/engine_project/test/dummy/script/rails","test/fixtures/sass_project/.gitignore","test/fixtures/sass_project/Gemfile","test/fixtures/sass_project/README","test/fixtures/sass_project/Rakefile","test/fixtures/sass_project/app/assets/images/rails.png","test/fixtures/sass_project/app/assets/javascripts/application.js","test/fixtures/sass_project/app/assets/stylesheets/application.css","test/fixtures/sass_project/app/controllers/application_controller.rb","test/fixtures/sass_project/app/helpers/application_helper.rb","test/fixtures/sass_project/app/mailers/.gitkeep","test/fixtures/sass_project/app/models/.gitkeep","test/fixtures/sass_project/app/views/layouts/application.html.erb","test/fixtures/sass_project/config.ru","test/fixtures/sass_project/config/application.rb","test/fixtures/sass_project/config/boot.rb","test/fixtures/sass_project/config/database.yml","test/fixtures/sass_project/config/environment.rb","test/fixtures/sass_project/config/environments/development.rb","test/fixtures/sass_project/config/environments/production.rb","test/fixtures/sass_project/config/environments/test.rb","test/fixtures/sass_project/config/initializers/backtrace_silencers.rb","test/fixtures/sass_project/config/initializers/inflections.rb","test/fixtures/sass_project/config/initializers/mime_types.rb","test/fixtures/sass_project/config/initializers/secret_token.rb","test/fixtures/sass_project/config/initializers/session_store.rb","test/fixtures/sass_project/config/initializers/wrap_parameters.rb","test/fixtures/sass_project/config/locales/en.yml","test/fixtures/sass_project/config/routes.rb","test/fixtures/sass_project/db/seeds.rb","test/fixtures/sass_project/doc/README_FOR_APP","test/fixtures/sass_project/lib/tasks/.gitkeep","test/fixtures/sass_project/log/.gitkeep","test/fixtures/sass_project/public/404.html","test/fixtures/sass_project/public/422.html","test/fixtures/sass_project/public/500.html","test/fixtures/sass_project/public/favicon.ico","test/fixtures/sass_project/public/index.html","test/fixtures/sass_project/public/robots.txt","test/fixtures/sass_project/script/rails","test/fixtures/sass_project/vendor/assets/stylesheets/.gitkeep","test/fixtures/sass_project/vendor/plugins/.gitkeep","test/fixtures/scss_project/.gitignore","test/fixtures/scss_project/Gemfile","test/fixtures/scss_project/README","test/fixtures/scss_project/Rakefile","test/fixtures/scss_project/app/assets/images/1x1.png","test/fixtures/scss_project/app/assets/images/rails.png","test/fixtures/scss_project/app/assets/javascripts/application.js","test/fixtures/scss_project/app/assets/stylesheets/_top_level_partial.css.scss","test/fixtures/scss_project/app/assets/stylesheets/application.css.scss","test/fixtures/scss_project/app/assets/stylesheets/css_application.css","test/fixtures/scss_project/app/assets/stylesheets/globbed/globbed.css.scss","test/fixtures/scss_project/app/assets/stylesheets/globbed/nested/nested_glob.css.scss","test/fixtures/scss_project/app/assets/stylesheets/partials/_sass_import.css.sass","test/fixtures/scss_project/app/assets/stylesheets/partials/_scss_import.css.scss","test/fixtures/scss_project/app/assets/stylesheets/partials/_without_css_ext.scss","test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_sass.css.sass","test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_scss.css.scss","test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/relative_not_a_partial.css.scss","test/fixtures/scss_project/app/assets/stylesheets/subfolder/another_plain.css","test/fixtures/scss_project/app/assets/stylesheets/subfolder/plain.css","test/fixtures/scss_project/app/assets/stylesheets/subfolder/second_level.css.scss","test/fixtures/scss_project/app/controllers/application_controller.rb","test/fixtures/scss_project/app/helpers/application_helper.rb","test/fixtures/scss_project/app/mailers/.gitkeep","test/fixtures/scss_project/app/models/.gitkeep","test/fixtures/scss_project/app/views/layouts/application.html.erb","test/fixtures/scss_project/config.ru","test/fixtures/scss_project/config/application.rb","test/fixtures/scss_project/config/boot.rb","test/fixtures/scss_project/config/database.yml","test/fixtures/scss_project/config/environment.rb","test/fixtures/scss_project/config/environments/development.rb","test/fixtures/scss_project/config/environments/production.rb","test/fixtures/scss_project/config/environments/test.rb","test/fixtures/scss_project/config/initializers/backtrace_silencers.rb","test/fixtures/scss_project/config/initializers/inflections.rb","test/fixtures/scss_project/config/initializers/mime_types.rb","test/fixtures/scss_project/config/initializers/secret_token.rb","test/fixtures/scss_project/config/initializers/session_store.rb","test/fixtures/scss_project/config/initializers/wrap_parameters.rb","test/fixtures/scss_project/config/locales/en.yml","test/fixtures/scss_project/config/routes.rb","test/fixtures/scss_project/db/seeds.rb","test/fixtures/scss_project/doc/README_FOR_APP","test/fixtures/scss_project/lib/tasks/.gitkeep","test/fixtures/scss_project/log/.gitkeep","test/fixtures/scss_project/public/404.html","test/fixtures/scss_project/public/422.html","test/fixtures/scss_project/public/500.html","test/fixtures/scss_project/public/favicon.ico","test/fixtures/scss_project/public/index.html","test/fixtures/scss_project/public/robots.txt","test/fixtures/scss_project/script/rails","test/fixtures/scss_project/vendor/assets/stylesheets/.gitkeep","test/fixtures/scss_project/vendor/plugins/.gitkeep","test/sass_rails_logger_test.rb","test/sass_rails_test.rb","test/support/sass_rails_test_case.rb","test/test_helper.rb"]
|
24
|
+
s.test_files = ["test/fixtures/alternate_config_project/.gitignore","test/fixtures/alternate_config_project/Gemfile","test/fixtures/alternate_config_project/README","test/fixtures/alternate_config_project/Rakefile","test/fixtures/alternate_config_project/app/assets/images/1x1.png","test/fixtures/alternate_config_project/app/assets/images/rails.png","test/fixtures/alternate_config_project/app/assets/javascripts/application.js","test/fixtures/alternate_config_project/app/assets/stylesheets/_top_level_partial.css.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/application.css.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/css_application.css","test/fixtures/alternate_config_project/app/assets/stylesheets/globbed/globbed.css.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/globbed/nested/nested_glob.css.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_sass_import.css.sass","test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_scss_import.css.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_without_css_ext.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/_relative_sass.css.sass","test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/_relative_scss.css.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/relative_not_a_partial.css.scss","test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/another_plain.css","test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/plain.css","test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/second_level.css.scss","test/fixtures/alternate_config_project/app/controllers/application_controller.rb","test/fixtures/alternate_config_project/app/helpers/application_helper.rb","test/fixtures/alternate_config_project/app/mailers/.gitkeep","test/fixtures/alternate_config_project/app/models/.gitkeep","test/fixtures/alternate_config_project/app/views/layouts/application.html.erb","test/fixtures/alternate_config_project/config.ru","test/fixtures/alternate_config_project/config/application.rb","test/fixtures/alternate_config_project/config/boot.rb","test/fixtures/alternate_config_project/config/database.yml","test/fixtures/alternate_config_project/config/environment.rb","test/fixtures/alternate_config_project/config/environments/development.rb","test/fixtures/alternate_config_project/config/environments/production.rb","test/fixtures/alternate_config_project/config/environments/test.rb","test/fixtures/alternate_config_project/config/initializers/backtrace_silencers.rb","test/fixtures/alternate_config_project/config/initializers/inflections.rb","test/fixtures/alternate_config_project/config/initializers/mime_types.rb","test/fixtures/alternate_config_project/config/initializers/secret_token.rb","test/fixtures/alternate_config_project/config/initializers/session_store.rb","test/fixtures/alternate_config_project/config/initializers/wrap_parameters.rb","test/fixtures/alternate_config_project/config/locales/en.yml","test/fixtures/alternate_config_project/config/routes.rb","test/fixtures/alternate_config_project/db/seeds.rb","test/fixtures/alternate_config_project/doc/README_FOR_APP","test/fixtures/alternate_config_project/lib/tasks/.gitkeep","test/fixtures/alternate_config_project/log/.gitkeep","test/fixtures/alternate_config_project/public/404.html","test/fixtures/alternate_config_project/public/422.html","test/fixtures/alternate_config_project/public/500.html","test/fixtures/alternate_config_project/public/favicon.ico","test/fixtures/alternate_config_project/public/index.html","test/fixtures/alternate_config_project/public/robots.txt","test/fixtures/alternate_config_project/script/rails","test/fixtures/alternate_config_project/vendor/assets/stylesheets/.gitkeep","test/fixtures/alternate_config_project/vendor/plugins/.gitkeep","test/fixtures/engine_project/.gitignore","test/fixtures/engine_project/Gemfile","test/fixtures/engine_project/README.rdoc","test/fixtures/engine_project/Rakefile","test/fixtures/engine_project/app/assets/images/engine_project/.gitkeep","test/fixtures/engine_project/app/assets/javascripts/engine_project/application.js","test/fixtures/engine_project/app/assets/stylesheets/engine_project/application.css","test/fixtures/engine_project/app/controllers/engine_project/application_controller.rb","test/fixtures/engine_project/app/helpers/engine_project/application_helper.rb","test/fixtures/engine_project/app/views/layouts/engine_project/application.html.erb","test/fixtures/engine_project/config/routes.rb","test/fixtures/engine_project/db/seeds.rb","test/fixtures/engine_project/engine_project.gemspec","test/fixtures/engine_project/lib/engine_project.rb","test/fixtures/engine_project/lib/engine_project/engine.rb","test/fixtures/engine_project/lib/engine_project/version.rb","test/fixtures/engine_project/lib/tasks/engine_project_tasks.rake","test/fixtures/engine_project/script/rails","test/fixtures/engine_project/test/dummy/Rakefile","test/fixtures/engine_project/test/dummy/app/assets/javascripts/application.js","test/fixtures/engine_project/test/dummy/app/assets/stylesheets/application.css","test/fixtures/engine_project/test/dummy/app/controllers/application_controller.rb","test/fixtures/engine_project/test/dummy/app/helpers/application_helper.rb","test/fixtures/engine_project/test/dummy/app/mailers/.gitkeep","test/fixtures/engine_project/test/dummy/app/models/.gitkeep","test/fixtures/engine_project/test/dummy/app/views/layouts/application.html.erb","test/fixtures/engine_project/test/dummy/config.ru","test/fixtures/engine_project/test/dummy/config/application.rb","test/fixtures/engine_project/test/dummy/config/boot.rb","test/fixtures/engine_project/test/dummy/config/database.yml","test/fixtures/engine_project/test/dummy/config/environment.rb","test/fixtures/engine_project/test/dummy/config/environments/development.rb","test/fixtures/engine_project/test/dummy/config/environments/production.rb","test/fixtures/engine_project/test/dummy/config/environments/test.rb","test/fixtures/engine_project/test/dummy/config/initializers/backtrace_silencers.rb","test/fixtures/engine_project/test/dummy/config/initializers/inflections.rb","test/fixtures/engine_project/test/dummy/config/initializers/mime_types.rb","test/fixtures/engine_project/test/dummy/config/initializers/secret_token.rb","test/fixtures/engine_project/test/dummy/config/initializers/session_store.rb","test/fixtures/engine_project/test/dummy/config/initializers/wrap_parameters.rb","test/fixtures/engine_project/test/dummy/config/locales/en.yml","test/fixtures/engine_project/test/dummy/config/routes.rb","test/fixtures/engine_project/test/dummy/db/seeds.rb","test/fixtures/engine_project/test/dummy/lib/assets/.gitkeep","test/fixtures/engine_project/test/dummy/log/.gitkeep","test/fixtures/engine_project/test/dummy/public/404.html","test/fixtures/engine_project/test/dummy/public/422.html","test/fixtures/engine_project/test/dummy/public/500.html","test/fixtures/engine_project/test/dummy/public/favicon.ico","test/fixtures/engine_project/test/dummy/script/rails","test/fixtures/sass_project/.gitignore","test/fixtures/sass_project/Gemfile","test/fixtures/sass_project/README","test/fixtures/sass_project/Rakefile","test/fixtures/sass_project/app/assets/images/rails.png","test/fixtures/sass_project/app/assets/javascripts/application.js","test/fixtures/sass_project/app/assets/stylesheets/application.css","test/fixtures/sass_project/app/controllers/application_controller.rb","test/fixtures/sass_project/app/helpers/application_helper.rb","test/fixtures/sass_project/app/mailers/.gitkeep","test/fixtures/sass_project/app/models/.gitkeep","test/fixtures/sass_project/app/views/layouts/application.html.erb","test/fixtures/sass_project/config.ru","test/fixtures/sass_project/config/application.rb","test/fixtures/sass_project/config/boot.rb","test/fixtures/sass_project/config/database.yml","test/fixtures/sass_project/config/environment.rb","test/fixtures/sass_project/config/environments/development.rb","test/fixtures/sass_project/config/environments/production.rb","test/fixtures/sass_project/config/environments/test.rb","test/fixtures/sass_project/config/initializers/backtrace_silencers.rb","test/fixtures/sass_project/config/initializers/inflections.rb","test/fixtures/sass_project/config/initializers/mime_types.rb","test/fixtures/sass_project/config/initializers/secret_token.rb","test/fixtures/sass_project/config/initializers/session_store.rb","test/fixtures/sass_project/config/initializers/wrap_parameters.rb","test/fixtures/sass_project/config/locales/en.yml","test/fixtures/sass_project/config/routes.rb","test/fixtures/sass_project/db/seeds.rb","test/fixtures/sass_project/doc/README_FOR_APP","test/fixtures/sass_project/lib/tasks/.gitkeep","test/fixtures/sass_project/log/.gitkeep","test/fixtures/sass_project/public/404.html","test/fixtures/sass_project/public/422.html","test/fixtures/sass_project/public/500.html","test/fixtures/sass_project/public/favicon.ico","test/fixtures/sass_project/public/index.html","test/fixtures/sass_project/public/robots.txt","test/fixtures/sass_project/script/rails","test/fixtures/sass_project/vendor/assets/stylesheets/.gitkeep","test/fixtures/sass_project/vendor/plugins/.gitkeep","test/fixtures/scss_project/.gitignore","test/fixtures/scss_project/Gemfile","test/fixtures/scss_project/README","test/fixtures/scss_project/Rakefile","test/fixtures/scss_project/app/assets/images/1x1.png","test/fixtures/scss_project/app/assets/images/rails.png","test/fixtures/scss_project/app/assets/javascripts/application.js","test/fixtures/scss_project/app/assets/stylesheets/_top_level_partial.css.scss","test/fixtures/scss_project/app/assets/stylesheets/application.css.scss","test/fixtures/scss_project/app/assets/stylesheets/css_application.css","test/fixtures/scss_project/app/assets/stylesheets/globbed/globbed.css.scss","test/fixtures/scss_project/app/assets/stylesheets/globbed/nested/nested_glob.css.scss","test/fixtures/scss_project/app/assets/stylesheets/partials/_sass_import.css.sass","test/fixtures/scss_project/app/assets/stylesheets/partials/_scss_import.css.scss","test/fixtures/scss_project/app/assets/stylesheets/partials/_without_css_ext.scss","test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_sass.css.sass","test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_scss.css.scss","test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/relative_not_a_partial.css.scss","test/fixtures/scss_project/app/assets/stylesheets/subfolder/another_plain.css","test/fixtures/scss_project/app/assets/stylesheets/subfolder/plain.css","test/fixtures/scss_project/app/assets/stylesheets/subfolder/second_level.css.scss","test/fixtures/scss_project/app/controllers/application_controller.rb","test/fixtures/scss_project/app/helpers/application_helper.rb","test/fixtures/scss_project/app/mailers/.gitkeep","test/fixtures/scss_project/app/models/.gitkeep","test/fixtures/scss_project/app/views/layouts/application.html.erb","test/fixtures/scss_project/config.ru","test/fixtures/scss_project/config/application.rb","test/fixtures/scss_project/config/boot.rb","test/fixtures/scss_project/config/database.yml","test/fixtures/scss_project/config/environment.rb","test/fixtures/scss_project/config/environments/development.rb","test/fixtures/scss_project/config/environments/production.rb","test/fixtures/scss_project/config/environments/test.rb","test/fixtures/scss_project/config/initializers/backtrace_silencers.rb","test/fixtures/scss_project/config/initializers/inflections.rb","test/fixtures/scss_project/config/initializers/mime_types.rb","test/fixtures/scss_project/config/initializers/secret_token.rb","test/fixtures/scss_project/config/initializers/session_store.rb","test/fixtures/scss_project/config/initializers/wrap_parameters.rb","test/fixtures/scss_project/config/locales/en.yml","test/fixtures/scss_project/config/routes.rb","test/fixtures/scss_project/db/seeds.rb","test/fixtures/scss_project/doc/README_FOR_APP","test/fixtures/scss_project/lib/tasks/.gitkeep","test/fixtures/scss_project/log/.gitkeep","test/fixtures/scss_project/public/404.html","test/fixtures/scss_project/public/422.html","test/fixtures/scss_project/public/500.html","test/fixtures/scss_project/public/favicon.ico","test/fixtures/scss_project/public/index.html","test/fixtures/scss_project/public/robots.txt","test/fixtures/scss_project/script/rails","test/fixtures/scss_project/vendor/assets/stylesheets/.gitkeep","test/fixtures/scss_project/vendor/plugins/.gitkeep","test/sass_rails_logger_test.rb","test/sass_rails_test.rb","test/support/sass_rails_test_case.rb","test/test_helper.rb"]
|
25
|
+
s.executables = []
|
24
26
|
s.require_paths = ["lib"]
|
25
27
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "sass/rails/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "sass-rails"
|
7
|
+
s.version = Sass::Rails::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["wycats", "chriseppstein"]
|
10
|
+
s.email = ["wycats@gmail.com", "chris@eppsteins.net"]
|
11
|
+
s.homepage = "https://github.com/rails/sass-rails"
|
12
|
+
s.summary = %q{Sass adapter for the Rails asset pipeline.}
|
13
|
+
s.description = %q{Sass adapter for the Rails asset pipeline.}
|
14
|
+
s.license = %q{MIT}
|
15
|
+
|
16
|
+
s.rubyforge_project = "sass-rails"
|
17
|
+
|
18
|
+
s.add_runtime_dependency 'sass', '>= 3.1.10'
|
19
|
+
s.add_runtime_dependency 'railties', '>= 4.0.0.beta', '< 5.0'
|
20
|
+
s.add_runtime_dependency 'tilt', '~> 1.3'
|
21
|
+
s.add_runtime_dependency 'sprockets-rails', '~> 2.0.0.rc0'
|
22
|
+
|
23
|
+
s.files = [<%= files.map(&:inspect).join ',' %>]
|
24
|
+
s.test_files = [<%= test_files.map(&:inspect).join ',' %>]
|
25
|
+
s.executables = [<%= executables.map(&:inspect).join ',' %>]
|
26
|
+
s.require_paths = ["lib"]
|
27
|
+
end
|
@@ -11,8 +11,8 @@
|
|
11
11
|
}
|
12
12
|
|
13
13
|
.rails {
|
14
|
-
asset-path: asset-path("rails.png"
|
15
|
-
asset-url: asset-url("rails.png"
|
14
|
+
asset-path: asset-path("rails.png");
|
15
|
+
asset-url: asset-url("rails.png");
|
16
16
|
image-path: image-path("rails.png");
|
17
17
|
image-url: image-url("rails.png");
|
18
18
|
video-path: video-path("rails.mp4");
|
@@ -6,8 +6,7 @@ AlternateConfigProject::Application.configure do
|
|
6
6
|
# since you don't have to restart the web server when you make code changes.
|
7
7
|
config.cache_classes = false
|
8
8
|
|
9
|
-
|
10
|
-
config.whiny_nils = true
|
9
|
+
config.eager_load = false
|
11
10
|
|
12
11
|
# Show full error reports and disable caching
|
13
12
|
config.consider_all_requests_local = true
|
@@ -11,8 +11,7 @@ AlternateConfigProject::Application.configure do
|
|
11
11
|
config.serve_static_assets = true
|
12
12
|
config.static_cache_control = "public, max-age=3600"
|
13
13
|
|
14
|
-
|
15
|
-
config.whiny_nils = true
|
14
|
+
config.eager_load = false
|
16
15
|
|
17
16
|
# Show full error reports and disable caching
|
18
17
|
config.consider_all_requests_local = true
|
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'engine_project'
|
3
3
|
s.version = '0.0.0'
|
4
4
|
|
5
|
-
s.add_dependency "rails", "~>
|
5
|
+
s.add_dependency "rails", "~> 4.0.0.beta"
|
6
6
|
s.add_dependency "sqlite3"
|
7
|
-
s.add_dependency "sass-rails", "~>
|
7
|
+
s.add_dependency "sass-rails", "~> 4.0.0.beta"
|
8
8
|
end
|
@@ -6,9 +6,6 @@ Dummy::Application.configure do
|
|
6
6
|
# since you don't have to restart the web server when you make code changes.
|
7
7
|
config.cache_classes = false
|
8
8
|
|
9
|
-
# Log error messages when you accidentally call methods on nil.
|
10
|
-
config.whiny_nils = true
|
11
|
-
|
12
9
|
# Show full error reports and disable caching
|
13
10
|
config.consider_all_requests_local = true
|
14
11
|
config.action_controller.perform_caching = false
|
@@ -11,9 +11,6 @@ Dummy::Application.configure do
|
|
11
11
|
config.serve_static_assets = true
|
12
12
|
config.static_cache_control = "public, max-age=3600"
|
13
13
|
|
14
|
-
# Log error messages when you accidentally call methods on nil
|
15
|
-
config.whiny_nils = true
|
16
|
-
|
17
14
|
# Show full error reports and disable caching
|
18
15
|
config.consider_all_requests_local = true
|
19
16
|
config.action_controller.perform_caching = false
|
@@ -6,9 +6,6 @@ ScssProject::Application.configure do
|
|
6
6
|
# since you don't have to restart the web server when you make code changes.
|
7
7
|
config.cache_classes = false
|
8
8
|
|
9
|
-
# Log error messages when you accidentally call methods on nil.
|
10
|
-
config.whiny_nils = true
|
11
|
-
|
12
9
|
# Show full error reports and disable caching
|
13
10
|
config.consider_all_requests_local = true
|
14
11
|
config.action_controller.perform_caching = false
|
@@ -11,9 +11,6 @@ ScssProject::Application.configure do
|
|
11
11
|
config.serve_static_assets = true
|
12
12
|
config.static_cache_control = "public, max-age=3600"
|
13
13
|
|
14
|
-
# Log error messages when you accidentally call methods on nil
|
15
|
-
config.whiny_nils = true
|
16
|
-
|
17
14
|
# Show full error reports and disable caching
|
18
15
|
config.consider_all_requests_local = true
|
19
16
|
config.action_controller.perform_caching = false
|
@@ -11,8 +11,8 @@
|
|
11
11
|
}
|
12
12
|
|
13
13
|
.rails {
|
14
|
-
asset-path: asset-path("rails.png"
|
15
|
-
asset-url: asset-url("rails.png"
|
14
|
+
asset-path: asset-path("rails.png");
|
15
|
+
asset-url: asset-url("rails.png");
|
16
16
|
image-path: image-path("rails.png");
|
17
17
|
image-url: image-url("rails.png");
|
18
18
|
video-path: video-path("rails.mp4");
|
@@ -6,8 +6,7 @@ ScssProject::Application.configure do
|
|
6
6
|
# since you don't have to restart the web server when you make code changes.
|
7
7
|
config.cache_classes = false
|
8
8
|
|
9
|
-
|
10
|
-
config.whiny_nils = true
|
9
|
+
config.eager_load = false
|
11
10
|
|
12
11
|
# Show full error reports and disable caching
|
13
12
|
config.consider_all_requests_local = true
|
@@ -11,9 +11,6 @@ ScssProject::Application.configure do
|
|
11
11
|
config.serve_static_assets = true
|
12
12
|
config.static_cache_control = "public, max-age=3600"
|
13
13
|
|
14
|
-
# Log error messages when you accidentally call methods on nil
|
15
|
-
config.whiny_nils = true
|
16
|
-
|
17
14
|
# Show full error reports and disable caching
|
18
15
|
config.consider_all_requests_local = true
|
19
16
|
config.action_controller.perform_caching = false
|
@@ -3,7 +3,7 @@ require 'test_helper'
|
|
3
3
|
class SassRailsLoggerTest < Sass::Rails::TestCase
|
4
4
|
test "setting a sass-rails logger as the sass default logger" do
|
5
5
|
within_rails_app "scss_project" do
|
6
|
-
logger_class_name = runcmd 'rails runner "print Sass::logger.class.name"'
|
6
|
+
logger_class_name = runcmd 'ruby script/rails runner "print Sass::logger.class.name"'
|
7
7
|
assert logger_class_name =~ /#{Regexp.escape(Sass::Rails::Logger.name)}/
|
8
8
|
end
|
9
9
|
end
|
@@ -12,7 +12,7 @@ class SassRailsLoggerTest < Sass::Rails::TestCase
|
|
12
12
|
within_rails_app "scss_project" do |app_root|
|
13
13
|
[:debug, :warn, :info, :error, :trace].each do |level|
|
14
14
|
message = "[#{level}]: sass message"
|
15
|
-
runcmd %{rails runner "Sass::logger.log_level = :#{level}; Sass::logger.log(:#{level}, %Q|#{message}|)"}
|
15
|
+
runcmd %{ruby script/rails runner "Sass::logger.log_level = :#{level}; Sass::logger.log(:#{level}, %Q|#{message}|)"}
|
16
16
|
|
17
17
|
assert File.exists?("#{app_root}/log/development.log"), "log file was not created"
|
18
18
|
|
data/test/sass_rails_test.rb
CHANGED
@@ -71,6 +71,7 @@ END_OF_COMMAND
|
|
71
71
|
assert_not_output(/conflict/)
|
72
72
|
end
|
73
73
|
end
|
74
|
+
|
74
75
|
test "sass files are generated during scaffold generation of sass projects" do
|
75
76
|
within_rails_app "sass_project" do
|
76
77
|
generate_scaffold
|
@@ -79,6 +80,7 @@ END_OF_COMMAND
|
|
79
80
|
assert_not_output(/conflict/)
|
80
81
|
end
|
81
82
|
end
|
83
|
+
|
82
84
|
test "scss files are generated during scaffold generation of a engine project" do
|
83
85
|
within_rails_app "engine_project" do
|
84
86
|
generate_scaffold
|
@@ -87,6 +89,7 @@ END_OF_COMMAND
|
|
87
89
|
assert_not_output(/conflict/)
|
88
90
|
end
|
89
91
|
end
|
92
|
+
|
90
93
|
test "sass files are generated during scaffold generation of a engine project, if is called with --stylesheet-engine=sass" do
|
91
94
|
within_rails_app "engine_project" do
|
92
95
|
generate_scaffold "--stylesheet-engine=sass"
|
@@ -95,6 +98,7 @@ END_OF_COMMAND
|
|
95
98
|
assert_not_output(/conflict/)
|
96
99
|
end
|
97
100
|
end
|
101
|
+
|
98
102
|
# DISABLED because we've removed the feature for now.
|
99
103
|
# test "scss template has correct dasherized css class for namespaced controllers" do
|
100
104
|
# within_rails_app "scss_project" do
|
@@ -103,6 +107,7 @@ END_OF_COMMAND
|
|
103
107
|
# assert_match /\.foo-bar/, File.read("app/assets/stylesheets/foo/bar.css.scss")
|
104
108
|
# end
|
105
109
|
# end
|
110
|
+
#
|
106
111
|
# test "sass template has correct dasherized css class for namespaced controllers" do
|
107
112
|
# within_rails_app "sass_project" do
|
108
113
|
# runcmd "rails generate controller foo/bar"
|
@@ -110,49 +115,53 @@ END_OF_COMMAND
|
|
110
115
|
# assert_match /\.foo-bar/, File.read("app/assets/stylesheets/foo/bar.css.sass")
|
111
116
|
# end
|
112
117
|
# end
|
118
|
+
#
|
113
119
|
test "sprockets require works correctly" do
|
114
120
|
css_output = sprockets_render("scss_project", "css_application.css")
|
115
121
|
assert_match /globbed/, css_output
|
116
122
|
end
|
123
|
+
|
117
124
|
test "sass imports work correctly" do
|
118
125
|
css_output = sprockets_render("scss_project", "application.css.scss")
|
119
|
-
assert_match
|
120
|
-
assert_match
|
121
|
-
assert_match
|
122
|
-
assert_match
|
123
|
-
assert_match
|
124
|
-
assert_match
|
125
|
-
assert_match
|
126
|
-
assert_match
|
127
|
-
assert_match
|
128
|
-
assert_match
|
129
|
-
assert_match
|
130
|
-
assert_match
|
126
|
+
assert_match /main/, css_output
|
127
|
+
assert_match /top-level/, css_output
|
128
|
+
assert_match /partial-sass/, css_output
|
129
|
+
assert_match /partial-scss/, css_output
|
130
|
+
assert_match /sub-folder-relative-sass/, css_output
|
131
|
+
assert_match /sub-folder-relative-scss/, css_output
|
132
|
+
assert_match /not-a-partial/, css_output
|
133
|
+
assert_match /globbed/, css_output
|
134
|
+
assert_match /nested-glob/, css_output
|
135
|
+
assert_match /plain-old-css/, css_output
|
136
|
+
assert_match /another-plain-old-css/, css_output
|
137
|
+
assert_match /without-css-ext/, css_output
|
131
138
|
end
|
139
|
+
|
132
140
|
test "sass asset paths work" do
|
133
141
|
css_output = sprockets_render("scss_project", "application.css.scss")
|
134
|
-
assert_match
|
135
|
-
assert_match
|
136
|
-
assert_match
|
137
|
-
assert_match
|
138
|
-
assert_match
|
139
|
-
assert_match
|
140
|
-
assert_match
|
141
|
-
assert_match
|
142
|
-
assert_match
|
143
|
-
assert_match
|
144
|
-
assert_match
|
145
|
-
assert_match
|
146
|
-
assert_match
|
147
|
-
assert_match
|
148
|
-
assert_match
|
142
|
+
assert_match %r{asset-path:\s*"/assets/rails.png"}, css_output, 'asset-path:\s*"/assets/rails.png"'
|
143
|
+
assert_match %r{asset-url:\s*url\(/assets/rails.png\)}, css_output, 'asset-url:\s*url\(/assets/rails.png\)'
|
144
|
+
assert_match %r{image-path:\s*"/assets/rails.png"}, css_output, 'image-path:\s*"/assets/rails.png"'
|
145
|
+
assert_match %r{image-url:\s*url\(/assets/rails.png\)}, css_output, 'image-url:\s*url\(/assets/rails.png\)'
|
146
|
+
assert_match %r{video-path:\s*"/assets/rails.mp4"}, css_output, 'video-path:\s*"/assets/rails.mp4"'
|
147
|
+
assert_match %r{video-url:\s*url\(/assets/rails.mp4\)}, css_output, 'video-url:\s*url\(/assets/rails.mp4\)'
|
148
|
+
assert_match %r{audio-path:\s*"/assets/rails.mp3"}, css_output, 'audio-path:\s*"/assets/rails.mp3"'
|
149
|
+
assert_match %r{audio-url:\s*url\(/assets/rails.mp3\)}, css_output, 'audio-url:\s*url\(/assets/rails.mp3\)'
|
150
|
+
assert_match %r{font-path:\s*"/assets/rails.ttf"}, css_output, 'font-path:\s*"/assets/rails.ttf"'
|
151
|
+
assert_match %r{font-url:\s*url\(/assets/rails.ttf\)}, css_output, 'font-url:\s*url\(/assets/rails.ttf\)'
|
152
|
+
assert_match %r{font-url-with-query-hash:\s*url\(/assets/rails.ttf\?#iefix\)}, css_output, 'font-url:\s*url\(/assets/rails.ttf?#iefix\)'
|
153
|
+
assert_match %r{javascript-path:\s*"/assets/rails.js"}, css_output, 'javascript-path:\s*"/assets/rails.js"'
|
154
|
+
assert_match %r{javascript-url:\s*url\(/assets/rails.js\)}, css_output, 'javascript-url:\s*url\(/assets/rails.js\)'
|
155
|
+
assert_match %r{stylesheet-path:\s*"/assets/rails.css"}, css_output, 'stylesheet-path:\s*"/assets/rails.css"'
|
156
|
+
assert_match %r{stylesheet-url:\s*url\(/assets/rails.css\)}, css_output, 'stylesheet-url:\s*url\(/assets/rails.css\)'
|
149
157
|
|
150
158
|
asset_data_url_regexp = %r{asset-data-url:\s*url\((.*?)\)}
|
151
|
-
assert_match
|
159
|
+
assert_match asset_data_url_regexp, css_output, 'asset-data-url:\s*url\((.*?)\)'
|
152
160
|
asset_data_url_match = css_output.match(asset_data_url_regexp)[1]
|
153
161
|
asset_data_url_expected = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCNzY5NDE1QkQ2NkMxMUUwOUUzM0E5Q0E2RTgyQUExQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCNzY5NDE1Q0Q2NkMxMUUwOUUzM0E5Q0E2RTgyQUExQiI%2BIDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE3MzcyNTQ2RDY2QjExRTA5RTMzQTlDQTZFODJBQTFCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkI3Njk0MTVBRDY2QzExRTA5RTMzQTlDQTZFODJBQTFCIi8%2BIDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY%2BIDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8%2B0HhJ9AAAABBJREFUeNpi%2BP%2F%2FPwNAgAEACPwC%2FtuiTRYAAAAASUVORK5CYII%3D"
|
154
162
|
assert_equal asset_data_url_expected, asset_data_url_match
|
155
163
|
end
|
164
|
+
|
156
165
|
test "css compressor compresses" do
|
157
166
|
assert_equal "div{color:red}\n", Sass::Rails::CssCompressor.new.compress(<<CSS)
|
158
167
|
div {
|
@@ -4,7 +4,6 @@ unless defined?(Bundler)
|
|
4
4
|
end
|
5
5
|
require 'fileutils'
|
6
6
|
require 'tmpdir'
|
7
|
-
require 'sprockets/helpers/rails_helper'
|
8
7
|
|
9
8
|
class Sass::Rails::TestCase < ActiveSupport::TestCase
|
10
9
|
|
@@ -68,8 +67,8 @@ class Sass::Rails::TestCase < ActiveSupport::TestCase
|
|
68
67
|
Dir.mktmpdir do |tmpdir|
|
69
68
|
FileUtils.cp_r "#{sourcedir}/.", tmpdir
|
70
69
|
Dir.chdir(tmpdir) do
|
71
|
-
gem_options.each {|
|
72
|
-
without_gems.each {|
|
70
|
+
gem_options.each { |gem_name, options| modify_gem_entry gem_name, options }
|
71
|
+
without_gems.each { |gem_name| remove_gem name }
|
73
72
|
FileUtils.rm("Gemfile.lock") if File.exist?("Gemfile.lock")
|
74
73
|
runcmd "bundle install --verbose"
|
75
74
|
runcmd "bundle exec rake db:create --trace"
|
@@ -143,7 +142,7 @@ class Sass::Rails::TestCase < ActiveSupport::TestCase
|
|
143
142
|
env["BUNDLE_GEMFILE"] = "#{working_directory}/#{gemfile}" if clean_env
|
144
143
|
todo = Proc.new do
|
145
144
|
r, w = IO.pipe
|
146
|
-
|
145
|
+
Kernel.spawn(env, cmd, :out => w , :err => w, :chdir => working_directory)
|
147
146
|
w.close
|
148
147
|
Process.wait
|
149
148
|
output = r.read
|
data/test/test_helper.rb
CHANGED
@@ -8,15 +8,13 @@ require 'rails'
|
|
8
8
|
require "rails/test_help"
|
9
9
|
require 'sass/rails'
|
10
10
|
require 'sfl'
|
11
|
-
require 'mocha'
|
12
11
|
|
13
12
|
Rails.backtrace_cleaner.remove_silencers!
|
14
13
|
|
15
|
-
|
16
14
|
# If developing against local dependencies, this code will ensure they get picked up
|
17
15
|
# in the project fixtures that have their own bundle environment
|
18
16
|
$gem_options = {}
|
19
|
-
possible_dev_dependencies = %w(sass-rails sass rails actionpack railties sprockets)
|
17
|
+
possible_dev_dependencies = %w(sass-rails sass rails actionpack railties sprockets journey sprockets-rails activerecord-deprecated_finders)
|
20
18
|
Bundler.load.specs.each do |s|
|
21
19
|
if possible_dev_dependencies.include?(s.name)
|
22
20
|
gem_path = s.full_gem_path
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0.beta1
|
5
|
+
prerelease: 6
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- wycats
|
@@ -9,50 +10,78 @@ authors:
|
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2013-
|
13
|
+
date: 2013-02-25 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: sass
|
16
17
|
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
17
19
|
requirements:
|
18
|
-
- -
|
20
|
+
- - ! '>='
|
19
21
|
- !ruby/object:Gem::Version
|
20
22
|
version: 3.1.10
|
21
23
|
type: :runtime
|
22
24
|
prerelease: false
|
23
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
24
27
|
requirements:
|
25
|
-
- -
|
28
|
+
- - ! '>='
|
26
29
|
- !ruby/object:Gem::Version
|
27
30
|
version: 3.1.10
|
28
31
|
- !ruby/object:Gem::Dependency
|
29
32
|
name: railties
|
30
33
|
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
31
35
|
requirements:
|
32
|
-
- -
|
36
|
+
- - ! '>='
|
33
37
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
38
|
+
version: 4.0.0.beta
|
39
|
+
- - <
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '5.0'
|
35
42
|
type: :runtime
|
36
43
|
prerelease: false
|
37
44
|
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
none: false
|
38
46
|
requirements:
|
39
|
-
- -
|
47
|
+
- - ! '>='
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 4.0.0.beta
|
50
|
+
- - <
|
40
51
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
52
|
+
version: '5.0'
|
42
53
|
- !ruby/object:Gem::Dependency
|
43
54
|
name: tilt
|
44
55
|
requirement: !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
45
57
|
requirements:
|
46
|
-
- -
|
58
|
+
- - ~>
|
47
59
|
- !ruby/object:Gem::Version
|
48
60
|
version: '1.3'
|
49
61
|
type: :runtime
|
50
62
|
prerelease: false
|
51
63
|
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
52
65
|
requirements:
|
53
|
-
- -
|
66
|
+
- - ~>
|
54
67
|
- !ruby/object:Gem::Version
|
55
68
|
version: '1.3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: sprockets-rails
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 2.0.0.rc0
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ~>
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 2.0.0.rc0
|
56
85
|
description: Sass adapter for the Rails asset pipeline.
|
57
86
|
email:
|
58
87
|
- wycats@gmail.com
|
@@ -61,8 +90,8 @@ executables: []
|
|
61
90
|
extensions: []
|
62
91
|
extra_rdoc_files: []
|
63
92
|
files:
|
64
|
-
-
|
65
|
-
-
|
93
|
+
- .gitignore
|
94
|
+
- .travis.yml
|
66
95
|
- CHANGELOG.md
|
67
96
|
- Gemfile
|
68
97
|
- MIT-LICENSE
|
@@ -82,9 +111,9 @@ files:
|
|
82
111
|
- lib/sass/rails/importer.rb
|
83
112
|
- lib/sass/rails/logger.rb
|
84
113
|
- lib/sass/rails/railtie.rb
|
85
|
-
- lib/sass/rails/template_handlers.rb
|
86
114
|
- lib/sass/rails/version.rb
|
87
115
|
- sass-rails.gemspec
|
116
|
+
- sass-rails.gemspec.erb
|
88
117
|
- test/fixtures/alternate_config_project/.gitignore
|
89
118
|
- test/fixtures/alternate_config_project/Gemfile
|
90
119
|
- test/fixtures/alternate_config_project/README
|
@@ -290,28 +319,30 @@ files:
|
|
290
319
|
- test/sass_rails_test.rb
|
291
320
|
- test/support/sass_rails_test_case.rb
|
292
321
|
- test/test_helper.rb
|
293
|
-
homepage:
|
294
|
-
licenses:
|
295
|
-
|
322
|
+
homepage: https://github.com/rails/sass-rails
|
323
|
+
licenses:
|
324
|
+
- MIT
|
296
325
|
post_install_message:
|
297
326
|
rdoc_options: []
|
298
327
|
require_paths:
|
299
328
|
- lib
|
300
329
|
required_ruby_version: !ruby/object:Gem::Requirement
|
330
|
+
none: false
|
301
331
|
requirements:
|
302
|
-
- -
|
332
|
+
- - ! '>='
|
303
333
|
- !ruby/object:Gem::Version
|
304
334
|
version: '0'
|
305
335
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
336
|
+
none: false
|
306
337
|
requirements:
|
307
|
-
- -
|
338
|
+
- - ! '>'
|
308
339
|
- !ruby/object:Gem::Version
|
309
|
-
version:
|
340
|
+
version: 1.3.1
|
310
341
|
requirements: []
|
311
342
|
rubyforge_project: sass-rails
|
312
|
-
rubygems_version:
|
343
|
+
rubygems_version: 1.8.23
|
313
344
|
signing_key:
|
314
|
-
specification_version:
|
345
|
+
specification_version: 3
|
315
346
|
summary: Sass adapter for the Rails asset pipeline.
|
316
347
|
test_files:
|
317
348
|
- test/fixtures/alternate_config_project/.gitignore
|
@@ -519,3 +550,4 @@ test_files:
|
|
519
550
|
- test/sass_rails_test.rb
|
520
551
|
- test/support/sass_rails_test_case.rb
|
521
552
|
- test/test_helper.rb
|
553
|
+
has_rdoc:
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: fa4a7fa667738b4b4b87420b11c2f45c34cbc250
|
4
|
-
data.tar.gz: f0289349cd742f30ff7fe4cb3f2f192302d4ca80
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 1705f5d67250608735a26f63551ea6c631f3f4fa5786c48470e43a99b907932cdba903cb672573ff0186602880bb061552ddf6645f98982a87be23b60ad1aebd
|
7
|
-
data.tar.gz: 5ec965ecbce68f8fa165c5eddbb17b00bc4d3ae9455073d4a1ab2928f5996bcb6f4cd6a2cce599e3ff02b81ad0dad66deed0d36891fec438b04bb527c5a72005
|
@@ -1,117 +0,0 @@
|
|
1
|
-
require 'tilt'
|
2
|
-
require 'sprockets'
|
3
|
-
|
4
|
-
module Sass::Rails
|
5
|
-
|
6
|
-
class Resolver
|
7
|
-
|
8
|
-
attr_accessor :context
|
9
|
-
|
10
|
-
def initialize(context)
|
11
|
-
@context = context
|
12
|
-
end
|
13
|
-
|
14
|
-
def resolve(path, content_type = :self)
|
15
|
-
options = {}
|
16
|
-
options[:content_type] = content_type unless content_type.nil?
|
17
|
-
context.resolve(path, options)
|
18
|
-
rescue Sprockets::FileNotFound, Sprockets::ContentTypeMismatch
|
19
|
-
nil
|
20
|
-
end
|
21
|
-
|
22
|
-
def source_path(path, ext)
|
23
|
-
context.asset_paths.compute_source_path(path, ::Rails.application.config.assets.prefix, ext)
|
24
|
-
end
|
25
|
-
|
26
|
-
def public_path(path, scope = nil, options = {})
|
27
|
-
context.asset_paths.compute_public_path(path, ::Rails.application.config.assets.prefix, options)
|
28
|
-
end
|
29
|
-
|
30
|
-
def process(path)
|
31
|
-
context.environment[path].to_s
|
32
|
-
end
|
33
|
-
|
34
|
-
def image_path(img)
|
35
|
-
context.image_path(img)
|
36
|
-
end
|
37
|
-
|
38
|
-
def video_path(video)
|
39
|
-
context.video_path(video)
|
40
|
-
end
|
41
|
-
|
42
|
-
def audio_path(audio)
|
43
|
-
context.audio_path(audio)
|
44
|
-
end
|
45
|
-
|
46
|
-
def javascript_path(javascript)
|
47
|
-
context.javascript_path(javascript)
|
48
|
-
end
|
49
|
-
|
50
|
-
def stylesheet_path(stylesheet)
|
51
|
-
context.stylesheet_path(stylesheet)
|
52
|
-
end
|
53
|
-
|
54
|
-
def font_path(font)
|
55
|
-
context.font_path(font)
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
class SassTemplate < Tilt::SassTemplate
|
60
|
-
self.default_mime_type = 'text/css'
|
61
|
-
|
62
|
-
def self.engine_initialized?
|
63
|
-
defined?(::Sass::Engine)
|
64
|
-
end
|
65
|
-
|
66
|
-
def initialize_engine
|
67
|
-
require_template_library 'sass'
|
68
|
-
end
|
69
|
-
|
70
|
-
def syntax
|
71
|
-
:sass
|
72
|
-
end
|
73
|
-
|
74
|
-
def sass_options_from_rails(scope)
|
75
|
-
scope.environment.context_class.sass_config
|
76
|
-
end
|
77
|
-
|
78
|
-
def sass_options(scope)
|
79
|
-
importer = self.importer(scope)
|
80
|
-
options = sass_options_from_rails(scope)
|
81
|
-
load_paths = (options[:load_paths] || []).dup
|
82
|
-
load_paths.unshift(importer)
|
83
|
-
resolver = Resolver.new(scope)
|
84
|
-
css_filename = resolver.source_path(scope.logical_path, 'css')
|
85
|
-
options.merge(
|
86
|
-
:filename => eval_file,
|
87
|
-
:css_filename => css_filename,
|
88
|
-
:line => line,
|
89
|
-
:syntax => syntax,
|
90
|
-
:importer => importer,
|
91
|
-
:load_paths => load_paths,
|
92
|
-
:custom => {
|
93
|
-
:resolver => resolver
|
94
|
-
}
|
95
|
-
)
|
96
|
-
end
|
97
|
-
|
98
|
-
def importer(scope)
|
99
|
-
Sass::Rails::Importer.new(scope)
|
100
|
-
end
|
101
|
-
|
102
|
-
def prepare
|
103
|
-
end
|
104
|
-
|
105
|
-
def evaluate(scope, locals, &block)
|
106
|
-
Sass::Engine.new(data, sass_options(scope)).render
|
107
|
-
end
|
108
|
-
end
|
109
|
-
|
110
|
-
class ScssTemplate < SassTemplate
|
111
|
-
self.default_mime_type = 'text/css'
|
112
|
-
|
113
|
-
def syntax
|
114
|
-
:scss
|
115
|
-
end
|
116
|
-
end
|
117
|
-
end
|