rscript 0.7.1 → 0.7.2
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 +9 -3
- data/lib/rscript_base.rb +16 -3
- metadata +2 -2
- 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: 845e770b89f51965807fd09565b493e371f7cde6cf731e0cb2b6735f3570ed83
|
4
|
+
data.tar.gz: e0a90d763a8ddc14d020f429d301a2c2ba476a5bd2600e7fcd4ee07ba6b4c715
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: deda38285fdc3d090a80fdc571e117508f4f81477d744e07e53157451c325974d984e1812b691bb160f1b6c487bdc12effdf7c3de247316c8b40b7765548e54e
|
7
|
+
data.tar.gz: c65076ba2fcad742663ce5ecad832f76dc9800d0c41b21b7b6116374da2dfb672a55a826ddd9a312dba77df5e0d8baecd5c94fdae47c4ee4cf88c89ced45b2f6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rscript.rb
CHANGED
@@ -3,10 +3,12 @@
|
|
3
3
|
# file: rscript.rb
|
4
4
|
|
5
5
|
# created: 1-Jul-2009
|
6
|
-
# updated:
|
6
|
+
# updated: 00-Mar-2019
|
7
7
|
|
8
8
|
# modification:
|
9
9
|
|
10
|
+
# 00-Mar-2019: feature: An explicit path or implicit path now can be
|
11
|
+
# specified in the src attribute
|
10
12
|
# 05-Mar-2019: feature: Added the class RScriptRW for :get, :post typed jobs
|
11
13
|
# 13-Oct-2018: bug fix: The log is now only written when the log exists
|
12
14
|
# 30-Jul-2018: feature: A list of job ids can now be returned
|
@@ -169,13 +171,17 @@ class RScript < RScriptBase
|
|
169
171
|
puts 'args: ' + args.inspect if @debug
|
170
172
|
rsfile = args[0]; args.shift
|
171
173
|
|
174
|
+
url = File.dirname rsfile
|
175
|
+
@url_dir = url[/(?:\w+:\/\/|.*)[^\/]*(\/.*)/,1]
|
176
|
+
@url_base = url[/(\w+:\/\/[^\/]+|.*)/]
|
177
|
+
|
172
178
|
$rsfile = rsfile[/[^\/]+(?=\.rsf)/]
|
173
179
|
|
174
180
|
a = @cache ? @rsf_cache.read(rsfile) { build_a(rsfile) } : build_a(rsfile)
|
175
181
|
puts 'read_rsfdoc a: ' + a.inspect if @debug
|
176
182
|
|
177
|
-
|
178
|
-
|
183
|
+
|
184
|
+
|
179
185
|
return a
|
180
186
|
|
181
187
|
end
|
data/lib/rscript_base.rb
CHANGED
@@ -7,6 +7,7 @@ require 'open-uri'
|
|
7
7
|
require 'rxfhelper'
|
8
8
|
|
9
9
|
class RScriptBase
|
10
|
+
using ColouredText
|
10
11
|
|
11
12
|
def initialize(debug: false)
|
12
13
|
@debug = debug
|
@@ -19,7 +20,7 @@ class RScriptBase
|
|
19
20
|
protected
|
20
21
|
|
21
22
|
def read_script(script)
|
22
|
-
puts 'inside read_script' if @debug
|
23
|
+
puts 'inside read_script'.info if @debug
|
23
24
|
out_buffer = ''
|
24
25
|
|
25
26
|
src = script.attributes[:src]
|
@@ -34,8 +35,20 @@ class RScriptBase
|
|
34
35
|
end
|
35
36
|
|
36
37
|
def read_sourcecode(rsf)
|
37
|
-
|
38
|
-
|
38
|
+
|
39
|
+
puts 'inside read_sourcecode'.info if @debug
|
40
|
+
#@log.debug 'rsf: ' + rsf.inspect if @log
|
41
|
+
#@log.debug 'url_base: ' + @url_base.inspect if @log
|
42
|
+
|
43
|
+
path = case rsf
|
44
|
+
when /^\//
|
45
|
+
@url_base =~ /^\// ? rsf : File.join(@url_base, rsf)
|
46
|
+
when /\w+:/ then rsf
|
47
|
+
else
|
48
|
+
File.join(@url_base, @url_dir, rsf)
|
49
|
+
end
|
50
|
+
|
51
|
+
buffer, _ = RXFHelper.read path, auto: false
|
39
52
|
return buffer
|
40
53
|
end
|
41
54
|
|
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.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
H+WbcZlnDVw3xyetJLKgUOqsjkXnFyv2ansbZtghG1wEvnd/0sNdyfRnjXv3gAt2
|
36
36
|
OUyieSgHfrd2srDrlcNHFJY8
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2019-03-
|
38
|
+
date: 2019-03-09 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: hashcache
|
metadata.gz.sig
CHANGED
Binary file
|