rse 0.1.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.
Files changed (6) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +2 -0
  4. data/lib/rse.rb +64 -0
  5. metadata +146 -0
  6. metadata.gz.sig +2 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 55a6be78a93e54bd702b73c28310bdb8b7027612
4
+ data.tar.gz: d8bb14db23936ccd27d1033c217f8a223a123027
5
+ SHA512:
6
+ metadata.gz: 51e48ca32e6d717eb633a472607a1b38404503e447e671806007bd3e8927ef35d025e56b0bb70455449303b4c179f6fdf53ca17ab8c187a8fb2287e50e2d5da6
7
+ data.tar.gz: 19f74bd482b94687d4b32dce29fc8c1e2600b4b827be407b4a44135fa02977f740e098555e48521c2608bdd71ec3582029e7a3e4d1cd0658686e29c035f1c010
Binary file
@@ -0,0 +1,2 @@
1
+
2
+ �s��5Ьx?�ҡR7�a�χ���!� ��_$�d�6����L�
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # file: rse.rb
4
+
5
+
6
+ require 'drb'
7
+ require 'sps-sub'
8
+ require 'rsf_services'
9
+ require 'remote_dwsregistry'
10
+ require 'spspublog_drb_client'
11
+
12
+
13
+
14
+ class Rse
15
+
16
+ def initialize(package_basepath=nil, host: '', port: '61000',
17
+ debug: false, loghost: 'localhost', reghost: 'localhost',
18
+ spshost: 'localhost')
19
+
20
+ @host, @port, @debug = host, port, debug
21
+
22
+ log = SPSPubLogDRbClient.new host: loghost
23
+ reg = RemoteDwsRegistry.new domain: reghost
24
+
25
+ @rs = rs = RSFServices.new reg,
26
+ package_basepath: package_basepath, log: log
27
+
28
+ sps = SPSSub.new host: spshost
29
+
30
+ Thread.new do
31
+ sps.subscribe(topic: 'rse/#') do |msg,topic|
32
+ a = topic.split('/')[1..-1]
33
+ if a.length < 2 then
34
+ begin
35
+ r = rs.run_job(a.first, msg)
36
+ rescue
37
+ sps.notice 'rse_result: no job ' + a.first
38
+ end
39
+ sps.notice 'rse_result: ' + r.inspect
40
+ else
41
+ package, job = a
42
+ begin
43
+ r = rs.run_job(package, job, {}, msg)
44
+ rescue
45
+ sps.notice 'rse_result: no job ' + a.first
46
+ end
47
+ sps.notice "rse_result/%s/%s: %s" % [package, job, r.inspect ]
48
+ end
49
+ end
50
+ end
51
+
52
+ @rs.services['sps'] = sps
53
+
54
+ puts 'ready'
55
+
56
+ end
57
+
58
+ def start()
59
+ puts 'starting ...'
60
+ DRb.start_service "druby://#{@host}:#{@port}", @rs
61
+ DRb.thread.join
62
+
63
+ end
64
+ end
metadata ADDED
@@ -0,0 +1,146 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rse
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - James Robertson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDXjCCAkagAwIBAgIBATANBgkqhkiG9w0BAQUFADAsMSowKAYDVQQDDCFnZW1t
14
+ YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTgwMzIyMTIyNjIzWhcN
15
+ MTkwMzIyMTIyNjIzWjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
16
+ cnRzb24vREM9ZXUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDKgZh3
17
+ L6Dw+LGmfDESYKAzFPLp7/DBCngXOpF9Xs67N9oWW6VvXuI4QfYP3TMWgML63LZW
18
+ fPbMIiIV77DgNzKEFIdkuVw4hBdS3rOBU8CM1rsCuzTNEz5dIk3j4X8f2u1MXj+R
19
+ xj8Kobrsf4T4j+GCnWmF8vs6A8mZ61ErqJZuAo/3DJk00e/feRpJMLDDauZ9jN1s
20
+ q/oLq0qGjgUEMfXzBpzc6ZH4ThQ/K18gVDs/5lVok+p2PnT6eBHll8KGQHrBLJ12
21
+ hOaPn2CfXXc1QIEhlFes5CuTga8UPslZKDsB0GUyP5i2UDCWtbLx3/lohits6ahB
22
+ Cq9TE50l+qgNussvAgMBAAGjgYowgYcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
23
+ HQYDVR0OBBYEFO4iKKVwKQysm3lDMP3B7tVBNZ0mMCYGA1UdEQQfMB2BG2dlbW1h
24
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTAmBgNVHRIEHzAdgRtnZW1tYXN0ZXJAamFt
25
+ ZXNyb2JlcnRzb24uZXUwDQYJKoZIhvcNAQEFBQADggEBABG0GDpCcLRqUaSpe01+
26
+ P7faKJpVfFpGTeBOeFMhXcIfXBts6XDkt0BV5WVs8hELMOuygayayVXegSkFRPCr
27
+ /f6GsmIVVUffLVoKhh8sbC9WH6ZE3hddzGZ4ak98DkYE+6a9V/07qjjjQIwYJBQ7
28
+ FKi+vwEKeiIniq3jsTvxUnZBLx+FaO+vVWgbqi2LI5FjXWEU1+Pv0sF1dHXUKOiR
29
+ 6VLVRd61U5PLkXgiFDUQTMQxbROuNge8Tn1sTxSPIK1FbNsKnx+1+5sonMBgu4zn
30
+ gou7xRtdjGdiyT3PyvX0OQ+99BHHx73PhDP1g8iDZJM0XfIVmfFIYOOCSNgKEgUM
31
+ V1M=
32
+ -----END CERTIFICATE-----
33
+ date: 2018-03-22 00:00:00.000000000 Z
34
+ dependencies:
35
+ - !ruby/object:Gem::Dependency
36
+ name: sps-sub
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '0.3'
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 0.3.6
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - "~>"
50
+ - !ruby/object:Gem::Version
51
+ version: '0.3'
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.3.6
55
+ - !ruby/object:Gem::Dependency
56
+ name: rsf_services
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.5'
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 0.5.1
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '0.5'
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 0.5.1
75
+ - !ruby/object:Gem::Dependency
76
+ name: remote_dwsregistry
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '0.2'
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: 0.2.7
85
+ type: :runtime
86
+ prerelease: false
87
+ version_requirements: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: '0.2'
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: 0.2.7
95
+ - !ruby/object:Gem::Dependency
96
+ name: spspublog_drb_client
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - "~>"
100
+ - !ruby/object:Gem::Version
101
+ version: '0.1'
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: 0.1.0
105
+ type: :runtime
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '0.1'
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: 0.1.0
115
+ description:
116
+ email: james@jamesrobertson.eu
117
+ executables: []
118
+ extensions: []
119
+ extra_rdoc_files: []
120
+ files:
121
+ - lib/rse.rb
122
+ homepage: https://github.com/jrobertson/rse
123
+ licenses:
124
+ - MIT
125
+ metadata: {}
126
+ post_install_message:
127
+ rdoc_options: []
128
+ require_paths:
129
+ - lib
130
+ required_ruby_version: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
135
+ required_rubygems_version: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ requirements: []
141
+ rubyforge_project:
142
+ rubygems_version: 2.6.13
143
+ signing_key:
144
+ specification_version: 4
145
+ summary: Executes Ruby jobs (using the rsf_services gem) from a DRb server.
146
+ test_files: []
@@ -0,0 +1,2 @@
1
+ ��V�-P�geVTX9�"(S��7�����\��}��4�S-�)���0��a��Y�:͍�`r��6CT&!�Z��)/�߳�\;�D�;Q�[����%S.n�G��� &�a�̕I <�l)��{?�7��:���,pX�bi2�VbJ�L��V�+cCW�%p=I�dQF��BL����C��֬_ �Lz\IhW"rM~�Ε�{t��![Þ�h�����
2
+ "����s�<���K����$�di~�"r/@