sass 3.2.8 → 3.2.9

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/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.8
1
+ 3.2.9
data/VERSION_DATE CHANGED
@@ -1 +1 @@
1
- 22 April 2013 19:59:23 UTC
1
+ 10 May 2013 23:56:29 UTC
@@ -234,23 +234,7 @@ module Sass::Plugin
234
234
  def watch(individual_files = [])
235
235
  update_stylesheets(individual_files)
236
236
 
237
- begin
238
- require 'listen'
239
- rescue LoadError => e
240
- dir = Sass::Util.scope("vendor/listen/lib")
241
- if $LOAD_PATH.include?(dir)
242
- e.message << "\n" <<
243
- if File.exists?(scope(".git"))
244
- 'Run "git submodule update --init" to get the recommended version.'
245
- else
246
- 'Run "gem install listen" to get it.'
247
- end
248
- raise e
249
- else
250
- $LOAD_PATH.unshift dir
251
- retry
252
- end
253
- end
237
+ load_listen!
254
238
 
255
239
  template_paths = template_locations # cache the locations
256
240
  individual_files_hash = individual_files.inject({}) do |h, files|
@@ -328,6 +312,43 @@ module Sass::Plugin
328
312
 
329
313
  private
330
314
 
315
+ def load_listen!
316
+ if defined?(gem)
317
+ begin
318
+ gem 'listen', '~> 0.7'
319
+ require 'listen'
320
+ rescue Gem::LoadError
321
+ dir = Sass::Util.scope("vendor/listen/lib")
322
+ $LOAD_PATH.unshift dir
323
+ begin
324
+ require 'listen'
325
+ rescue LoadError => e
326
+ e.message << "\n" <<
327
+ if File.exists?(scope(".git"))
328
+ 'Run "git submodule update --init" to get the recommended version.'
329
+ else
330
+ 'Run "gem install listen" to get it.'
331
+ end
332
+ raise e
333
+ end
334
+ end
335
+ else
336
+ begin
337
+ require 'listen'
338
+ rescue LoadError => e
339
+ dir = Sass::Util.scope("vendor/listen/lib")
340
+ if $LOAD_PATH.include?(dir)
341
+ raise e unless File.exists?(scope(".git"))
342
+ e.message << "\n" <<
343
+ 'Run "git submodule update --init" to get the recommended version.'
344
+ else
345
+ $LOAD_PATH.unshift dir
346
+ retry
347
+ end
348
+ end
349
+ end
350
+ end
351
+
331
352
  def update_stylesheet(filename, css)
332
353
  dir = File.dirname(css)
333
354
  unless File.exists?(dir)
@@ -1423,6 +1423,19 @@ module Sass::Script
1423
1423
  end
1424
1424
  declare :if, [:condition, :if_true, :if_false]
1425
1425
 
1426
+ # This function only exists as a workaround for IE7's [`content:counter`
1427
+ # bug][bug]. It works identically to any other plain-CSS function, except it
1428
+ # avoids adding spaces between the argument commas.
1429
+ #
1430
+ # [bug]: http://jes.st/2013/ie7s-css-breaking-content-counter-bug/
1431
+ #
1432
+ # @example
1433
+ # counter(item, ".") => counter(item,".")
1434
+ def counter(*args)
1435
+ Sass::Script::String.new("counter(#{args.map {|a| a.to_s(options)}.join(',')})")
1436
+ end
1437
+ declare :counter, [], :var_args => true
1438
+
1426
1439
  private
1427
1440
 
1428
1441
  # This method implements the pattern of transforming a numeric value into
@@ -171,7 +171,7 @@ module Sass
171
171
  def with_more_sources(sources)
172
172
  sseq = dup
173
173
  sseq.members = members.dup
174
- sseq.sources.merge sources
174
+ sseq.sources = self.sources | sources
175
175
  sseq
176
176
  end
177
177
 
@@ -1186,6 +1186,20 @@ SCSS
1186
1186
 
1187
1187
  # Regression Tests
1188
1188
 
1189
+ def test_nested_extend_specificity
1190
+ assert_equal <<CSS, render(<<SCSS)
1191
+ a :b, a :b:c {
1192
+ a: b; }
1193
+ CSS
1194
+ %foo {a: b}
1195
+
1196
+ a {
1197
+ :b {@extend %foo}
1198
+ :b:c {@extend %foo}
1199
+ }
1200
+ SCSS
1201
+ end
1202
+
1189
1203
  def test_nested_double_extend_optimization
