strelka 0.0.1.pre148 → 0.0.1.pre177

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/ChangeLog +1294 -0
  2. data/IDEAS.rdoc +6 -0
  3. data/Manifest.txt +20 -0
  4. data/README.rdoc +8 -2
  5. data/Rakefile +9 -7
  6. data/examples/auth-demo.rb +32 -0
  7. data/examples/auth-demo2.rb +37 -0
  8. data/examples/auth-form.tmpl +10 -0
  9. data/examples/auth-success.tmpl +3 -0
  10. data/examples/config.yml +12 -0
  11. data/examples/examples.css +4 -0
  12. data/examples/examples.html +31 -0
  13. data/examples/gen-config.rb +5 -2
  14. data/examples/layout.tmpl +31 -0
  15. data/lib/strelka/app/auth.rb +480 -0
  16. data/lib/strelka/app/sessions.rb +8 -6
  17. data/lib/strelka/app/templating.rb +78 -17
  18. data/lib/strelka/app.rb +13 -5
  19. data/lib/strelka/authprovider/basic.rb +134 -0
  20. data/lib/strelka/authprovider/hostaccess.rb +91 -0
  21. data/lib/strelka/authprovider.rb +122 -0
  22. data/lib/strelka/cookie.rb +1 -1
  23. data/lib/strelka/cookieset.rb +1 -1
  24. data/lib/strelka/httprequest/auth.rb +31 -0
  25. data/lib/strelka/logging.rb +69 -14
  26. data/lib/strelka/mixins.rb +35 -65
  27. data/lib/strelka/session/db.rb +115 -0
  28. data/lib/strelka/session/default.rb +38 -49
  29. data/lib/strelka/session.rb +1 -1
  30. data/lib/strelka.rb +4 -1
  31. data/spec/lib/helpers.rb +8 -3
  32. data/spec/strelka/app/auth_spec.rb +367 -0
  33. data/spec/strelka/authprovider/basic_spec.rb +192 -0
  34. data/spec/strelka/authprovider/hostaccess_spec.rb +70 -0
  35. data/spec/strelka/authprovider_spec.rb +99 -0
  36. data/spec/strelka/cookie_spec.rb +1 -1
  37. data/spec/strelka/httprequest/auth_spec.rb +55 -0
  38. data/spec/strelka/httprequest/session_spec.rb +63 -3
  39. data/spec/strelka/session/db_spec.rb +85 -0
  40. data/spec/strelka/session/default_spec.rb +5 -51
  41. data.tar.gz.sig +0 -0
  42. metadata +88 -57
  43. metadata.gz.sig +0 -0
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strelka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre148
4
+ version: 0.0.1.pre177
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -36,88 +36,88 @@ cert_chain:
36
36
  YUhDS0xaZFNLai9SSHVUT3QrZ2JsUmV4OEZBaDhOZUEKY21saFhlNDZwWk5K
37
37
  Z1dLYnhaYWg4NWpJang5NWhSOHZPSStOQU01aUg5a09xSzEzRHJ4YWNUS1Bo
38
38
  cWo1UGp3RgotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
39
- date: 2012-03-19 00:00:00.000000000 Z
39
+ date: 2012-04-06 00:00:00.000000000 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
- name: mongrel2
43
- requirement: &70260997346740 !ruby/object:Gem::Requirement
42
+ name: trollop
43
+ requirement: &70219852939220 !ruby/object:Gem::Requirement
44
44
  none: false
45
45
  requirements:
46
46
  - - ~>
47
47
  - !ruby/object:Gem::Version
48
- version: '0.16'
48
+ version: '1.16'
49
49
  type: :runtime
50
50
  prerelease: false
51
- version_requirements: *70260997346740
51
+ version_requirements: *70219852939220
52
52
  - !ruby/object:Gem::Dependency
53
- name: configurability
54
- requirement: &70260997346100 !ruby/object:Gem::Requirement
53
+ name: highline
54
+ requirement: &70219852938760 !ruby/object:Gem::Requirement
55
55
  none: false
56
56
  requirements:
57
57
  - - ~>
58
58
  - !ruby/object:Gem::Version
59
- version: '1.0'
59
+ version: '1.6'
60
60
  type: :runtime
61
61
  prerelease: false
