SassyJSON 1.1.6 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 787abe4f1e5dfa7793c6083b9f56076035bd3e37
4
- data.tar.gz: 9e084cad5fc089626159ca7904cdf7efe739a25f
3
+ metadata.gz: fdbf1249ba45810c63b51f8b6fd740f0fcd4bc66
4
+ data.tar.gz: 991a05fc6d5ed57809347bdb1e553c6a791ceb65
5
5
  SHA512:
6
- metadata.gz: ac2c206c0985cf301e94b842a7b13b2dd0ff010d170aa92ac589852ed98ca4e23ff7fb57b0564f744c02a90e940798761ef863e4bf579122064e9de4d8eb0b64
7
- data.tar.gz: 2e304ea35d7d22c956c279df15ad1d5283e887f90043b178233770705a525882c64f146f53a87cc9099c70b6bd6c7d18bcb8a3710530da00225267be1ab54987
6
+ metadata.gz: 1e2bfacf5774a32283b7936fb234c2748b61d5da07e05855e50b2d6f6b7554417517069aa484141da00d91a31c7311ca3e44505ba90e3e5206be919bc92ae5c9
7
+ data.tar.gz: 204fb617d61b5ee9c0a1ec73750b08c81c86e2153bbaa6b1e9153c3b2edec51ee9992e17ef85a6bebe6ac4128a2f27bf936316888e51a66e3522ee5822576958
data/CHANGELOG.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Changelog
2
+ * `1.1.7`: Include cosmetic changes made after linting with [scss-lint](https://github.com/causes/scss-lint)
2
3
  * `1.1.6`: JSON files that are loaded via `@import "data.json?varname` can be pretty printed now.
3
4
  * `1.1.5`: Fixed `json-encode` mixin to keep `body::before` in the render tree. Making it possible to access via `getComputedStyle(document.body, ':before')`
4
5
  * `1.1.4`: Small fix for the `npm` release
data/lib/SassyJSON.rb CHANGED
@@ -7,6 +7,6 @@ Compass::Frameworks.register('SassyJSON', :path => extension_path)
7
7
  # Version is a number. If a version contains alphas, it will be created as a prerelease version
8
8
  # Date is in the form of YYYY-MM-DD
9
9
  module SassyJSON
10
- VERSION = "1.1.6"
11
- DATE = "2014-03-07"
10
+ VERSION = "1.1.7"
11
+ DATE = "2014-04-08"
12
12
  end
@@ -13,10 +13,10 @@
13
13
  }
14
14
 
15
15
  $last: str-slice($string, -1, -1);
16
-
16
+
17
17
  @return if(
18
- $last == '%',
19
- nth(_json-decode--number(str-slice($string, 1, -2), 2), 2) * 1%,
18
+ $last == '%',
19
+ nth(_json-decode--number(str-slice($string, 1, -2), 2), 2) * 1%,
20
20
  nth(_json-decode--number($string, 2), 2)
21
21
  );
22
22
  }
@@ -4,17 +4,17 @@
4
4
  // --------------------------------------------------------------------------------
5
5
  // @return [number] decimal number
6
6
 
7
- @function _hex-to-dec($string){
7
+ @function _hex-to-dec($string) {
8
8
  $hex: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "a" "b" "c" "d" "e" "f";
9
9
  $string: to-lower-case($string);
10
10
  $length: str-length($string);
11
-
11
+
12
12
  $dec: 0;
13
13
  @for $i from 1 through $length {
14
- $factor: 1 + ( 15 * ( $length - $i ));
14
+ $factor: 1 + (15 * ($length - $i));
15
15
  $index: index($hex, str-slice($string, $i, $i));
16
16
  $dec: $dec + $factor * ($index - 1);
17
17
  }
18
-
18
+
19
19
  @return $dec;
20
- }
20
+ }
@@ -29,12 +29,12 @@
29
29
  @else if str-length($g) < $max { $g: $g + $c }
30
30
  @else if str-length($b) < $max { $b: $b + $c }
31
31
  }
32
-
32
+
33
33
  @if $length == 4 {
34
34
  $r: $r + $r;
35
35
  $g: $g + $g;
36
36
  $b: $b + $b;
37
37
  }
