rscript 0.7.0 → 0.7.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bcb3dd422f080c1976bc0478fbdc1a433b7e8df117f1f6cb2f9fddbd1d71ea64
4
- data.tar.gz: 6d02210b6339ebdf549bb4264e0d88ae57c44e681246d6d17d6014c9ec32ac1f
3
+ metadata.gz: 87de3007d89a229148c3dbb1c7c1f166dc9c1fc2bac1b7471587713d1550c11d
4
+ data.tar.gz: 67b9ad3063e3c4f90f210d7e738883ab1eaeafda7e5f8c2f2717c5cd3003e592
5
5
  SHA512:
6
- metadata.gz: 7f023d1a1d6be510cf1f12f4f0708145e466883c0523343303952f1cef6dcb5d312ed3895163b3c5d505561e8f5d945ecb59d0d8540c29493e26d2016b95c79e
7
- data.tar.gz: 2f7f93846337b081612fdfd35d60086d3e414a786263f612beb6a6343bdb5fc7f459b09cf76f8f6683dca7f86a3878870239b329000d4bb1708c81a55d1672e8
6
+ metadata.gz: 6b76c85bcf4bdf8420a35243852d6fee32873b3605f0e9b35fe321fb21b61513f0d67fb6b89e5d6f4f4d7759f973292303f347fa3b22c01ca23a7ba05315e51f
7
+ data.tar.gz: 4d976cda6b2aad249550384ba6b70b1dc0582c4db36f5fd97ad44efd91d6da53e62be62a38c55f718d9f2b9dce2734ed1f204087aaff0a19d23c4ee5bff9ac36
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rscript
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file