rscript 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rscript.rb +1 -1
- data/lib/rscript_base.rb +4 -1
- metadata +2 -2
data/lib/rscript.rb
CHANGED
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[/
|
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.
|
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-
|
12
|
+
date: 2011-02-18 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|