38
-
38
+
39
39
  @return rgb(_hex-to-dec($r), _hex-to-dec($g), _hex-to-dec($b));
40
- }
40
+ }
@@ -41,7 +41,7 @@
41
41
  @else {
42
42
  $frags: set-nth($frags, length($frags), nth($frags, length($frags)) + $token);
43
43
  }
44
- }
44
+ }
45
45
 
46
46
  @return $string;
47
- }
47
+ }
@@ -41,7 +41,7 @@
41
41
  @else {
42
42
  $frags: set-nth($frags, length($frags), nth($frags, length($frags)) + $token);
43
43
  }
44
- }
44
+ }
45
45
 
46
46
  @return $string;
47
- }
47
+ }
@@ -4,7 +4,7 @@
4
4
  // --------------------------------------------------------------------------------
5
5
  // @return [number] position of the first non escaped quote
6
6
 
7
- @function _find-ending-quote($string){
7
+ @function _find-ending-quote($string) {
8
8
  $backslash: str-slice('\\', 1, 1); // Dirty hack to have a single backslash
9
9
  $escaped-chars: '"\/bfnrtu'; // Characters that can be escaped in JSON
10
10
  $hexadecimal-chars: '0' '1' '2' '3' '4' '5' '6' '7' '8' '9' '0' 'a' 'b' 'c' 'd' 'e' 'f';
@@ -26,7 +26,7 @@
26
26
  not index($hexadecimal-chars, str-slice($string, $pos + 2, $pos + 2)) or
27
27
  not index($hexadecimal-chars, str-slice($string, $pos + 3, $pos + 3)) or
28
28
  not index($hexadecimal-chars, str-slice($string, $pos + 4, $pos + 4)) {
29
- @return 0;
29
+ @return 0;
30
30
  }
31
31
 
32
32
  $pos: $pos + 4;
@@ -13,7 +13,7 @@
13
13
  $units: 1px 1cm 1mm 1% 1ch 1pica 1in 1em 1rem 1pt 1pc 1ex 1vw 1vh 1vmin 1vmax;
14
14
  $number: "";
15
15
  $unit: "";
16
-
16
+
17
17
  @for $i from 1 through str-length($string) {
18
18
  $c: str-slice($string, $i, $i);
19
19
  @if $c == ' ' {
@@ -31,7 +31,7 @@
31
31
  $unit: $unit + $c;
32
32
  }
33
33
  }
34
-
34
+
35
35
  $number: nth(_json-decode--number($number, 2), 2);
36
36
  $index: index($strings, to-lower-case($unit));
37
37
 
@@ -40,4 +40,4 @@
40
40
  }
41
41
 
42
42
  @return $string;
43
- }
43
+ }
@@ -3,7 +3,7 @@
3
3
  // --------------------------------------------------------------------------------
4
4
  // @param $value: value to be stringified
5
5
  // --------------------------------------------------------------------------------
6
- // @throw "Unknown type for $value ({x})."
6
+ // @throw "Unknown type for $value ( {x} )."
7
7
  // --------------------------------------------------------------------------------
8
8
  // @return [string|false] JSON encoded string
9
9
 
@@ -11,7 +11,7 @@
11
11
  $type: type-of($value);
12
12
  @if function_exists('_json-encode--#{$type}') {
13
13
  @return call('_json-encode--#{$type}', $value);
14
- }
14
+ }
15
15
  @warn "Unknown type for #{$value} (#{$type}).";
16
16
  @return false;
17
17
  }
@@ -16,10 +16,11 @@
16
16
  // All browsers except IE8-
17
17
  body::before {
18
18
  // This element must be in the render tree to get it via getComputedStyle(document.body, ':before');
19
- display:block;
20
- width:0;height:0;
21
- overflow:hidden;
22
19
  content: json-encode($value);
20
+ display: block;
21
+ height: 0;
22
+ overflow: hidden;
23
+ width: 0;
23
24
  }
24
25
 
25
26
  // All browsers except Opera (Presto based)
@@ -36,4 +37,4 @@
36
37
  }
37
38
  }
38
39
  }
39
- }
40
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: SassyJSON
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hugo Giraudel
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-07 00:00:00.000000000 Z
12
+ date: 2014-04-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Sass API for JSON
15
15
  email: