sass-rails 3.1.0.rc.4 → 3.1.0.rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile CHANGED
@@ -4,6 +4,7 @@ source "http://rubygems.org"
4
4
  gemspec
5
5
 
6
6
  gem "rails", :git => "git://github.com/rails/rails.git", :branch => "3-1-stable"
7
+ gem "sfl", "~> 2.0"
7
8
  gem "sprockets"
8
9
 
9
10
  # To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
@@ -1,7 +1,3 @@
1
1
  // Place all the styles related to the <%= name %> controller here.
2
2
  // They will automatically be included in application.css.
3
3
  // You can use Sass here: http://sass-lang.com/
4
-
5
- body.<%= name.parameterize.dasherize %>
6
- // Add the <%= name.parameterize.dasherize %> class to your body tag
7
- // Then, place scoped styles here.
@@ -1,8 +1,3 @@
1
1
  // Place all the styles related to the <%= name %> controller here.
2
2
  // They will automatically be included in application.css.
3
3
  // You can use Sass (SCSS) here: http://sass-lang.com/
4
-
5
- body.<%= name.parameterize.dasherize %> {
6
- // Add the <%= name.parameterize.dasherize %> class to your body tag
7
- // Then, place scoped styles here.
8
- }
@@ -8,7 +8,9 @@ module Sass::Rails
8
8
 
9
9
  SASS_EXTENSIONS = {
10
10
  ".css.sass" => :sass,
11
- ".css.scss" => :scss
11
+ ".css.scss" => :scss,
12
+ ".sass" => :sass,
13
+ ".scss" => :scss
12
14
  }
13
15
  attr_reader :context
14
16
 
@@ -1,5 +1,5 @@
1
1
  module Sass
2
2
  module Rails
3
- VERSION = "3.1.0.rc.4"
3
+ VERSION = "3.1.0.rc.5"
4
4
  end
5
5
  end
data/sass-rails.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.add_runtime_dependency 'sass', '>= 3.1.4'
18
18
  s.add_runtime_dependency 'railties', '~> 3.1.0.rc1'
19
19
  s.add_runtime_dependency 'actionpack', '~> 3.1.0.rc1'
20
- s.add_runtime_dependency 'sprockets', '>= 2.0.0.beta.9'
20
+ s.add_runtime_dependency 'sprockets', '>= 2.0.0.beta.9'
21
21
 
22
22
  s.files = `git ls-files`.split("\n")
23
23
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -1,6 +1,6 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- ScssProject::Application.config.session_store :cookie_store, key: '_scss_project_session'
3
+ ScssProject::Application.config.session_store :cookie_store, :key => '_scss_project_session'
4
4
 
5
5
  # Use the database for sessions instead of the cookie-based default,
6
6
  # which shouldn't be used to store highly confidential information
@@ -4,7 +4,7 @@
4
4
  # which will be enabled by default in the upcoming version of Ruby on Rails.
5
5
 
6
6
  # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
- ActionController::Base.wrap_parameters format: [:json]
7
+ ActionController::Base.wrap_parameters :format => [:json]
8
8
 
9
9
  # Disable root element in JSON by default.
10
10
  if defined?(ActiveRecord)
@@ -3,6 +3,7 @@
3
3
  @import "globbed/**/*";
4
4
  @import "subfolder/plain";
5
5
  @import "subfolder/second_level";
6
+ @import "partials/without_css_ext";
6
7
 
7
8
  .main {
8
9
  color: yellow;
@@ -13,4 +14,6 @@
13
14
  asset-path: asset-path("rails.png", image);
14
15
  asset-url: asset-url("rails.png", image);
15
16
  image-url: image-url("rails.png");
16
- }
17
+ }
18
+
19
+ @include without-css-ext;
@@ -0,0 +1,3 @@
1
+ @mixin without-css-ext {
2
+ .without-css-ext { should: work; }
3
+ }
@@ -1,6 +1,6 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- ScssProject::Application.config.session_store :cookie_store, key: '_scss_project_session'
3
+ ScssProject::Application.config.session_store :cookie_store, :key => '_scss_project_session'
4
4
 
5
5
  # Use the database for sessions instead of the cookie-based default,
6
6
  # which shouldn't be used to store highly confidential information
@@ -4,7 +4,7 @@
4
4
  # which will be enabled by default in the upcoming version of Ruby on Rails.
