rspectacular 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +1,22 @@
1
- #!/usr/bin/env bash
1
+ #!/usr/bin/env ruby
2
2
 
3
- trap "rm -f ./tmp/test_fifo; exit;" 2
3
+ fifo_dir = 'tmp'
4
+ fifo_file = 'test_fifo'
5
+ fifo_path = ['.', fifo_dir, fifo_file].join('/')
4
6
 
5
- if [ ! -d ./tmp ]; then
6
- mkdir ./tmp
7
- fi
7
+ trap 2 do
8
+ File.delete(fifo_path)
9
+ exit
10
+ end
8
11
 
9
- if [ ! -p ./tmp/test_fifo ]; then
10
- mkfifo ./tmp/test_fifo
11
- fi
12
+ Dir.mkdir(fifo_dir) unless Dir.exists?(fifo_dir)
12
13
 
13
- while true; do
14
- sh -c "$(cat ./tmp/test_fifo)"
15
- done
14
+ unless File.exists?(fifo_path)
15
+ %x{mkfifo #{fifo_path}}
16
+ end
17
+
18
+ input = open(fifo_path, 'r+')
19
+
20
+ while true do
21
+ system input.gets
22
+ end
@@ -1,3 +1,3 @@
1
1
  module RSpectacular
2
- VERSION = '0.10.0'
2
+ VERSION = '0.10.1'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rspectacular
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.10.0
5
+ version: 0.10.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - jfelchner