rscript 0.3.4 → 0.4.0
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 +13 -19
- metadata +29 -29
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d510750d5310ec2a14bb6870768d91c854264c67
|
4
|
+
data.tar.gz: e0209e8f7b96455bfa7d3140283fd266fb3bf109
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9160525ba3453c07c198aa17b9f5663eef501c11fda60149423c215c6b9695a272c8f00d4428fecdd7e742a5dd2c23a2de7fc40c4f06a79c992b859a8d9b6748
|
7
|
+
data.tar.gz: d0ee8e32c36e235f6f22cb131e0858c4cf6387040f161c6ec6bc5fcfcf4cffcc2f4189ecc8ed76988d50c6667b128a382cec62ac9f705f9b1d34d4bdc946f1e9
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rscript.rb
CHANGED
@@ -2,11 +2,12 @@
|
|
2
2
|
|
3
3
|
# file: rscript.rb
|
4
4
|
|
5
|
-
# created:
|
6
|
-
# updated:
|
5
|
+
# created: 1-Jul-2009
|
6
|
+
# updated: 7-Nov-2017
|
7
7
|
|
8
8
|
# modification:
|
9
9
|
|
10
|
+
# 07-Nov-2017: feature: The log object is now passed into initialize()
|
10
11
|
# 24-Dec-2016: Bug fix: An argument can now include an integer
|
11
12
|
# 12-Dec-2016: The cache size can now be changed from initialize()
|
12
13
|
# 21-Jun-2016: Replaced the initialize hash options with inline named params
|
@@ -41,22 +42,17 @@ require 'rexle'
|
|
41
42
|
|
42
43
|
class RScript < RScriptBase
|
43
44
|
|
44
|
-
def initialize(
|
45
|
+
def initialize(log: nil, pkg_src: '', cache: 5)
|
45
46
|
|
46
|
-
@
|
47
|
+
@log = log
|
47
48
|
@cache = cache
|
48
49
|
@rsf_cache = HashCache.new({cache: cache}) if cache > 0
|
49
50
|
|
50
51
|
end
|
51
52
|
|
52
53
|
def read(args=[])
|
53
|
-
|
54
|
-
if @logger then
|
55
|
-
|
56
|
-
@logger.debug 'inside RScript#read'
|
57
|
-
@logger.debug 'RScript -> args: ' + args.inspect
|
58
54
|
|
59
|
-
|
55
|
+
@log.info 'RScript/read: args: ' + args.inspect if @log
|
60
56
|
|
61
57
|
threads = []
|
62
58
|
|
@@ -83,9 +79,9 @@ class RScript < RScriptBase
|
|
83
79
|
|
84
80
|
else
|
85
81
|
out = read_rsf(args) {|doc| doc.root.xpath('//script').map {|s| read_script(s)}}.join("\n")
|
86
|
-
end
|
87
|
-
|
88
|
-
@
|
82
|
+
end
|
83
|
+
|
84
|
+
@log.info 'RScript/read: code: ' + out.inspect if @log
|
89
85
|
|
90
86
|
[out, args]
|
91
87
|
end
|
@@ -97,10 +93,7 @@ class RScript < RScriptBase
|
|
97
93
|
# note: run() was copied from the development file rscript-wrapper.rb
|
98
94
|
def run(raw_args, params={}, rws=self)
|
99
95
|
|
100
|
-
if @
|
101
|
-
@logger.debug 'inside RScript#run'
|
102
|
-
@logger.debug 'RScript -> raw_args: ' + raw_args.inspect
|
103
|
-
end
|
96
|
+
@log.info 'RScript/run: raw_args: ' + raw_args.inspect if @log
|
104
97
|
|
105
98
|
if params[:splat] then
|
106
99
|
params.each do |k,v|
|
@@ -117,7 +110,8 @@ class RScript < RScriptBase
|
|
117
110
|
end
|
118
111
|
|
119
112
|
code2, args = self.read raw_args
|
120
|
-
|
113
|
+
|
114
|
+
@log.info 'RScript/run: code2: ' + code2 if @log
|
121
115
|
|
122
116
|
begin
|
123
117
|
|
@@ -177,4 +171,4 @@ if __FILE__ == $0 then
|
|
177
171
|
rs = RScript.new()
|
178
172
|
code, args = rs.read(raw_args)
|
179
173
|
puts eval(code).join("\n")
|
180
|
-
end
|
174
|
+
end
|
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.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -12,26 +12,26 @@ cert_chain:
|
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
14
14
|
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
-
|
15
|
+
8ixkARkWAmV1MB4XDTE3MTEwNzExMjQwMVoXDTE4MTEwNzExMjQwMVowSDESMBAG
|
16
16
|
A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
|
17
17
|
EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
ggEBALgKH/MjSfa8qrRYhFDKWD6qDMnQavDaCv9rxzQW0ku0GRDuf4De9ewMZrYg
|
19
|
+
+ENxRKsYQefyfYL6+ddWhD4K9+rNsEhLasMDIScwthXbWeeCuZvLgYCS5gFp1ciV
|
20
|
+
4aL8S7x2QdephSMOaouhYVYV/2N+uxDhCD9rdB2XCfdjWBg+dSCdbJRO/pQ8vr1j
|
21
|
+
tZE2WaCgvZq6XBB4+pqYsC/ekjRaOGXc1TfwBP/WYmjTYCVYmlhN2rJG0vfp9Zxy
|
22
|
+
xAjliP6u2t4NMZY2kBo3W+bCySwPeZPflgI8MAlBln9y9GHPO3zndD14du5fR9Ui
|
23
|
+
Czd6gzEW6Ra3BoZmK+D6UfUYGh8CAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
|
24
|
+
DwQEAwIEsDAdBgNVHQ4EFgQUVTzGTFtV6+VIt+oV5ksQmdzKtP4wJgYDVR0RBB8w
|
25
25
|
HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAs93QhCVT
|
27
|
+
FUsRHEhQSWzHXjrz91vttIT2xamtOB/EL6V1pP+lTck8jkuejn0Xh4pv8BrbWsDN
|
28
|
+
XB+0ypuCqjWm6uQfLMaeoCUec0ue+gfyqU6XtosViTyXlIarGr/QSPBaMMamCcFv
|
29
|
+
eApQIEUoxne7bRBHlN9hk+9GDbMhi3gV34pGWwIAEnUzJQgmN/YFy0ix5XJTpfgA
|
30
|
+
xj+tZ4/g/En7EMods00s7POLSpHhvN7LQT8nRttEmIm0AXNeZ7tSfxRZ4n7hgEQM
|
31
|
+
TqGxWMRGelsOt2zNIFH+8d4Yz1dYsNbhK66Q8KRR2vHoT/9T3IJGBPHdsR6Kl6yB
|
32
|
+
e5SlxbsP/R/Leg==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2017-11-07 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: hashcache
|
@@ -59,42 +59,42 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '0.
|
62
|
+
version: '0.4'
|
63
63
|
- - ">="
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version: 0.3
|
65
|
+
version: 0.4.3
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
68
|
version_requirements: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
70
|
- - "~>"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '0.
|
72
|
+
version: '0.4'
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.3
|
75
|
+
version: 0.4.3
|
76
76
|
- !ruby/object:Gem::Dependency
|
77
77
|
name: rexle
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '1.
|
82
|
+
version: '1.4'
|
83
83
|
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 1.
|
85
|
+
version: 1.4.10
|
86
86
|
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
89
|
requirements:
|
90
90
|
- - "~>"
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: '1.
|
92
|
+
version: '1.4'
|
93
93
|
- - ">="
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 1.
|
95
|
+
version: 1.4.10
|
96
96
|
description:
|
97
|
-
email: james@
|
97
|
+
email: james@jamesrobertson.eu
|
98
98
|
executables: []
|
99
99
|
extensions: []
|
100
100
|
extra_rdoc_files: []
|
@@ -121,9 +121,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
123
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.
|
124
|
+
rubygems_version: 2.6.13
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
|
-
summary:
|
128
|
-
|
127
|
+
summary: Reads or executes a job contained within a package (XML document), whereby
|
128
|
+
the package is typically read from a URL
|
129
129
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|