indie-raster 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.
data/build-c/indie-raster CHANGED
Binary file
data/indie-raster.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
 
4
4
  s.name = "indie-raster"
5
- s.version = "0.0.1"
5
+ s.version = "0.0.2"
6
6
 
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["ShopKeep"]
@@ -80,13 +80,23 @@ class IndieRasterSession
80
80
  cmd = File.expand_path(File.dirname(__FILE__) + "/../build-c/indie-raster")
81
81
  input = @c.join ''
82
82
 
83
- stdin, stdout, stderr = Open3.popen3 cmd
84
- stdin.puts input
85
- stdin.close
83
+ tmppath = opt[:commands_temp_path]
84
+ if tmppath
85
+ File.open(tmppath, "w") do |f|
86
+ f.write input
87
+ end
88
+ out = `cat '#{tmppath}' | #{cmd}`
89
+ `rm '#{tmppath}'`
90
+ else
91
+ stdin, stdout, stderr = Open3.popen3 cmd
92
+ stdin.puts input
93
+ stdin.close
94
+ out = stdout.read
95
+ err = stderr.read
96
+ end
97
+
86
98
  code = $?.to_i
87
- out = stdout.read
88
- err = stderr.read
89
- #TODO handle error
99
+ #TODO handle errors
90
100
 
91
101
  return out
92
102
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: indie-raster
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - ShopKeep