deadly_serious 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/deadly_serious.gemspec +4 -3
- data/lib/deadly_serious/engine/channel.rb +15 -1
- data/lib/deadly_serious/version.rb +1 -1
- data/lib/deadly_serious.rb +1 -0
- metadata +38 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a30b61e936eb33f5cb91c10f88d76d9e5cd4af32
|
4
|
+
data.tar.gz: 136f091a820f42adc1def958f18deddf46ba9adb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e906728b97a32698a5c0275e4d09bda031fba5cfaa95ae409a987d2fa9088205352bfffcbd17621215c161706147198374b478032cc92ad4910631fc185d72ff
|
7
|
+
data.tar.gz: 079c0bceba60c84b166174420ea1e7a347806c1328e8f4151c98f89be267c7afda4812ac3511d275c56066fa47a227dd8fa9ccb5bb7d9ce1d769b5edf9b7c933
|
data/deadly_serious.gemspec
CHANGED
@@ -18,8 +18,9 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
22
|
-
spec.add_development_dependency 'rake'
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.5', '>= 1.5.1'
|
22
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
23
23
|
|
24
|
-
spec.add_dependency '
|
24
|
+
spec.add_dependency 'rb-inotify', '~> 0.9'
|
25
|
+
spec.add_dependency 'json', '~> 1.8'
|
25
26
|
end
|
@@ -4,6 +4,10 @@ require 'deadly_serious/engine/lazy_io'
|
|
4
4
|
module DeadlySerious
|
5
5
|
module Engine
|
6
6
|
# Fake class, it's actually a factory ¬¬
|
7
|
+
# Creates a pipe, file or socket, depending on the name informed:
|
8
|
+
# xyz # create a pipe
|
9
|
+
# >xyz # create a file
|
10
|
+
# xyz:8080 # create a socket
|
7
11
|
module Channel
|
8
12
|
def self.new(name)
|
9
13
|
matcher = name.match(/^(>)?(.*?)(?:(:)(\d{1,5}))?$/)
|
@@ -49,7 +53,17 @@ module DeadlySerious
|
|
49
53
|
|
50
54
|
def open_reader
|
51
55
|
fail %(File "#{@io_name}" not found) unless File.exist?(@io_name)
|
52
|
-
|
56
|
+
if File.size(@io_name) > 0 && `lsof #{@io_name}` == ''
|
57
|
+
open(@io_name, 'r')
|
58
|
+
else
|
59
|
+
notifier = INotify::Notifier.new
|
60
|
+
file = nil
|
61
|
+
notifier.watch(@io_name, :close_write, :close_nowrite) do
|
62
|
+
file = open(@io_name, 'r')
|
63
|
+
end
|
64
|
+
notifier.process
|
65
|
+
file
|
66
|
+
end
|
53
67
|
end
|
54
68
|
|
55
69
|
def open_writer
|
data/lib/deadly_serious.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,77 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deadly_serious
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ronie Uliana
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.5'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.5.1
|
20
23
|
type: :development
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - ~>
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.5'
|
30
|
+
- - ">="
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: 1.5.1
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rake
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- -
|
37
|
+
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
39
|
+
version: '10.0'
|
34
40
|
type: :development
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
|
-
- -
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '10.0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rb-inotify
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.9'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
39
59
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
60
|
+
version: '0.9'
|
41
61
|
- !ruby/object:Gem::Dependency
|
42
62
|
name: json
|
43
63
|
requirement: !ruby/object:Gem::Requirement
|
44
64
|
requirements:
|
45
|
-
- -
|
65
|
+
- - "~>"
|
46
66
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
67
|
+
version: '1.8'
|
48
68
|
type: :runtime
|
49
69
|
prerelease: false
|
50
70
|
version_requirements: !ruby/object:Gem::Requirement
|
51
71
|
requirements:
|
52
|
-
- -
|
72
|
+
- - "~>"
|
53
73
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
74
|
+
version: '1.8'
|
55
75
|
description: Flow Based Programming Engine mechanically sympathetic to *nix.
|
56
76
|
email:
|
57
77
|
- ronie.uliana@gmail.com
|
@@ -59,7 +79,7 @@ executables: []
|
|
59
79
|
extensions: []
|
60
80
|
extra_rdoc_files: []
|
61
81
|
files:
|
62
|
-
- .gitignore
|
82
|
+
- ".gitignore"
|
63
83
|
- Gemfile
|
64
84
|
- LICENSE.txt
|
65
85
|
- README.md
|
@@ -92,17 +112,17 @@ require_paths:
|
|
92
112
|
- lib
|
93
113
|
required_ruby_version: !ruby/object:Gem::Requirement
|
94
114
|
requirements:
|
95
|
-
- -
|
115
|
+
- - ">="
|
96
116
|
- !ruby/object:Gem::Version
|
97
117
|
version: '0'
|
98
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
119
|
requirements:
|
100
|
-
- -
|
120
|
+
- - ">="
|
101
121
|
- !ruby/object:Gem::Version
|
102
122
|
version: '0'
|
103
123
|
requirements: []
|
104
124
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
125
|
+
rubygems_version: 2.2.0
|
106
126
|
signing_key:
|
107
127
|
specification_version: 4
|
108
128
|
summary: Flow Based Programming engine that relies on named pipes and Linux processes
|