racknga 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +3 -12
  3. data/README.textile +9 -8
  4. data/Rakefile +19 -272
  5. data/doc/text/news.textile +8 -0
  6. data/lib/racknga/access_log_parser.rb +1 -1
  7. data/lib/racknga/api-keys.rb +40 -0
  8. data/lib/racknga/cache_database.rb +2 -2
  9. data/lib/racknga/exception_mail_notifier.rb +5 -5
  10. data/lib/racknga/log_database.rb +1 -1
  11. data/lib/racknga/log_entry.rb +1 -1
  12. data/lib/racknga/middleware/auth/api-key.rb +95 -0
  13. data/lib/racknga/middleware/cache.rb +20 -6
  14. data/lib/racknga/middleware/deflater.rb +1 -1
  15. data/lib/racknga/middleware/exception_notifier.rb +1 -1
  16. data/lib/racknga/middleware/instance_name.rb +65 -12
  17. data/lib/racknga/middleware/jsonp.rb +24 -5
  18. data/lib/racknga/middleware/log.rb +1 -1
  19. data/lib/racknga/middleware/nginx_raw_uri.rb +1 -1
  20. data/lib/racknga/middleware/range.rb +1 -1
  21. data/lib/racknga/reverse_line_reader.rb +1 -1
  22. data/lib/racknga/utils.rb +1 -1
  23. data/lib/racknga/version.rb +2 -2
  24. data/lib/racknga.rb +2 -1
  25. data/munin/plugins/passenger_application_ +61 -47
  26. data/munin/plugins/passenger_status +64 -33
  27. data/test/racknga-test-utils.rb +2 -1
  28. data/test/run-test.rb +1 -3
  29. data/test/test-access-log-parser.rb +1 -1
  30. data/test/test-api-keys.rb +80 -0
  31. data/test/test-middleware-auth-api-key.rb +144 -0
  32. data/test/test-middleware-cache.rb +1 -1
  33. data/test/test-middleware-instance-name.rb +32 -10
  34. data/test/test-middleware-jsonp.rb +14 -2
  35. data/test/test-middleware-nginx-raw-uri.rb +1 -1
  36. data/test/test-middleware-range.rb +1 -1
  37. metadata +156 -156
  38. data/lib/racknga/will_paginate.rb +0 -48
metadata CHANGED
@@ -1,144 +1,149 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: racknga
3
- version: !ruby/object:Gem::Version
4
- hash: 61
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.4
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Kouhei Sutou
14
- autorequire:
8
+ autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2011-11-12 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
- none: false
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- hash: 3
27
- segments:
28
- - 0
29
- version: "0"
30
- name: rroonga
31
- prerelease: false
32
- 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"
11
+ date: 2023-09-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
44
14
  name: rack
45
- prerelease: false
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
46
20
  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
21
  prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: RedCloth
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
60
34
  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
35
  prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
74
48
  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
49
  prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: packnga
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
88
62
  type: :development
89
- requirement: *id005
90
- - !ruby/object:Gem::Dependency
91
- version_requirements: &id006 !ruby/object:Gem::Requirement
92
- none: false
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- hash: 3
97
- segments:
98
- - 0
99
- version: "0"
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
100
70
  name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
101
77
  prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rroonga
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
102
90
  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
91
  prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: test-unit
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: test-unit-capybara
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
116
118
  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
119
  prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: test-unit-notify
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
130
132
  type: :development
131
- requirement: *id008
132
- description: Racknga is a Rack middlewares that uses rroonga features.
133
- email:
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ description: Racknga is a Rack middlewares that uses Rroonga features.
140
+ email:
134
141
  - kou@clear-code.com
135
142
  executables: []
136
-
137
143
  extensions: []
138
-
139
- extra_rdoc_files:
144
+ extra_rdoc_files:
140
145
  - README.textile
141
- files:
146
+ files:
142
147
  - AUTHORS
143
148
  - Gemfile
144
149
  - README.textile
@@ -146,10 +151,12 @@ files:
146
151
  - doc/text//news.textile
147
152
  - lib/racknga.rb
