densify 0.0.1 → 0.0.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.
- checksums.yaml +4 -4
- data/ext/densify/densify.c +4 -7
- data/ext/densify/extconf.rb +3 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1689aa4b192893aa5214e4d7274bf18770f07f78
|
4
|
+
data.tar.gz: 04a176aab40bc61cc22f0da0d6ccb87e5ad42e38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90c8b499261147a6ea928cb5eaf552202d73c7e72558e1e8447c01de67f92d5be4ca6f238eee62f23552c0a490a46f5fa5f70ced124839538c83232e6131acd3
|
7
|
+
data.tar.gz: 36962990e2f141d370546d8a73d79e809e982cf9b88a90702dad81662216026ff972aea5e4df93d203e6d6873958f6b4f43f03f46bf4fba1aec696eb672c9f4a
|
data/ext/densify/densify.c
CHANGED
@@ -37,16 +37,13 @@ static VALUE densify(VALUE self) {
|
|
37
37
|
|
38
38
|
switch (curr_char) {
|
39
39
|
case '\n':
|
40
|
-
//
|
41
|
-
// just ignore this character
|
42
|
-
break;
|
43
|
-
case '\t':
|
44
|
-
curr_char = ' ';
|
40
|
+
// ignore newlines
|
45
41
|
break;
|
42
|
+
case '\t': // treat tabs like spaces
|
46
43
|
case ' ':
|
47
44
|
// If this is the first space, add the space
|
48
45
|
if (is_in_spaces == 0) {
|
49
|
-
minified[minified_index] =
|
46
|
+
minified[minified_index] = ' ';
|
50
47
|
minified_index++;
|
51
48
|
}
|
52
49
|
|
@@ -61,5 +58,5 @@ static VALUE densify(VALUE self) {
|
|
61
58
|
}
|
62
59
|
}
|
63
60
|
minified[minified_index] = '\0'; // don't add anything to the index because it will have been incremented after the last character is appended in the for loop
|
64
|
-
return
|
61
|
+
return rb_str_new(minified, minified_index+2);
|
65
62
|
}
|
data/ext/densify/extconf.rb
CHANGED
metadata
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: densify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathaniel Symer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Densify is a general-purpose string minification gem written purely in
|
14
14
|
C. It takes mere microseconds (literally) to minify thousands of lines of CSS to
|
15
|
-
|
15
|
+
approximately the size other minfiers acheive.
|
16
16
|
email: nate@ivytap.com
|
17
17
|
executables: []
|
18
18
|
extensions:
|