acts_as_ferret 0.4.8 → 0.4.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,279 +1,59 @@
1
- --- !ruby/object:Gem::Specification
2
- name: acts_as_ferret
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 4
8
- - 8
9
- version: 0.4.8
10
- platform: ruby
11
- authors:
12
- - Jens Kraemer
13
- autorequire:
14
- bindir: bin
15
- cert_chain: []
1
+ Gem::Specification.new do |s|
16
2
 
17
- date: 2010-07-13 14:10:00 +02:00
18
- default_executable: aaf_install
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: ferret
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- version: "0"
30
- type: :runtime
31
- version_requirements: *id001
32
- description: Rails plugin that adds powerful full text search capabilities to ActiveRecord models.
33
- email: jk@jkraemer.net
34
- executables:
35
- - aaf_install
36
- extensions: []
37
-
38
- extra_rdoc_files: []
39
-
40
- files:
41
- - acts_as_ferret.gemspec
42
- - bin
43
- - bin/aaf_install
44
- - config
45
- - config/ferret_server.yml
46
- - doc
47
- - doc/demo
48
- - doc/demo/app
49
- - doc/demo/app/controllers
50
- - doc/demo/app/controllers/admin
51
- - doc/demo/app/controllers/admin/backend_controller.rb
52
- - doc/demo/app/controllers/admin_area_controller.rb
53
- - doc/demo/app/controllers/application.rb
54
- - doc/demo/app/controllers/contents_controller.rb
55
- - doc/demo/app/controllers/searches_controller.rb
56
- - doc/demo/app/helpers
57
- - doc/demo/app/helpers/admin
58
- - doc/demo/app/helpers/admin/backend_helper.rb
59
- - doc/demo/app/helpers/application_helper.rb
60
- - doc/demo/app/helpers/content_helper.rb
61
- - doc/demo/app/helpers/search_helper.rb
62
- - doc/demo/app/models
63
- - doc/demo/app/models/comment.rb
64
- - doc/demo/app/models/content.rb
65
- - doc/demo/app/models/content_base.rb
66
- - doc/demo/app/models/search.rb
67
- - doc/demo/app/models/shared_index1.rb
68
- - doc/demo/app/models/shared_index2.rb
69
- - doc/demo/app/models/special_content.rb
70
- - doc/demo/app/models/stats.rb
71
- - doc/demo/app/views
72
- - doc/demo/app/views/admin
73
- - doc/demo/app/views/admin/backend
74
- - doc/demo/app/views/admin/backend/search.rhtml
75
- - doc/demo/app/views/contents
76
- - doc/demo/app/views/contents/_form.rhtml
77
- - doc/demo/app/views/contents/edit.rhtml
78
- - doc/demo/app/views/contents/index.rhtml
79
- - doc/demo/app/views/contents/new.rhtml
80
- - doc/demo/app/views/contents/show.rhtml
81
- - doc/demo/app/views/layouts
82
- - doc/demo/app/views/layouts/application.html.erb
83
- - doc/demo/app/views/searches
84
- - doc/demo/app/views/searches/_content.html.erb
85
- - doc/demo/app/views/searches/search.html.erb
86
- - doc/demo/config
87
- - doc/demo/config/boot.rb
88
- - doc/demo/config/database.yml
89
- - doc/demo/config/environment.rb
90
- - doc/demo/config/environments
91
- - doc/demo/config/environments/development.rb
92
- - doc/demo/config/environments/production.rb
93
- - doc/demo/config/environments/test.rb
94
- - doc/demo/config/ferret_server.yml
95
- - doc/demo/config/lighttpd.conf
96
- - doc/demo/config/routes.rb
97
- - doc/demo/db
98
- - doc/demo/db/development_structure.sql
99
- - doc/demo/db/migrate
100
- - doc/demo/db/migrate/001_initial_migration.rb
101
- - doc/demo/db/migrate/002_add_type_to_contents.rb
102
- - doc/demo/db/migrate/003_create_shared_index1s.rb
103
- - doc/demo/db/migrate/004_create_shared_index2s.rb
104
- - doc/demo/db/migrate/005_special_field.rb
105
- - doc/demo/db/migrate/006_create_stats.rb
106
- - doc/demo/db/schema.sql
107
- - doc/demo/doc
108
- - doc/demo/doc/howto.txt
109
- - doc/demo/doc/README_FOR_APP
110
- - doc/demo/public
111
- - doc/demo/public/.htaccess
112
- - doc/demo/public/404.html
113
- - doc/demo/public/500.html
114
- - doc/demo/public/dispatch.cgi
115
- - doc/demo/public/dispatch.fcgi
116
- - doc/demo/public/dispatch.rb
117
- - doc/demo/public/favicon.ico
118
- - doc/demo/public/images
119
- - doc/demo/public/images/rails.png
120
- - doc/demo/public/index.html
121
- - doc/demo/public/robots.txt
122
- - doc/demo/public/stylesheets
123
- - doc/demo/public/stylesheets/scaffold.css
124
- - doc/demo/Rakefile
125
- - doc/demo/README
126
- - doc/demo/README_DEMO
127
- - doc/demo/script
128
- - doc/demo/script/about
129
- - doc/demo/script/breakpointer
130
- - doc/demo/script/console
131
- - doc/demo/script/destroy
132
- - doc/demo/script/ferret_server
133
- - doc/demo/script/generate
134
- - doc/demo/script/performance
135
- - doc/demo/script/performance/benchmarker
136
- - doc/demo/script/performance/profiler
137
- - doc/demo/script/plugin
138
- - doc/demo/script/process
139
- - doc/demo/script/process/inspector
140
- - doc/demo/script/process/reaper
141
- - doc/demo/script/process/spawner
142
- - doc/demo/script/process/spinner
143
- - doc/demo/script/runner
144
- - doc/demo/script/server
145
- - doc/demo/test
146
- - doc/demo/test/fixtures
147
- - doc/demo/test/fixtures/comments.yml
148
- - doc/demo/test/fixtures/contents.yml
149
- - doc/demo/test/fixtures/remote_contents.yml
150
- - doc/demo/test/fixtures/shared_index1s.yml
151
- - doc/demo/test/fixtures/shared_index2s.yml
152
- - doc/demo/test/functional
153
- - doc/demo/test/functional/admin
154
- - doc/demo/test/functional/admin/backend_controller_test.rb
155
- - doc/demo/test/functional/contents_controller_test.rb
156
- - doc/demo/test/functional/searches_controller_test.rb
157
- - doc/demo/test/smoke
158
- - doc/demo/test/smoke/drb_smoke_test.rb
159
- - doc/demo/test/smoke/process_stats.rb
160
- - doc/demo/test/test_helper.rb
161
- - doc/demo/test/unit
162
- - doc/demo/test/unit/comment_test.rb
163
- - doc/demo/test/unit/content_test.rb
164
- - doc/demo/test/unit/ferret_result_test.rb
165
- - doc/demo/test/unit/multi_index_test.rb
166
- - doc/demo/test/unit/remote_index_test.rb
167
- - doc/demo/test/unit/shared_index1_test.rb
168
- - doc/demo/test/unit/shared_index2_test.rb
169
- - doc/demo/test/unit/sort_test.rb
170
- - doc/demo/test/unit/special_content_test.rb
171
- - doc/demo/vendor
172
- - doc/demo/vendor/plugins
173
- - doc/demo/vendor/plugins/will_paginate
174
- - doc/demo/vendor/plugins/will_paginate/init.rb
175
- - doc/demo/vendor/plugins/will_paginate/lib
176
- - doc/demo/vendor/plugins/will_paginate/lib/will_paginate
177
- - doc/demo/vendor/plugins/will_paginate/lib/will_paginate/collection.rb
178
- - doc/demo/vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb
179
- - doc/demo/vendor/plugins/will_paginate/lib/will_paginate/finder.rb
180
- - doc/demo/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb
181
- - doc/demo/vendor/plugins/will_paginate/LICENSE
182
- - doc/demo/vendor/plugins/will_paginate/Rakefile
183
- - doc/demo/vendor/plugins/will_paginate/README
184
- - doc/demo/vendor/plugins/will_paginate/test
185
- - doc/demo/vendor/plugins/will_paginate/test/array_pagination_test.rb
186
- - doc/demo/vendor/plugins/will_paginate/test/boot.rb
187
- - doc/demo/vendor/plugins/will_paginate/test/console
188
- - doc/demo/vendor/plugins/will_paginate/test/finder_test.rb
189
- - doc/demo/vendor/plugins/will_paginate/test/fixtures
190
- - doc/demo/vendor/plugins/will_paginate/test/fixtures/admin.rb
191
- - doc/demo/vendor/plugins/will_paginate/test/fixtures/companies.yml
192
- - doc/demo/vendor/plugins/will_paginate/test/fixtures/company.rb
193
- - doc/demo/vendor/plugins/will_paginate/test/fixtures/developer.rb
194
- - doc/demo/vendor/plugins/will_paginate/test/fixtures/developers_projects.yml
195
- - doc/demo/vendor/plugins/will_paginate/test/fixtures/project.rb
196
- - doc/demo/vendor/plugins/will_paginate/test/fixtures/projects.yml
197
- - doc/demo/vendor/plugins/will_paginate/test/fixtures/replies.yml
198
- - doc/demo/vendor/plugins/will_paginate/test/fixtures/reply.rb
199
- - doc/demo/vendor/plugins/will_paginate/test/fixtures/schema.sql
200
- - doc/demo/vendor/plugins/will_paginate/test/fixtures/topic.rb
201
- - doc/demo/vendor/plugins/will_paginate/test/fixtures/topics.yml
202
- - doc/demo/vendor/plugins/will_paginate/test/fixtures/user.rb
203
- - doc/demo/vendor/plugins/will_paginate/test/fixtures/users.yml
204
- - doc/demo/vendor/plugins/will_paginate/test/helper.rb
205
- - doc/demo/vendor/plugins/will_paginate/test/lib
206
- - doc/demo/vendor/plugins/will_paginate/test/lib/activerecord_test_connector.rb
207
- - doc/demo/vendor/plugins/will_paginate/test/lib/load_fixtures.rb
208
- - doc/demo/vendor/plugins/will_paginate/test/pagination_test.rb
209
- - doc/monit-example
210
- - doc/README.win32
211
- - rails/init.rb
212
- - install.rb
213
- - lib
214
- - lib/act_methods.rb
215
- - lib/acts_as_ferret.rb
216
- - lib/ar_mysql_auto_reconnect_patch.rb
217
- - lib/blank_slate.rb
218
- - lib/bulk_indexer.rb
219
- - lib/class_methods.rb
220
- - lib/ferret_extensions.rb
221
- - lib/ferret_find_methods.rb
222
- - lib/ferret_result.rb
223
- - lib/ferret_server.rb
224
- - lib/index.rb
225
- - lib/instance_methods.rb
226
- - lib/local_index.rb
227
- - lib/more_like_this.rb
228
- - lib/multi_index.rb
229
- - lib/rdig_adapter.rb
230
- - lib/remote_functions.rb
231
- - lib/remote_index.rb
232
- - lib/remote_multi_index.rb
233
- - lib/search_results.rb
234
- - lib/server_manager.rb
235
- - lib/unix_daemon.rb
236
- - lib/without_ar.rb
237
- - LICENSE
238
- - rakefile
239
- - README
240
- - recipes
241
- - recipes/aaf_recipes.rb
242
- - script
243
- - script/ferret_daemon
244
- - script/ferret_server
245
- - script/ferret_service
246
- - tasks
247
- - tasks/ferret.rake
248
- has_rdoc: true
249
- homepage: http://github.com/jkraemer/acts_as_ferret
250
- licenses: []
251
-
252
- post_install_message:
253
- rdoc_options: []
254
-
255
- require_paths:
256
- - lib
257
- required_ruby_version: !ruby/object:Gem::Requirement
258
- requirements:
259
- - - ">="
260
- - !ruby/object:Gem::Version
261
- segments:
262
- - 0
263
- version: "0"
264
- required_rubygems_version: !ruby/object:Gem::Requirement
265
- requirements:
266
- - - ">="
267
- - !ruby/object:Gem::Version
268
- segments:
269
- - 0
270
- version: "0"
271
- requirements: []
272
-
273
- rubyforge_project: acts_as_ferret
274
- rubygems_version: 1.3.6
275
- signing_key:
276
- specification_version: 3
277
- summary: acts_as_ferret - Ferret based full text search for any ActiveRecord model
278
- test_files: []
3
+ s.name = 'acts_as_ferret'
4
+ s.version = '0.4.8.1'
5
+ s.authors = ['Jens Kraemer']
6
+ s.summary = 'acts_as_ferret - Ferret based full text search for any ActiveRecord model'
7
+ s.description = 'Rails plugin that adds powerful full text search capabilities to ActiveRecord models.'
8
+ s.email = 'jk@jkraemer.net'
9
+ s.homepage = 'http://github.com/jkraemer/acts_as_ferret'
10
+ s.rubyforge_project = 'acts_as_ferret'
11
+
12
+ s.bindir = 'bin'
13
+ s.executables = ['aaf_install']
14
+ s.default_executable = 'aaf_install'
15
+ s.require_paths = ["lib"]
16
+
17
+
18
+ s.platform = Gem::Platform::RUBY
19
+ s.required_ruby_version = '>=1.8.6'
20
+ s.rubygems_version = '1.3.6'
21
+ if s.respond_to? :specification_version then
22
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23
+ s.specification_version = 3
24
+
25
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
26
+ s.add_runtime_dependency('ferret', [">= 0.11.6"])
27
+ else
28
+ s.add_dependency('ferret', [">= 0.11.6"])
29
+ end
30
+ else
31
+ s.add_dependency('ferret', [">= 0.11.6"])
32
+ end
33
+
279
34
 
35
+ s.has_rdoc = true
36
+ s.rdoc_options = ["--charset=UTF-8"]
37
+ s.extra_rdoc_files = [
38
+ 'LICENSE',
39
+ 'README'
40
+ ]
41
+ s.test_files = Dir['test/**/*rb']
42
+ s.files = [
43
+ 'bin/*',
44
+ 'config/*',
45
+ 'doc/**/*',
46
+ 'recipes/*',
47
+ 'script/*',
48
+ 'tasks/*',
49
+ 'lib/**/*rb'
50
+ ].map{|p| Dir[p]}.flatten +
51
+ [
52
+ 'acts_as_ferret.gemspec',
53
+ 'init.rb',
54
+ 'install.rb',
55
+ 'README',
56
+ 'LICENSE',
57
+ ]
58
+
59
+ end
@@ -9,7 +9,7 @@ class Stats < ActiveRecord::Base
9
9
  where kind=? group by time;
10
10
  END
11
11
  result = connection.execute sanitize_sql([sql, start_date, start_date, kind.to_s])
12
- returning [] do |res|
12
+ [].tap do |res|
13
13
  while row = result.fetch_row
14
14
  data = row.last.split(',').map{|t|t.to_i}
15
15
  median = data.size.odd? ? data[data.size/2] : ((data[data.size/2-1]+data[data.size/2]) / 2.0)
@@ -0,0 +1,14 @@
1
+ drop table contents;
2
+ create table contents (
3
+ id INTEGER PRIMARY KEY,
4
+ title varchar(100),
5
+ description text
6
+ );
7
+
8
+ drop table comments;
9
+ create table comments (
10
+ id INTEGER PRIMARY KEY,
11
+ author varchar(100),
12
+ content text,
13
+ content_id int
14
+ );
@@ -21,4 +21,4 @@
21
21
  require 'acts_as_ferret'
22
22
 
23
23
  config.after_initialize { ActsAsFerret::load_config }
24
- config.to_prepare { ActsAsFerret::load_config }
24
+ config.to_prepare { ActsAsFerret::load_config }
@@ -490,14 +490,13 @@ module ActsAsFerret
490
490
 
491
491
  # combine our conditions with those given by user, if any
492
492
  def self.combine_conditions(conditions, additional_conditions = [])
493
- returning conditions do
494
- if additional_conditions && additional_conditions.any?
495
- cust_opts = (Array === additional_conditions) ? additional_conditions.dup : [ additional_conditions ]
496
- logger.debug "cust_opts: #{cust_opts.inspect}"
497
- conditions.first << " and " << cust_opts.shift
498
- conditions.concat(cust_opts)
499
- end
493
+ if additional_conditions && additional_conditions.any?
494
+ cust_opts = (Array === additional_conditions) ? additional_conditions.dup : [ additional_conditions ]
495
+ logger.debug "cust_opts: #{cust_opts.inspect}"
496
+ conditions.first << " and " << cust_opts.shift
497
+ conditions.concat(cust_opts)
500
498
  end
499
+ return conditions
501
500
  end
502
501
 
503
502
  def self.build_field_config(fields)
@@ -227,7 +227,7 @@ module ActsAsFerret
227
227
  :create => true,
228
228
  :field_infos => ActsAsFerret::field_infos(index_definition),
229
229
  :path => File.join(index_definition[:index_base_dir], 'rebuild')
230
- returning Ferret::Index::Index.new(ferret_cfg) do |i|
230
+ Ferret::Index::Index.new(ferret_cfg).tap do |i|
231
231
  i.batch_size = index_definition[:reindex_batch_size]
232
232
  i.logger = @logger
233
233
  end
@@ -125,7 +125,7 @@ module ActsAsFerret #:nodoc:
125
125
  # fieldname => value pairs)
126
126
  def to_doc
127
127
  logger.debug "creating doc for class: #{self.ferret_key}"
128
- returning Ferret::Document.new do |doc|
128
+ Ferret::Document.new.tap do |doc|
129
129
  # store the id and class name of each item, and the unique key used for identifying the record
130
130
  # even in multi-class indexes.
131
131
  doc[:key] = self.ferret_key
@@ -16,9 +16,9 @@ module ActsAsFerret
16
16
  # The 'real' Ferret Index instance
17
17
  def ferret_index
18
18
  ensure_index_exists
