sassc 1.8.1 → 1.8.2

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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/ext/libsass/Makefile +10 -6
  4. data/ext/libsass/Readme.md +4 -4
  5. data/ext/libsass/appveyor.yml +16 -1
  6. data/ext/libsass/docs/README.md +1 -1
  7. data/ext/libsass/docs/api-context-example.md +1 -1
  8. data/ext/libsass/docs/api-context.md +1 -1
  9. data/ext/libsass/docs/api-doc.md +1 -1
  10. data/ext/libsass/docs/api-function-example.md +12 -3
  11. data/ext/libsass/docs/api-function-internal.md +4 -4
  12. data/ext/libsass/docs/api-function.md +15 -13
  13. data/ext/libsass/docs/api-importer-internal.md +9 -4
  14. data/ext/libsass/docs/api-value.md +1 -1
  15. data/ext/libsass/docs/build-shared-library.md +3 -3
  16. data/ext/libsass/docs/custom-functions-internal.md +1 -1
  17. data/ext/libsass/docs/{plugins.go → plugins.md} +0 -0
  18. data/ext/libsass/script/ci-build-libsass +25 -36
  19. data/ext/libsass/script/ci-install-deps +3 -8
  20. data/ext/libsass/script/ci-report-coverage +17 -13
  21. data/ext/libsass/src/ast.cpp +102 -7
  22. data/ext/libsass/src/ast.hpp +53 -27
  23. data/ext/libsass/src/ast_def_macros.hpp +8 -0
  24. data/ext/libsass/src/ast_fwd_decl.hpp +3 -2
  25. data/ext/libsass/src/backtrace.hpp +1 -1
  26. data/ext/libsass/src/bind.cpp +28 -17
  27. data/ext/libsass/src/bind.hpp +1 -1
  28. data/ext/libsass/src/context.cpp +441 -184
  29. data/ext/libsass/src/context.hpp +79 -82
  30. data/ext/libsass/src/debugger.hpp +3 -1
  31. data/ext/libsass/src/emitter.cpp +18 -17
  32. data/ext/libsass/src/emitter.hpp +5 -2
  33. data/ext/libsass/src/error_handling.cpp +78 -7
  34. data/ext/libsass/src/error_handling.hpp +50 -9
  35. data/ext/libsass/src/eval.cpp +100 -36
  36. data/ext/libsass/src/eval.hpp +5 -5
  37. data/ext/libsass/src/expand.cpp +32 -3
  38. data/ext/libsass/src/extend.cpp +1 -1
  39. data/ext/libsass/src/file.cpp +39 -27
  40. data/ext/libsass/src/file.hpp +67 -13
  41. data/ext/libsass/src/functions.cpp +39 -32
  42. data/ext/libsass/src/inspect.cpp +21 -21
  43. data/ext/libsass/src/json.cpp +1 -1
  44. data/ext/libsass/src/lexer.hpp +33 -4
  45. data/ext/libsass/src/output.cpp +11 -11
  46. data/ext/libsass/src/parser.cpp +28 -130
  47. data/ext/libsass/src/parser.hpp +0 -4
  48. data/ext/libsass/src/prelexer.cpp +8 -5
  49. data/ext/libsass/src/prelexer.hpp +1 -3
  50. data/ext/libsass/src/sass_context.cpp +52 -241
  51. data/ext/libsass/src/sass_context.hpp +156 -0
  52. data/ext/libsass/src/sass_functions.cpp +1 -26
  53. data/ext/libsass/src/sass_functions.hpp +32 -0
  54. data/ext/libsass/src/sass_interface.cpp +14 -48
  55. data/ext/libsass/src/sass_values.cpp +3 -77
  56. data/ext/libsass/src/sass_values.hpp +81 -0
  57. data/ext/libsass/src/source_map.cpp +7 -7
  58. data/ext/libsass/src/source_map.hpp +1 -4
  59. data/ext/libsass/src/to_string.cpp +4 -3
  60. data/ext/libsass/src/to_string.hpp +2 -1
  61. data/ext/libsass/src/util.cpp +34 -16
  62. data/ext/libsass/src/util.hpp +10 -8
  63. data/lib/sassc/version.rb +1 -1
  64. data/lib/tasks/libsass.rb +1 -1
  65. data/test/custom_importer_test.rb +6 -4
  66. data/test/engine_test.rb +5 -3
  67. data/test/functions_test.rb +1 -0
  68. data/test/native_test.rb +1 -1
  69. metadata +6 -4
  70. data/ext/libsass/script/coveralls-debug +0 -32
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91b3f5152e03b21d9b101c9ee37e998565a900fe
4
- data.tar.gz: a872b4b0599925f217186897efa68c68e536837c
3
+ metadata.gz: 8d364a5c0cc8d7b4890657139a0970c0bf39385e
4
+ data.tar.gz: 095ebc9195614341559f74e687e59ee951c75dcf
5
5
  SHA512:
