sassc 1.8.3 → 1.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/ext/libsass/.editorconfig +1 -1
- data/ext/libsass/.gitignore +1 -0
- data/ext/libsass/LICENSE +1 -1
- data/ext/libsass/Makefile +20 -14
- data/ext/libsass/Makefile.conf +0 -1
- data/ext/libsass/Readme.md +3 -1
- data/ext/libsass/appveyor.yml +19 -11
- data/ext/libsass/docs/api-importer-example.md +2 -1235
- data/ext/libsass/docs/build-with-autotools.md +10 -0
- data/ext/libsass/docs/build-with-makefiles.md +18 -0
- data/ext/libsass/include/sass/base.h +4 -1
- data/ext/libsass/include/sass/values.h +2 -1
- data/ext/libsass/src/ast.cpp +279 -346
- data/ext/libsass/src/ast.hpp +234 -60
- data/ext/libsass/src/base64vlq.cpp +1 -0
- data/ext/libsass/src/bind.cpp +35 -45
- data/ext/libsass/src/bind.hpp +1 -0
- data/ext/libsass/src/color_maps.cpp +1 -0
- data/ext/libsass/src/constants.cpp +4 -1
- data/ext/libsass/src/constants.hpp +2 -1
- data/ext/libsass/src/context.cpp +41 -31
- data/ext/libsass/src/context.hpp +10 -10
- data/ext/libsass/src/cssize.cpp +7 -4
- data/ext/libsass/src/cssize.hpp +1 -3
- data/ext/libsass/src/debugger.hpp +73 -14
- data/ext/libsass/src/emitter.cpp +37 -25
- data/ext/libsass/src/emitter.hpp +10 -9
- data/ext/libsass/src/environment.cpp +16 -5
- data/ext/libsass/src/environment.hpp +5 -3
- data/ext/libsass/src/error_handling.cpp +91 -14
- data/ext/libsass/src/error_handling.hpp +105 -4
- data/ext/libsass/src/eval.cpp +519 -330
- data/ext/libsass/src/eval.hpp +12 -13
- data/ext/libsass/src/expand.cpp +92 -56
- data/ext/libsass/src/expand.hpp +5 -3
- data/ext/libsass/src/extend.cpp +60 -51
- data/ext/libsass/src/extend.hpp +1 -3
- data/ext/libsass/src/file.cpp +37 -27
- data/ext/libsass/src/functions.cpp +78 -62
- data/ext/libsass/src/functions.hpp +1 -0
- data/ext/libsass/src/inspect.cpp +293 -64
- data/ext/libsass/src/inspect.hpp +2 -0
- data/ext/libsass/src/lexer.cpp +1 -0
- data/ext/libsass/src/listize.cpp +14 -15
- data/ext/libsass/src/listize.hpp +3 -5
- data/ext/libsass/src/memory_manager.cpp +1 -0
- data/ext/libsass/src/node.cpp +2 -3
- data/ext/libsass/src/operation.hpp +70 -71
- data/ext/libsass/src/output.cpp +28 -32
- data/ext/libsass/src/output.hpp +1 -2
- data/ext/libsass/src/parser.cpp +402 -183
- data/ext/libsass/src/parser.hpp +19 -9
- data/ext/libsass/src/plugins.cpp +1 -0
- data/ext/libsass/src/position.cpp +1 -0
- data/ext/libsass/src/prelexer.cpp +134 -56
- data/ext/libsass/src/prelexer.hpp +51 -3
- data/ext/libsass/src/remove_placeholders.cpp +35 -9
- data/ext/libsass/src/remove_placeholders.hpp +4 -3
- data/ext/libsass/src/sass.cpp +1 -0
- data/ext/libsass/src/sass.hpp +129 -0
- data/ext/libsass/src/sass_context.cpp +31 -14
- data/ext/libsass/src/sass_context.hpp +2 -31
- data/ext/libsass/src/sass_functions.cpp +1 -0
- data/ext/libsass/src/sass_interface.cpp +5 -6
- data/ext/libsass/src/sass_util.cpp +1 -2
- data/ext/libsass/src/sass_util.hpp +5 -5
- data/ext/libsass/src/sass_values.cpp +13 -10
- data/ext/libsass/src/source_map.cpp +4 -3
- data/ext/libsass/src/source_map.hpp +2 -2
- data/ext/libsass/src/subset_map.hpp +0 -1
- data/ext/libsass/src/to_c.cpp +1 -0
- data/ext/libsass/src/to_c.hpp +1 -3
- data/ext/libsass/src/to_value.cpp +3 -5
- data/ext/libsass/src/to_value.hpp +1 -1
- data/ext/libsass/src/units.cpp +96 -59
- data/ext/libsass/src/units.hpp +10 -8
- data/ext/libsass/src/utf8_string.cpp +5 -0
- data/ext/libsass/src/util.cpp +23 -156
- data/ext/libsass/src/util.hpp +10 -14
- data/ext/libsass/src/values.cpp +1 -0
- data/ext/libsass/test/test_node.cpp +2 -6
- data/ext/libsass/test/test_selector_difference.cpp +1 -3
- data/ext/libsass/test/test_specificity.cpp +0 -2
- data/ext/libsass/test/test_superselector.cpp +0 -2
- data/ext/libsass/test/test_unification.cpp +1 -3
- data/ext/libsass/win/libsass.targets +18 -5
- data/ext/libsass/win/libsass.vcxproj +9 -7
- data/ext/libsass/win/libsass.vcxproj.filters +148 -106
- data/lib/sassc/version.rb +1 -1
- data/test/engine_test.rb +12 -0
- data/test/native_test.rb +1 -1
- metadata +3 -4
- data/ext/libsass/src/to_string.cpp +0 -48
- data/ext/libsass/src/to_string.hpp +0 -38
data/lib/sassc/version.rb
CHANGED
data/test/engine_test.rb
CHANGED
@@ -194,5 +194,17 @@ CSS
|
|
194
194
|
output = Engine.new('').render
|
195
195
|
assert_equal '', output
|
196
196
|
end
|
197
|
+
|
198
|
+
def test_empty_template_returns_a_new_object
|
199
|
+
input = ''
|
200
|
+
output = Engine.new(input).render
|
201
|
+
assert input.object_id != output.object_id, 'empty template must return a new object'
|
202
|
+
end
|
203
|
+
|
204
|
+
def test_empty_template_encoding_matches_input
|
205
|
+
input = ''.force_encoding("ISO-8859-1")
|
206
|
+
output = Engine.new(input).render
|
207
|
+
assert_equal input.encoding, output.encoding
|
208
|
+
end
|
197
209
|
end
|
198
210
|
end
|
data/test/native_test.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sassc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Boland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -279,6 +279,7 @@ files:
|
|
279
279
|
- ext/libsass/src/remove_placeholders.cpp
|
280
280
|
- ext/libsass/src/remove_placeholders.hpp
|
281
281
|
- ext/libsass/src/sass.cpp
|
282
|
+
- ext/libsass/src/sass.hpp
|
282
283
|
- ext/libsass/src/sass2scss.cpp
|
283
284
|
- ext/libsass/src/sass_context.cpp
|
284
285
|
- ext/libsass/src/sass_context.hpp
|
@@ -295,8 +296,6 @@ files:
|
|
295
296
|
- ext/libsass/src/support/libsass.pc.in
|
296
297
|
- ext/libsass/src/to_c.cpp
|
297
298
|
- ext/libsass/src/to_c.hpp
|
298
|
-
- ext/libsass/src/to_string.cpp
|
299
|
-
- ext/libsass/src/to_string.hpp
|
300
299
|
- ext/libsass/src/to_value.cpp
|
301
300
|
- ext/libsass/src/to_value.hpp
|
302
301
|
- ext/libsass/src/units.cpp
|
@@ -1,48 +0,0 @@
|
|
1
|
-
#include <cmath>
|
2
|
-
#include <sstream>
|
3
|
-
#include <iomanip>
|
4
|
-
#include <iostream>
|
5
|
-
|
6
|
-
#include "ast.hpp"
|
7
|
-
#include "inspect.hpp"
|
8
|
-
#include "context.hpp"
|
9
|
-
#include "to_string.hpp"
|
10
|
-
|
11
|
-
namespace Sass {
|
12
|
-
|
13
|
-
To_String::To_String(Context* ctx, bool in_declaration, bool in_debug)
|
14
|
-
: ctx(ctx), in_declaration(in_declaration), in_debug(in_debug) { }
|
15
|
-
To_String::~To_String() { }
|
16
|
-
|
17
|
-
inline std::string To_String::fallback_impl(AST_Node* n)
|
18
|
-
{
|
19
|
-
Emitter emitter(ctx);
|
20
|
-
Inspect i(emitter);
|
21
|
-
i.in_declaration = in_declaration;
|
22
|
-
i.in_debug = in_debug;
|
23
|
-
if (n) n->perform(&i);
|
24
|
-
return i.get_buffer();
|
25
|
-
}
|
26
|
-
|
27
|
-
inline std::string To_String::operator()(String_Schema* s)
|
28
|
-
{
|
29
|
-
std::string acc("");
|
30
|
-
for (size_t i = 0, L = s->length(); i < L; ++i) {
|
31
|
-
acc += s->elements()[i]->perform(this);
|
32
|
-
}
|
33
|
-
return acc;
|
34
|
-
}
|
35
|
-
|
36
|
-
inline std::string To_String::operator()(String_Quoted* s)
|
37
|
-
{
|
38
|
-
return s->value();
|
39
|
-
}
|
40
|
-
|
41
|
-
inline std::string To_String::operator()(String_Constant* s)
|
42
|
-
{
|
43
|
-
return s->value();
|
44
|
-
}
|
45
|
-
|
46
|
-
inline std::string To_String::operator()(Null* n)
|
47
|
-
{ return in_debug ? "null" : ""; }
|
48
|
-
}
|
@@ -1,38 +0,0 @@
|
|
1
|
-
#ifndef SASS_TO_STRING_H
|
2
|
-
#define SASS_TO_STRING_H
|
3
|
-
|
4
|
-
#include <string>
|
5
|
-
|
6
|
-
#include "operation.hpp"
|
7
|
-
|
8
|
-
namespace Sass {
|
9
|
-
|
10
|
-
class Context;
|
11
|
-
class Null;
|
12
|
-
|
13
|
-
class To_String : public Operation_CRTP<std::string, To_String> {
|
14
|
-
// import all the class-specific methods and override as desired
|
15
|
-
using Operation<std::string>::operator();
|
16
|
-
// override this to define a catch-all
|
17
|
-
std::string fallback_impl(AST_Node* n);
|
18
|
-
|
19
|
-
Context* ctx;
|
20
|
-
bool in_declaration;
|
21
|
-
bool in_debug;
|
22
|
-
|
23
|
-
public:
|
24
|
-
|
25
|
-
To_String(Context* ctx = 0, bool in_declaration = true, bool in_debug = false);
|
26
|
-
virtual ~To_String();
|
27
|
-
|
28
|
-
std::string operator()(Null* n);
|
29
|
-
std::string operator()(String_Schema*);
|
30
|
-
std::string operator()(String_Quoted*);
|
31
|
-
std::string operator()(String_Constant*);
|
32
|
-
|
33
|
-
template <typename U>
|
34
|
-
std::string fallback(U n) { return fallback_impl(n); }
|
35
|
-
};
|
36
|
-
}
|
37
|
-
|
38
|
-
#endif
|