rack-rscript 0.9.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05cbb552f2b117cdd2a6776764c5d2c53ff93a9a
4
- data.tar.gz: 0cfc3e2a21cf29cddf937f76eafae85b6b96ca9f
3
+ metadata.gz: c5adcfa56e1cd6ec30c974ebc8f22cd665e3c8d8
4
+ data.tar.gz: 2cdac5d39d82192bb8a6e62eef82193510d3dcb8
5
5
  SHA512:
6
- metadata.gz: 4926298e07270c3e61c1eed9562cbe3b9b59cfcf919fa20ba7b2d7959f42ee05b9425b42ef73860d3295ef98b66398a27e306a5102e35c3c1fc52708a0fe7c28
7
- data.tar.gz: b70bdb5cd2e6f5c44c69f7d96ec9502b8cb2b8d45525985d3e42581b137ebb4a8233b7c356585b7772af456a643283a32be75d8eb13fd2b58b412e804b513ba9
6
+ metadata.gz: 22bd6205f5ed232142b6bd389e3beb52328a2548aaa0c31a99741f1ca293bafff87048b6206daeaee27ba5c1cf5193de1fcb1bb64fa4ebb09cb8d44cb646557a
7
+ data.tar.gz: 58711eb69d801e5b2f0b1cfdf84bae4e2908b81db754f9ab4d4e733780d75f48e40bfcbc887eafa6d2873aec1ca5f547fddedeedcb33f18e45c970bd53212db0
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/rack-rscript.rb CHANGED
@@ -3,14 +3,15 @@
3
3
  # file: rack-rscript.rb
4
4
 
5
5
 
6
- require 'rscript'
7
- require 'app-routes'
8
- require 'logger'
6
+ require 'rsc'
9
7
  require 'haml'
10
8
  require 'slim'
11
9
  require 'tilt'
12
10
  require 'json'
11
+ require 'logger'
13
12
  require 'rexslt'
13
+ require 'rscript'
14
+ require 'app-routes'
14
15
 
15
16
 
16
17
  class Redirect
@@ -28,7 +29,8 @@ class RackRscript
28
29
  include AppRoutes
29
30
 
30
31
 
31
- def initialize(logfile: '', logrotate: 'daily', pkg_src: '', cache: 5)
32
+ def initialize(logfile: '', logrotate: 'daily', pkg_src: '', cache: 5,
33
+ rsc_host: 'rse', rsc_package_src: nil)
32
34
 
33
35
  @params = {}
34
36
  @templates = {}
@@ -47,7 +49,10 @@ class RackRscript
47
49
  end
48
50
 
49
51
  super() # required for app-routes initialize method to exectue
50
- default_routes(@env, @params)
52
+ default_routes(@env, @params)
53
+
54
+ @rsc = nil
55
+ @rsc = RSC.new rsc_host, rsc_package_src if rsc_package_src
51
56
 
52
57
  end
53
58
 
@@ -114,7 +119,7 @@ class RackRscript
114
119
 
115
120
  [status_code, {"Content-Type" => content_type}, [content]]
116
121
  end
117
- end
122
+ end
118
123
 
119
124
  def clear_cache()
120
125
  @rrscript.reset
@@ -141,6 +146,7 @@ class RackRscript
141
146
  qargs].flatten)
142
147
 
143
148
  rws = self
149
+ rsc = @rsc if @rsc
144
150
 
145
151
  begin
146
152
  r = eval result
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.9.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  Ds3gVVKTRQV/ovLdiT/BpXxGWS5/OQ4Ftl2JY1A8bBhJqZGdpMbwv+Jtn/gpmMjE
32
32
  EHV4ZelB040ghg==
33
33
  -----END CERTIFICATE-----
34
- date: 2016-12-23 00:00:00.000000000 Z
34
+ date: 2017-04-27 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rack
@@ -62,7 +62,7 @@ dependencies:
62
62
  version: '0.1'
63
63
  - - ">="
64
64
  - !ruby/object:Gem::Version
65
- version: 0.1.18
65
+ version: 0.1.19
66
66
  type: :runtime
67
67
  prerelease: false
68
68
  version_requirements: !ruby/object:Gem::Requirement
@@ -72,7 +72,7 @@ dependencies:
72
72
  version: '0.1'
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 0.1.18
75
+ version: 0.1.19
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: rscript
78
78
  requirement: !ruby/object:Gem::Requirement
