rscript 0.6.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/lib/rscript.rb +58 -10
  5. metadata +35 -32
  6. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98476c04f7d3f5baab79fca79e0acf7694eecf148fbab05133b546a6018b460d
4
- data.tar.gz: 74d17b141e498f81b874b4be409105ede004ececf7d23bfbc189debbc591efb8
3
+ metadata.gz: bcb3dd422f080c1976bc0478fbdc1a433b7e8df117f1f6cb2f9fddbd1d71ea64
4
+ data.tar.gz: 6d02210b6339ebdf549bb4264e0d88ae57c44e681246d6d17d6014c9ec32ac1f
5
5
  SHA512:
6
- metadata.gz: 27db0842b7c1534086bd2f66fd1388131bc1c0efc4c50850aaeac03c11219d5a8657c5860be1748c7a5982e031eef0aeaad8cc7fee1aa96820647b75f81c9ce4
7
- data.tar.gz: c64c661f6a453563c0f3f3155ec994fdb43971284f071834cf7b8078dbd184a98ce5ff9f1232a232bf44ce0bb9fe3b9bbd1a06a92f915aeebe17268c18d2f596
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: 13-Oct-2018
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
- #=begin
45
- require 'requestor'
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.6.2
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
- MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
- YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTE3MTEwNzExMjQwMVoXDTE4MTEwNzExMjQwMVowSDESMBAG
16
- A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
- EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
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
- HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29u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
+ 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.8'
66
+ version: '0.9'
63
67
  - - ">="
64
68
  - !ruby/object:Gem::Version
65
- version: 0.8.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.8'
76
+ version: '0.9'
73
77
  - - ">="
74
78
  - !ruby/object:Gem::Version
75
- version: 0.8.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.4'
86
+ version: '1.5'
83
87
  - - ">="
84
88
  - !ruby/object:Gem::Version
85
- version: 1.4.12
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.4'
96
+ version: '1.5'
93
97
  - - ">="
94
98
  - !ruby/object:Gem::Version
95
- version: 1.4.12
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
- rubyforge_project:
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