rcscript-client 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data/lib/rcscript-client.rb +15 -6
- data.tar.gz.sig +0 -0
- metadata +48 -51
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 77c0b880a7ad3a0cf456d0c1e973619b170599a47bad90b1fa2833ea13c07bde
|
4
|
+
data.tar.gz: 6fd566cb7154146f41c27b5c2aef8084ef10c09afff43facf59720e4d94fe8ee
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 72f79aa75926612bb6c3d64ea69d2fdb95f3f3a19d9cd5c61bacfb54f975cdb7d905c1ad374da25e4781e826e4e36b6e67dc0339f613ec0923781d50445251b5
|
7
|
+
data.tar.gz: bf5ba617e96ac2f0192f12594d437169e70474821ac50823f0e77340d2eee94d57a19894ecdbdb568a1f09eff3220baa2860339caae31893d5bd578c90c41375
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data/lib/rcscript-client.rb
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# file: rcscript-client.rb
|
4
|
+
|
1
5
|
require 'open-uri'
|
2
6
|
require 'cgi'
|
3
7
|
require 'rexml/document'
|
4
8
|
|
5
|
-
class
|
9
|
+
class RCScriptClient
|
6
10
|
include REXML
|
7
11
|
|
8
12
|
attr_reader :doc, :result, :text
|
@@ -10,9 +14,11 @@ class RScriptClient
|
|
10
14
|
|
11
15
|
def initialize(opts={})
|
12
16
|
|
13
|
-
o = {:hostname => 'rscript.heroku.com', :package => ''}
|
17
|
+
o = {:hostname => 'rscript.heroku.com', :package => '', https: false}\
|
18
|
+
.merge(opts)
|
14
19
|
@hostname = o[:hostname]
|
15
20
|
@package = o[:package]
|
21
|
+
@protocol = o[:https] ? 'https' : 'http'
|
16
22
|
|
17
23
|
if @package.length > 0 then
|
18
24
|
jobs_to_methods(@package)
|
@@ -32,10 +38,12 @@ class RScriptClient
|
|
32
38
|
private
|
33
39
|
|
34
40
|
def jobs_to_methods(package)
|
35
|
-
#url = "http://
|
36
|
-
url = "
|
41
|
+
#url = "http://a0.jamesrobertson.me.uk/rorb/r/heroku/%s.rsf" % package
|
42
|
+
url = "%s://%s/source/%s" % [@protocol, @hostname, package]
|
37
43
|
puts 'url : ' + url
|
38
|
-
|
44
|
+
buffer = URI.open(url, 'UserAgent' => 'ClientRscript').read
|
45
|
+
puts 'buffer: ' + buffer.inspect
|
46
|
+
doc = Document.new(buffer)
|
39
47
|
a = XPath.match(doc.root, 'job/attribute::id')
|
40
48
|
a.each do |attr|
|
41
49
|
method_name = attr.value.to_s.gsub('-','_')
|
@@ -96,7 +104,8 @@ EOF
|
|
96
104
|
base_url = "http://#{@hostname}/do/#{@package}/"
|
97
105
|
param_list = params.to_a.map{|param, value| "%s=%s" % [param, CGI.escape(value)]}.join('&')
|
98
106
|
url = "%s%s?%s" % [base_url, method.gsub('_','-'), param_list]
|
99
|
-
|
107
|
+
puts 'url: ' + url.inspect
|
108
|
+
response = URI.open(url, 'UserAgent' => 'RScriptClient')
|
100
109
|
@result = response.read
|
101
110
|
@return_type[response.content_type].call
|
102
111
|
return self
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,75 +1,72 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcscript-client
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.2.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.0
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
6
|
+
authors:
|
8
7
|
- James Robertson
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
|
-
cert_chain:
|
10
|
+
cert_chain:
|
12
11
|
- |
|
13
12
|
-----BEGIN CERTIFIC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H/bc5nYYCDIVBGe0hjGM550umkp2B6t3veAK
|
26
|
+
8SbopQIDAQABo4GKMIGHMAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
|
27
|
+
BBQRlK2zX8TebOXtdgN/NSSoK0spajAmBgNVHREEHzAdgRtnZW1tYXN0ZXJAamFt
|
28
|
+
ZXNyb2JlcnRzb24uZXUwJgYDVR0SBB8wHYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0
|
29
|
+
c29uLmV1MA0GCSqGSIb3DQEBCwUAA4IBgQAsY5n3LECN8k1kfmhOwDVegBPK0yTJ
|
30
|
+
g0cOB3t/atgjvzfner5UI4Em8sbR+5vEFutDiedNJNhWYHpJQkWPXApx5Qb4nxqO
|
31
|
+
0ZJdMkw8zfS//MWLlmkWUt0uZvtN4OQlj4GBoViDYNRp71q/GbXnyKkEIxynl5yO
|
32
|
+
9VF6waYEMoX5Gw8FeVf2ysMLxg3gXr9HCEhVxUYKntwUmqaZdfjUuV3YhOFH2QB1
|
33
|
+
uU11JXrCWIpqBuOi6qJ6wfDlslHGdc78ohCwgD56ploSrZx/DMFeNqHHfS4IpXfM
|
34
|
+
SY1xIACWElmoYRsQtVXnYI23hNRtRU9Cs4H8vgarJu7kGD8eXJ0iNSx5ya1yVFiT
|
35
|
+
l//QmNN1PnsgftCvlpeZ61/AIGoGt+8/Gph01TRtHOA9VsgDrlSTqLUUQ7V6R/we
|
36
|
+
VO6qa1oMueCjGfwrKLuGIvYkeTUeMrgxMmfvXeJ/jgj2XAI5Q84Q6UbSPY5EN76d
|
37
|
+
QTK5gYMz0dEaWen2t+dvqlPJ9cFUAKsf5M8=
|
32
38
|
-----END CERTIFICATE-----
|
33
|
-
|
34
|
-
date: 2013-02-06 00:00:00 Z
|
39
|
+
date: 2023-03-13 00:00:00.000000000 Z
|
35
40
|
dependencies: []
|
36
|
-
|
37
41
|
description:
|
38
|
-
email:
|
42
|
+
email: digital.robertson@gmail.com
|
39
43
|
executables: []
|
40
|
-
|
41
44
|
extensions: []
|
42
|
-
|
43
45
|
extra_rdoc_files: []
|
44
|
-
|
45
|
-
files:
|
46
|
+
files:
|
46
47
|
- lib/rcscript-client.rb
|
47
|
-
homepage:
|
48
|
-
licenses:
|
49
|
-
|
48
|
+
homepage: https://github.com/jrobertson/rcscript-client
|
49
|
+
licenses:
|
50
|
+
- MIT
|
51
|
+
metadata: {}
|
50
52
|
post_install_message:
|
51
53
|
rdoc_options: []
|
52
|
-
|
53
|
-
require_paths:
|
54
|
+
require_paths:
|
54
55
|
- lib
|
55
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
-
|
57
|
-
requirements:
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
58
|
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version:
|
61
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
|
-
|
63
|
-
requirements:
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 2.1.2
|
61
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
64
63
|
- - ">="
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version:
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
67
66
|
requirements: []
|
68
|
-
|
69
|
-
rubyforge_project:
|
70
|
-
rubygems_version: 1.8.23
|
67
|
+
rubygems_version: 3.4.4
|
71
68
|
signing_key:
|
72
|
-
specification_version:
|
73
|
-
summary: RCscript-client is a utility for remotely executing Ruby Scripting Files
|
69
|
+
specification_version: 4
|
70
|
+
summary: RCscript-client is a utility for remotely executing Ruby Scripting Files
|
71
|
+
(RSF)
|
74
72
|
test_files: []
|
75
|
-
|
metadata.gz.sig
CHANGED
Binary file
|