rcscript-client 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fabfdca08feeb5c380e8e91783fc17e16af0e2cf
4
- data.tar.gz: 392bbb54cb36875f3f62636aa2e8e75530dc9c18
2
+ SHA256:
3
+ metadata.gz: 77c0b880a7ad3a0cf456d0c1e973619b170599a47bad90b1fa2833ea13c07bde
4
+ data.tar.gz: 6fd566cb7154146f41c27b5c2aef8084ef10c09afff43facf59720e4d94fe8ee
5
5
  SHA512:
6
- metadata.gz: 274013beb9dcbd6a05935ad6394a4810db64704a14520f23ea2a19393d0fbf82a868c1d48cf8015ee08bf5202d92ef7c97264e57cd353eb5dac5fb700f1a9e09
7
- data.tar.gz: 449ee8d5496d995463b4ec843f19190090838f0a9dc85dc72954ee76a25e884f555ffd60c29a904bd896462e25d2a6c10525586bae738e4711fcc422d1cf44a4
6
+ metadata.gz: 72f79aa75926612bb6c3d64ea69d2fdb95f3f3a19d9cd5c61bacfb54f975cdb7d905c1ad374da25e4781e826e4e36b6e67dc0339f613ec0923781d50445251b5
7
+ data.tar.gz: bf5ba617e96ac2f0192f12594d437169e70474821ac50823f0e77340d2eee94d57a19894ecdbdb568a1f09eff3220baa2860339caae31893d5bd578c90c41375
checksums.yaml.gz.sig CHANGED
Binary file
@@ -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 RScriptClient
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 => ''}.merge(opts)
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://rorbuilder.info/r/heroku/%s.rsf" % package
36
- url = "http://%s/view-source/%s" % [@hostname, package]
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
- doc = Document.new(open(url, 'UserAgent' => 'ClientRscript').read)
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
- response = open(url, 'UserAgent' => 'RScriptClient')
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcscript-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -10,29 +10,36 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDRDCCAiygAwIBAgIBADANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
13
+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k1kfmhOwDVegBPK0yTJ
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=
31
38
  -----END CERTIFICATE-----
32
- date: 2013-07-27 00:00:00.000000000 Z
39
+ date: 2023-03-13 00:00:00.000000000 Z
33
40
  dependencies: []
34
41
  description:
35
- email: james@r0bertson.co.uk
42
+ email: digital.robertson@gmail.com
36
43
  executables: []
37
44
  extensions: []
38
45
  extra_rdoc_files: []
@@ -48,17 +55,16 @@ require_paths:
48
55
  - lib
49
56
  required_ruby_version: !ruby/object:Gem::Requirement
50
57
  requirements:
51
- - - '>='
58
+ - - ">="
52
59
  - !ruby/object:Gem::Version
53
- version: '0'
60
+ version: 2.1.2
54
61
  required_rubygems_version: !ruby/object:Gem::Requirement
55
62
  requirements:
56
- - - '>='
63
+ - - ">="
57
64
  - !ruby/object:Gem::Version
58
65
  version: '0'
59
66
  requirements: []
60
- rubyforge_project:
61
- rubygems_version: 2.0.0.rc.2
67
+ rubygems_version: 3.4.4
62
68
  signing_key:
63
69
  specification_version: 4
64
70
  summary: RCscript-client is a utility for remotely executing Ruby Scripting Files
metadata.gz.sig CHANGED
Binary file