5
5
 
6
6
  # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
- ActionController::Base.wrap_parameters format: [:json]
7
+ ActionController::Base.wrap_parameters :format => [:json]
8
8
 
9
9
  # Disable root element in JSON by default.
10
10
  if defined?(ActiveRecord)
@@ -14,7 +14,7 @@ class SassRailsLoggerTest < Sass::Rails::TestCase
14
14
  app_root = runcmd 'rails runner "print Rails.root"'
15
15
 
16
16
  message = "[#{level}]: sass message"
17
- runcmd %{rails runner "Sass::logger.log_level = :#{level}; Sass::logger.log(:#{level}, '#{message}')"}
17
+ runcmd %{rails runner "Sass::logger.log_level = :#{level}; Sass::logger.log(:#{level}, %Q|#{message}|)"}
18
18
 
19
19
  log_output = File.open("#{app_root}/log/development.log").read
20
20
  assert log_output.include?(message), "the #{level} log message was not found in the log file"
@@ -26,14 +26,14 @@ class SassRailsTest < Sass::Rails::TestCase
26
26
  within_rails_app "scss_project" do
27
27
  runcmd "rails generate controller foo/bar"
28
28
  assert_file_exists "app/assets/stylesheets/foo/bar.css.scss"
29
- assert_match File.read("app/assets/stylesheets/foo/bar.css.scss"), /\.foo-bar/
29
+ assert_match /\.foo-bar/, File.read("app/assets/stylesheets/foo/bar.css.scss")
30
30
  end
31
31
  end
32
32
  test "sass template has correct dasherized css class for namespaced controllers" do
33
33
  within_rails_app "sass_project" do
34
34
  runcmd "rails generate controller foo/bar"
35
35
  assert_file_exists "app/assets/stylesheets/foo/bar.css.sass"
36
- assert_match File.read("app/assets/stylesheets/foo/bar.css.sass"), /\.foo-bar/
36
+ assert_match /\.foo-bar/, File.read("app/assets/stylesheets/foo/bar.css.sass")
37
37
  end
38
38
  end
39
39
  test "templates are registered with sprockets" do
@@ -42,7 +42,7 @@ class SassRailsTest < Sass::Rails::TestCase
42
42
  end
43
43
  test "sprockets require works correctly" do
44
44
  css_output = sprockets_render("scss_project", "css_application.css")
45
- assert_match css_output, /globbed/
45
+ assert_match /globbed/, css_output
46
46
  end
47
47
  test "sass imports work correctly" do
48
48
  css_output = sprockets_render("scss_project", "application.css.scss")
@@ -57,6 +57,7 @@ class SassRailsTest < Sass::Rails::TestCase
57
57
  assert_match css_output, /nested-glob/
58
58
  assert_match css_output, /plain-old-css/
59
59
  assert_match css_output, /another-plain-old-css/
60
+ assert_match css_output, /without-css-ext/
60
61
  end
61
62
  test "sass asset paths work" do
62
63
  css_output = sprockets_render("scss_project", "application.css.scss")
@@ -151,7 +151,7 @@ class Sass::Rails::TestCase < ActiveSupport::TestCase
151
151
  env["BUNDLE_GEMFILE"] = "#{working_directory}/#{gemfile}" if clean_env
152
152
  todo = Proc.new do
153
153
  r, w = IO.pipe
154
- pid = spawn(env, cmd, :out =>w , :err => w, :chdir => working_directory)
154
+ pid = Kernel.spawn(env, cmd, :out =>w , :err => w, :chdir => working_directory)
155
155
  w.close
156
156
  Process.wait
157
157
  output = r.read
data/test/test_helper.rb CHANGED
@@ -4,6 +4,7 @@ ENV["RAILS_ENV"] = "test"
4
4
  require 'rails'
5
5
  require "rails/test_help"
6
6
  require 'sass/rails'
7
+ require 'sfl'
7
8
 
8
9
  Rails.backtrace_cleaner.remove_silencers!
9
10
 
metadata CHANGED
@@ -1,8 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-rails
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 15424111
4
5
  prerelease: 6
5
- version: 3.1.0.rc.4
6
+ segments:
7
+ - 3
8
+ - 1
9
+ - 0
10
+ - rc
11
+ - 5
12
+ version: 3.1.0.rc.5
6
13
  platform: ruby
