rscript 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/rscript.rb +1 -1
  2. data/lib/rscript_base.rb +4 -1
  3. metadata +2 -2
data/lib/rscript.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #file: rscript.rb
3
3
 
4
4
  # created: 1-Jul-2009
5
- # updated: 09-Jul-2010
5
+ # updated: 18-Feb-2011
6
6
 
7
7
  # description
8
8
  # - This script executes Ruby script contained within an XML file.
data/lib/rscript_base.rb CHANGED
@@ -30,8 +30,11 @@ class RScriptBase
30
30
  end
31
31
 
32
32
  def read_sourcecode(rsf)
33
- if rsf[/http:\/\//] then
33
+ if rsf[/https?:\/\//] then
34
+ @url_base = rsf[/\w+:\/\/[^\/]+/]
34
35
  return open(rsf, "UserAgent" => "Ruby-SourceCodeReader").read
36
+ elsif rsf[/^\//]
37
+ return @url_base + rsf
35
38
  else
36
39
  return File.open(rsf,'r').read
37
40
  end
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.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors: []
7
7
 
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2011-02-15 00:00:00 +00:00
12
+ date: 2011-02-18 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency