sass-rails 6.0.0.beta1 → 6.0.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c1b04b0301fea537ecc93336d859d7014bd44547
4
- data.tar.gz: a635205225e4fa734031611d03a2c1436af98184
2
+ SHA256:
3
+ metadata.gz: fdb55e4ec7ba4e141764095288c4657b407434770231b200f53ed959fd3b4cc2
4
+ data.tar.gz: 37f07940c5723becaea39eeb87a6615cae3505f272c0e91adf21ae4481c9639c
5
5
  SHA512:
6
- metadata.gz: 16f8ca2843e8e61ab0d94c7b795880b8952910c3613c0acc44516d07aa516d8e97bf1a2ec76dd7265dc181051666b0ecf509c783045cd9b7b5d5d309ffa6f459
7
- data.tar.gz: bfdc2a2f767e1321b94ba6f46d3eb0d2fd7f89fd6a36a4be0603281de5da251f797de18ad0fcd987d0f751ca11d61f4f82acb1217761714d81780431c9daee29
6
+ metadata.gz: e87ba4605c8479ba1be9bb10294a5574829eb477f195fd1984ad14259515b9215a67aa3c35474414b127b24dd741cce47e8e349211598107840a4a429b582cca
7
+ data.tar.gz: 5727a314aa6f2668336f89966093e3150809a62be53f1e1250ed83bfc58406ce7b4d22915845a5751fd7db4bf238784cb8fa9cbedeeefe26aa98b4c5e6c2050d
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011-2016 Christopher Eppstein
1
+ Copyright (c) 2011-2019 Christopher Eppstein
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -101,4 +101,3 @@ If you need to test against local gems, use Bundler's gem :path option in the Ge
101
101
 