62
- version_requirements: *70260997346100
62
+ version_requirements: *70219852938760
63
63
  - !ruby/object:Gem::Dependency
64
- name: inversion
65
- requirement: &70260997345360 !ruby/object:Gem::Requirement
64
+ name: sysexits
65
+ requirement: &70219852938180 !ruby/object:Gem::Requirement
66
66
  none: false
67
67
  requirements:
68
68
  - - ~>
69
69
  - !ruby/object:Gem::Version
70
- version: '0.2'
70
+ version: '1.0'
71
71
  type: :runtime
72
72
  prerelease: false
73
- version_requirements: *70260997345360
73
+ version_requirements: *70219852938180
74
74
  - !ruby/object:Gem::Dependency
75
- name: trollop
76
- requirement: &70260997344640 !ruby/object:Gem::Requirement
75
+ name: formvalidator
76
+ requirement: &70219852937740 !ruby/object:Gem::Requirement
77
77
  none: false
78
78
  requirements:
79
79
  - - ~>
80
80
  - !ruby/object:Gem::Version
81
- version: '1.16'
81
+ version: '0.1'
82
82
  type: :runtime
83
83
  prerelease: false
84
- version_requirements: *70260997344640
84
+ version_requirements: *70219852937740
85
85
  - !ruby/object:Gem::Dependency
86
- name: highline
87
- requirement: &70260997360320 !ruby/object:Gem::Requirement
86
+ name: ! 'inversion '
87
+ requirement: &70219852937300 !ruby/object:Gem::Requirement
88
88
  none: false
89
89
  requirements:
90
90
  - - ~>
91
91
  - !ruby/object:Gem::Version
92
- version: '1.6'
92
+ version: '0.8'
93
93
  type: :runtime
94
94
  prerelease: false
95
- version_requirements: *70260997360320
95
+ version_requirements: *70219852937300
96
96
  - !ruby/object:Gem::Dependency
97
- name: formvalidator
98
- requirement: &70260997359480 !ruby/object:Gem::Requirement
97
+ name: mongrel2
98
+ requirement: &70219852936840 !ruby/object:Gem::Requirement
99
99
  none: false
100
100
  requirements:
101
101
  - - ~>
102
102
  - !ruby/object:Gem::Version
103
- version: 0.1.5
103
+ version: '0.20'
104
104
  type: :runtime
105
105
  prerelease: false
106
- version_requirements: *70260997359480
106
+ version_requirements: *70219852936840
107
107
  - !ruby/object:Gem::Dependency
108
- name: uuidtools
109
- requirement: &70260997358900 !ruby/object:Gem::Requirement
108
+ name: ! 'uuidtools '
109
+ requirement: &70219852936260 !ruby/object:Gem::Requirement
110
110
  none: false
111
111
  requirements:
112
112
  - - ~>
113
113
  - !ruby/object:Gem::Version
114
- version: 2.1.2
114
+ version: '2.1'
115
115
  type: :runtime
116
116
  prerelease: false
117
- version_requirements: *70260997358900
117
+ version_requirements: *70219852936260
118
118
  - !ruby/object:Gem::Dependency
119
- name: sysexits
120
- requirement: &70260997358420 !ruby/object:Gem::Requirement
119
+ name: configurability
120
+ requirement: &70219852935720 !ruby/object:Gem::Requirement
121
121
  none: false
122
122
  requirements:
123
123
  - - ~>
@@ -125,10 +125,10 @@ dependencies:
125
125
  version: '1.0'
126
126
  type: :runtime
127
127
  prerelease: false
128
- version_requirements: *70260997358420
128
+ version_requirements: *70219852935720
129
129
  - !ruby/object:Gem::Dependency
130
- name: pluginfactory
131
- requirement: &70260997357840 !ruby/object:Gem::Requirement
130
+ name: ! 'pluginfactory '
131
+ requirement: &70219852935180 !ruby/object:Gem::Requirement
132
132
  none: false
133
133
  requirements:
134
134
  - - ~>
@@ -136,73 +136,84 @@ dependencies:
136
136
  version: '1.0'
137
137
  type: :runtime
138
138
  prerelease: false
139
- version_requirements: *70260997357840
139
+ version_requirements: *70219852935180
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: hoe-mercurial
142
- requirement: &70260997357360 !ruby/object:Gem::Requirement
142
+ requirement: &70219852934600 !ruby/object:Gem::Requirement
143
143
  none: false