@@ -82,7 +82,7 @@ dependencies:
82
82
  version: '0.3'
83
83
  - - ">="
84
84
  - !ruby/object:Gem::Version
85
- version: 0.3.3
85
+ version: 0.3.4
86
86
  type: :runtime
87
87
  prerelease: false
88
88
  version_requirements: !ruby/object:Gem::Requirement
@@ -92,27 +92,27 @@ dependencies:
92
92
  version: '0.3'
93
93
  - - ">="
94
94
  - !ruby/object:Gem::Version
95
- version: 0.3.3
95
+ version: 0.3.4
96
96
  - !ruby/object:Gem::Dependency
97
97
  name: haml
98
98
  requirement: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '4.0'
102
+ version: '5.0'
103
103
  - - ">="
104
104
  - !ruby/object:Gem::Version
105
- version: 4.0.7
105
+ version: 5.0.0
106
106
  type: :runtime
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - "~>"
111
111
  - !ruby/object:Gem::Version
112
- version: '4.0'
112
+ version: '5.0'
113
113
  - - ">="
114
114
  - !ruby/object:Gem::Version
115
- version: 4.0.7
115
+ version: 5.0.0
116
116
  - !ruby/object:Gem::Dependency
117
117
  name: tilt
118
118
  requirement: !ruby/object:Gem::Requirement
@@ -122,7 +122,7 @@ dependencies:
122
122
  version: '2.0'
123
123
  - - ">="
124
124
  - !ruby/object:Gem::Version
125
- version: 2.0.5
125
+ version: 2.0.7
126
126
  type: :runtime
127
127
  prerelease: false
128
128
  version_requirements: !ruby/object:Gem::Requirement
@@ -132,7 +132,7 @@ dependencies:
132
132
  version: '2.0'
133
133
  - - ">="
134
134
  - !ruby/object:Gem::Version
135
- version: 2.0.5
135
+ version: 2.0.7
136
136
  - !ruby/object:Gem::Dependency
137
137
  name: slim
138
138
  requirement: !ruby/object:Gem::Requirement
@@ -159,20 +159,20 @@ dependencies:
159
159
  requirements:
160
160
  - - "~>"
161
161
  - !ruby/object:Gem::Version
162
- version: '2.0'
162
+ version: '2.1'
163
163
  - - ">="
164
164
  - !ruby/object:Gem::Version
165
- version: 2.0.2
165
+ version: 2.1.0
166
166
  type: :runtime
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
169
169
  requirements:
170
170
  - - "~>"
171
171
  - !ruby/object:Gem::Version
172
- version: '2.0'
172
+ version: '2.1'
173
173
  - - ">="
174
174
  - !ruby/object:Gem::Version
175
- version: 2.0.2
175
+ version: 2.1.0
176
176
  - !ruby/object:Gem::Dependency
177
177
  name: rexslt
178
178
  requirement: !ruby/object:Gem::Requirement
@@ -193,8 +193,28 @@ dependencies:
193
193
  - - ">="
194
194
  - !ruby/object:Gem::Version
195
195
  version: 0.6.7
196
+ - !ruby/object:Gem::Dependency
197
+ name: rsc
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - "~>"
201
+ - !ruby/object:Gem::Version
202
+ version: '0.2'
203
+ - - ">="
204
+ - !ruby/object:Gem::Version
205
+ version: 0.2.2
206
+ type: :runtime
207
+ prerelease: false
208
+ version_requirements: !ruby/object:Gem::Requirement
209
+ requirements:
210
+ - - "~>"
211
+ - !ruby/object:Gem::Version
212
+ version: '0.2'
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: 0.2.2
196
216
  description:
197
- email: james@r0bertson.co.uk
217
+ email: james@jamesrobertson.eu
198
218
  executables: []
199
219
  extensions: []
200
220
  extra_rdoc_files: []
@@ -220,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
240
  version: '0'
221
241
  requirements: []
222
242
  rubyforge_project:
223
- rubygems_version: 2.5.1
243
+ rubygems_version: 2.6.8
224
244
  signing_key:
225
245
  specification_version: 4
226
246
  summary: Rack-Rscript is a light-weight alternative to Sinatra-Rscript.
metadata.gz.sig CHANGED
Binary file