sass 3.2.4 → 3.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.4
1
+ 3.2.5
@@ -1 +1 @@
1
- 22 December 2012 02:32:35 UTC
1
+ 05 January 2013 02:49:12 UTC
@@ -379,7 +379,7 @@ module Sass
379
379
  comment_tab_str = nil
380
380
  first = true
381
381
  lines = []
382
- string.gsub(/\r|\n|\r\n|\r\n/, "\n").scan(/^[^\n]*?$/).each_with_index do |line, index|
382
+ string.gsub(/\r\n|\r|\n/, "\n").scan(/^[^\n]*?$/).each_with_index do |line, index|
383
383
  index += (@options[:line] || 1)
384
384
  if line.strip.empty?
385
385
  lines.last.text << "\n" if lines.last && lines.last.comment?
@@ -115,6 +115,9 @@ module Sass
115
115
  # @param name [String] The filename to search for.
116
116
  # @return [(String, Symbol)] A filename-syntax pair.
117
117
  def find_real_file(dir, name, options)
118
+ # on windows 'dir' can be in native File::ALT_SEPARATOR form
119
+ dir = dir.gsub(File::ALT_SEPARATOR, File::SEPARATOR) unless File::ALT_SEPARATOR.nil?
120
+
118
121
  found = possible_files(remove_root(name)).map do |f, s|
119
122
  path = (dir == "." || Pathname.new(f).absolute?) ? f : "#{dir}/#{f}"
120
123
  Dir[path].map do |full_path|
@@ -102,7 +102,7 @@ module Sass
102
102
  # seq is A, sels is B, and self is C
103
103
 
104
104
  self_without_sel = self.members - sels
105
- group.each {|e, _| e.result = :failed_to_unify}
105
+ group.each {|e, _| e.result = :failed_to_unify unless e.result == :succeeded}
106
106
  next unless unified = seq.members.last.unify(self_without_sel, subject?)
107
107
  group.each {|e, _| e.result = :succeeded}
108
108
  next if group.map {|e, _| check_directives_match!(e, parent_directives)}.none?
@@ -140,7 +140,7 @@ class Sass::Tree::Visitors::CheckNesting < Sass::Tree::Visitors::Base
140
140
  end
141
141
 
142
142
  def try_send(method, *args)
143
- return unless respond_to?(method)
143
+ return unless respond_to?(method, true)
144
144
  send(method, *args)
145
145
  end
146
146
  end
@@ -379,6 +379,7 @@ module Sass
379
379
  #
380
380
  # @param msg [String]
381
381
  def sass_warn(msg)
382
+ msg = msg + "\n" unless ruby1?
382
383
  Sass.logger.warn(msg)
383
384
  end
384
385
 
@@ -484,6 +485,13 @@ module Sass
484
485
 
485
486
  ## Cross-Ruby-Version Compatibility
486
487
 
488
+ # Whether or not this is running under a Ruby version under 2.0.
489
+ #
490
+ # @return [Boolean]
491
+ def ruby1?
492
+ Sass::Util::RUBY_VERSION[0] <= 1
493
+ end
494
+
487
495
  # Whether or not this is running under Ruby 1.8 or lower.
488
496
  #
489
497
  # Note that IronRuby counts as Ruby 1.8,
@@ -2381,6 +2381,21 @@ SASS
2381
2381
 
2382
2382
  # Regression tests
2383
2383
 
2384
+ def test_line_numbers_with_dos_line_endings
2385
+ assert_equal <<CSS, render(<<SASS, :line_comments => true)
2386
+ /* line 5, test_line_numbers_with_dos_line_endings_inline.sass */
2387
+ .foo {
2388
+ a: b; }
2389
+ CSS
2390
+ \r
2391
+ \r
2392
+ \r
2393
+ \r
2394
+ .foo
2395
+ a: b
2396
+ SASS
2397
+ end
2398
+
2384
2399
  def test_variable_in_media_in_mixin
2385
2400
  assert_equal <<CSS, render(<<SASS)
2386
2401
  @media screen and (min-width: 10px) {
@@ -1186,6 +1186,20 @@ SCSS
1186
1186
 
1187
1187
  # Regression Tests
1188
1188
 
1189
+ def test_partially_failed_extend
1190
+ assert_no_warning {assert_equal(<<CSS, render(<<SCSS))}
1191
+ .rc, test {
1192
+ color: white; }
1193
+
1194
+ .prices span.pill span.rc {
1195
+ color: red; }
1196
+ CSS
1197
+ test { @extend .rc; }
1198
+ .rc {color: white;}
1199
+ .prices span.pill span.rc {color: red;}
1200
+ SCSS
1201
+ end
1202
+
1189
1203
  def test_newline_near_combinator
1190
1204
  assert_equal <<CSS, render(<<SCSS)
1191
1205
  .a +
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.4
4
+ version: 3.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-12-22 00:00:00.000000000 Z
14
+ date: 2013-01-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: yard