m4assets 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -0
- data/README.rdoc +1 -1
- data/lib/m4assets/processor.rb +10 -3
- data/lib/m4assets/version.rb +1 -1
- data/test/helper.rb +5 -0
- metadata +2 -2
data/Gemfile
CHANGED
data/README.rdoc
CHANGED
@@ -52,7 +52,7 @@ initializer:
|
|
52
52
|
|
53
53
|
== Contributing
|
54
54
|
|
55
|
-
If you'd like to contribute to
|
55
|
+
If you'd like to contribute to M4Assets, start by forking the repo on GitHub:
|
56
56
|
|
57
57
|
{http://github.com/tobiassvn/m4assets}[http://github.com/tobiassvn/m4assets]
|
58
58
|
|
data/lib/m4assets/processor.rb
CHANGED
@@ -5,14 +5,21 @@ module M4Assets
|
|
5
5
|
stdin.puts(data)
|
6
6
|
stdin.close
|
7
7
|
|
8
|
+
# Trim dangling newline.
|
9
|
+
stdout_output = stdout.read[0..-2]
|
10
|
+
stderr_output = stderr.read
|
11
|
+
|
12
|
+
# Need to close these explicitly.
|
13
|
+
stdout.close
|
14
|
+
stderr.close
|
15
|
+
|
8
16
|
# Exit status is 0 for success, 1 for failure, 63 for frozen file version
|
9
17
|
# mismatch, or whatever value was passed to the m4exit macro.
|
10
18
|
if exitstatus = wait_thr.value.exitstatus != 0
|
11
|
-
raise Error.new("m4 exit status #{exitstatus}. stderr: #{
|
19
|
+
raise Error.new("m4 exit status #{exitstatus}. stderr: #{stderr_output}")
|
12
20
|
end
|
13
21
|
|
14
|
-
|
15
|
-
stdout.read[0..-2]
|
22
|
+
stdout_output
|
16
23
|
end
|
17
24
|
end
|
18
25
|
end
|
data/lib/m4assets/version.rb
CHANGED
data/test/helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: m4assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sprockets
|