rscript-server 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rscript-server.rb +6 -5
- metadata +1 -1
data/lib/rscript-server.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
# file: rscript-server.rb
|
3
|
+
# file: rscript-server.rb
|
4
4
|
|
5
5
|
require 'socket'
|
6
6
|
require 'app-routes'
|
@@ -11,9 +11,9 @@ class RScriptServer
|
|
11
11
|
include REXML
|
12
12
|
|
13
13
|
def initialize(raw_opts={})
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
|
15
|
+
opts = {ip: '0.0.0.0', port: 4446, pkg_src: ''}.merge(raw_opts)
|
16
|
+
@ip, @port, @url_base = opts[:ip], opts[:port], opts[:pkg_src]
|
17
17
|
super()
|
18
18
|
params = {}
|
19
19
|
@app = AppRoutes.new(params)
|
@@ -71,6 +71,7 @@ class RScriptServer
|
|
71
71
|
|
72
72
|
url = "%s%s.rsf" % [@url_base, package]
|
73
73
|
@content_type = 'text/plain'
|
74
|
+
puts 'url : ' + url
|
74
75
|
open(url, "UserAgent" => 'RscriptServer').read
|
75
76
|
end
|
76
77
|
|