148
153
  - lib/racknga/access_log_parser.rb
154
+ - lib/racknga/api-keys.rb
149
155
  - lib/racknga/cache_database.rb
150
156
  - lib/racknga/exception_mail_notifier.rb
151
157
  - lib/racknga/log_database.rb
152
158
  - lib/racknga/log_entry.rb
159
+ - lib/racknga/middleware/auth/api-key.rb
153
160
  - lib/racknga/middleware/cache.rb
154
161
  - lib/racknga/middleware/deflater.rb
155
162
  - lib/racknga/middleware/exception_notifier.rb
@@ -161,57 +168,50 @@ files:
161
168
  - lib/racknga/reverse_line_reader.rb
162
169
  - lib/racknga/utils.rb
163
170
  - lib/racknga/version.rb
164
- - lib/racknga/will_paginate.rb
165
171
  - license/lgpl-2.1.txt
166
172
  - munin/plugins/passenger_application_
167
173
  - munin/plugins/passenger_status
168
- - test/test-middleware-jsonp.rb
169
174
  - test/racknga-test-utils.rb
170
- - test/test-middleware-range.rb
171
- - test/test-middleware-nginx-raw-uri.rb
172
175
  - test/run-test.rb
173
- - test/test-middleware-instance-name.rb
174
- - test/test-middleware-cache.rb
175
176
  - test/test-access-log-parser.rb
176
- homepage: http://groonga.rubyforge.org/
177
- licenses:
177
+ - test/test-api-keys.rb
178
+ - test/test-middleware-auth-api-key.rb
179
+ - test/test-middleware-cache.rb
180
+ - test/test-middleware-instance-name.rb
181
+ - test/test-middleware-jsonp.rb
182
+ - test/test-middleware-nginx-raw-uri.rb
183
+ - test/test-middleware-range.rb
184
+ homepage: http://ranguba.org/
185
+ licenses:
178
186
  - LGPLv2.1 or later
179
- post_install_message:
187
+ metadata: {}
188
+ post_install_message:
180
189
  rdoc_options: []
181
-
182
- require_paths:
190
+ require_paths:
183
191
  - lib
184
- required_ruby_version: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
192
+ required_ruby_version: !ruby/object:Gem::Requirement
193
+ requirements:
187
194
  - - ">="
188
- - !ruby/object:Gem::Version
189
- hash: 3
190
- segments:
191
- - 0
192
- version: "0"
193
- required_rubygems_version: !ruby/object:Gem::Requirement
194
- none: false
195
- requirements:
195
+ - !ruby/object:Gem::Version
196
+ version: '0'
197
+ required_rubygems_version: !ruby/object:Gem::Requirement
198
+ requirements:
196
199
  - - ">="
197
- - !ruby/object:Gem::Version
198
- hash: 3
199
- segments:
200
- - 0
201
- version: "0"
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
202
  requirements: []
203
-
204
- rubyforge_project: groonga
205
- rubygems_version: 1.8.10
206
- signing_key:
207
- specification_version: 3
208
- summary: A Rack middleware collection for rroonga features.
209
- test_files:
210
- - test/test-middleware-jsonp.rb
203
+ rubygems_version: 3.5.0.dev
204
+ signing_key:
205
+ specification_version: 4
206
+ summary: A Rack middleware collection for Rroonga features.
207
+ test_files:
211
208
  - test/racknga-test-utils.rb
212
- - test/test-middleware-range.rb
213
- - test/test-middleware-nginx-raw-uri.rb
214
209
  - test/run-test.rb
215
- - test/test-middleware-instance-name.rb
216
- - test/test-middleware-cache.rb
217
210
  - test/test-access-log-parser.rb
211
+ - test/test-api-keys.rb
212
+ - test/test-middleware-auth-api-key.rb
213
+ - test/test-middleware-cache.rb
214
+ - test/test-middleware-instance-name.rb
215
+ - test/test-middleware-jsonp.rb
216
+ - test/test-middleware-nginx-raw-uri.rb
217
+ - test/test-middleware-range.rb
@@ -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