6
- metadata.gz: f81496b861e719e6aad4efb4fa392ced9503967a155e405680d278b5d10c8add33f1a4bcc2bd97d3bbce847d447ce9171e9c6762776ec0fd0d6ac217d64a6ec7
7
- data.tar.gz: c3093d1aae7a2f0ffd6c192d5e6d198f75be5e2a6d8b9d094e33bd167b23ccbc6346858dd922bf4a17620cb890cf4ac7e246c660eea82fb8daaa79581717f22c
6
+ metadata.gz: 9e97b7a55b207c857d6f2017e7877e6f7df3385e6c366ccc5412ab2fdddf73578ffd6be0279427b6b51df81d886bbd368000a267c8039c9411e7c3c9c7ee4759
7
+ data.tar.gz: 40a4b7bcca1a22180400841ce114f5b67c72e8e88e30315dacd265a9c3470994df40695f8d65a23c58074d141c328e7cdaa46f792ae4c49b8b9da392d877b5be
data/README.md CHANGED
@@ -6,7 +6,7 @@ This gem combines the speed of `libsass`, the [Sass C implementation](https://gi
6
6
 
7
7
  ### libsass Version
8
8
 
9
- [3.3.1](https://github.com/sass/libsass/releases/tag/3.3.1)
9
+ [3.3.2](https://github.com/sass/libsass/releases/tag/3.3.2)
10
10
 
11
11
  ## Usage
12
12
 
@@ -25,6 +25,8 @@ and [awesome contributors](https://github.com/bolandrm/sassc-ruby/graphs/contrib
25
25
 
26
26
  ## Changelog
27
27
 
28
+ - **1.8.2**
29
+ - Update to Libsass 3.3.2
28
30
  - **1.8.1**
29
31
  - Update to Libsass 3.3.1
30
32
  - **1.8.0**
data/ext/libsass/Makefile CHANGED
@@ -152,9 +152,11 @@ ifeq (MinGW,$(UNAME))
152
152
  LIB_SHARED = $(SASS_LIBSASS_PATH)/lib/libsass.dll
153
153
  endif
154
154
  else
155
- CFLAGS += -fPIC
156
- CXXFLAGS += -fPIC
157
- LDFLAGS += -fPIC
155
+ ifneq (Cygwin,$(UNAME))
156
+ CFLAGS += -fPIC
157
+ CXXFLAGS += -fPIC
158
+ LDFLAGS += -fPIC
159
+ endif
158
160
  endif
159
161
 
160
162
  ifeq (MinGW,$(UNAME))
@@ -177,9 +179,11 @@ ifeq (MinGW,$(UNAME))
177
179
  CXXFLAGS += -D ADD_EXPORTS
178
180
  endif
179
181
  else
180
- CFLAGS += -fPIC
181
- CXXFLAGS += -fPIC
182
- LDFLAGS += -fPIC
182
+ ifneq (Cygwin,$(UNAME))
183
+ CFLAGS += -fPIC
184
+ CXXFLAGS += -fPIC
185
+ LDFLAGS += -fPIC
186
+ endif
183
187
  endif
184
188
 
185
189
  OBJECTS = $(addprefix src/,$(SOURCES:.cpp=.o))
@@ -14,7 +14,7 @@ https://github.com/sass/libsass
14
14
  LibSass is just a library, but if you want to RUN LibSass,
15
15
  then go to https://github.com/sass/sassc or
16
16
  https://github.com/sass/ruby-libsass or
17
- [find your local implementer](https://github.com/sass/libsass/wiki/Implementations).
17
+ [find your local implementer](docs/implementations.md).
18
18
 
19
19
  LibSass requires GCC 4.6+ or Clang/LLVM. If your OS is older, this version may not compile.
20
20
 
@@ -54,12 +54,12 @@ Library Usage
54
54
  While LibSass is a library primarily written in C++, it provides a simple
55
55
  C interface which should be used by most implementers. LibSass does not do
56
56
  much on its own without an implementer. This can be a command line tool, like
57
- [sassc](https://github.com/sass/sassc) or a [binding](https://github.com/sass/libsass/wiki/Implementations)
57
+ [sassc](https://github.com/sass/sassc) or a [binding](docs/implementations.md)
58
58
  to your favorite programing language.
59
59
 
60
60
  If you want to build or interface with LibSass, we recommend to check out the
61
- wiki pages about [building LibSass](https://github.com/sass/libsass/wiki/building-libsass) and
62
- the [C-API documentation](https://github.com/sass/libsass/wiki/API-Documentation).
61
+ documentation pages about [building LibSass](docs/build.md) and
62
+ the [C-API documentation](docs/api-doc.md).
63
63
 
64
64
  About Sass
65
65
  ----------
@@ -52,4 +52,19 @@ build_script:
52
52
  ruby -v
53
53
 
54
54
  test_script:
55
- - ps: ruby sass-spec/sass-spec.rb -c $env:TargetPath -s --ignore-todo sass-spec/spec
55
+ - ps: |
56
+ $PRNR = [System.Environment]::ExpandEnvironmentVariables("%APPVEYOR_PULL_REQUEST_NUMBER%")
57
+ if ($PRNR -ne "") {
58
+ echo "Fetching info for PR $PRNR"
59
+ $request = (New-Object System.Net.WebClient)
60
+ $request.headers['User-Agent'] = "Mozilla/5.0"
61
+ $request.DownloadFile( "https://api.github.com/repos/sass/libsass/pulls/$PRNR", 'pr.json')
62
+ $json = [IO.File]::ReadAllText('pr.json')
63
+ $SPEC_PR = [regex]::match($json,'sass\/sass-spec(#|\/pull\/)([0-9]+)').Groups[2].Value
64
+ if ($SPEC_PR -ne "") {
65
+ echo "Checkout sass spec PR $SPEC_PR"
66
+ git -C sass-spec fetch -q -u origin pull/$SPEC_PR/head:ci-spec-pr-$SPEC_PR
67
+ git -C sass-spec checkout -q --force ci-spec-pr-$SPEC_PR
68
+ }
69
+ }
70
+ ruby sass-spec/sass-spec.rb -c $env:TargetPath -s --ignore-todo sass-spec/spec
@@ -1,4 +1,4 @@
1
- Welcome to the LibSass wiki!
1
+ Welcome to the LibSass documentation!
2
2
 
3
3
  ## First Off
4
4
  LibSass is just a library. To run the code locally (i.e. to compile your stylesheets), you need an implementer. SassC (get it?) is an implementer written in C. There are a number of other implementations of LibSass - for example Node. We encourage you to write your own port - the whole point of LibSass is that we want to bring Sass to many other languages, not just Ruby!
@@ -2,7 +2,7 @@
2
2
 
3
3
  ```C
4
4
  #include <stdio.h>
5
- #include "sass_context.h"
5
+ #include "sass/context.h"
6
6
 
7
7
  int main( int argc, const char* argv[] )
8
8
  {
@@ -6,7 +6,7 @@ Sass Contexts come in two flavors:
6
6
  ### Basic Usage
7
7
 
8
8
  ```C
9
- #include "sass_context.h"
9
+ #include "sass/context.h"
10
10
  ```
11
11
 
12
12
  ***Sass_Options***
@@ -23,7 +23,7 @@ It's deprecated and incompatible with this documentation, use `sass/context.h`!
23
23
 
24
24
  ```C
25
25
  // deprecated interface
26
- #include "sass_interface.h"
26
+ #include "sass/interface.h"
27
27
  ```
28
28
 
29
29
  ## Basic C Example
@@ -5,8 +5,17 @@
5
5
  #include <stdint.h>
6
6
  #include "sass/context.h"
7
7
 
8
- union Sass_Value* call_fn_foo(const union Sass_Value* s_args, void* cookie)
8
+ union Sass_Value* call_fn_foo(const union Sass_Value* s_args, Sass_Function_Entry cb, struct Sass_Compiler* comp)
9
9
  {
10
+ // get context/option struct associated with this compiler
11
+ struct Sass_Context* ctx = sass_compiler_get_context(comp);
12
+ struct Sass_Options* opts = sass_compiler_get_options(comp);
13
+ // get information about previous importer entry from the stack
14
+ struct Sass_Import* import = sass_compiler_get_last_import(comp);
15
+ const char* prev_abs_path = sass_import_get_abs_path(import);
16
+ const char* prev_imp_path = sass_import_get_imp_path(import);
17
+ // get the cookie from function descriptor
18
+ void* cookie = sass_function_get_cookie(cb);
10
19
  // we actually abuse the void* to store an "int"
11
20
  return sass_make_number((intptr_t)cookie, "px");
12
21
  }
@@ -23,11 +32,11 @@ int main( int argc, const char* argv[] )
23
32
  struct Sass_Options* ctx_opt = sass_context_get_options(ctx);
24
33
 
25
34
  // allocate a custom function caller
26
- Sass_C_Function_Callback fn_foo =
35
+ Sass_Function_Entry fn_foo =
27
36
  sass_make_function("foo()", call_fn_foo, (void*)42);
28
37
 
29
38
  // create list of all custom functions
30
- Sass_C_Function_List fn_list = sass_make_function_list(1);
39
+ Sass_Function_List fn_list = sass_make_function_list(1);
31
40
  sass_function_set_list_entry(fn_list, 0, fn_foo);
32
41
  sass_option_set_c_functions(ctx_opt, fn_list);
33
42
 
@@ -1,8 +1,8 @@
1
1
  ```C
2
2
  // Struct to hold custom function callback
3
- struct Sass_C_Function_Descriptor {
4
- const char* signature;
5
- Sass_C_Function function;
6
- void* cookie;
3
+ struct Sass_Function {
4
+ const char* signature;
5
+ Sass_Function_Fn function;
6
+ void* cookie;
7
7
  };
8
8
  ```
@@ -19,26 +19,28 @@ Note: The fallback implementation will be given the name of the called function
19
19
 
20
20
  ```C
21
21
  // Forward declaration
22
- struct Sass_C_Function_Descriptor;
22
+ struct Sass_Compiler;
23
+ struct Sass_Function;
23
24
 
24
- // Typedef defining null terminated list of custom callbacks
25
- typedef struct Sass_C_Function_Descriptor* (*Sass_C_Function_List);
26
- typedef struct Sass_C_Function_Descriptor (*Sass_C_Function_Callback);
27
- // Typedef defining custom function prototype and its return value type
28
- typedef union Sass_Value*(*Sass_C_Function) (const union Sass_Value*, void* cookie);
25
+ // Typedef helpers for custom functions lists
26
+ typedef struct Sass_Function (*Sass_Function_Entry);
27
+ typedef struct Sass_Function* (*Sass_Function_List);
28
+ // Typedef defining function signature and return type
29
+ typedef union Sass_Value* (*Sass_Function_Fn)
30
+ (const union Sass_Value*, Sass_Function_Entry cb, struct Sass_Compiler* compiler);
29
31
 
30
32
  // Creators for sass function list and function descriptors
31
- Sass_C_Function_List sass_make_function_list (size_t length);
32
- Sass_C_Function_Callback sass_make_function (const char* signature, Sass_C_Function fn, void* cookie);
33
+ ADDAPI Sass_Function_List ADDCALL sass_make_function_list (size_t length);
34
+ ADDAPI Sass_Function_Entry ADDCALL sass_make_function (const char* signature, Sass_Function_Fn cb, void* cookie);
33
35
 
34
36
  // Setters and getters for callbacks on function lists
35
- Sass_C_Function_Callback sass_function_get_list_entry(Sass_C_Function_List list, size_t pos);
36
- void sass_function_set_list_entry(Sass_C_Function_List list, size_t pos, Sass_C_Function_Callback cb);
37
+ ADDAPI Sass_Function_Entry ADDCALL sass_function_get_list_entry(Sass_Function_List list, size_t pos);
38
+ ADDAPI void ADDCALL sass_function_set_list_entry(Sass_Function_List list, size_t pos, Sass_Function_Entry cb);
37
39
 
38
40
  // Getters for custom function descriptors
39
- const char* sass_function_get_signature (Sass_C_Function_Callback fn);
40
- Sass_C_Function sass_function_get_function (Sass_C_Function_Callback fn);
41
- void* sass_function_get_cookie (Sass_C_Function_Callback fn);
41
+ ADDAPI const char* ADDCALL sass_function_get_signature (Sass_Function_Entry cb);
42
+ ADDAPI Sass_Function_Fn ADDCALL sass_function_get_function (Sass_Function_Entry cb);
43
+ ADDAPI void* ADDCALL sass_function_get_cookie (Sass_Function_Entry cb);
42
44
  ```
43
45
 
44
46
  ### More links
@@ -1,15 +1,20 @@
1
1
  ```C
2
2
  // External import entry
3
3
  struct Sass_Import {
4
- char* rel;
5
- char* abs;
4
+ char* imp_path; // path as found in the import statement
5
+ char *abs_path; // path after importer has resolved it
6
6
  char* source;
7
7
  char* srcmap;
8
+ // error handling
9
+ char* error;
10
+ size_t line;
11
+ size_t column;
8
12
  };
9
13
 
10
14
  // Struct to hold importer callback
11
- struct Sass_C_Import_Descriptor {
12
- Sass_C_Import_Fn function;
15
+ struct Sass_Importer {
16
+ Sass_Importer_Fn importer;
17
+ double priority;
13
18
  void* cookie;
14
19
  };
15
20
  ```
@@ -3,7 +3,7 @@
3
3
  ### Basic Usage
4
4
 
5
5
  ```C
6
- #include "sass_values.h"
6
+ #include "sass/values.h"
7
7
  ```
8
8
 
9
9
  ```C
@@ -29,7 +29,7 @@ This should install these files
29
29
  # $ ls -la /usr/include/sass*
30
30
  /usr/include/sass.h
31
31
  /usr/include/sass2scss.h
32
- /usr/include/sass_context.h
33
- /usr/include/sass_functions.h
34
- /usr/include/sass_values.h
32
+ /usr/include/sass/context.h
33
+ /usr/include/sass/functions.h
34
+ /usr/include/sass/values.h
35
35
  ```
@@ -66,7 +66,7 @@ void sass_delete_value (const union Sass_Value* val);
66
66
  ```C
67
67
  #include <stdio.h>
68
68
  #include <stdint.h>
69
- #include "sass_context.h"
69
+ #include "sass/context.h"
70
70
 
71
71
  union Sass_Value* call_fn_foo(const union Sass_Value* s_args, void* cookie)
72
72
  {
File without changes
@@ -8,10 +8,14 @@ script/bootstrap
8
8
  export SASS_LIBSASS_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../ && pwd )"
9
9
 
10
10
  # use some defaults if not running under travis ci
11
- if [ "x$TRAVIS_BUILD_DIR" == "x" ]; then export TRAVIS_BUILD_DIR=$(pwd)/build; fi
11
+ if [ "x$CONTINUOUS_INTEGRATION" == "x" ]; then export CONTINUOUS_INTEGRATION=true; fi
12
+ if [ "x$TRAVIS_BUILD_DIR" == "x" ]; then export TRAVIS_BUILD_DIR=$(pwd); fi
12
13
  if [ "x$SASS_SASSC_PATH" == "x" ]; then export SASS_SASSC_PATH=$(pwd)/sassc; fi
13
14
  if [ "x$SASS_SPEC_PATH" == "x" ]; then export SASS_SPEC_PATH=$(pwd)/sass-spec; fi
14
15
 
16
+ # try to get the os name from uname (and filter via perl - probably not the most portable way?)
17
+ if [ "x$TRAVIS_OS_NAME" == "x" ]; then export TRAVIS_OS_NAME=`uname -s | perl -ne 'print lc \$1 if\(/^([a-zA-Z]+)/'\)`; fi
18
+
15
19
  if [ "x$COVERAGE" == "xyes" ]; then
16
20
  COVERAGE_OPT="--enable-coverage"
17
21
  export EXTRA_CFLAGS="--coverage"
@@ -62,67 +66,52 @@ if [ "x$AUTOTOOLS" == "xyes" ]; then
62
66
  ${SHARED_OPT}
63
67
  echo -en 'travis_fold:end:configure\r'
64
68
 
65
- make clean $MAKE_OPTS
69
+ make $MAKE_OPTS clean
66
70
 
67
71
  # install to prefix directory
68
- PREFIX="$PREFIX" make install
72
+ PREFIX="$PREFIX" make $MAKE_OPTS install
69
73
 
70
74
  else
71
75
 
72
- make clean $MAKE_OPTS
76
+ make $MAKE_OPTS clean
73
77
 
74
78
  fi
75
79
 
76
80
  # install to prefix directory
77
- PREFIX="$PREFIX" make install
81
+ PREFIX="$PREFIX" make $MAKE_OPTS install
78
82
 
79
83
  ls -la $PREFIX/*
80
84
 
81
85
  echo successfully compiled libsass
82
86
  echo AUTOTOOLS=$AUTOTOOLS COVERAGE=$COVERAGE BUILD=$BUILD
83
87
 
84
- if [ "$CONTINUOUS_INTEGRATION" == "true" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_OS_NAME" == "linux" ];
88
+ if [ "$CONTINUOUS_INTEGRATION" == "true" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "x$TRAVIS_PULL_REQUEST" != "x" ] &&
89
+ ([ "$TRAVIS_OS_NAME" == "linux" ] || [ "$TRAVIS_OS_NAME" == "osx" ] || [ "$TRAVIS_OS_NAME" == "cygwin" ]);
85
90
  then
86
- echo "Downloading jq"
87
-
88
- curl http://stedolan.github.io/jq/download/linux64/jq > jq
89
- chmod +x jq
90
91
 
91
92
  echo "Fetching PR $TRAVIS_PULL_REQUEST"
92
93
 
93
- JSON=$(curl -u xzyfer:882aeec2a5b847b7d67c61d7788c2721f011e2ea -sS https://api.github.com/repos/sass/libsass/pulls/$TRAVIS_PULL_REQUEST)
94
+ JSON=$(curl -L -sS https://api.github.com/repos/sass/libsass/pulls/$TRAVIS_PULL_REQUEST)
94
95
 
95
- SPEC_PR=$(echo $JSON | jq -r .body)
96
+ if [[ $JSON =~ "API rate limit exceeded" ]];
97
+ then
98
+ echo "Travis rate limit on github exceeded"
99
+ echo "Retrying via 'special purpose proxy'"
100
+ JSON=$(curl -L -sS http://libsass.ocbnet.ch/libsass-spec-pr.psgi/$TRAVIS_PULL_REQUEST)
101
+ fi
96
102
 
97
- BLAH="sass\/sass-spec(#|\/pull\/)([0-9]+)"
103
+ RE_SPEC_PR="sass\/sass-spec(#|\/pull\/)([0-9]+)"
98
104
 
99
- if [[ $SPEC_PR =~ $BLAH ]];
105
+ if [[ $JSON =~ $RE_SPEC_PR ]];
100
106
  then
101
107
  SPEC_PR="${BASH_REMATCH[2]}"
102
-
103
108
  echo "Fetching Sass Spec PR $SPEC_PR"
104
-
105
- JSON=$(curl -u xzyfer:882aeec2a5b847b7d67c61d7788c2721f011e2ea -sS https://api.github.com/repos/sass/sass-spec/pulls/$SPEC_PR)
106
-
107
- SPEC_REMOTE=$(echo $JSON | jq -r .head.repo.clone_url)
108
- SPEC_SHA=$(echo $JSON | jq -r .head.sha)
109
-
110
- echo "Cloning $SPEC_REMOTE"
111
-
112
- git clone $SPEC_REMOTE sass-spec-pr
113
-
114
- echo "Checking out $SPEC_SHA"
115
-
116
- cd sass-spec-pr
117
- git checkout $SPEC_SHA
118
-
119
- echo "Re-running Sass Spec"
120
-
121
- cd ..
122
- SASS_SPEC_PATH="sass-spec-pr" LD_LIBRARY_PATH="$PREFIX/lib/" make $MAKE_OPTS test_build
109
+ git -C sass-spec fetch -u origin pull/$SPEC_PR/head:ci-spec-pr-$SPEC_PR
110
+ git -C sass-spec checkout --force ci-spec-pr-$SPEC_PR
111
+ LD_LIBRARY_PATH="$PREFIX/lib/" make $MAKE_OPTS test_build
123
112
  else
124
- LD_LIBRARY_PATH="$PREFIX/lib/" script/spec
113
+ LD_LIBRARY_PATH="$PREFIX/lib/" make $MAKE_OPTS test_build
125
114
  fi
126
115
  else
127
- LD_LIBRARY_PATH="$PREFIX/lib/" script/spec
116
+ LD_LIBRARY_PATH="$PREFIX/lib/" make $MAKE_OPTS test_build
128
117
  fi
@@ -1,12 +1,7 @@
1
1
  #!/bin/bash
2
-
3
2
  if [ "x$COVERAGE" == "xyes" ]; then
4
- sudo pip install cpp-coveralls
5
- # enable to debug coverage
6
- sudo pip install gcovr
7
- sudo apt-get install libjson-perl
8
- sudo apt-get install libjson-xs-perl
9
- sudo apt-get install libfile-slurp-perl
3
+ pip install --user gcovr
4
+ pip install --user cpp-coveralls
10
5
  else
11
6
  echo "no dependencies to install"
12
7
  fi
@@ -16,4 +11,4 @@ if [ "x$AUTOTOOLS" == "xyes" ]; then
16
11
  sudo apt-get -qq update
17
12
  sudo apt-get -qq install automake
18
13
  AUTOTOOLS=yes
19
- fi
14
+ fi
@@ -3,22 +3,26 @@
3
3
  if [ "x$COVERAGE" = "xyes" ]; then
4
4
 
5
5
  # exclude some directories from profiling (.libs is from autotools)
6
- export EXCLUDE_COVERAGE="--exclude sassc --exclude sass-spec
7
- --exclude .libs --exclude debug.hpp
8
- --exclude json.cpp --exclude json.hpp
9
- --exclude cencode.c --exclude b64
10
- --exclude utf8 --exclude utf8_string.hpp
11
- --exclude utf8.h --exclude utf8_string.cpp
12
- --exclude sass2scss.h --exclude sass2scss.cpp
13
- --exclude test --exclude posix
14
- --exclude debugger.hpp"
6
+ export EXCLUDE_COVERAGE="--exclude src/sassc
7
+ --exclude src/sass-spec
8
+ --exclude src/.libs
9
+ --exclude src/debug.hpp
10
+ --exclude src/json.cpp
11
+ --exclude src/json.hpp
12
+ --exclude src/cencode.c
13
+ --exclude src/b64
14
+ --exclude src/utf8
15
+ --exclude src/utf8_string.hpp
16
+ --exclude src/utf8.h
17
+ --exclude src/utf8_string.cpp
18
+ --exclude src/sass2scss.h
19
+ --exclude src/sass2scss.cpp
20
+ --exclude src/test
21
+ --exclude src/posix
22
+ --exclude src/debugger.hpp"
15
23
  # debug via gcovr
16
24
  gcov -v
17
25
  gcovr -r .
18
- # debug via coveralls (dump result for futher analyzing)
19
- coveralls $EXCLUDE_COVERAGE --gcov-options '\-lp' --dump coveralls.json
20
- # analyze the resulting json
21
- ./script/coveralls-debug
22
26
  # generate and submit report to coveralls.io
23
27
  coveralls $EXCLUDE_COVERAGE --gcov-options '\-lp'
24
28