144
144
  requirements:
145
145
  - - ~>
146
146
  - !ruby/object:Gem::Version
147
- version: 1.3.1
147
+ version: 1.4.0
148
148
  type: :development
149
149
  prerelease: false
150
- version_requirements: *70260997357360
150
+ version_requirements: *70219852934600
151
151
  - !ruby/object:Gem::Dependency
152
152
  name: hoe-manualgen
153
- requirement: &70260997356520 !ruby/object:Gem::Requirement
153
+ requirement: &70219852934080 !ruby/object:Gem::Requirement
154
154
  none: false
155
155
  requirements:
156
156
  - - ~>
157
157
  - !ruby/object:Gem::Version
158
- version: 0.2.0
158
+ version: 0.3.0
159
159
  type: :development
160
160
  prerelease: false
161
- version_requirements: *70260997356520
161
+ version_requirements: *70219852934080
162
162
  - !ruby/object:Gem::Dependency
163
163
  name: hoe-highline
164
- requirement: &70260997354460 !ruby/object:Gem::Requirement
164
+ requirement: &70219852933540 !ruby/object:Gem::Requirement
165
165
  none: false
166
166
  requirements:
167
167
  - - ~>
168
168
  - !ruby/object:Gem::Version
169
- version: 0.0.1
169
+ version: 0.1.0
170
170
  type: :development
171
171
  prerelease: false
172
- version_requirements: *70260997354460
172
+ version_requirements: *70219852933540
173
173
  - !ruby/object:Gem::Dependency
174
- name: rspec
175
- requirement: &70260997353200 !ruby/object:Gem::Requirement
174
+ name: rdoc
175
+ requirement: &70219852932880 !ruby/object:Gem::Requirement
176
176
  none: false
177
177
  requirements:
178
178
  - - ~>
179
179
  - !ruby/object:Gem::Version
180
- version: '2.6'
180
+ version: '3.10'
181
181
  type: :development
182
182
  prerelease: false
183
- version_requirements: *70260997353200
183
+ version_requirements: *70219852932880
184
184
  - !ruby/object:Gem::Dependency
185
- name: rdoc
186
- requirement: &70260997368560 !ruby/object:Gem::Requirement
185
+ name: hoe-deveiate
186
+ requirement: &70219852729340 !ruby/object:Gem::Requirement
187
187
  none: false
188
188
  requirements:
189
189
  - - ~>
190
190
  - !ruby/object:Gem::Version
191
- version: '3.10'
191
+ version: '0.1'
192
192
  type: :development
193
193
  prerelease: false
194
- version_requirements: *70260997368560
194
+ version_requirements: *70219852729340
195
+ - !ruby/object:Gem::Dependency
196
+ name: simplecov
197
+ requirement: &70219852728760 !ruby/object:Gem::Requirement
198
+ none: false
199
+ requirements:
200
+ - - ~>
201
+ - !ruby/object:Gem::Version
202
+ version: '0.6'
203
+ type: :development
204
+ prerelease: false
205
+ version_requirements: *70219852728760
195
206
  - !ruby/object:Gem::Dependency
196
207
  name: hoe
197
- requirement: &70260997366420 !ruby/object:Gem::Requirement
208
+ requirement: &70219852728160 !ruby/object:Gem::Requirement
198
209
  none: false
199
210
  requirements:
200
211
  - - ~>
201
212
  - !ruby/object:Gem::Version
202
- version: '2.13'
213
+ version: '3.0'
203
214
  type: :development
204
215
  prerelease: false
205
- version_requirements: *70260997366420
216
+ version_requirements: *70219852728160
206
217
  description: ! 'Strelka is a framework for creating and deploying Mongrel2 web applications
207
218
 
208
219
  in Ruby, and for managing a Mongrel2 cluster.
@@ -217,12 +228,13 @@ executables:
217
228
  - leash
218
229
  extensions: []
219
230
  extra_rdoc_files:
220
- - Manifest.txt
221
231
  - History.rdoc
222
232
  - IDEAS.rdoc
233
+ - Manifest.txt
223
234
  - README.rdoc
224
235
  files:
225
236
  - .gemtest
237
+ - ChangeLog
226
238
  - History.rdoc
