racknga 0.9.3 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +3 -12
- data/README.md +44 -0
- data/Rakefile +19 -272
- data/doc/text/{news.textile → news.md} +24 -7
- data/lib/racknga/access_log_parser.rb +1 -1
- data/lib/racknga/api-keys.rb +39 -0
- data/lib/racknga/cache_database.rb +2 -2
- data/lib/racknga/exception_mail_notifier.rb +18 -17
- data/lib/racknga/log_database.rb +1 -1
- data/lib/racknga/log_entry.rb +1 -1
- data/lib/racknga/middleware/auth/api-key.rb +95 -0
- data/lib/racknga/middleware/cache.rb +23 -11
- data/lib/racknga/middleware/deflater.rb +1 -1
- data/lib/racknga/middleware/exception_notifier.rb +1 -1
- data/lib/racknga/middleware/instance_name.rb +65 -12
- data/lib/racknga/middleware/jsonp.rb +26 -9
- data/lib/racknga/middleware/log.rb +1 -1
- data/lib/racknga/middleware/nginx_raw_uri.rb +1 -1
- data/lib/racknga/middleware/range.rb +4 -6
- data/lib/racknga/reverse_line_reader.rb +1 -1
- data/lib/racknga/utils.rb +1 -1
- data/lib/racknga/version.rb +3 -5
- data/lib/racknga.rb +2 -1
- data/munin/plugins/passenger_application_ +61 -47
- data/munin/plugins/passenger_status +64 -33
- data/test/racknga-test-utils.rb +2 -6
- data/test/run-test.rb +2 -5
- data/test/test-access-log-parser.rb +1 -1
- data/test/test-api-keys.rb +80 -0
- data/test/test-middleware-auth-api-key.rb +144 -0
- data/test/test-middleware-cache.rb +1 -1
- data/test/test-middleware-instance-name.rb +32 -10
- data/test/test-middleware-jsonp.rb +14 -2
- data/test/test-middleware-nginx-raw-uri.rb +1 -1
- data/test/test-middleware-range.rb +1 -1
- metadata +182 -157
- data/README.textile +0 -52
- data/lib/racknga/will_paginate.rb +0 -48
@@ -12,17 +12,31 @@
|
|
12
12
|
#
|
13
13
|
# You should have received a copy of the GNU Lesser General Public
|
14
14
|
# License along with this library; if not, write to the Free Software
|
15
|
-
# Foundation, Inc.,
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
16
|
|
17
17
|
class InstanceNameTest < Test::Unit::TestCase
|
18
18
|
include RackngaTestUtils
|
19
19
|
|
20
|
+
DEFAULT_HEADER_NAME = "X-Responsed-By"
|
21
|
+
|
20
22
|
def test_no_option
|
21
23
|
footer_variables = extract_from_default_instance_name
|
22
24
|
|
23
25
|
instance_name_options({}) do
|
24
26
|
request
|
25
|
-
|
27
|
+
assert_equal("Proc #{default_footer(*footer_variables)}",
|
28
|
+
response_header(DEFAULT_HEADER_NAME))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_header_name
|
33
|
+
header_name = "X-header-name"
|
34
|
+
footer_variables = extract_from_default_instance_name
|
35
|
+
|
36
|
+
instance_name_options(:header_name => header_name) do
|
37
|
+
request
|
38
|
+
assert_equal("Proc #{default_footer(*footer_variables)}",
|
39
|
+
response_header(header_name))
|
26
40
|
end
|
27
41
|
end
|
28
42
|
|
@@ -32,8 +46,9 @@ class InstanceNameTest < Test::Unit::TestCase
|
|
32
46
|
|
33
47
|
instance_name_options(:application_name => application_name) do
|
34
48
|
request
|
35
|
-
|
36
|
-
|
49
|
+
assert_equal("#{application_name} " +
|
50
|
+
"#{default_footer(*footer_variables)}",
|
51
|
+
response_header(DEFAULT_HEADER_NAME))
|
37
52
|
end
|
38
53
|
end
|
39
54
|
|
@@ -45,8 +60,9 @@ class InstanceNameTest < Test::Unit::TestCase
|
|
45
60
|
instance_name_options(:application_name => application_name,
|
46
61
|
:version => version) do
|
47
62
|
request
|
48
|
-
|
49
|
-
|
63
|
+
assert_equal("#{application_name} v#{version} " +
|
64
|
+
"#{default_footer(*footer_variables)}",
|
65
|
+
response_header(DEFAULT_HEADER_NAME))
|
50
66
|
end
|
51
67
|
end
|
52
68
|
|
@@ -83,7 +99,10 @@ class InstanceNameTest < Test::Unit::TestCase
|
|
83
99
|
end
|
84
100
|
|
85
101
|
def default_footer(server, user, revision, branch, ruby)
|
86
|
-
|
102
|
+
footer = ""
|
103
|
+
footer << "(at #{revision} (#{branch})) " if format_is_possible?(revision)
|
104
|
+
footer << "on #{server} by #{user} with #{ruby}"
|
105
|
+
footer
|
87
106
|
end
|
88
107
|
|
89
108
|
def create_minimal_application
|
@@ -103,8 +122,11 @@ class InstanceNameTest < Test::Unit::TestCase
|
|
103
122
|
yield
|
104
123
|
end
|
105
124
|
|
106
|
-
def
|
107
|
-
|
108
|
-
|
125
|
+
def response_header(name)
|
126
|
+
page.response_headers[name]
|
127
|
+
end
|
128
|
+
|
129
|
+
def format_is_possible?(data)
|
130
|
+
data and (data.respond_to?(:to_s) and not data.to_s.empty?)
|
109
131
|
end
|
110
132
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2010 Kouhei Sutou <kou@clear-code.com>
|
1
|
+
# Copyright (C) 2010-2012 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -12,7 +12,7 @@
|
|
12
12
|
#
|
13
13
|
# You should have received a copy of the GNU Lesser General Public
|
14
14
|
# License along with this library; if not, write to the Free Software
|
15
|
-
# Foundation, Inc.,
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
16
|
|
17
17
|
class MiddlewareJSONPTest < Test::Unit::TestCase
|
18
18
|
include RackngaTestUtils
|
@@ -76,6 +76,18 @@ class MiddlewareJSONPTest < Test::Unit::TestCase
|
|
76
76
|
@environment[@cache_key_key])
|
77
77
|
end
|
78
78
|
|
79
|
+
def test_jsonp_content_length
|
80
|
+
@update_environment = Proc.new do |environment|
|
81
|
+
environment["Content-Length"] = @body.bytesize
|
82
|
+
environment
|
83
|
+
end
|
84
|
+
visit("/?callback=jsonp_callback")
|
85
|
+
expected_response = "jsonp_callback(#{@body});"
|
86
|
+
assert_jsonp_response(expected_response)
|
87
|
+
assert_equal(expected_response.bytesize.to_s,
|
88
|
+
page.response_headers["Content-Length"])
|
89
|
+
end
|
90
|
+
|
79
91
|
private
|
80
92
|
def assert_jsonp_response(body)
|
81
93
|
assert_equal({
|
@@ -12,7 +12,7 @@
|
|
12
12
|
#
|
13
13
|
# You should have received a copy of the GNU Lesser General Public
|
14
14
|
# License along with this library; if not, write to the Free Software
|
15
|
-
# Foundation, Inc.,
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
16
|
|
17
17
|
class NginxRawURITest < Test::Unit::TestCase
|
18
18
|
include RackngaTestUtils
|
@@ -12,7 +12,7 @@
|
|
12
12
|
#
|
13
13
|
# You should have received a copy of the GNU Lesser General Public
|
14
14
|
# License along with this library; if not, write to the Free Software
|
15
|
-
# Foundation, Inc.,
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
16
|
|
17
17
|
module MiddlewareRangeTests
|
18
18
|
include RackngaTestUtils
|
metadata
CHANGED
@@ -1,155 +1,189 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: racknga
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 9
|
9
|
-
- 3
|
10
|
-
version: 0.9.3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.5
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Kouhei Sutou
|
14
|
-
autorequire:
|
15
8
|
bindir: bin
|
16
9
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
segments:
|
28
|
-
- 0
|
29
|
-
version: "0"
|
30
|
-
name: rroonga
|
10
|
+
date: 2024-04-08 00:00:00.000000000 Z
|
11
|
+
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: base64
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0'
|
19
|
+
type: :runtime
|
31
20
|
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - ">="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '0'
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: csv
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: net-smtp
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
32
47
|
type: :runtime
|
33
|
-
requirement: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
version_requirements: &id002 !ruby/object:Gem::Requirement
|
36
|
-
none: false
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
hash: 3
|
41
|
-
segments:
|
42
|
-
- 0
|
43
|
-
version: "0"
|
44
|
-
name: rack
|
45
48
|
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: rack
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
46
61
|
type: :runtime
|
47
|
-
requirement: *id002
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
version_requirements: &id003 !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
hash: 3
|
55
|
-
segments:
|
56
|
-
- 0
|
57
|
-
version: "0"
|
58
|
-
name: test-unit
|
59
62
|
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: bundler
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
60
75
|
type: :development
|
61
|
-
requirement: *id003
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
version_requirements: &id004 !ruby/object:Gem::Requirement
|
64
|
-
none: false
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
hash: 3
|
69
|
-
segments:
|
70
|
-
- 0
|
71
|
-
version: "0"
|
72
|
-
name: test-unit-notify
|
73
76
|
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: kramdown
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
74
89
|
type: :development
|
75
|
-
requirement: *id004
|
76
|
-
- !ruby/object:Gem::Dependency
|
77
|
-
version_requirements: &id005 !ruby/object:Gem::Requirement
|
78
|
-
none: false
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
hash: 3
|
83
|
-
segments:
|
84
|
-
- 0
|
85
|
-
version: "0"
|
86
|
-
name: test-unit-capybara
|
87
90
|
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: packnga
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
88
103
|
type: :development
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
hash: 3
|
97
|
-
segments:
|
98
|
-
- 0
|
99
|
-
version: "0"
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
100
111
|
name: rake
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
type: :development
|
101
118
|
prerelease: false
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: rroonga
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
102
131
|
type: :development
|
103
|
-
requirement: *id006
|
104
|
-
- !ruby/object:Gem::Dependency
|
105
|
-
version_requirements: &id007 !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
hash: 3
|
111
|
-
segments:
|
112
|
-
- 0
|
113
|
-
version: "0"
|
114
|
-
name: jeweler
|
115
132
|
prerelease: false
|
133
|
+
version_requirements: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
- !ruby/object:Gem::Dependency
|
139
|
+
name: test-unit
|
140
|
+
requirement: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
116
145
|
type: :development
|
117
|
-
requirement: *id007
|
118
|
-
- !ruby/object:Gem::Dependency
|
119
|
-
version_requirements: &id008 !ruby/object:Gem::Requirement
|
120
|
-
none: false
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
hash: 3
|
125
|
-
segments:
|
126
|
-
- 0
|
127
|
-
version: "0"
|
128
|
-
name: yard
|
129
146
|
prerelease: false
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
- !ruby/object:Gem::Dependency
|
153
|
+
name: test-unit-capybara
|
154
|
+
requirement: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
130
159
|
type: :development
|
131
|
-
|
132
|
-
|
133
|
-
|
160
|
+
prerelease: false
|
161
|
+
version_requirements: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
description: Racknga is a Rack middlewares that uses Rroonga features.
|
167
|
+
email:
|
134
168
|
- kou@clear-code.com
|
135
169
|
executables: []
|
136
|
-
|
137
170
|
extensions: []
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
files:
|
171
|
+
extra_rdoc_files:
|
172
|
+
- README.md
|
173
|
+
files:
|
142
174
|
- AUTHORS
|
143
175
|
- Gemfile
|
144
|
-
- README.
|
176
|
+
- README.md
|
145
177
|
- Rakefile
|
146
|
-
- doc/text//news.
|
178
|
+
- doc/text//news.md
|
147
179
|
- lib/racknga.rb
|
148
180
|
- lib/racknga/access_log_parser.rb
|
181
|
+
- lib/racknga/api-keys.rb
|
149
182
|
- lib/racknga/cache_database.rb
|
150
183
|
- lib/racknga/exception_mail_notifier.rb
|
151
184
|
- lib/racknga/log_database.rb
|
152
185
|
- lib/racknga/log_entry.rb
|
186
|
+
- lib/racknga/middleware/auth/api-key.rb
|
153
187
|
- lib/racknga/middleware/cache.rb
|
154
188
|
- lib/racknga/middleware/deflater.rb
|
155
189
|
- lib/racknga/middleware/exception_notifier.rb
|
@@ -161,57 +195,48 @@ files:
|
|
161
195
|
- lib/racknga/reverse_line_reader.rb
|
162
196
|
- lib/racknga/utils.rb
|
163
197
|
- lib/racknga/version.rb
|
164
|
-
- lib/racknga/will_paginate.rb
|
165
198
|
- license/lgpl-2.1.txt
|
166
199
|
- munin/plugins/passenger_application_
|
167
200
|
- munin/plugins/passenger_status
|
168
|
-
- test/test-middleware-jsonp.rb
|
169
201
|
- test/racknga-test-utils.rb
|
170
|
-
- test/test-middleware-range.rb
|
171
|
-
- test/test-middleware-nginx-raw-uri.rb
|
172
202
|
- test/run-test.rb
|
173
|
-
- test/test-middleware-instance-name.rb
|
174
|
-
- test/test-middleware-cache.rb
|
175
203
|
- test/test-access-log-parser.rb
|
176
|
-
|
177
|
-
|
204
|
+
- test/test-api-keys.rb
|
205
|
+
- test/test-middleware-auth-api-key.rb
|
206
|
+
- test/test-middleware-cache.rb
|
207
|
+
- test/test-middleware-instance-name.rb
|
208
|
+
- test/test-middleware-jsonp.rb
|
209
|
+
- test/test-middleware-nginx-raw-uri.rb
|
210
|
+
- test/test-middleware-range.rb
|
211
|
+
homepage: http://ranguba.org/
|
212
|
+
licenses:
|
178
213
|
- LGPLv2.1 or later
|
179
|
-
|
214
|
+
metadata: {}
|
180
215
|
rdoc_options: []
|
181
|
-
|
182
|
-
require_paths:
|
216
|
+
require_paths:
|
183
217
|
- lib
|
184
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
185
|
-
|
186
|
-
requirements:
|
218
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
187
220
|
- - ">="
|
188
|
-
- !ruby/object:Gem::Version
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
version: "0"
|
193
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
194
|
-
none: false
|
195
|
-
requirements:
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
223
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
224
|
+
requirements:
|
196
225
|
- - ">="
|
197
|
-
- !ruby/object:Gem::Version
|
198
|
-
|
199
|
-
segments:
|
200
|
-
- 0
|
201
|
-
version: "0"
|
226
|
+
- !ruby/object:Gem::Version
|
227
|
+
version: '0'
|
202
228
|
requirements: []
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
specification_version: 3
|
208
|
-
summary: A Rack middleware collection for rroonga features.
|
209
|
-
test_files:
|
210
|
-
- test/test-middleware-jsonp.rb
|
229
|
+
rubygems_version: 3.6.0.dev
|
230
|
+
specification_version: 4
|
231
|
+
summary: A Rack middleware collection for Rroonga features.
|
232
|
+
test_files:
|
211
233
|
- test/racknga-test-utils.rb
|
212
|
-
- test/test-middleware-range.rb
|
213
|
-
- test/test-middleware-nginx-raw-uri.rb
|
214
234
|
- test/run-test.rb
|
215
|
-
- test/test-middleware-instance-name.rb
|
216
|
-
- test/test-middleware-cache.rb
|
217
235
|
- test/test-access-log-parser.rb
|
236
|
+
- test/test-api-keys.rb
|
237
|
+
- test/test-middleware-auth-api-key.rb
|
238
|
+
- test/test-middleware-cache.rb
|
239
|
+
- test/test-middleware-instance-name.rb
|
240
|
+
- test/test-middleware-jsonp.rb
|
241
|
+
- test/test-middleware-nginx-raw-uri.rb
|
242
|
+
- test/test-middleware-range.rb
|
data/README.textile
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
h1. README
|
2
|
-
|
3
|
-
h2. Name
|
4
|
-
|
5
|
-
racknga
|
6
|
-
|
7
|
-
h2. Description
|
8
|
-
|
9
|
-
Rack middlewares that use rroonga features and
|
10
|
-
middlewares/utilities that don't use rroonga features.
|
11
|
-
|
12
|
-
* "rroonga":http://groonga.rubyforge.org/
|
13
|
-
* "Rack":http://rack.rubyforge.org/
|
14
|
-
|
15
|
-
h2. Authors
|
16
|
-
|
17
|
-
* Kouhei Sutou <kou@clear-code.com>
|
18
|
-
|
19
|
-
h2. License
|
20
|
-
|
21
|
-
LGPL 2.1 or later. See license/lgpl-2.1.txt for details.
|
22
|
-
|
23
|
-
(Kouhei Sutou has a right to change the license
|
24
|
-
including contributed patches.)
|
25
|
-
|
26
|
-
h2. Dependencies
|
27
|
-
|
28
|
-
* Ruby >= 1.9.1
|
29
|
-
* rroonga
|
30
|
-
* Rack
|
31
|
-
|
32
|
-
h2. Suggested libraries
|
33
|
-
|
34
|
-
* jpmobile
|
35
|
-
|
36
|
-
h2. Install
|
37
|
-
|
38
|
-
<pre>
|
39
|
-
% sudo gem install racknga
|
40
|
-
</pre>
|
41
|
-
|
42
|
-
h2. Documents
|
43
|
-
|
44
|
-
http://groonga.rubyforge.org/racknga/en/
|
45
|
-
|
46
|
-
h2. Mailing list
|
47
|
-
|
48
|
-
http://rubyforge.org/mailman/listinfo/groonga-users-en
|
49
|
-
|
50
|
-
h2. Thanks
|
51
|
-
|
52
|
-
* ...
|
@@ -1,48 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
#
|
3
|
-
# Copyright (C) 2010 SHIMODA Hiroshi <shimoda@clear-code.com>
|
4
|
-
#
|
5
|
-
# This library is free software; you can redistribute it and/or
|
6
|
-
# modify it under the terms of the GNU Lesser General Public
|
7
|
-
# License as published by the Free Software Foundation; either
|
8
|
-
# version 2.1 of the License, or (at your option) any later version.
|
9
|
-
#
|
10
|
-
# This library is distributed in the hope that it will be useful,
|
11
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
-
# Lesser General Public License for more details.
|
14
|
-
#
|
15
|
-
# You should have received a copy of the GNU Lesser General Public
|
16
|
-
# License along with this library; if not, write to the Free Software
|
17
|
-
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18
|
-
|
19
|
-
require "groonga"
|
20
|
-
|
21
|
-
module Groonga
|
22
|
-
# @deprecated since 0.9.2. Use Kaminari instead of will_paginate.
|
23
|
-
module WillPaginateAPI
|
24
|
-
def total_pages
|
25
|
-
n_pages
|
26
|
-
end
|
27
|
-
|
28
|
-
def per_page
|
29
|
-
n_records_in_page
|
30
|
-
end
|
31
|
-
|
32
|
-
def total_entries
|
33
|
-
n_records
|
34
|
-
end
|
35
|
-
|
36
|
-
def out_of_bounds?
|
37
|
-
current_page > total_pages
|
38
|
-
end
|
39
|
-
|
40
|
-
def offset
|
41
|
-
(start_offset || 0) - 1
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
module Pagination
|
46
|
-
include WillPaginateAPI
|
47
|
-
end
|
48
|
-
end
|