19
- returning @ferret_index ||= Ferret::Index::Index.new(index_definition[:ferret]) do
20
- @ferret_index.batch_size = index_definition[:reindex_batch_size]
21
- @ferret_index.logger = logger
19
+ (@ferret_index ||= Ferret::Index::Index.new(index_definition[:ferret])).tap do |idx|
20
+ idx.batch_size = index_definition[:reindex_batch_size]
21
+ idx.logger = logger
22
22
  end
23
23
  end
24
24
 
@@ -151,7 +151,7 @@ module ActsAsFerret
151
151
  return Ferret::Search::TermQuery.new(:key, key.to_s)
152
152
  # if shared?
153
153
  # raise InvalidArgumentError.new("shared index needs class_name argument") if class_name.nil?
154
- # returning bq = Ferret::Search::BooleanQuery.new do
154
+ # Ferret::Search::BooleanQuery.new.tap do |bq|
155
155
  # bq.add_query(Ferret::Search::TermQuery.new(:id, id.to_s), :must)
156
156
  # bq.add_query(Ferret::Search::TermQuery.new(:class_name, class_name), :must)
157
157
  # end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_ferret
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 77
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
9
  - 8
10
- version: 0.4.8
10
+ - 1
11
+ version: 0.4.8.1
11
12
  platform: ruby
12
13
  authors:
13
14
  - Jens Kraemer
@@ -15,20 +16,23 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-07-13 14:10:00 +02:00
19
+ date: 2010-09-14 00:00:00 +02:00
19
20
  default_executable: aaf_install
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
22
23
  name: ferret
23
24
  prerelease: false
24
25
  requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
25
27
  requirements:
26
28
  - - ">="
27
29
  - !ruby/object:Gem::Version
28
- hash: 3
30
+ hash: 63
29
31
  segments:
30
32
  - 0
31
- version: "0"
33
+ - 11
34
+ - 6
35
+ version: 0.11.6
32
36
  type: :runtime
33
37
  version_requirements: *id001