227
239
  - IDEAS.rdoc
228
240
  - Manifest.txt
@@ -239,11 +251,19 @@ files:
239
251
  - contrib/hoetemplate/lib/file_name.rb.erb
240
252
  - contrib/hoetemplate/spec/file_name_spec.rb.erb
241
253
  - data/strelka/apps/hello-world
254
+ - examples/auth-demo.rb
255
+ - examples/auth-demo2.rb
256
+ - examples/auth-form.tmpl
257
+ - examples/auth-success.tmpl
242
258
  - examples/config.yml
259
+ - examples/examples.css
260
+ - examples/examples.html
243
261
  - examples/gen-config.rb
262
+ - examples/layout.tmpl
244
263
  - examples/sessions-demo.rb
245
264
  - lib/strelka.rb
246
265
  - lib/strelka/app.rb
266
+ - lib/strelka/app/auth.rb
247
267
  - lib/strelka/app/errors.rb
248
268
  - lib/strelka/app/filters.rb
249
269
  - lib/strelka/app/negotiation.rb
@@ -253,6 +273,9 @@ files:
253
273
  - lib/strelka/app/routing.rb
254
274
  - lib/strelka/app/sessions.rb
255
275
  - lib/strelka/app/templating.rb
276
+ - lib/strelka/authprovider.rb
277
+ - lib/strelka/authprovider/basic.rb
278
+ - lib/strelka/authprovider/hostaccess.rb
256
279
  - lib/strelka/behavior/plugin.rb
257
280
  - lib/strelka/constants.rb
258
281
  - lib/strelka/cookie.rb
@@ -260,6 +283,7 @@ files:
260
283
  - lib/strelka/exceptions.rb
261
284
  - lib/strelka/httprequest.rb
262
285
  - lib/strelka/httprequest/acceptparams.rb
286
+ - lib/strelka/httprequest/auth.rb
263
287
  - lib/strelka/httprequest/negotiation.rb
264
288
  - lib/strelka/httprequest/session.rb
265
289
  - lib/strelka/httpresponse.rb
@@ -272,12 +296,14 @@ files:
272
296
  - lib/strelka/router/default.rb
273
297
  - lib/strelka/router/exclusive.rb
274
298
  - lib/strelka/session.rb
299
+ - lib/strelka/session/db.rb
275
300
  - lib/strelka/session/default.rb
276
301
  - spec/data/error.tmpl
277
302
  - spec/data/layout.tmpl
278
303
  - spec/data/main.tmpl
279
304
  - spec/lib/constants.rb
280
305
  - spec/lib/helpers.rb
306
+ - spec/strelka/app/auth_spec.rb
281
307
  - spec/strelka/app/errors_spec.rb
282
308
  - spec/strelka/app/filters_spec.rb
283
309
  - spec/strelka/app/negotiation_spec.rb
@@ -288,10 +314,14 @@ files:
288
314
  - spec/strelka/app/sessions_spec.rb
289
315
  - spec/strelka/app/templating_spec.rb
290
316
  - spec/strelka/app_spec.rb
317
+ - spec/strelka/authprovider/basic_spec.rb
318
+ - spec/strelka/authprovider/hostaccess_spec.rb
319
+ - spec/strelka/authprovider_spec.rb
291
320
  - spec/strelka/cookie_spec.rb
292
321
  - spec/strelka/cookieset_spec.rb
293
322
  - spec/strelka/exceptions_spec.rb
294
323
  - spec/strelka/httprequest/acceptparams_spec.rb
324
+ - spec/strelka/httprequest/auth_spec.rb
295
325
  - spec/strelka/httprequest/negotiation_spec.rb
296
326
  - spec/strelka/httprequest/session_spec.rb
297
327
  - spec/strelka/httprequest_spec.rb
@@ -303,6 +333,7 @@ files:
303
333
  - spec/strelka/router/default_spec.rb
304
334
  - spec/strelka/router/exclusive_spec.rb
305
335
  - spec/strelka/router_spec.rb
336
+ - spec/strelka/session/db_spec.rb
306
337
  - spec/strelka/session/default_spec.rb
307
338
  - spec/strelka/session_spec.rb
308
339
  - spec/strelka_spec.rb
metadata.gz.sig CHANGED
Binary file