rscript 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rscript.rb +56 -55
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87de3007d89a229148c3dbb1c7c1f166dc9c1fc2bac1b7471587713d1550c11d
|
4
|
+
data.tar.gz: 67b9ad3063e3c4f90f210d7e738883ab1eaeafda7e5f8c2f2717c5cd3003e592
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b76c85bcf4bdf8420a35243852d6fee32873b3605f0e9b35fe321fb21b61513f0d67fb6b89e5d6f4f4d7759f973292303f347fa3b22c01ca23a7ba05315e51f
|
7
|
+
data.tar.gz: 4d976cda6b2aad249550384ba6b70b1dc0582c4db36f5fd97ad44efd91d6da53e62be62a38c55f718d9f2b9dce2734ed1f204087aaff0a19d23c4ee5bff9ac36
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rscript.rb
CHANGED
@@ -47,61 +47,6 @@ require 'hashcache'
|
|
47
47
|
require 'rexle'
|
48
48
|
|
49
49
|
|
50
|
-
class RScriptRW < RScript
|
51
|
-
|
52
|
-
attr_accessor :type
|
53
|
-
|
54
|
-
|
55
|
-
def read(args=[])
|
56
|
-
|
57
|
-
puts 'inside read' if @debug
|
58
|
-
@log.info 'RScript/read: args: ' + args.inspect if @log
|
59
|
-
@log.info 'RScript/read: type: ' + type.inspect if @log
|
60
|
-
|
61
|
-
threads = []
|
62
|
-
|
63
|
-
if args.to_s[/\/\/job:/] then
|
64
|
-
|
65
|
-
ajob = ''
|
66
|
-
|
67
|
-
args.each_index do |i|
|
68
|
-
if args[i].to_s[/\/\/job:/] then
|
69
|
-
ajob = $'; args[i] = nil
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
args.compact!
|
74
|
-
|
75
|
-
if @debug then
|
76
|
-
puts 'type: ' + self.type.to_s.inspect
|
77
|
-
puts 'self.type: ' + self.type.to_s.inspect
|
78
|
-
end
|
79
|
-
|
80
|
-
a = read_rsfdoc(args)
|
81
|
-
job = a.find do |xy|
|
82
|
-
name, x = xy
|
83
|
-
name == ajob.to_sym and
|
84
|
-
(x[:attributes][:type] || self.type.to_s) == self.type.to_s
|
85
|
-
end.last
|
86
|
-
|
87
|
-
out, attr = job[:code], job[:attributes]
|
88
|
-
|
89
|
-
raise "job not found" unless out.length > 0
|
90
|
-
out
|
91
|
-
|
92
|
-
else
|
93
|
-
out = read_rsfdoc(args).map {|x| x.last[:code]}.join("\n")
|
94
|
-
end
|
95
|
-
|
96
|
-
@log.info 'RScript/read: code: ' + out.inspect if @log
|
97
|
-
|
98
|
-
[out, args]
|
99
|
-
|
100
|
-
end
|
101
|
-
|
102
|
-
end
|
103
|
-
|
104
|
-
|
105
50
|
class RScript < RScriptBase
|
106
51
|
|
107
52
|
def initialize(log: nil, pkg_src: '', cache: 5, debug: false, type: 'job')
|
@@ -237,6 +182,62 @@ class RScript < RScriptBase
|
|
237
182
|
|
238
183
|
end
|
239
184
|
|
185
|
+
|
186
|
+
class RScriptRW < RScript
|
187
|
+
|
188
|
+
attr_accessor :type
|
189
|
+
|
190
|
+
|
191
|
+
def read(args=[])
|
192
|
+
|
193
|
+
puts 'inside read' if @debug
|
194
|
+
@log.info 'RScript/read: args: ' + args.inspect if @log
|
195
|
+
@log.info 'RScript/read: type: ' + type.inspect if @log
|
196
|
+
|
197
|
+
threads = []
|
198
|
+
|
199
|
+
if args.to_s[/\/\/job:/] then
|
200
|
+
|
201
|
+
ajob = ''
|
202
|
+
|
203
|
+
args.each_index do |i|
|
204
|
+
if args[i].to_s[/\/\/job:/] then
|
205
|
+
ajob = $'; args[i] = nil
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
args.compact!
|
210
|
+
|
211
|
+
if @debug then
|
212
|
+
puts 'type: ' + self.type.to_s.inspect
|
213
|
+
puts 'self.type: ' + self.type.to_s.inspect
|
214
|
+
end
|
215
|
+
|
216
|
+
a = read_rsfdoc(args)
|
217
|
+
job = a.find do |xy|
|
218
|
+
name, x = xy
|
219
|
+
name == ajob.to_sym and
|
220
|
+
(x[:attributes][:type] || self.type.to_s) == self.type.to_s
|
221
|
+
end.last
|
222
|
+
|
223
|
+
out, attr = job[:code], job[:attributes]
|
224
|
+
|
225
|
+
raise "job not found" unless out.length > 0
|
226
|
+
out
|
227
|
+
|
228
|
+
else
|
229
|
+
out = read_rsfdoc(args).map {|x| x.last[:code]}.join("\n")
|
230
|
+
end
|
231
|
+
|
232
|
+
@log.info 'RScript/read: code: ' + out.inspect if @log
|
233
|
+
|
234
|
+
[out, args]
|
235
|
+
|
236
|
+
end
|
237
|
+
|
238
|
+
end
|
239
|
+
|
240
|
+
|
240
241
|
if __FILE__ == $0 then
|
241
242
|
raw_args = ARGV
|
242
243
|
rs = RScript.new()
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|