strelka 0.9.0 → 0.9.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 +1 -2
- data.tar.gz.sig +2 -1
- data/ChangeLog +143 -24
- data/History.rdoc +7 -0
- data/Rakefile +40 -27
- data/lib/strelka.rb +3 -2
- data/lib/strelka/app.rb +1 -0
- data/lib/strelka/app/auth.rb +2 -2
- data/lib/strelka/httprequest.rb +16 -14
- data/spec/helpers.rb +0 -1
- data/spec/strelka/app/auth_spec.rb +13 -6
- data/spec/strelka/app/errors_spec.rb +0 -5
- data/spec/strelka/app/filters_spec.rb +0 -5
- data/spec/strelka/app/negotiation_spec.rb +0 -5
- data/spec/strelka/app/parameters_spec.rb +0 -5
- data/spec/strelka/app/restresources_spec.rb +0 -5
- data/spec/strelka/app/routing_spec.rb +0 -5
- data/spec/strelka/app/sessions_spec.rb +0 -5
- data/spec/strelka/app/templating_spec.rb +0 -2
- data/spec/strelka/app_spec.rb +0 -2
- data/spec/strelka/authprovider/basic_spec.rb +0 -5
- data/spec/strelka/authprovider/hostaccess_spec.rb +0 -5
- data/spec/strelka/authprovider_spec.rb +0 -5
- data/spec/strelka/cookie_spec.rb +0 -8
- data/spec/strelka/discovery_spec.rb +0 -5
- data/spec/strelka/exceptions_spec.rb +0 -5
- data/spec/strelka/httprequest/acceptparams_spec.rb +0 -8
- data/spec/strelka/httprequest/auth_spec.rb +0 -5
- data/spec/strelka/httprequest/negotiation_spec.rb +0 -5
- data/spec/strelka/httprequest/session_spec.rb +0 -5
- data/spec/strelka/httprequest_spec.rb +0 -4
- data/spec/strelka/httpresponse/negotiation_spec.rb +0 -5
- data/spec/strelka/httpresponse/session_spec.rb +0 -5
- data/spec/strelka/httpresponse_spec.rb +0 -5
- data/spec/strelka/mixins_spec.rb +0 -7
- data/spec/strelka/multipartparser_spec.rb +0 -2
- data/spec/strelka/paramvalidator_spec.rb +1 -13
- data/spec/strelka/plugins_spec.rb +0 -2
- data/spec/strelka/router/default_spec.rb +0 -5
- data/spec/strelka/router/exclusive_spec.rb +0 -5
- data/spec/strelka/router_spec.rb +0 -5
- data/spec/strelka/session/db_spec.rb +0 -5
- data/spec/strelka/session/default_spec.rb +0 -5
- data/spec/strelka/session_spec.rb +0 -5
- data/spec/strelka/websocketserver/routing_spec.rb +0 -5
- data/spec/strelka/websocketserver_spec.rb +0 -2
- data/spec/strelka_spec.rb +0 -9
- metadata +78 -90
- 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: 75847ae82c8afb5c1b015ff7883b242f02f497e3
|
4
|
+
data.tar.gz: f3a1644c01ff9e07c776eda4c98105a85c94f50b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc56b4ca53995f7b2ac9196c3ab0ea5727b5bb0bbca9ab8802a0205d628d7ccc9365a5b0c2b9f97c9d4b0c0223a32121505aa9c685a791cde17363b717a5f31e
|
7
|
+
data.tar.gz: 5346f6b0ae56a569cf57cef4ab248d65469a77fb84384150e02d51633d392b3f26cf54e9dedfab4672babb53037645052295dd0720b4a64457d42510e8fe58a0
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
GDJ���Ue/*u5-�%N�>2�h��䈆�qo�4{x��-�������'�
|
1
|
+
`���[�(ɱ���꾂�G|�G#���\��Ұ��E!]���$�_�Ob'�|��>h���-�Hsja�+0Ƣd�c,5�N�M��F�**��lܰs-Q�y�W4Voj�<����7���Ty_�Prvl1��T ���Ց�@\g�����uj�p��3.U���x�Z'�`0��d7�e�fmM�t�c6�E9W�9��X��9;Q��ƓNb�T���]�0r�d�&�J-�|�I��4h@"W�>6�:�
|
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
�I�^��Po�!�r-ƾ�Du1����Gc�0�$��=(��,�.���*`�\�J���}��?%z��nj͔��A}ɣ�$u����,�e�N-��W�ͅ�\b��~�&*��K�L�l6v��H%ZE�z��6��@.��9��τ�vz��ZĦ�$��������QG�8�M�ׄ��5�F�^f���*�,�Cl�">1�q� "
|
2
|
+
|
data/ChangeLog
CHANGED
@@ -1,9 +1,127 @@
|
|
1
|
+
2015-04-01 Michael Granger <ged@FaerieMUD.org>
|
2
|
+
|
3
|
+
* cert/mahlon.pem:
|
4
|
+
Sign mahlon's cert
|
5
|
+
[db92e594bfc2] [tip]
|
6
|
+
|
7
|
+
2015-04-01 Mahlon E. Smith <mahlon@martini.nu>
|
8
|
+
|
9
|
+
* .gems, Rakefile:
|
10
|
+
Add certificate signing to gem packaging.
|
11
|
+
[d8b9bca999a8]
|
12
|
+
|
13
|
+
* .hoerc, Rakefile, cert/ged.pem, cert/mahlon.pem, strelka.gemspec:
|
14
|
+
Add certificate signing to gem packaging.
|
15
|
+
[d85a66521643]
|
16
|
+
|
17
|
+
* .gems:
|
18
|
+
Add safe_yaml to the .gems file.
|
19
|
+
[1f2abfa84b12]
|
20
|
+
|
21
|
+
* lib/strelka/app/auth.rb, spec/strelka/app/auth_spec.rb:
|
22
|
+
Ensure required permissions for the auth plugin are unmodified
|
23
|
+
between requests.
|
24
|
+
[e38b9bf6df30]
|
25
|
+
|
26
|
+
2015-03-25 Michael Granger <ged@FaerieMUD.org>
|
27
|
+
|
28
|
+
* lib/strelka/httprequest.rb, spec/helpers.rb:
|
29
|
+
Fix urlencoded param parsing
|
30
|
+
|
31
|
+
Ruby 2.2's URI library no longer supports parsing application/x-www-
|
32
|
+
form-urlencoded with semicolon delimiters because the WhatWG decided
|
33
|
+
no one used that I guess.
|
34
|
+
|
35
|
+
This change restores the old behavior by doing the two splits
|
36
|
+
ourselves and handing the escaping off to URI.
|
37
|
+
[dd7fe269b65b]
|
38
|
+
|
39
|
+
* spec/strelka/app/auth_spec.rb, spec/strelka/app/errors_spec.rb,
|
40
|
+
spec/strelka/app/filters_spec.rb,
|
41
|
+
spec/strelka/app/negotiation_spec.rb,
|
42
|
+
spec/strelka/app/parameters_spec.rb,
|
43
|
+
spec/strelka/app/restresources_spec.rb,
|
44
|
+
spec/strelka/app/routing_spec.rb, spec/strelka/app/sessions_spec.rb,
|
45
|
+
spec/strelka/app/templating_spec.rb, spec/strelka/app_spec.rb,
|
46
|
+
spec/strelka/authprovider/basic_spec.rb,
|
47
|
+
spec/strelka/authprovider/hostaccess_spec.rb,
|
48
|
+
spec/strelka/authprovider_spec.rb, spec/strelka/cookie_spec.rb,
|
49
|
+
spec/strelka/discovery_spec.rb, spec/strelka/exceptions_spec.rb,
|
50
|
+
spec/strelka/httprequest/acceptparams_spec.rb,
|
51
|
+
spec/strelka/httprequest/auth_spec.rb,
|
52
|
+
spec/strelka/httprequest/negotiation_spec.rb,
|
53
|
+
spec/strelka/httprequest/session_spec.rb,
|
54
|
+
spec/strelka/httprequest_spec.rb,
|
55
|
+
spec/strelka/httpresponse/negotiation_spec.rb,
|
56
|
+
spec/strelka/httpresponse/session_spec.rb,
|
57
|
+
spec/strelka/httpresponse_spec.rb, spec/strelka/mixins_spec.rb,
|
58
|
+
spec/strelka/multipartparser_spec.rb,
|
59
|
+
spec/strelka/paramvalidator_spec.rb, spec/strelka/plugins_spec.rb,
|
60
|
+
spec/strelka/router/default_spec.rb,
|
61
|
+
spec/strelka/router/exclusive_spec.rb, spec/strelka/router_spec.rb,
|
62
|
+
spec/strelka/session/db_spec.rb,
|
63
|
+
spec/strelka/session/default_spec.rb, spec/strelka/session_spec.rb,
|
64
|
+
spec/strelka/websocketserver/routing_spec.rb,
|
65
|
+
spec/strelka/websocketserver_spec.rb, spec/strelka_spec.rb:
|
66
|
+
Use the loggability spechelper for logging setup/teardown
|
67
|
+
[a585c7b4f35b]
|
68
|
+
|
69
|
+
* spec/strelka/paramvalidator_spec.rb:
|
70
|
+
Update paramvalidator specs for Ruby 2.2.
|
71
|
+
|
72
|
+
This removes some "bad" URI examples that are now parsed
|
73
|
+
successfully by Ruby 2.2's URI library, and one that used to be
|
74
|
+
parsed okay but no longer is.
|
75
|
+
[5675c3e920cb]
|
76
|
+
|
77
|
+
* .gems, .rvm.gems, Rakefile, strelka.gemspec:
|
78
|
+
Bump mongrel2 dependency to get rid of Ruby 2.2 warnings
|
79
|
+
[bb0e56836291]
|
80
|
+
|
81
|
+
2015-03-01 Michael Granger <ged@FaerieMUD.org>
|
82
|
+
|
83
|
+
* strelka.gemspec:
|
84
|
+
Update the gemspec
|
85
|
+
[92c894486289]
|
86
|
+
|
87
|
+
* Rakefile:
|
88
|
+
Fix the fivefish version
|
89
|
+
[22b8b7b6a0dd]
|
90
|
+
|
91
|
+
* .rvmrc:
|
92
|
+
Bump the rvmrc Ruby version
|
93
|
+
[653f2efdcfb3]
|
94
|
+
|
95
|
+
2015-02-27 Michael Granger <ged@FaerieMUD.org>
|
96
|
+
|
97
|
+
* .hgignore, .travis.yml, Gemfile, Rakefile, strelka.gemspec:
|
98
|
+
Prep for travis-ci builds
|
99
|
+
[d2eccf740f22]
|
100
|
+
|
101
|
+
* lib/strelka.rb, lib/strelka/app.rb:
|
102
|
+
Ensure mixins are loaded
|
103
|
+
[421c715bc499]
|
104
|
+
|
105
|
+
2014-06-06 Michael Granger <ged@FaerieMUD.org>
|
106
|
+
|
107
|
+
* .hgtags:
|
108
|
+
Added tag v0.9.0 for changeset a03445b9de0f
|
109
|
+
[f314a21c616e]
|
110
|
+
|
111
|
+
* .hgsigs:
|
112
|
+
Added signature for changeset 406a68302dc6
|
113
|
+
[a03445b9de0f] [v0.9.0]
|
114
|
+
|
115
|
+
* History.rdoc, lib/strelka.rb:
|
116
|
+
Bump the minor version, update history.
|
117
|
+
[406a68302dc6]
|
118
|
+
|
1
119
|
2014-06-06 Mahlon E. Smith <mahlon@martini.nu>
|
2
120
|
|
3
121
|
* lib/strelka/app/auth.rb, spec/strelka/app/auth_spec.rb:
|
4
122
|
Auth plugin: Add the ability to modify permission sets from the
|
5
123
|
require_perms_for() block.
|
6
|
-
[69fbfc1e2de3]
|
124
|
+
[69fbfc1e2de3]
|
7
125
|
|
8
126
|
2014-06-05 Michael Granger <ged@FaerieMUD.org>
|
9
127
|
|
@@ -15,7 +133,7 @@
|
|
15
133
|
spec/strelka/httpresponse/session_spec.rb,
|
16
134
|
spec/strelka/plugins_spec.rb, spec/strelka_spec.rb:
|
17
135
|
Updated for RSpec 3.0; bumped deps.
|
18
|
-
[04bd8611e28f]
|
136
|
+
[04bd8611e28f]
|
19
137
|
|
20
138
|
2014-02-05 Michael Granger <ged@FaerieMUD.org>
|
21
139
|
|
@@ -37,13 +155,6 @@
|
|
37
155
|
Update dependencies.
|
38
156
|
[4ddae11c28b8]
|
39
157
|
|
40
|
-
2014-01-22 Mahlon E. Smith <mahlon@laika.com>
|
41
|
-
|
42
|
-
* lib/strelka/httprequest.rb:
|
43
|
-
Don't modify the original request URI object when calling
|
44
|
-
HttpRequest#base_uri.
|
45
|
-
[6e2d1e0e89d1]
|
46
|
-
|
47
158
|
2014-01-29 Michael Granger <ged@FaerieMUD.org>
|
48
159
|
|
49
160
|
* lib/strelka/app.rb:
|
@@ -81,19 +192,19 @@
|
|
81
192
|
Merge improvements to the AbstractClass mixin from elsewhere.
|
82
193
|
[96725c68d4ae]
|
83
194
|
|
195
|
+
2014-01-22 Mahlon E. Smith <mahlon@laika.com>
|
196
|
+
|
197
|
+
* lib/strelka/httprequest.rb:
|
198
|
+
Don't modify the original request URI object when calling
|
199
|
+
HttpRequest#base_uri.
|
200
|
+
[6e2d1e0e89d1]
|
201
|
+
|
84
202
|
2014-01-02 Michael Granger <ged@FaerieMUD.org>
|
85
203
|
|
86
204
|
* lib/strelka.rb:
|
87
205
|
Merged with bdb098771858
|
88
206
|
[140055f6ee81]
|
89
207
|
|
90
|
-
2013-12-02 Mahlon E. Smith <mahlon@martini.nu>
|
91
|
-
|
92
|
-
* .rvm.gems, lib/strelka.rb, lib/strelka/app/auth.rb,
|
93
|
-
spec/strelka/session/default_spec.rb:
|
94
|
-
Restore access to request parameters from the authentication plugin.
|
95
|
-
[bdb098771858]
|
96
|
-
|
97
208
|
2014-01-01 Michael Granger <ged@FaerieMUD.org>
|
98
209
|
|
99
210
|
* History.rdoc, lib/strelka.rb:
|
@@ -135,6 +246,13 @@
|
|
135
246
|
Remove config keys that moved to Discovery
|
136
247
|
[c4b52cde2f47]
|
137
248
|
|
249
|
+
2013-12-02 Mahlon E. Smith <mahlon@martini.nu>
|
250
|
+
|
251
|
+
* .rvm.gems, lib/strelka.rb, lib/strelka/app/auth.rb,
|
252
|
+
spec/strelka/session/default_spec.rb:
|
253
|
+
Restore access to request parameters from the authentication plugin.
|
254
|
+
[bdb098771858]
|
255
|
+
|
138
256
|
2013-11-08 Michael Granger <ged@FaerieMUD.org>
|
139
257
|
|
140
258
|
* .hgtags:
|
@@ -586,7 +704,7 @@
|
|
586
704
|
spec/strelka/app/parameters_spec.rb,
|
587
705
|
spec/strelka/paramvalidator_spec.rb:
|
588
706
|
Add a paramvalidator constraint for JSON fields
|
589
|
-
[ac11b12f9366]
|
707
|
+
[ac11b12f9366]
|
590
708
|
|
591
709
|
2013-01-25 Michael Granger <ged@FaerieMUD.org>
|
592
710
|
|
@@ -829,7 +947,7 @@
|
|
829
947
|
|
830
948
|
* lib/strelka/authprovider.rb, spec/strelka/authprovider_spec.rb:
|
831
949
|
Fix the documentation and specs for AuthProvider#authorize.
|
832
|
-
[accb655c57b4]
|
950
|
+
[accb655c57b4]
|
833
951
|
|
834
952
|
2012-10-03 Michael Granger <ged@FaerieMUD.org>
|
835
953
|
|
@@ -2440,8 +2558,8 @@
|
|
2440
2558
|
- Require Ruby-Mongrel 0.12+
|
2441
2559
|
- This is just the initial implementation. Yet to be added:
|
2442
2560
|
configuration options for enabling/disabling stuff, automatic
|
2443
|
-
composite services mapped from association reflections, mass-
|
2444
|
-
option, and lots more I'm forgetting.
|
2561
|
+
composite services mapped from association reflections, mass-
|
2562
|
+
create option, and lots more I'm forgetting.
|
2445
2563
|
[23acdb6e9afc]
|
2446
2564
|
|
2447
2565
|
* data/strelka/bootstrap-config.rb:
|
@@ -2759,11 +2877,12 @@
|
|
2759
2877
|
spec/strelka/httpresponse/negotiation_spec.rb:
|
2760
2878
|
Alterations to the plugin system to reflect dogfood discoveries.
|
2761
2879
|
- Rearranged the lifecycle of the request to all happen inside the
|
2762
|
-
try/catch to allow fixup hooks to finish with an error status,
|
2880
|
+
try/catch to allow fixup hooks to finish with an error status,
|
2881
|
+
too.
|
2763
2882
|
- Moved the negotiation plugin closer to the router so negotation
|
2764
|
-
callbacks can return responses that will be further altered by
|
2765
|
-
plugins. Moved the acceptable check into the response fixup
|
2766
|
-
accomplish this.
|
2883
|
+
callbacks can return responses that will be further altered by
|
2884
|
+
later plugins. Moved the acceptable check into the response fixup
|
2885
|
+
hook to accomplish this.
|
2767
2886
|
- Made the response fixup hook only take a response object since
|
2768
2887
|
responses can now know what their request is.
|
2769
2888
|
- Made language-negotiation short-circuit whenever there aren't any
|
data/History.rdoc
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
== v0.9.1 [2015-04-01] Mahlon E. Smith <mahlon@martini.nu>
|
2
|
+
|
3
|
+
- Ensure required permissions for the auth plugin are unmodified between requests.
|
4
|
+
- Fix urlencoded param parsing
|
5
|
+
- Fixes for Ruby 2.2.
|
6
|
+
|
7
|
+
|
1
8
|
== v0.9.0 [2014-06-06] Mahlon E. Smith <mahlon@martini.nu>
|
2
9
|
|
3
10
|
- Auth plugin: Add the ability to modify permission sets from the
|
data/Rakefile
CHANGED
@@ -8,10 +8,11 @@ rescue LoadError
|
|
8
8
|
abort "This Rakefile requires 'hoe' (gem install hoe)"
|
9
9
|
end
|
10
10
|
|
11
|
+
GEMSPEC = 'strelka.gemspec'
|
12
|
+
|
11
13
|
Hoe.plugin :mercurial
|
12
14
|
Hoe.plugin :signing
|
13
15
|
Hoe.plugin :deveiate
|
14
|
-
Hoe.plugin :bundler
|
15
16
|
|
16
17
|
Hoe.plugins.delete :rubyforge
|
17
18
|
|
@@ -19,6 +20,7 @@ hoespec = Hoe.spec 'strelka' do
|
|
19
20
|
self.readme_file = 'README.rdoc'
|
20
21
|
self.history_file = 'History.rdoc'
|
21
22
|
self.extra_rdoc_files = FileList[ '*.rdoc' ]
|
23
|
+
self.license "BSD"
|
22
24
|
|
23
25
|
self.developer 'Mahlon E. Smith', 'mahlon@martini.nu'
|
24
26
|
self.developer 'Michael Granger', 'ged@FaerieMUD.org'
|
@@ -28,42 +30,35 @@ hoespec = Hoe.spec 'strelka' do
|
|
28
30
|
self.dependency 'highline', '~> 1.6'
|
29
31
|
self.dependency 'inversion', '~> 0.12'
|
30
32
|
self.dependency 'loggability', '~> 0.9'
|
31
|
-
self.dependency 'mongrel2', '~> 0.
|
33
|
+
self.dependency 'mongrel2', ['~> 0.43', '>= 0.43.1']
|
32
34
|
self.dependency 'pluggability', '~> 0.4'
|
33
35
|
self.dependency 'sysexits', '~> 1.1'
|
34
36
|
self.dependency 'trollop', '~> 2.0'
|
35
37
|
self.dependency 'uuidtools', '~> 2.1'
|
36
38
|
self.dependency 'safe_yaml', '~> 1.0'
|
37
39
|
|
38
|
-
self.dependency 'hoe-deveiate', '~> 0.
|
39
|
-
self.dependency 'hoe-bundler', '~> 1.2', :developer
|
40
|
+
self.dependency 'hoe-deveiate', '~> 0.6', :developer
|
40
41
|
self.dependency 'rspec', '~> 3.0', :developer
|
41
42
|
self.dependency 'simplecov', '~> 0.7', :developer
|
42
|
-
self.dependency 'rdoc-generator-fivefish', '~> 0.
|
43
|
-
|
44
|
-
self.license "BSD"
|
45
|
-
self.spec_extras[:rdoc_options] = [
|
46
|
-
'-t', 'Strelka Web Application Toolkit',
|
47
|
-
'-w', '4',
|
48
|
-
]
|
49
|
-
|
50
|
-
# Use the Fivefish formatter if run in development
|
51
|
-
self.spec_extras[:rdoc_options] += [ '-f', 'fivefish' ] if File.directory?( '.hg' )
|
43
|
+
self.dependency 'rdoc-generator-fivefish', '~> 0.1', :developer
|
52
44
|
|
53
|
-
self.require_ruby_version( '>=
|
45
|
+
self.require_ruby_version( '>=2.0.0' )
|
54
46
|
self.hg_sign_tags = true if self.respond_to?( :hg_sign_tags= )
|
55
47
|
self.check_history_on_release = true if self.respond_to?( :check_history_on_release= )
|
56
|
-
|
57
48
|
self.rdoc_locations << "deveiate:/usr/local/www/public/code/#{remote_rdoc_dir}"
|
58
49
|
end
|
59
50
|
|
60
|
-
|
61
|
-
|
62
51
|
ENV['VERSION'] ||= hoespec.spec.version.to_s
|
63
52
|
|
64
53
|
# Ensure the specs pass before checking in
|
65
|
-
task 'hg:precheckin' => [
|
54
|
+
task 'hg:precheckin' => [:check_history, :check_manifest, :spec]
|
66
55
|
|
56
|
+
if Rake::Task.task_defined?( '.gemtest' )
|
57
|
+
Rake::Task['.gemtest'].clear
|
58
|
+
task '.gemtest' do
|
59
|
+
$stderr.puts "Not including a .gemtest until I'm confident the test suite is idempotent."
|
60
|
+
end
|
61
|
+
end
|
67
62
|
|
68
63
|
desc "Build a coverage report"
|
69
64
|
task :coverage do
|
@@ -71,15 +66,33 @@ task :coverage do
|
|
71
66
|
Rake::Task[:spec].invoke
|
72
67
|
end
|
73
68
|
|
74
|
-
if Rake::Task.task_defined?( '.gemtest' )
|
75
|
-
Rake::Task['.gemtest'].clear
|
76
|
-
task '.gemtest' do
|
77
|
-
$stderr.puts "Not including a .gemtest until I'm confident the test suite is idempotent."
|
78
|
-
end
|
79
|
-
end
|
80
69
|
|
70
|
+
# Use the fivefish formatter for docs generated from development checkout
|
71
|
+
if File.directory?( '.hg' )
|
72
|
+
require 'rdoc/task'
|
81
73
|
|
82
|
-
|
83
|
-
|
74
|
+
Rake::Task[ 'docs' ].clear
|
75
|
+
RDoc::Task.new( 'docs' ) do |rdoc|
|
76
|
+
rdoc.main = "README.rdoc"
|
77
|
+
rdoc.rdoc_files.include( "*.rdoc", "ChangeLog", "lib/**/*.rb" )
|
78
|
+
rdoc.generator = :fivefish
|
79
|
+
rdoc.title = "Strelka: A Ruby Web Framework"
|
80
|
+
rdoc.rdoc_dir = 'doc'
|
81
|
+
end
|
82
|
+
end
|
84
83
|
|
84
|
+
task :gemspec => GEMSPEC
|
85
|
+
file GEMSPEC => __FILE__
|
86
|
+
task GEMSPEC do |task|
|
87
|
+
spec = $hoespec.spec
|
88
|
+
spec.files.delete( '.gemtest' )
|
89
|
+
spec.signing_key = nil
|
90
|
+
spec.cert_chain = [ 'certs/mahlon.pem', 'certs/ged.pem' ]
|
91
|
+
spec.version = "#{spec.version.bump}.0.pre#{Time.now.strftime("%Y%m%d%H%M%S")}"
|
92
|
+
File.open( task.name, 'w' ) do |fh|
|
93
|
+
fh.write( spec.to_ruby )
|
94
|
+
end
|
95
|
+
end
|
85
96
|
|
97
|
+
CLOBBER.include( GEMSPEC.to_s )
|
98
|
+
task :default => :gemspec
|
data/lib/strelka.rb
CHANGED
@@ -24,11 +24,12 @@ module Strelka
|
|
24
24
|
log_as :strelka
|
25
25
|
|
26
26
|
# Library version constant
|
27
|
-
VERSION = '0.9.
|
27
|
+
VERSION = '0.9.1'
|
28
28
|
|
29
29
|
# Version-control revision constant
|
30
|
-
REVISION = %q$Revision:
|
30
|
+
REVISION = %q$Revision: d8332e8ea7f7 $
|
31
31
|
|
32
|
+
require 'strelka/mixins'
|
32
33
|
require 'strelka/constants'
|
33
34
|
require 'strelka/exceptions'
|
34
35
|
include Strelka::Constants
|
data/lib/strelka/app.rb
CHANGED
data/lib/strelka/app/auth.rb
CHANGED
@@ -421,7 +421,7 @@ module Strelka::App::Auth
|
|
421
421
|
|
422
422
|
pattern.gsub!( %r{^/+|/+$}, '' ) if pattern.respond_to?( :gsub! )
|
423
423
|
self.log.debug " adding require_perms (%p) for %p" % [ perms, pattern ]
|
424
|
-
self.positive_perms_criteria << [ pattern, block, perms ]
|
424
|
+
self.positive_perms_criteria << [ pattern, block, perms.freeze ]
|
425
425
|
end
|
426
426
|
|
427
427
|
|
@@ -624,7 +624,7 @@ module Strelka::App::Auth
|
|
624
624
|
criteria = self.request_matches_criteria( request, pattern, &block )
|
625
625
|
next unless criteria
|
626
626
|
|
627
|
-
newperms = Array( newperms )
|
627
|
+
newperms = Array( newperms ).dup
|
628
628
|
|
629
629
|
if criteria.is_a?( Symbol )
|
630
630
|
newperms << criteria
|
data/lib/strelka/httprequest.rb
CHANGED
@@ -142,7 +142,7 @@ class Strelka::HTTPRequest < Mongrel2::HTTPRequest
|
|
142
142
|
|
143
143
|
case self.verb
|
144
144
|
when :GET, :HEAD
|
145
|
-
value = self.
|
145
|
+
value = decode_www_form( self.uri.query )
|
146
146
|
when :POST, :PUT
|
147
147
|
value = self.parse_body
|
148
148
|
when :TRACE
|
@@ -177,7 +177,7 @@ class Strelka::HTTPRequest < Mongrel2::HTTPRequest
|
|
177
177
|
|
178
178
|
case mimetype.split( ';' ).first
|
179
179
|
when 'application/x-www-form-urlencoded'
|
180
|
-
return
|
180
|
+
return decode_www_form( self.body.read )
|
181
181
|
when 'application/json', 'text/javascript'
|
182
182
|
return Yajl.load( self.body )
|
183
183
|
when 'text/x-yaml', 'application/x-yaml'
|
@@ -219,24 +219,26 @@ class Strelka::HTTPRequest < Mongrel2::HTTPRequest
|
|
219
219
|
alias_method :redirect_to, :redirect
|
220
220
|
|
221
221
|
|
222
|
-
|
223
|
-
|
224
|
-
|
222
|
+
#######
|
223
|
+
private
|
224
|
+
#######
|
225
225
|
|
226
|
-
### Return a Hash of
|
227
|
-
###
|
228
|
-
|
229
|
-
|
226
|
+
### Return a Hash of parameters decoded from a application/x-www-form-urlencoded
|
227
|
+
### +query_string+, combining multiple values for the same key into an Array
|
228
|
+
### value in the order they occurred.
|
229
|
+
def decode_www_form( query_string )
|
230
|
+
return {} if query_string.nil?
|
231
|
+
|
232
|
+
query_args = query_string.split( /[&;]/ ).each_with_object([]) do |pair, accum|
|
233
|
+
pair = pair.split( '=', 2 )
|
234
|
+
raise "malformed parameter pair %p: no '='" % [ pair ] unless pair.length == 2
|
235
|
+
accum << pair.map {|part| URI.decode_www_form_component(part) }
|
236
|
+
end
|
230
237
|
|
231
|
-
query_args = URI.decode_www_form( self.uri.query )
|
232
238
|
return merge_query_args( query_args )
|
233
239
|
end
|
234
240
|
|
235
241
|
|
236
|
-
#######
|
237
|
-
private
|
238
|
-
#######
|
239
|
-
|
240
242
|
### Strip surrounding double quotes from a copy of the specified string
|
241
243
|
### and return it.
|
242
244
|
def dequote( string )
|