34
38
  description: Rails plugin that adds powerful full text search capabilities to ActiveRecord models.
@@ -37,12 +41,16 @@ executables:
37
41
  - aaf_install
38
42
  extensions: []
39
43
 
40
- extra_rdoc_files: []
41
-
44
+ extra_rdoc_files:
45
+ - LICENSE
46
+ - README
42
47
  files:
43
- - acts_as_ferret.gemspec
44
48
  - bin/aaf_install
45
49
  - config/ferret_server.yml
50
+ - doc/README.win32
51
+ - doc/demo/README
52
+ - doc/demo/README_DEMO
53
+ - doc/demo/Rakefile
46
54
  - doc/demo/app/controllers/admin/backend_controller.rb
47
55
  - doc/demo/app/controllers/admin_area_controller.rb
48
56
  - doc/demo/app/controllers/application.rb
@@ -86,9 +94,9 @@ files:
86
94
  - doc/demo/db/migrate/005_special_field.rb
87
95
  - doc/demo/db/migrate/006_create_stats.rb
88
96
  - doc/demo/db/schema.sql
89
- - doc/demo/doc/howto.txt
97
+ - doc/demo/db/schema.sqlite
90
98
  - doc/demo/doc/README_FOR_APP
91
- - doc/demo/public/.htaccess
99
+ - doc/demo/doc/howto.txt
92
100
  - doc/demo/public/404.html
93
101
  - doc/demo/public/500.html
94
102
  - doc/demo/public/dispatch.cgi
@@ -99,9 +107,6 @@ files:
99
107
  - doc/demo/public/index.html
100
108
  - doc/demo/public/robots.txt
101
109
  - doc/demo/public/stylesheets/scaffold.css
102
- - doc/demo/Rakefile
103
- - doc/demo/README
104
- - doc/demo/README_DEMO
105
110
  - doc/demo/script/about
106
111
  - doc/demo/script/breakpointer
107
112
  - doc/demo/script/console
@@ -137,14 +142,14 @@ files:
137
142
  - doc/demo/test/unit/shared_index2_test.rb
138
143
  - doc/demo/test/unit/sort_test.rb
139
144
  - doc/demo/test/unit/special_content_test.rb
145
+ - doc/demo/vendor/plugins/will_paginate/LICENSE
146
+ - doc/demo/vendor/plugins/will_paginate/README
147
+ - doc/demo/vendor/plugins/will_paginate/Rakefile
140
148
  - doc/demo/vendor/plugins/will_paginate/init.rb
141
149
  - doc/demo/vendor/plugins/will_paginate/lib/will_paginate/collection.rb
142
150
  - doc/demo/vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb
143
151
  - doc/demo/vendor/plugins/will_paginate/lib/will_paginate/finder.rb
144
152
  - doc/demo/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb
145
- - doc/demo/vendor/plugins/will_paginate/LICENSE
146
- - doc/demo/vendor/plugins/will_paginate/Rakefile
147
- - doc/demo/vendor/plugins/will_paginate/README
148
153
  - doc/demo/vendor/plugins/will_paginate/test/array_pagination_test.rb
149
154
  - doc/demo/vendor/plugins/will_paginate/test/boot.rb
150
155
  - doc/demo/vendor/plugins/will_paginate/test/console
@@ -168,9 +173,11 @@ files:
168
173
  - doc/demo/vendor/plugins/will_paginate/test/lib/load_fixtures.rb
169
174
  - doc/demo/vendor/plugins/will_paginate/test/pagination_test.rb
170
175
  - doc/monit-example
171
- - doc/README.win32
172
- - rails/init.rb
173
- - install.rb
176
+ - recipes/aaf_recipes.rb
177
+ - script/ferret_daemon
178
+ - script/ferret_server
179
+ - script/ferret_service
180
+ - tasks/ferret.rake
174
181
  - lib/act_methods.rb
175
182
  - lib/acts_as_ferret.rb
176
183
  - lib/ar_mysql_auto_reconnect_patch.rb
@@ -194,32 +201,33 @@ files:
194
201
  - lib/server_manager.rb
