rack-rscript 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rack-rscript.rb +11 -6
- metadata +60 -18
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 875cbf1083ade035659604b1213379e3805e3aa0
|
4
|
+
data.tar.gz: cc138f396e38d7d4a516d3e7354594a41467646d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32b39e8bf085b27df48f84e90dcb6717640de45fd125e4fe0c8c04bfe1d93008f2017fef41cb5f0179cdc274c8a5fa6a996db93bfb2925f00d017c632f0f40ad
|
7
|
+
data.tar.gz: cc844b85081fdced5c58be772b76fd3e699f6a5109be4888bd2211806f395ec5817757f9b25c20b1f10e3d2cf638fc758a92cc3ea007a2313d2274d863d6e9d7
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rack-rscript.rb
CHANGED
@@ -19,6 +19,9 @@ class Redirect
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
+
class RackRscriptError < Exception
|
23
|
+
end
|
24
|
+
|
22
25
|
class RackRscript
|
23
26
|
include AppRoutes
|
24
27
|
|
@@ -56,15 +59,15 @@ class RackRscript
|
|
56
59
|
@ws = c.connect(uri: "ws://%s:%s" % [opts[:sps_address], opts[:sps_port]])
|
57
60
|
|
58
61
|
@ws.onopen do
|
59
|
-
puts "Client connected"
|
62
|
+
#puts "Client connected"
|
60
63
|
end
|
61
64
|
|
62
65
|
@ws.onclose do
|
63
|
-
puts "Client disconnected"
|
66
|
+
#puts "Client disconnected"
|
64
67
|
end
|
65
68
|
|
66
69
|
EventMachine.error_handler{ |e|
|
67
|
-
puts "Error raised during event loop: #{e.message}"
|
70
|
+
#puts "Error raised during event loop: #{e.message}"
|
68
71
|
|
69
72
|
}
|
70
73
|
|
@@ -74,7 +77,7 @@ class RackRscript
|
|
74
77
|
end
|
75
78
|
end
|
76
79
|
|
77
|
-
|
80
|
+
def call(env)
|
78
81
|
@env = env
|
79
82
|
request = env['REQUEST_URI'][/https?:\/\/[^\/]+(.*)/,1]
|
80
83
|
|
@@ -117,6 +120,7 @@ class RackRscript
|
|
117
120
|
'text/slim' => tilt_proc,
|
118
121
|
'text/plain' => passthru_proc,
|
119
122
|
'text/xml' => passthru_proc,
|
123
|
+
'text/css' => passthru_proc,
|
120
124
|
'application/xml' => passthru_proc,
|
121
125
|
'image/png' => passthru_proc,
|
122
126
|
'image/jpeg' => passthru_proc
|
@@ -129,7 +133,7 @@ class RackRscript
|
|
129
133
|
|
130
134
|
[status_code, {"Content-Type" => content_type}, [content]]
|
131
135
|
end
|
132
|
-
|
136
|
+
end
|
133
137
|
|
134
138
|
def clear_cache()
|
135
139
|
@rrscript.reset
|
@@ -164,6 +168,7 @@ class RackRscript
|
|
164
168
|
rescue Exception => e
|
165
169
|
@params = {}
|
166
170
|
err_label = e.message.to_s + " :: \n" + e.backtrace.join("\n")
|
171
|
+
raise RackRscriptError, err_label
|
167
172
|
log(err_label)
|
168
173
|
end
|
169
174
|
|
@@ -257,4 +262,4 @@ class RackRscript
|
|
257
262
|
template = Tilt[@templates[name][:type].to_s].new(options) {|x| @templates[name][:content]}
|
258
263
|
layout.render{ template.render(self, locals)}
|
259
264
|
end
|
260
|
-
end
|
265
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-rscript
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,106 +31,148 @@ cert_chain:
|
|
31
31
|
oGNzP1rxjANUGW/2lTKop1erzGf0J+T5D99GqIMDOgY0isR8aE/vL7wcicJB/4tg
|
32
32
|
3HU/e1wiHvcI6A==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2014-
|
34
|
+
date: 2014-12-14 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rack
|
38
38
|
requirement: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '1.5'
|
40
43
|
- - ">="
|
41
44
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
45
|
+
version: 1.5.2
|
43
46
|
type: :runtime
|
44
47
|
prerelease: false
|
45
48
|
version_requirements: !ruby/object:Gem::Requirement
|
46
49
|
requirements:
|
50
|
+
- - "~>"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '1.5'
|
47
53
|
- - ">="
|
48
54
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
55
|
+
version: 1.5.2
|
50
56
|
- !ruby/object:Gem::Dependency
|
51
57
|
name: app-routes
|
52
58
|
requirement: !ruby/object:Gem::Requirement
|
53
59
|
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0.1'
|
54
63
|
- - ">="
|
55
64
|
- !ruby/object:Gem::Version
|
56
|
-
version:
|
65
|
+
version: 0.1.18
|
57
66
|
type: :runtime
|
58
67
|
prerelease: false
|
59
68
|
version_requirements: !ruby/object:Gem::Requirement
|
60
69
|
requirements:
|
70
|
+
- - "~>"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0.1'
|
61
73
|
- - ">="
|
62
74
|
- !ruby/object:Gem::Version
|
63
|
-
version:
|
75
|
+
version: 0.1.18
|
64
76
|
- !ruby/object:Gem::Dependency
|
65
77
|
name: rscript
|
66
78
|
requirement: !ruby/object:Gem::Requirement
|
67
79
|
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.1'
|
68
83
|
- - ">="
|
69
84
|
- !ruby/object:Gem::Version
|
70
|
-
version:
|
85
|
+
version: 0.1.25
|
71
86
|
type: :runtime
|
72
87
|
prerelease: false
|
73
88
|
version_requirements: !ruby/object:Gem::Requirement
|
74
89
|
requirements:
|
90
|
+
- - "~>"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0.1'
|
75
93
|
- - ">="
|
76
94
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
95
|
+
version: 0.1.25
|
78
96
|
- !ruby/object:Gem::Dependency
|
79
97
|
name: haml
|
80
98
|
requirement: !ruby/object:Gem::Requirement
|
81
99
|
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '4.0'
|
82
103
|
- - ">="
|
83
104
|
- !ruby/object:Gem::Version
|
84
|
-
version:
|
105
|
+
version: 4.0.5
|
85
106
|
type: :runtime
|
86
107
|
prerelease: false
|
87
108
|
version_requirements: !ruby/object:Gem::Requirement
|
88
109
|
requirements:
|
110
|
+
- - "~>"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '4.0'
|
89
113
|
- - ">="
|
90
114
|
- !ruby/object:Gem::Version
|
91
|
-
version:
|
115
|
+
version: 4.0.5
|
92
116
|
- !ruby/object:Gem::Dependency
|
93
117
|
name: tilt
|
94
118
|
requirement: !ruby/object:Gem::Requirement
|
95
119
|
requirements:
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '2.0'
|
96
123
|
- - ">="
|
97
124
|
- !ruby/object:Gem::Version
|
98
|
-
version:
|
125
|
+
version: 2.0.1
|
99
126
|
type: :runtime
|
100
127
|
prerelease: false
|
101
128
|
version_requirements: !ruby/object:Gem::Requirement
|
102
129
|
requirements:
|
130
|
+
- - "~>"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '2.0'
|
103
133
|
- - ">="
|
104
134
|
- !ruby/object:Gem::Version
|
105
|
-
version:
|
135
|
+
version: 2.0.1
|
106
136
|
- !ruby/object:Gem::Dependency
|
107
137
|
name: slim
|
108
138
|
requirement: !ruby/object:Gem::Requirement
|
109
139
|
requirements:
|
140
|
+
- - "~>"
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '2.0'
|
110
143
|
- - ">="
|
111
144
|
- !ruby/object:Gem::Version
|
112
|
-
version:
|
145
|
+
version: 2.0.2
|
113
146
|
type: :runtime
|
114
147
|
prerelease: false
|
115
148
|
version_requirements: !ruby/object:Gem::Requirement
|
116
149
|
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '2.0'
|
117
153
|
- - ">="
|
118
154
|
- !ruby/object:Gem::Version
|
119
|
-
version:
|
155
|
+
version: 2.0.2
|
120
156
|
- !ruby/object:Gem::Dependency
|
121
157
|
name: websocket-eventmachine-client
|
122
158
|
requirement: !ruby/object:Gem::Requirement
|
123
159
|
requirements:
|
160
|
+
- - "~>"
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '1.0'
|
124
163
|
- - ">="
|
125
164
|
- !ruby/object:Gem::Version
|
126
|
-
version:
|
165
|
+
version: 1.0.1
|
127
166
|
type: :runtime
|
128
167
|
prerelease: false
|
129
168
|
version_requirements: !ruby/object:Gem::Requirement
|
130
169
|
requirements:
|
170
|
+
- - "~>"
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '1.0'
|
131
173
|
- - ">="
|
132
174
|
- !ruby/object:Gem::Version
|
133
|
-
version:
|
175
|
+
version: 1.0.1
|
134
176
|
description:
|
135
177
|
email: james@r0bertson.co.uk
|
136
178
|
executables: []
|
@@ -150,7 +192,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
150
192
|
requirements:
|
151
193
|
- - ">="
|
152
194
|
- !ruby/object:Gem::Version
|
153
|
-
version:
|
195
|
+
version: 2.1.2
|
154
196
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
197
|
requirements:
|
156
198
|
- - ">="
|
@@ -158,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
200
|
version: '0'
|
159
201
|
requirements: []
|
160
202
|
rubyforge_project:
|
161
|
-
rubygems_version: 2.
|
203
|
+
rubygems_version: 2.2.2
|
162
204
|
signing_key:
|
163
205
|
specification_version: 4
|
164
206
|
summary: Rack-Rscript is a light-weight alternative to Sinatra-Rscript.
|
metadata.gz.sig
CHANGED
Binary file
|