1190
1204
  assert_equal <<CSS, render(<<SCSS)
1191
1205
  .parent1 .child {
@@ -1037,6 +1037,12 @@ MSG
1037
1037
  assert_equal("2px", evaluate("if(null, 1px, 2px)"))
1038
1038
  end
1039
1039
 
1040
+ def test_counter
1041
+ assert_equal("counter(foo)", evaluate("counter(foo)"))
1042
+ assert_equal('counter(item,".")', evaluate('counter(item, ".")'))
1043
+ assert_equal('counter(item,".")', evaluate('counter(item,".")'))
1044
+ end
1045
+
1040
1046
  def test_keyword_args_rgb
1041
1047
  assert_equal(%Q{white}, evaluate("rgb($red: 255, $green: 255, $blue: 255)"))
1042
1048
  end
@@ -1105,7 +1111,9 @@ MSG
1105
1111
  private
1106
1112
 
1107
1113
  def evaluate(value)
1108
- Sass::Script::Parser.parse(value, 0, 0).perform(Sass::Environment.new).to_s
1114
+ result = perform(value)
1115
+ assert_kind_of Sass::Script::Literal, result
1116
+ return result.to_s
1109
1117
  end
1110
1118
 
1111
1119
  def perform(value)
@@ -543,6 +543,7 @@ SASS
543
543
  def resolve(str, opts = {}, environment = env)
544
544
  munge_filename opts
545
545
  val = eval(str, opts, environment)
546
+ assert_kind_of Sass::Script::Literal, val
546
547
  val.is_a?(Sass::Script::String) ? val.value : val.to_s
547
548
  end
548
549
 
@@ -1,3 +1,10 @@
1
+ ## 0.7.3 - February 24, 2013
2
+
3
+ ### Bug fix
4
+
5
+ - [#88] Update wdm dependency. (fixed by [@mrbinky3000][])
6
+ - [#78] Depend on latest rb-inotify. (fixed by [@mbj][])
7
+
1
8
  ## 0.7.2 - January 11, 2013
2
9
 
3
10
  ### Bug fix
@@ -8,7 +8,7 @@ gem 'rake'
8
8
 
9
9
  gem 'rb-kqueue', '~> 0.2' if RbConfig::CONFIG['target_os'] =~ /freebsd/i
10
10
  gem 'rb-fsevent', '~> 0.9.1' if RbConfig::CONFIG['target_os'] =~ /darwin(1.+)?$/i
11
- gem 'rb-inotify', '~> 0.8.8', :github => 'mbj/rb-inotify' if RbConfig::CONFIG['target_os'] =~ /linux/i
11
+ gem 'rb-inotify', '~> 0.9.0' if RbConfig::CONFIG['target_os'] =~ /linux/i
12
12
  gem 'wdm', '~> 0.0.3' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i
13
13
 
14
14
  group :development do
@@ -7,7 +7,7 @@ module Listen
7
7
  extend DependencyManager
8
8
 
9
9
  # Declare the adapter's dependencies
10
- dependency 'rb-fsevent', '~> 0.9.1'
10
+ dependency 'rb-fsevent', '~> 0.9'
11
11
 
12
12
  LAST_SEPARATOR_REGEX = /\/$/
13
13
 
@@ -7,7 +7,7 @@ module Listen
7
7
  extend DependencyManager
8
8
 
9
9
  # Declare the adapter's dependencies
10
- dependency 'rb-inotify', '~> 0.8.8'
10
+ dependency 'rb-inotify', '~> 0.9'
11
11
 
12
12
  # Watched inotify events
13
13
  #
@@ -9,7 +9,7 @@ module Listen
9
9
  extend DependencyManager
10
10
 
11
11
  # Declare the adapter's dependencies
12
- dependency 'wdm', '~> 0.0.3'
12
+ dependency 'wdm', '~> 0.1'
13
13
 
14
14
  # Initializes the Adapter. See {Listen::Adapter#initialize} for more info.
15
15
  #
@@ -1,3 +1,3 @@
1
1
  module Listen
2
- VERSION = '0.7.2'
2
+ VERSION = '0.7.3'
3
3
  end
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.8
4
+ version: 3.2.9
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: 2013-04-22 00:00:00.000000000 Z
14
+ date: 2013-05-10 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: yard