195
202
  - lib/unix_daemon.rb
196
203
  - lib/without_ar.rb
197
- - LICENSE
198
- - rakefile
204
+ - acts_as_ferret.gemspec
205
+ - init.rb
206
+ - install.rb
199
207
  - README
200
- - recipes/aaf_recipes.rb
201
- - script/ferret_daemon
202
- - script/ferret_server
203
- - script/ferret_service
204
- - tasks/ferret.rake
208
+ - LICENSE
205
209
  has_rdoc: true
206
210
  homepage: http://github.com/jkraemer/acts_as_ferret
207
211
  licenses: []
208
212
 
209
213
  post_install_message:
210
- rdoc_options: []
211
-
214
+ rdoc_options:
215
+ - --charset=UTF-8
212
216
  require_paths:
213
217
  - lib
214
218
  required_ruby_version: !ruby/object:Gem::Requirement
219
+ none: false
215
220
  requirements:
216
221
  - - ">="
217
222
  - !ruby/object:Gem::Version
218
- hash: 3
223
+ hash: 59
219
224
  segments:
220
- - 0
221
- version: "0"
225
+ - 1
226
+ - 8
227
+ - 6
228
+ version: 1.8.6
222
229
  required_rubygems_version: !ruby/object:Gem::Requirement
230
+ none: false
223
231
  requirements:
224
232
  - - ">="
225
233
  - !ruby/object:Gem::Version
