rsc 0.4.0 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rsc.rb +36 -32
- metadata +31 -27
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b01f72dfa760e286914b6c423cbf9724deb0eb47edcf7fcb3ad110eb12a67922
|
4
|
+
data.tar.gz: bf1e28da451ab37f4708a7d1a96c02739752fdf8d2475a0c3c3674e9e03a53f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1edee6d3f54ad895aaf0a6a87b0e078b6dc68f3ba5d9f31dc00e946d66878304af643c2acba4229cd8f9483002dabb3e59080e53032d838efc4dd32a5c380dc1
|
7
|
+
data.tar.gz: 18ca4264549c16234606ad3772c4fbfefe94baceb9b9b5a0f8e47a05c699277f883c63fbfdda5250d4fc3968b82cb8c4ae1b17261c8226dff48176bff4ab0751
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rsc.rb
CHANGED
@@ -7,55 +7,48 @@ require 'drb'
|
|
7
7
|
require 'rexle'
|
8
8
|
|
9
9
|
|
10
|
-
class
|
10
|
+
class RseClient
|
11
11
|
|
12
|
-
def self.call(x)
|
13
|
-
|
14
|
-
end
|
12
|
+
def self.call(x) RSC.new.get(x) end
|
13
|
+
def self.get(x) RSC.new.get(x) end
|
14
|
+
def self.post(x, val) RSC.new.post(x, val) end
|
15
|
+
def self.delete(x) RSC.new.delete(x) end
|
16
|
+
def self.put(x, val) RSC.new.put(x, val) end
|
15
17
|
|
16
18
|
end
|
17
19
|
|
18
20
|
class RSC
|
21
|
+
using ColouredText
|
19
22
|
|
20
23
|
class Package
|
24
|
+
using ColouredText
|
21
25
|
|
22
|
-
def initialize(drb_obj,
|
26
|
+
def initialize(drb_obj, package, debug: false)
|
27
|
+
|
28
|
+
@debug = debug
|
23
29
|
|
24
30
|
@obj = drb_obj
|
31
|
+
drb_obj.package_methods(package).each do |method_name|
|
32
|
+
|
33
|
+
puts ('creating method ' + method_name).info if @debug
|
25
34
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
method = "def %s(*args); run_job('%s', args) ; end" % \
|
33
|
-
([method_name] * 2)
|
34
|
-
self.instance_eval(method)
|
35
|
+
methodx = "
|
36
|
+
def %s(*args, params: {})
|
37
|
+
@obj.run_job('%s','%s', params, args)
|
38
|
+
end" % [method_name, package, method_name]
|
39
|
+
self.instance_eval(methodx)
|
40
|
+
|
35
41
|
end
|
36
42
|
|
37
43
|
end
|
38
44
|
|
39
|
-
private
|
40
|
-
|
41
|
-
def run_job(method_name, *args)
|
42
|
-
|
43
|
-
args.flatten!(1)
|
44
|
-
params = args.pop if args.find {|x| x.is_a? Hash}
|
45
|
-
a = ['//job:' + method_name, @url, args].flatten(1)
|
46
|
-
params ? @obj.run(a, params) : @obj.run(a)
|
47
|
-
end
|
48
|
-
|
49
45
|
end
|
50
46
|
|
51
|
-
def initialize(drb_hostname='rse',
|
47
|
+
def initialize(drb_hostname='rse', port: '61000', debug: false)
|
52
48
|
|
53
|
-
@port = port
|
49
|
+
@port, @debug = port, debug
|
54
50
|
|
55
|
-
|
56
|
-
@parent_url = parent_url
|
57
|
-
drb_start(drb_hostname)
|
58
|
-
end
|
51
|
+
drb_start(drb_hostname)
|
59
52
|
|
60
53
|
end
|
61
54
|
|
@@ -71,7 +64,7 @@ class RSC
|
|
71
64
|
s ? run_uri(s, :post, value: val) : @obj.post
|
72
65
|
end
|
73
66
|
|
74
|
-
def put(s)
|
67
|
+
def put(s=nil, val=nil)
|
75
68
|
s ? run_uri(s, :put, value: val) : @obj.put
|
76
69
|
end
|
77
70
|
|
@@ -88,7 +81,18 @@ class RSC
|
|
88
81
|
end
|
89
82
|
|
90
83
|
def method_missing(method_name, *args)
|
91
|
-
|
84
|
+
|
85
|
+
if @debug then
|
86
|
+
puts 'method_missing'.info
|
87
|
+
puts ('method_name: ' + method_name.inspect).debug
|
88
|
+
end
|
89
|
+
|
90
|
+
begin
|
91
|
+
Package.new @obj, method_name.to_s, debug: @debug
|
92
|
+
rescue
|
93
|
+
# nil will be returned if there is no package by that name
|
94
|
+
end
|
95
|
+
|
92
96
|
end
|
93
97
|
|
94
98
|
def parse_uri(s)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,27 +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
|
-
|
13
|
+
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMjAxMTIyMjExMDI0WhcN
|
15
|
+
MjExMTIyMjExMDI0WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
|
16
|
+
cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDj/1eB
|
17
|
+
V/C3L3qsRlMSobUmyRpRU6HQ4Quzmry9InuiKs6txHL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2qgCAJbFLPBcOb0ra20Ze2Rfy3QMmSSH6T3gC2UzRq2arvpJ6XEKiAU
|
33
|
+
wun2n+XzOSh5y7/zKlrSTahPyR3Uafi35zyi3tQoCVsYvbn2ZaZoW/vLBxOzBhmd
|
34
|
+
1xuKzyqnn5CkXGlSZbB0zTZpog6L+x4MJdZAEb5DFcso/ZnGeNn0Bpr1N4lg547P
|
35
|
+
BxBwmRZJ2RVS09pLv4ZwZ9VG6pxhnhbGZhRvgwfpH8yzFxyix3K8FwNQcSUw+Qzs
|
36
|
+
sq6tf27j+XsE4ORGUcdVfJFm
|
32
37
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
38
|
+
date: 2020-11-22 00:00:00.000000000 Z
|
34
39
|
dependencies:
|
35
40
|
- !ruby/object:Gem::Dependency
|
36
41
|
name: rexle
|
@@ -38,20 +43,20 @@ dependencies:
|
|
38
43
|
requirements:
|
39
44
|
- - "~>"
|
40
45
|
- !ruby/object:Gem::Version
|
41
|
-
version: '1.
|
46
|
+
version: '1.5'
|
42
47
|
- - ">="
|
43
48
|
- !ruby/object:Gem::Version
|
44
|
-
version: 1.
|
49
|
+
version: 1.5.1
|
45
50
|
type: :runtime
|
46
51
|
prerelease: false
|
47
52
|
version_requirements: !ruby/object:Gem::Requirement
|
48
53
|
requirements:
|
49
54
|
- - "~>"
|
50
55
|
- !ruby/object:Gem::Version
|
51
|
-
version: '1.
|
56
|
+
version: '1.5'
|
52
57
|
- - ">="
|
53
58
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
59
|
+
version: 1.5.1
|
55
60
|
description: formerly known as rcscript-client
|
56
61
|
email: james@jamesrobertson.eu
|
57
62
|
executables: []
|
@@ -78,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
83
|
- !ruby/object:Gem::Version
|
79
84
|
version: '0'
|
80
85
|
requirements: []
|
81
|
-
|
82
|
-
rubygems_version: 2.6.13
|
86
|
+
rubygems_version: 3.0.3
|
83
87
|
signing_key:
|
84
88
|
specification_version: 4
|
85
89
|
summary: Objectifies remote calls to RSF packages and jobs which are run through a
|
metadata.gz.sig
CHANGED
Binary file
|