7
14
  authors:
8
15
  - wycats
@@ -11,7 +18,7 @@ autorequire:
11
18
  bindir: bin
12
19
  cert_chain: []
13
20
 
14
- date: 2011-07-02 00:00:00 -07:00
21
+ date: 2011-07-25 00:00:00 -07:00
15
22
  default_executable:
16
23
  dependencies:
17
24
  - !ruby/object:Gem::Dependency
@@ -22,6 +29,11 @@ dependencies:
22
29
  requirements:
23
30
  - - ">="
24
31
  - !ruby/object:Gem::Version
32
+ hash: 11
33
+ segments:
34
+ - 3
35
+ - 1
36
+ - 4
25
37
  version: 3.1.4
26
38
  type: :runtime
27
39
  version_requirements: *id001
@@ -33,6 +45,13 @@ dependencies:
33
45
  requirements:
34
46
  - - ~>
35
47
  - !ruby/object:Gem::Version
48
+ hash: 15424103
49
+ segments:
50
+ - 3
51
+ - 1
52
+ - 0
53
+ - rc
54
+ - 1
36
55
  version: 3.1.0.rc1
37
56
  type: :runtime
38
57
  version_requirements: *id002
@@ -44,6 +63,13 @@ dependencies:
44
63
  requirements:
45
64
  - - ~>
46
65
  - !ruby/object:Gem::Version
66
+ hash: 15424103
67
+ segments:
68
+ - 3
69
+ - 1
70
+ - 0
71
+ - rc
72
+ - 1
47
73
  version: 3.1.0.rc1
48
74
  type: :runtime
49
75
  version_requirements: *id003
@@ -55,6 +81,13 @@ dependencies:
55
81
  requirements:
56
82
  - - ">="
57
83
  - !ruby/object:Gem::Version
84
+ hash: 62196465
85
+ segments:
86
+ - 2
87
+ - 0
88
+ - 0
89
+ - beta
90
+ - 9
58
91
  version: 2.0.0.beta.9
59
92
  type: :runtime
60
93
  version_requirements: *id004
@@ -145,6 +178,7 @@ files:
145
178
  - test/fixtures/scss_project/app/assets/stylesheets/globbed/nested/nested_glob.css.scss
146
179
  - test/fixtures/scss_project/app/assets/stylesheets/partials/_sass_import.css.sass
147
180
  - test/fixtures/scss_project/app/assets/stylesheets/partials/_scss_import.css.scss
181
+ - test/fixtures/scss_project/app/assets/stylesheets/partials/_without_css_ext.scss
148
182
  - test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_sass.css.sass
149
183
  - test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_scss.css.scss
150
184
  - test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/relative_not_a_partial.css.scss
@@ -203,17 +237,25 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
237
  requirements:
204
238
  - - ">="
205
239
  - !ruby/object:Gem::Version
240
+ hash: 3
241
+ segments:
242
+ - 0
206
243
  version: "0"
207
244
  required_rubygems_version: !ruby/object:Gem::Requirement
208
245
  none: false
209
246
  requirements:
210
247
  - - ">"
211
248
  - !ruby/object:Gem::Version
249
+ hash: 25
250
+ segments:
251
+ - 1
252
+ - 3
253
+ - 1
212
254
  version: 1.3.1
213
255
  requirements: []
214
256
 
215
257
  rubyforge_project: sass-rails
216
- rubygems_version: 1.5.3
258
+ rubygems_version: 1.6.2
217
259
  signing_key:
218
260
  specification_version: 3
219
261
  summary: Sass adapter for the Rails asset pipeline.
@@ -272,6 +314,7 @@ test_files:
272
314
  - test/fixtures/scss_project/app/assets/stylesheets/globbed/nested/nested_glob.css.scss
273
315
  - test/fixtures/scss_project/app/assets/stylesheets/partials/_sass_import.css.sass
274
316
  - test/fixtures/scss_project/app/assets/stylesheets/partials/_scss_import.css.scss
317
+ - test/fixtures/scss_project/app/assets/stylesheets/partials/_without_css_ext.scss
275
318
  - test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_sass.css.sass
276
319
  - test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_scss.css.scss
277
320
  - test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/relative_not_a_partial.css.scss