rscript 0.1.11 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rscript_base.rb +6 -9
  2. metadata +16 -7
data/lib/rscript_base.rb CHANGED
@@ -1,8 +1,10 @@
1
- #!/usr/bin/ruby
1
+ #!/usr/bin/env ruby
2
+
2
3
  #file: rscript_base.rb
3
4
 
4
5
  require 'cgi'
5
6
  require 'open-uri'
7
+ require 'rxfhelper'
6
8
  require 'rexml/document'
7
9
  include REXML
8
10
 
@@ -31,14 +33,9 @@ class RScriptBase
31
33
  end
32
34
 
33
35
  def read_sourcecode(rsf)
34
- if rsf[/https?:\/\//] then
35
- return open(rsf, "UserAgent" => "Ruby-SourceCodeReader").read
36
- elsif rsf[/^\//]
37
- return open(@url_base + rsf, "UserAgent" => "Ruby-SourceCodeReader").read
38
- else
39
- return File.open(rsf,'r').read
40
- end
41
- end
36
+ buffer,type = RXFHelper.read rsf
37
+ buffer
38
+ end
42
39
 
43
40
  end
44
41
 
metadata CHANGED
@@ -2,16 +2,15 @@
2
2
  name: rscript
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.11
5
+ version: 0.1.13
6
6
  platform: ruby
7
- authors: []
8
-
7
+ authors:
8
+ - James Robertson
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-05 00:00:00 +01:00
14
- default_executable:
13
+ date: 2012-09-13 00:00:00 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: hashcache
@@ -24,6 +23,17 @@ dependencies:
24
23
  version: "0"
25
24
  type: :runtime
26
25
  version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
27
+ name: rxfhelper
28
+ prerelease: false
29
+ requirement: &id002 !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: "0"
35
+ type: :runtime
36
+ version_requirements: *id002
27
37
  description:
28
38
  email:
29
39
  executables: []
@@ -35,7 +45,6 @@ extra_rdoc_files: []
35
45
  files:
36
46
  - lib/rscript_base.rb
37
47
  - lib/rscript.rb
38
- has_rdoc: true
39
48
  homepage:
40
49
  licenses: []
41
50
 
@@ -59,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
68
  requirements: []
60
69
 
61
70
  rubyforge_project:
62
- rubygems_version: 1.5.2
71
+ rubygems_version: 1.8.23
63
72
  signing_key:
64
73
  specification_version: 3
65
74
  summary: rscript previously known as rcscript, reads Ruby code which is embedded within an rscript XML file.