@@ -1,40 +0,0 @@
1
- # General Apache options
2
- AddHandler fastcgi-script .fcgi
3
- AddHandler cgi-script .cgi
4
- Options +FollowSymLinks +ExecCGI
5
-
6
- # If you don't want Rails to look in certain directories,
7
- # use the following rewrite rules so that Apache won't rewrite certain requests
8
- #
9
- # Example:
10
- # RewriteCond %{REQUEST_URI} ^/notrails.*
11
- # RewriteRule .* - [L]
12
-
13
- # Redirect all requests not available on the filesystem to Rails
14
- # By default the cgi dispatcher is used which is very slow
15
- #
16
- # For better performance replace the dispatcher with the fastcgi one
17
- #
18
- # Example:
19
- # RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
20
- RewriteEngine On
21
-
22
- # If your Rails application is accessed via an Alias directive,
23
- # then you MUST also set the RewriteBase in this htaccess file.
24
- #
25
- # Example:
26
- # Alias /myrailsapp /path/to/myrailsapp/public
27
- # RewriteBase /myrailsapp
28
-
29
- RewriteRule ^$ index.html [QSA]
30
- RewriteRule ^([^.]+)$ $1.html [QSA]
31
- RewriteCond %{REQUEST_FILENAME} !-f
32
- RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
33
-
34
- # In case Rails experiences terminal errors
35
- # Instead of displaying this message you can supply a file here which will be rendered instead
36
- #
37
- # Example:
38
- # ErrorDocument 500 /500.html
39
-
40
- ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
data/rakefile DELETED
@@ -1,117 +0,0 @@
1
- # rakefile for acts_as_ferret.
2
- # use to create a gem or generate rdoc api documentation.
3
- #
4
- # RELEASE creation:
5
- # rake release REL=x.y.z
6
-
7
- require 'pathname'
8
- require 'yaml'
9
- require 'rake'
10
- require 'rake/rdoctask'
11
- require 'rake/packagetask'
12
- require 'rake/gempackagetask'
13
- require 'rake/testtask'
14
- require 'rake/contrib/rubyforgepublisher'
15
-
16
- def announce(msg='')
17
- STDERR.puts msg
18
- end
19
-
20
-
21
- PKG_NAME = 'acts_as_ferret'
22
- PKG_VERSION = ENV['REL']
23
- PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
24
- RUBYFORGE_PROJECT = 'actsasferret'
25
- RUBYFORGE_USER = 'jkraemer'
26
-
27
- desc 'Default: run unit tests.'
28
- task :default => :test
29
-
30
- desc 'Test the acts_as_ferret plugin.'
31
- Rake::TestTask.new(:test) do |t|
32
- t.libs << 'lib'
33
- t.pattern = 'test/**/*_test.rb'
34
- t.verbose = true
35
- end
36
-
37
- desc 'Generate documentation for the acts_as_ferret plugin.'
38
- Rake::RDocTask.new(:rdoc) do |rdoc|
39
- rdoc.rdoc_dir = 'html'
40
- rdoc.title = "acts_as_ferret - Ferret based full text search for any ActiveRecord model"
41
- rdoc.options << '--line-numbers' << '--inline-source'
42
- rdoc.options << '--main' << 'README'
43
- rdoc.rdoc_files.include('README', 'LICENSE')
44
- rdoc.template = "#{ENV['template']}.rb" if ENV['template']
45
- rdoc.rdoc_files.include('lib/**/*.rb')
46
- end
47
-
48
- # FIXME
49
- desc "Publish the API documentation"
50
- task :pdoc => [:rdoc] do
51
- # Rake::RubyForgePublisher.new(RUBYFORGE_PROJECT, RUBYFORGE_USER).upload
52
- end
53
-
54
- if PKG_VERSION
55
- spec = Gem::Specification.new do |s|
56
- s.name = PKG_NAME
57
- s.version = PKG_VERSION.dup
58
- s.platform = Gem::Platform::RUBY
59
- s.rubyforge_project = 'acts_as_ferret'
60
- s.summary = "acts_as_ferret - Ferret based full text search for any ActiveRecord model"
61
- s.description = "Rails plugin that adds powerful full text search capabilities to ActiveRecord models."
62
- s.files = Dir.glob('**/*', File::FNM_DOTMATCH).reject do |f|
63
- [ /\.$/, /sqlite$/, /\.log$/, /^pkg/, /\.svn/, /\.git/, /\.\w+\.sw.$/,
64
- /^html/, /\~$/, /\/\._/, /\/#/, /\._/, /tmp\// ].any? {|regex| f =~ regex }
65
- end
66
- #s.files = FileList["{lib,test}/**/*"].to_a + %w(README MIT-LICENSE CHANGELOG)
67
- s.add_dependency 'ferret'
68
- s.require_path = 'lib'
69
- s.bindir = "bin"
70
- s.executables = ["aaf_install"]
71
- s.default_executable = "aaf_install"
72
- # s.autorequire = 'acts_as_ferret'
73
- s.has_rdoc = true
74
- # s.test_files = Dir['test/**/*_test.rb']
75
- s.author = "Jens Kraemer"
76
- s.email = "jk@jkraemer.net"
77
- s.homepage = "http://github.com/jkraemer/acts_as_ferret"
78
- end
79
-
80
- desc "Update the gemspec for GitHub's gem server"
81
- task :gemspec do
82
- Pathname("#{spec.name}.gemspec").open('w') {|f| f << YAML.dump(spec) }
83
- end
84
-
85
- desc 'build the gem'
86
- task :package => :gemspec do
87
- `gem build acts_as_ferret.gemspec`
88
- `mv #{PKG_FILE_NAME}.gem pkg/#{PKG_FILE_NAME}.gem`
89
- end
90
-
91
- desc 'publish to rubygems.org'
92
- task :push => [ :package, :tag ] do
93
- if ENV['RELTEST']
94
- announce "Release Task Testing, not pushing to rubygems.org"
95
- else
96
- `gem push pkg/#{PKG_FILE_NAME}.gem`
97
- end
98
- end
99
-
100
-
101
- desc "tag the new release"
102
- task :tag do
103
- reltag = "rel_#{PKG_VERSION.gsub(/\./, '_')}"
104
- announce "Tagging with [#{PKG_VERSION}]"
105
- if ENV['RELTEST']
106
- announce "Release Task Testing, skipping tagging"
107
- else
108
- `git tag -m 'tagging release #{reltag}' -s #{reltag} HEAD`
109
- `git tag -d stable`
110
- `git tag -m 'tagging HEAD as stable' -s stable HEAD`
111
- end
112
- end
113
-
114
- desc 'Publish the gem and API docs'
115
- task :release => [:pdoc, :push ]
116
-
117
- end