haml-edge 3.1.47 → 3.1.48
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/EDGE_GEM_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/haml/util.rb +1 -0
- data/lib/sass/plugin/configuration.rb +4 -7
- data/lib/sass/plugin/generic.rb +15 -0
- data/lib/sass/plugin.rb +7 -2
- data/lib/sass/script/lexer.rb +1 -1
- data/test/sass/script_test.rb +12 -0
- metadata +3 -2
data/EDGE_GEM_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.1.
|
|
1
|
+
3.1.48
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.1.
|
|
1
|
+
3.1.48
|
data/lib/haml/util.rb
CHANGED
|
@@ -441,6 +441,7 @@ MSG
|
|
|
441
441
|
# @raise [ArgumentError] if the document declares an unknown encoding
|
|
442
442
|
def check_haml_encoding(str, &block)
|
|
443
443
|
return check_encoding(str, &block) if ruby1_8?
|
|
444
|
+
str = str.dup if str.frozen?
|
|
444
445
|
|
|
445
446
|
bom, encoding = parse_haml_magic_comment(str)
|
|
446
447
|
if encoding; str.force_encoding(encoding)
|
|
@@ -117,12 +117,7 @@ module Sass
|
|
|
117
117
|
# The location of the CSS file that was deleted.
|
|
118
118
|
define_callback :deleting_css
|
|
119
119
|
|
|
120
|
-
@options = {
|
|
121
|
-
:css_location => './public/stylesheets',
|
|
122
|
-
:always_update => false,
|
|
123
|
-
:always_check => true,
|
|
124
|
-
:full_exception => true
|
|
125
|
-
}
|
|
120
|
+
@options = {:full_exception => true}
|
|
126
121
|
|
|
127
122
|
# An options hash.
|
|
128
123
|
# See {file:SASS_REFERENCE.md#sass_options the Sass options documentation}.
|
|
@@ -215,7 +210,9 @@ module Sass
|
|
|
215
210
|
return if options[:template_location].is_a?(Array)
|
|
216
211
|
options[:template_location] =
|
|
217
212
|
case options[:template_location]
|
|
218
|
-
when nil
|
|
213
|
+
when nil
|
|
214
|
+
css_location = options[:css_location] || './public/stylesheets'
|
|
215
|
+
[[File.join(css_location, 'sass'), css_location]]
|
|
219
216
|
when String; [[options[:template_location], options[:css_location]]]
|
|
220
217
|
else; options[:template_location].to_a
|
|
221
218
|
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# The reason some options are declared here rather than in sass/plugin/configuration.rb
|
|
2
|
+
# is that otherwise they'd clobber the Rails-specific options.
|
|
3
|
+
# Since Rails' options are lazy-loaded in Rails 3,
|
|
4
|
+
# they're reverse-merged with the default options
|
|
5
|
+
# so that user configuration is preserved.
|
|
6
|
+
# This means that defaults that differ from Rails'
|
|
7
|
+
# must be declared here.
|
|
8
|
+
|
|
9
|
+
unless defined?(Sass::GENERIC_LOADED)
|
|
10
|
+
Sass::GENERIC_LOADED = true
|
|
11
|
+
|
|
12
|
+
Sass::Plugin.options.merge!(:css_location => './public/stylesheets',
|
|
13
|
+
:always_update => false,
|
|
14
|
+
:always_check => true)
|
|
15
|
+
end
|
data/lib/sass/plugin.rb
CHANGED
|
@@ -265,5 +265,10 @@ module Sass
|
|
|
265
265
|
end
|
|
266
266
|
end
|
|
267
267
|
|
|
268
|
-
|
|
269
|
-
require 'sass/plugin/
|
|
268
|
+
if defined?(ActionController)
|
|
269
|
+
require 'sass/plugin/rails'
|
|
270
|
+
elsif defined?(Merb::Plugins)
|
|
271
|
+
require 'sass/plugin/merb'
|
|
272
|
+
else
|
|
273
|
+
require 'sass/plugin/generic'
|
|
274
|
+
end
|
data/lib/sass/script/lexer.rb
CHANGED
|
@@ -92,7 +92,7 @@ module Sass
|
|
|
92
92
|
:number => /(-)?(?:(\d*\.\d+)|(\d+))([a-zA-Z%]+)?/,
|
|
93
93
|
:color => HEXCOLOR,
|
|
94
94
|
:bool => /(true|false)\b/,
|
|
95
|
-
:ident_op => %r{(#{Regexp.union(*IDENT_OP_NAMES.map{|s| Regexp.new(Regexp.escape(s) +
|
|
95
|
+
:ident_op => %r{(#{Regexp.union(*IDENT_OP_NAMES.map{|s| Regexp.new(Regexp.escape(s) + "(?!#{NMCHAR}|$)")})})},
|
|
96
96
|
:op => %r{(#{Regexp.union(*OP_NAMES)})},
|
|
97
97
|
}
|
|
98
98
|
|
data/test/sass/script_test.rb
CHANGED
|
@@ -390,6 +390,18 @@ SASS
|
|
|
390
390
|
'Invalid CSS after "foo(bar, ": expected function argument, was ")"') {eval('foo(bar, )')}
|
|
391
391
|
end
|
|
392
392
|
|
|
393
|
+
def test_color_prefixed_identifier
|
|
394
|
+
assert_equal "tealbang", resolve("tealbang")
|
|
395
|
+
assert_equal "teal-bang", resolve("teal-bang")
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
def test_op_prefixed_identifier
|
|
399
|
+
assert_equal "notbang", resolve("notbang")
|
|
400
|
+
assert_equal "not-bang", resolve("not-bang")
|
|
401
|
+
assert_equal "or-bang", resolve("or-bang")
|
|
402
|
+
assert_equal "and-bang", resolve("and-bang")
|
|
403
|
+
end
|
|
404
|
+
|
|
393
405
|
private
|
|
394
406
|
|
|
395
407
|
def resolve(str, opts = {}, environment = env)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: haml-edge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.1.
|
|
4
|
+
version: 3.1.48
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nathan Weizenbaum
|
|
@@ -11,7 +11,7 @@ autorequire:
|
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
13
|
|
|
14
|
-
date: 2010-06-
|
|
14
|
+
date: 2010-06-23 00:00:00 -04:00
|
|
15
15
|
default_executable:
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
@@ -91,6 +91,7 @@ files:
|
|
|
91
91
|
- lib/sass/plugin/rack.rb
|
|
92
92
|
- lib/sass/plugin/rails.rb
|
|
93
93
|
- lib/sass/plugin/staleness_checker.rb
|
|
94
|
+
- lib/sass/plugin/generic.rb
|
|
94
95
|
- lib/sass/repl.rb
|
|
95
96
|
- lib/sass/script.rb
|
|
96
97
|
- lib/sass/script/bool.rb
|