102
102
  * [![Travis CI](https://api.travis-ci.org/rails/sass-rails.svg)](http://travis-ci.org/rails/sass-rails)
103
103
  * [![Gem Version](https://badge.fury.io/rb/sass-rails.svg)](http://badge.fury.io/rb/sass-rails)
104
- * [![Dependencies](https://gemnasium.com/rails/sass-rails.svg)](https://gemnasium.com/rails/sass-rails)
@@ -1 +1 @@
1
- require 'sass/rails'
1
+ require 'sassc/rails'
@@ -1,9 +1 @@
1
- module Sass
2
- module Rails
3
- autoload :Logger, 'sass/rails/logger'
4
- end
5
- end
6
-
7
- require 'sass/rails/version'
8
- require 'sass/rails/importer'
9
- require 'sass/rails/railtie'
1
+ require 'sassc/rails'
@@ -1,158 +1,5 @@
1
- require 'active_support/deprecation/reporting'
2
- require 'sass/importers'
3
- require 'sprockets/file_reader'
4
- require 'sprockets/erb_processor'
5
- require 'sprockets/processor_utils'
1
+ # frozen_string_literal: true
6
2
 
7
- module Sass
8
- module Rails
9
- class SassImporter < Sass::Importers::Filesystem
10
- module Globbing
11
- GLOB = /(\A|\/)(\*|\*\*\/\*)\z/
3
+ require "active_support/deprecation"
12
4
 
13
- def find_relative(name, base, options)
14
- if options[:sprockets] && m = name.match(GLOB)
15
- path = name.sub(m[0], "")
16
- base = File.expand_path(path, File.dirname(base))
17
- glob_imports(base, m[2], options)
18
- else
19
- super
20
- end
21
- end
22
-
23
- def find(name, options)
24
- # globs must be relative
25
- return if name =~ GLOB
26
- super
27
- end
28
-
29
- private
30
- def glob_imports(base, glob, options)
31
- contents = ""
32
- context = options[:sprockets][:context]
33
- each_globbed_file(base, glob, context) do |filename|
34
- next if filename == options[:filename]
35
- contents << "@import #{filename.inspect};\n"
36
- end
37
- return nil if contents == ""
38
- Sass::Engine.new(contents, options.merge(
39
- :filename => base,
40
- :importer => self,
41
- :syntax => :scss
42
- ))
43
- end
44
-
45
- def each_globbed_file(base, glob, context)
46
- raise ArgumentError unless glob == "*" || glob == "**/*"
47
-
48
- exts = extensions.keys.map { |ext| Regexp.escape(".#{ext}") }.join("|")
49
- sass_re = Regexp.compile("(#{exts})$")
50
-
51
- context.depend_on(base)
52
-
53
- Dir["#{base}/#{glob}"].sort.each do |path|
54
- if File.directory?(path)
55
- context.depend_on(path)
56
- elsif sass_re =~ path
57
- yield path
58
- end
59
- end
60
- end
61
- end
62
-
63
- module ERB
64
- def extensions
65
- {
66
- 'css.erb' => :scss_erb,
67
- 'scss.erb' => :scss_erb,
68
- 'sass.erb' => :sass_erb
69
- }.merge(super)
70
- end
71
-
72
- def erb_extensions
73
- {
74
- :scss_erb => :scss,
75
- :sass_erb => :sass
76
- }
77
- end
78
-
79
- def find_relative(*args)
80
- process_erb_engine(super)
81
- end
82
-
83
- def find(*args)
84
- process_erb_engine(super)
85
- end
86
-
87
- private
88
- def process_erb_engine(engine)
89
- if engine && engine.options[:sprockets] && syntax = erb_extensions[engine.options[:syntax]]
90
- context = engine.options[:sprockets][:context]
91
-
92
- input = {
93
- filename: engine.options[:filename],
94
- environment: context.environment,
95
- content_type: "text/#{syntax}",
96
- metadata: {}
97
- }
98
-
99
- processors = [Sprockets::ERBProcessor, Sprockets::FileReader]
100
-
101
- result = Sprockets::ProcessorUtils.call_processors(processors, input)
102
-
103
- Sass::Engine.new(result[:data], engine.options.merge(:syntax => syntax))
104
- else
105
- engine
106
- end
107
- end
108
- end
109
-
110
- module Deprecated
111
- def extensions
112
- {
113
- 'css.scss' => :scss,
114
- 'css.sass' => :sass,
115
- 'css.scss.erb' => :scss_erb,
116
- 'css.sass.erb' => :sass_erb
117
- }.merge(super)
118
- end
119
-
120
- def find_relative(*args)
121
- deprecate_extra_css_extension(super)
122
- end
123
-
124
- def find(*args)
125
- deprecate_extra_css_extension(super)
126
- end
127
-
128
- private
129
- def deprecate_extra_css_extension(engine)
130
- if engine && filename = engine.options[:filename]
131
- if filename.end_with?('.css.scss')
132
- msg = "Extra .css in SCSS file is unnecessary. Rename #{filename} to #{filename.sub('.css.scss', '.scss')}."
133
- elsif filename.end_with?('.css.sass')
134
- msg = "Extra .css in SASS file is unnecessary. Rename #{filename} to #{filename.sub('.css.sass', '.sass')}."
135
- elsif filename.end_with?('.css.scss.erb')
136
- msg = "Extra .css in SCSS/ERB file is unnecessary. Rename #{filename} to #{filename.sub('.css.scss.erb', '.scss.erb')}."
137
- elsif filename.end_with?('.css.sass.erb')
138
- msg = "Extra .css in SASS/ERB file is unnecessary. Rename #{filename} to #{filename.sub('.css.sass.erb', '.sass.erb')}."
139
- end
140
-
141
- ActiveSupport::Deprecation.warn(msg) if msg
142
- end
143
-
144
- engine
145
- end
146
- end
147
-
148
- include ERB
149
- include Deprecated
150
- include Globbing
151
-
152
- # Allow .css files to be @import'd
153
- def extensions
154
- { 'css' => :scss }.merge(super)
155
- end
156
- end
157
- end
158
- end
5
+ ActiveSupport::Deprecation.warn "Sass::Rails::Importer has been removed, please use SassC::Rails::Importer instead."
@@ -1,21 +1,5 @@
1
- require 'sass/logger'
1
+ # frozen_string_literal: true
2
2
 
3
- module Sass
4
- module Rails
5
- class Logger < Sass::Logger::Base
6
- def _log(level, message)
3
+ require "active_support/deprecation"
7
4
 
8
- case level
9
- when :trace, :debug
10
- ::Rails.logger.debug message
11
- when :warn
12
- ::Rails.logger.warn message
13
- when :error
14
- ::Rails.logger.error message
15
- when :info
16
- ::Rails.logger.info message
17
- end
18
- end
19
- end
20
- end
21
- end
5
+ ActiveSupport::Deprecation.warn "Sass::Rails::Logger has been removed, please stop requiring sass/rails/logger."
@@ -1,78 +1 @@
1
- require 'sass'
2
- require 'active_support/core_ext/class/attribute'
3
- require 'sprockets/railtie'
4
- require 'sprockets/sass_processor'
5
-
6
- module Sass::Rails
7
- class Railtie < ::Rails::Railtie
8
- config.sass = ActiveSupport::OrderedOptions.new
9
-
10
- # Establish static configuration defaults
11
- # Emit scss files during stylesheet generation of scaffold
12
- config.sass.preferred_syntax = :scss
13
- # Write sass cache files for performance
14
- config.sass.cache = true
15
- # Read sass cache files for performance
16
- config.sass.read_cache = true
17
- # Display line comments above each selector as a debugging aid
18
- config.sass.line_comments = true
19
- # Initialize the load paths to an empty array
20
- config.sass.load_paths = []
21
- # Send Sass logs to Rails.logger
22
- config.sass.logger = Sass::Rails::Logger.new
23
-
24
- # Set the default stylesheet engine
25
- # It can be overridden by passing:
26
- # --stylesheet_engine=sass
27
- # to the rails generate command
28
- config.app_generators.stylesheet_engine config.sass.preferred_syntax
29
-
30
- if config.respond_to?(:annotations)
31
- config.annotations.register_extensions("scss", "sass") { |annotation| /\/\/\s*(#{annotation}):?\s*(.*)$/ }
32
- end
33
-
34
- # Remove the sass middleware if it gets inadvertently enabled by applications.
35
- config.after_initialize do |app|
36
- app.config.middleware.delete(Sass::Plugin::Rack) if defined?(Sass::Plugin::Rack)
37
- end
38
-
39
- initializer :setup_sass, group: :all do |app|
40
- # Only emit one kind of syntax because though we have registered two kinds of generators
41
- syntax = app.config.sass.preferred_syntax.to_sym
42
- alt_syntax = syntax == :sass ? "scss" : "sass"
43
- app.config.generators.hide_namespace alt_syntax
44
-
45
- # Override stylesheet engine to the preferred syntax
46
- config.app_generators.stylesheet_engine syntax
47
-
48
- # Set the sass cache location
49
- config.sass.cache_location = File.join(Rails.root, "tmp/cache/sass")
50
-
51
- # Establish configuration defaults that are evironmental in nature
52
- if config.sass.full_exception.nil?
53
- # Display a stack trace in the css output when in development-like environments.
54
- config.sass.full_exception = app.config.consider_all_requests_local
55
- end
56
-
57
- config.assets.configure do |env|
58
- env.register_transformer 'text/sass', 'text/css',
59
- Sprockets::SassProcessor.new(importer: SassImporter, sass_config: app.config.sass)
60
- env.register_transformer 'text/scss', 'text/css',
61
- Sprockets::ScssProcessor.new(importer: SassImporter, sass_config: app.config.sass)
62
- end
63
-
64
- Sass.logger = app.config.sass.logger
65
- end
66
-
67
- initializer :setup_compression, group: :all do |app|
68
- if Rails.env.development?
69
- # Use expanded output instead of the sass default of :nested unless specified
70
- app.config.sass.style ||= :expanded
71
- else
72
- # config.assets.css_compressor may be set to nil in non-dev environments.
73
- # otherwise, the default is sass compression.
74
- app.config.assets.css_compressor = :sass unless app.config.assets.has_key?(:css_compressor)
75
- end
76
- end
77
- end
78
- end
1
+ require 'sassc/rails/railtie'
@@ -1,5 +1,5 @@
1
1
  module Sass
2
2
  module Rails
3
- VERSION = "6.0.0.beta1"
3
+ VERSION = "6.0.0.beta2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0.beta1
4
+ version: 6.0.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - wycats
@@ -9,84 +9,28 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-23 00:00:00.000000000 Z
12
+ date: 2019-03-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: railties
15
+ name: sassc-rails
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 4.0.0
21
- - - "<"
22
- - !ruby/object:Gem::Version
23
- version: '5.0'
24
- type: :runtime
25
- prerelease: false
26
- version_requirements: !ruby/object:Gem::Requirement
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- version: 4.0.0
31
- - - "<"
32
- - !ruby/object:Gem::Version
33
- version: '5.0'
34
- - !ruby/object:Gem::Dependency
35
- name: sass
36
- requirement: !ruby/object:Gem::Requirement
37
- requirements:
20
+ version: 2.1.0
38
21
  - - "~>"
39
22
  - !ruby/object:Gem::Version
40
- version: '3.4'
41
- type: :runtime
42
- prerelease: false
43
- version_requirements: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3.4'
48
- - !ruby/object:Gem::Dependency
49
- name: sprockets-rails
50
- requirement: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "<"
53
- - !ruby/object:Gem::Version
54
- version: '4.0'
23
+ version: '2.1'
55
24
  type: :runtime
56
25
  prerelease: false
57
26
  version_requirements: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "<"
60
- - !ruby/object:Gem::Version
61
- version: '4.0'
62
- - !ruby/object:Gem::Dependency
63
- name: sprockets
64
- requirement: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 4.x
69
- type: :runtime
70
- prerelease: false
71
- version_requirements: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 4.x
76
- - !ruby/object:Gem::Dependency
77
- name: sqlite3
78
- requirement: !ruby/object:Gem::Requirement
79
27
  requirements:
80
28
  - - ">="
81
29
  - !ruby/object:Gem::Version
82
- version: '0'
83
- type: :development
84
- prerelease: false
85
- version_requirements: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
30
+ version: 2.1.0
31
+ - - "~>"
88
32
  - !ruby/object:Gem::Version
89
- version: '0'
33
+ version: '2.1'
90
34
  description: Sass adapter for the Rails asset pipeline.
91
35
  email:
92
36
  - wycats@gmail.com
@@ -97,13 +41,6 @@ extra_rdoc_files: []
97
41
  files:
98
42
  - MIT-LICENSE
99
43
  - README.md
100
- - lib/rails/generators/sass/assets/assets_generator.rb
101
- - lib/rails/generators/sass/assets/templates/stylesheet.sass
102
- - lib/rails/generators/sass/scaffold/scaffold_generator.rb
103
- - lib/rails/generators/sass_scaffold.rb
104
- - lib/rails/generators/scss/assets/assets_generator.rb
105
- - lib/rails/generators/scss/assets/templates/stylesheet.scss
106
- - lib/rails/generators/scss/scaffold/scaffold_generator.rb
107
44
  - lib/sass-rails.rb
108
45
  - lib/sass/rails.rb
109
46
  - lib/sass/rails/importer.rb
@@ -129,8 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
66
  - !ruby/object:Gem::Version
130
67
  version: 1.3.1
131
68
  requirements: []
132
- rubyforge_project:
133
- rubygems_version: 2.5.1
69
+ rubygems_version: 3.0.1
134
70
  signing_key:
135
71
  specification_version: 4
136
72
  summary: Sass adapter for the Rails asset pipeline.
@@ -1,13 +0,0 @@
1
- require "rails/generators/named_base"
2
-
3
- module Sass
4
- module Generators
5
- class AssetsGenerator < ::Rails::Generators::NamedBase
6
- source_root File.expand_path("../templates", __FILE__)
7
-
8
- def copy_sass
9
- template "stylesheet.sass", File.join('app/assets/stylesheets', class_path, "#{file_name}.sass")
10
- end
11
- end
12
- end
13
- end
@@ -1,3 +0,0 @@
1
- // Place all the styles related to the <%= name %> controller here.
2
- // They will automatically be included in application.css.
3
- // You can use Sass here: http://sass-lang.com/
@@ -1,9 +0,0 @@
1
- require "rails/generators/sass_scaffold"
2
-
3
- module Sass
4
- module Generators
5
- class ScaffoldGenerator < ::Sass::Generators::ScaffoldBase
6
- def syntax() :sass end
7
- end
8
- end
9
- end
@@ -1,15 +0,0 @@
1
- require "sass/css"
2
- require "rails/generators/named_base"
3
-
4
- module Sass
5
- module Generators
6
- class ScaffoldBase < ::Rails::Generators::NamedBase
7
- def copy_stylesheet
8
- dir = ::Rails::Generators::ScaffoldGenerator.source_root
9
- file = File.join(dir, "scaffold.css")
10
- converted_contents = ::Sass::CSS.new(File.read(file)).render(syntax)
11
- create_file "app/assets/stylesheets/scaffolds.#{syntax}", converted_contents
12
- end
13
- end
14
- end
15
- end
@@ -1,13 +0,0 @@
1
- require "rails/generators/named_base"
2
-
3
- module Scss
4
- module Generators
5
- class AssetsGenerator < ::Rails::Generators::NamedBase
6
- source_root File.expand_path("../templates", __FILE__)
7
-
8
- def copy_scss
9
- template "stylesheet.scss", File.join('app/assets/stylesheets', class_path, "#{file_name}.scss")
10
- end
11
- end
12
- end
13
- end
@@ -1,3 +0,0 @@
1
- // Place all the styles related to the <%= name %> controller here.
2
- // They will automatically be included in application.css.
3
- // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -1,10 +0,0 @@
1
- require "rails/generators/sass_scaffold"
2
-
3
- module Scss
4
- module Generators
5
- class ScaffoldGenerator < ::Sass::Generators::ScaffoldBase
6
- def syntax() :scss end
7
- end
8
- end
9
- end
10
-