rscript 0.6.2 → 0.7.0
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rscript.rb +58 -10
- metadata +35 -32
- 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: bcb3dd422f080c1976bc0478fbdc1a433b7e8df117f1f6cb2f9fddbd1d71ea64
|
4
|
+
data.tar.gz: 6d02210b6339ebdf549bb4264e0d88ae57c44e681246d6d17d6014c9ec32ac1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f023d1a1d6be510cf1f12f4f0708145e466883c0523343303952f1cef6dcb5d312ed3895163b3c5d505561e8f5d945ecb59d0d8540c29493e26d2016b95c79e
|
7
|
+
data.tar.gz: 2f7f93846337b081612fdfd35d60086d3e414a786263f612beb6a6343bdb5fc7f459b09cf76f8f6683dca7f86a3878870239b329000d4bb1708c81a55d1672e8
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rscript.rb
CHANGED
@@ -3,10 +3,11 @@
|
|
3
3
|
# file: rscript.rb
|
4
4
|
|
5
5
|
# created: 1-Jul-2009
|
6
|
-
# updated:
|
6
|
+
# updated: 05-Mar-2019
|
7
7
|
|
8
8
|
# modification:
|
9
9
|
|
10
|
+
# 05-Mar-2019: feature: Added the class RScriptRW for :get, :post typed jobs
|
10
11
|
# 13-Oct-2018: bug fix: The log is now only written when the log exists
|
11
12
|
# 30-Jul-2018: feature: A list of job ids can now be returned
|
12
13
|
# 28-Jul-2018: feature: Jobs are now looked up from a Hash object
|
@@ -41,17 +42,64 @@
|
|
41
42
|
# MIT license - basically you can do anything you like with the script.
|
42
43
|
# http://www.opensource.org/licenses/mit-license.php
|
43
44
|
|
44
|
-
|
45
|
-
require '
|
45
|
+
require 'rscript_base'
|
46
|
+
require 'hashcache'
|
47
|
+
require 'rexle'
|
46
48
|
|
47
|
-
code = Requestor.read('http://a0.jamesrobertson.eu/rorb/r/ruby/') do |x|
|
48
|
-
x.require 'rscript_base'
|
49
|
-
x.require 'hashcache'
|
50
|
-
x.require 'rexle'
|
51
|
-
end
|
52
|
-
eval code
|
53
|
-
#=end
|
54
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
|
55
103
|
|
56
104
|
|
57
105
|
class RScript < RScriptBase
|
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.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,28 +10,32 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
13
|
+
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTkwMzA1MTQyMTAzWhcN
|
15
|
+
MjAwMzA0MTQyMTAzWjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
|
16
|
+
cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC+8gm3
|
17
|
+
MGnzLHvS5tYK1sHZjqe3618+OQlRvZTcxT+uYNwMtjd1ZSflCNP+C49ljwZCPbs9
|
18
|
+
daItoLolzfcWNUaG+qvawmxKSWDhonZ6n79bsac35+gdAx9K2qeMLI+kEoQcji7J
|
19
|
+
bgNM1iANqCLKZ6MlEdC3W9Zkg/Bficbxg2sqO75rZZHWKH7TnrUNZQwKtruoOJe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IvMd0F3hQB5szfv0hr+LOGkeNn40yZY22NnOB7QN1cN4JKIb1rI
|
35
|
+
H+WbcZlnDVw3xyetJLKgUOqsjkXnFyv2ansbZtghG1wEvnd/0sNdyfRnjXv3gAt2
|
36
|
+
OUyieSgHfrd2srDrlcNHFJY8
|
33
37
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
38
|
+
date: 2019-03-05 00:00:00.000000000 Z
|
35
39
|
dependencies:
|
36
40
|
- !ruby/object:Gem::Dependency
|
37
41
|
name: hashcache
|
@@ -59,40 +63,40 @@ dependencies:
|
|
59
63
|
requirements:
|
60
64
|
- - "~>"
|
61
65
|
- !ruby/object:Gem::Version
|
62
|
-
version: '0.
|
66
|
+
version: '0.9'
|
63
67
|
- - ">="
|
64
68
|
- !ruby/object:Gem::Version
|
65
|
-
version: 0.
|
69
|
+
version: 0.9.4
|
66
70
|
type: :runtime
|
67
71
|
prerelease: false
|
68
72
|
version_requirements: !ruby/object:Gem::Requirement
|
69
73
|
requirements:
|
70
74
|
- - "~>"
|
71
75
|
- !ruby/object:Gem::Version
|
72
|
-
version: '0.
|
76
|
+
version: '0.9'
|
73
77
|
- - ">="
|
74
78
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
79
|
+
version: 0.9.4
|
76
80
|
- !ruby/object:Gem::Dependency
|
77
81
|
name: rexle
|
78
82
|
requirement: !ruby/object:Gem::Requirement
|
79
83
|
requirements:
|
80
84
|
- - "~>"
|
81
85
|
- !ruby/object:Gem::Version
|
82
|
-
version: '1.
|
86
|
+
version: '1.5'
|
83
87
|
- - ">="
|
84
88
|
- !ruby/object:Gem::Version
|
85
|
-
version: 1.
|
89
|
+
version: 1.5.1
|
86
90
|
type: :runtime
|
87
91
|
prerelease: false
|
88
92
|
version_requirements: !ruby/object:Gem::Requirement
|
89
93
|
requirements:
|
90
94
|
- - "~>"
|
91
95
|
- !ruby/object:Gem::Version
|
92
|
-
version: '1.
|
96
|
+
version: '1.5'
|
93
97
|
- - ">="
|
94
98
|
- !ruby/object:Gem::Version
|
95
|
-
version: 1.
|
99
|
+
version: 1.5.1
|
96
100
|
description:
|
97
101
|
email: james@jamesrobertson.eu
|
98
102
|
executables: []
|
@@ -120,8 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
124
|
- !ruby/object:Gem::Version
|
121
125
|
version: '0'
|
122
126
|
requirements: []
|
123
|
-
|
124
|
-
rubygems_version: 2.7.6
|
127
|
+
rubygems_version: 3.0.1
|
125
128
|
signing_key:
|
126
129
|
specification_version: 4
|
127
130
|
summary: Reads or executes a job contained within a package (XML document), whereby
|
metadata.gz.sig
CHANGED
Binary file
|