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 CHANGED
@@ -6,3 +6,7 @@ group :development do
6
6
  gem 'rake'
7
7
  end
8
8
 
9
+ group :test do
10
+ gem 'simplecov'
11
+ end
12
+
@@ -52,7 +52,7 @@ initializer:
52
52
 
53
53
  == Contributing
54
54
 
55
- If you'd like to contribute to Tweedle, start by forking the repo on GitHub:
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
 
@@ -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: #{stderr.read}")
19
+ raise Error.new("m4 exit status #{exitstatus}. stderr: #{stderr_output}")
12
20
  end
13
21
 
14
- # Trim dangling newline.
15
- stdout.read[0..-2]
22
+ stdout_output
16
23
  end
17
24
  end
18
25
  end
@@ -1,3 +1,3 @@
1
1
  module M4Assets
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -1,2 +1,7 @@
1
+ if ENV['COVERAGE'] && (RUBY_ENGINE == "ruby")
2
+ require 'simplecov'
3
+ SimpleCov.start { add_filter "/test/" }
4
+ end
5
+
1
6
  require 'minitest/autorun'
2
7
  require 'm4assets'
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.0
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-03 00:00:00.000000000 Z
12
+ date: 2012-12-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sprockets