droonga-engine 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/bin/droonga-engine-absorb-data +2 -1
  3. data/bin/droonga-engine-catalog-generate +21 -5
  4. data/bin/droonga-engine-catalog-modify +22 -6
  5. data/bin/droonga-engine-configure +215 -0
  6. data/bin/droonga-engine-join +48 -123
  7. data/bin/droonga-engine-unjoin +14 -1
  8. data/doc/text/news.md +21 -0
  9. data/droonga-engine.gemspec +12 -10
  10. data/install/centos/droonga-engine +60 -0
  11. data/install/centos/functions.sh +35 -0
  12. data/install/debian/droonga-engine +155 -0
  13. data/install/debian/functions.sh +33 -0
  14. data/install.sh +360 -0
  15. data/lib/droonga/address.rb +3 -1
  16. data/lib/droonga/catalog/dataset.rb +2 -0
  17. data/lib/droonga/catalog/version1.rb +16 -3
  18. data/lib/droonga/catalog/version2.rb +16 -3
  19. data/lib/droonga/catalog_fetcher.rb +51 -0
  20. data/lib/droonga/catalog_generator.rb +6 -5
  21. data/lib/droonga/catalog_modifier.rb +45 -0
  22. data/lib/droonga/command/droonga_engine.rb +96 -29
  23. data/lib/droonga/command/droonga_engine_service.rb +5 -0
  24. data/lib/droonga/command/remote.rb +368 -0
  25. data/lib/droonga/command/serf_event_handler.rb +37 -304
  26. data/lib/droonga/dispatcher.rb +15 -1
  27. data/lib/droonga/engine/version.rb +1 -1
  28. data/lib/droonga/engine.rb +11 -4
  29. data/lib/droonga/engine_state.rb +2 -0
  30. data/lib/droonga/farm.rb +14 -5
  31. data/lib/droonga/fluent_message_receiver.rb +23 -6
  32. data/lib/droonga/fluent_message_sender.rb +5 -1
  33. data/lib/droonga/node_status.rb +67 -0
  34. data/lib/droonga/path.rb +28 -4
  35. data/lib/droonga/plugins/catalog.rb +40 -0
  36. data/lib/droonga/safe_file_writer.rb +1 -1
  37. data/lib/droonga/searcher.rb +3 -15
  38. data/lib/droonga/serf.rb +17 -32
  39. data/lib/droonga/serf_downloader.rb +26 -1
  40. data/lib/droonga/service_installation.rb +123 -0
  41. data/lib/droonga/session.rb +4 -0
  42. data/lib/droonga/slice.rb +22 -12
  43. data/lib/droonga/supervisor.rb +16 -2
  44. data/lib/droonga/worker_process_agent.rb +13 -1
  45. data/sample/droonga-engine.yaml +5 -0
  46. data/test/command/config/default/catalog.json +1 -1
  47. data/test/command/config/default/droonga-engine.yaml +4 -0
  48. data/test/command/config/version1/catalog.json +1 -1
  49. data/test/command/suite/catalog/fetch.expected +64 -0
  50. data/test/command/suite/catalog/fetch.test +6 -0
  51. data/test/unit/catalog/test_version1.rb +2 -2
  52. data/test/unit/catalog/test_version2.rb +3 -3
  53. data/test/unit/helper/sandbox.rb +3 -1
  54. data/test/unit/plugins/catalog/test_fetch.rb +76 -0
  55. data/test/unit/test_catalog_generator.rb +7 -3
  56. metadata +74 -27
  57. data/bin/droonga-engine-data-publisher +0 -66
@@ -46,13 +46,13 @@ class CatalogVersion1Test < Test::Unit::TestCase
46
46
  partitions = @catalog.get_partitions("localhost:23003/test")
47
47
  assert_equal({
48
48
  "localhost:23003/test.000" => {
49
- :database => "#{base_path}/000/db",
49
+ :database => "#{base_path}/database/000/db",
50
50
  :dataset => "Test",
51
51
  :plugins => ["for_dataset"],
52
52
  :n_workers => 0
53
53
  },
54
54
  "localhost:23003/test.002" => {
55
- :database => "#{base_path}/002/db",
55
+ :database => "#{base_path}/database/002/db",
56
56
  :dataset => "Test",
57
57
  :plugins => ["for_dataset"],
58
58
  :n_workers => 0
@@ -45,19 +45,19 @@ class CatalogVersion2Test < Test::Unit::TestCase
45
45
  slices = @catalog.slices("localhost:23003/test")
46
46
  assert_equal({
47
47
  "localhost:23003/test.000" => {
48
- :database => "#{base_path}/000/db",
48
+ :database => "#{base_path}/database/000/db",
49
49
  :dataset => "Test",
50
50
  :plugins => ["plugin1", "plugin2", "plugin3"],
51
51
  :n_workers => 4,
52
52
  },
53
53
  "localhost:23003/test.001" => {
54
- :database => "#{base_path}/001/db",
54
+ :database => "#{base_path}/database/001/db",
55
55
  :dataset => "Test",
56
56
  :plugins => ["plugin1", "plugin2", "plugin3"],
57
57
  :n_workers => 4,
58
58
  },
59
59
  "localhost:23003/test.002" => {
60
- :database => "#{base_path}/002/db",
60
+ :database => "#{base_path}/database/002/db",
61
61
  :dataset => "Test",
62
62
  :plugins => ["plugin1", "plugin2", "plugin3"],
63
63
  :n_workers => 4,
@@ -28,6 +28,8 @@ module Sandbox
28
28
 
29
29
  @database_path = @temporary_directory + "database"
30
30
  @database = nil
31
+
32
+ ENV[Droonga::Path::BASE_DIR_ENV_NAME] = @temporary_directory.to_s
31
33
  end
32
34
 
33
35
  def setup_temporary_directory
@@ -41,7 +43,7 @@ module Sandbox
41
43
  FileUtils.mkdir_p(@base_temporary_directory.to_s)
42
44
  end
43
45
 
44
- @temporary_directory = @base_temporary_directory + "fluent-plugin-droonga"
46
+ @temporary_directory = @base_temporary_directory + "droonga-engine"
45
47
  FileUtils.rm_rf(@temporary_directory.to_s)
46
48
  FileUtils.mkdir_p(@temporary_directory.to_s)
47
49
  end
@@ -0,0 +1,76 @@
1
+ # Copyright (C) 2014 Droonga Project
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License version 2.1 as published by the Free Software Foundation.
6
+ #
7
+ # This library is distributed in the hope that it will be useful,
8
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
9
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10
+ # Lesser General Public License for more details.
11
+ #
12
+ # You should have received a copy of the GNU Lesser General Public
13
+ # License along with this library; if not, write to the Free Software
14
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15
+
16
+ require "fileutils"
17
+
18
+ require "droonga/plugins/catalog"
19
+ require "droonga/path"
20
+
21
+ class CatalogFetchHandlerTest < Test::Unit::TestCase
22
+ def setup
23
+ setup_handler
24
+ setup_catalog_json
25
+ end
26
+
27
+ def teardown
28
+ teardown_handler
29
+ teardown_catalog_json
30
+ end
31
+
32
+ private
33
+ def setup_handler
34
+ @worker = StubWorker.new
35
+ @messenger = Droonga::Test::StubHandlerMessenger.new
36
+ @loop = nil
37
+ @handler = Droonga::Plugins::Catalog::FetchHandler.new("name",
38
+ @worker.context,
39
+ @messenger,
40
+ @loop)
41
+ end
42
+
43
+ def teardown_handler
44
+ @handler = nil
45
+ end
46
+
47
+ def setup_catalog_json
48
+ catalog_path = Droonga::Path.catalog
49
+ FileUtils.mkdir_p(catalog_path.parent.to_s)
50
+ catalog_path.open("w") do |file|
51
+ file.puts(JSON.generate(catalog))
52
+ end
53
+ end
54
+
55
+ def teardown_catalog_json
56
+ FileUtils.rm_f(Droonga::Path.catalog)
57
+ end
58
+
59
+ def catalog
60
+ {
61
+ "version" => 2,
62
+ }
63
+ end
64
+
65
+ def process(request)
66
+ message = Droonga::Test::StubHandlerMessage.new(request)
67
+ @handler.handle(message)
68
+ end
69
+
70
+ public
71
+ def test_request
72
+ request = {}
73
+ response = process(request)
74
+ assert_equal(catalog, response)
75
+ end
76
+ end
@@ -40,6 +40,10 @@ class CatalogGeneratorTest < Test::Unit::TestCase
40
40
  end
41
41
  end
42
42
 
43
+ def default_plugins
44
+ ["groonga", "search", "crud", "dump", "system", "catalog"]
45
+ end
46
+
43
47
  def test_default
44
48
  catalog = {
45
49
  "version" => 2,
@@ -55,7 +59,7 @@ class CatalogGeneratorTest < Test::Unit::TestCase
55
59
  @generator.add_dataset("Droonga", {})
56
60
  dataset = {
57
61
  "nWorkers" => 4,
58
- "plugins" => ["groonga", "search", "crud", "dump", "system"],
62
+ "plugins" => default_plugins,
59
63
  "schema" => {},
60
64
  "replicas" => [
61
65
  {
@@ -94,7 +98,7 @@ class CatalogGeneratorTest < Test::Unit::TestCase
94
98
  def test_replicas
95
99
  dataset = {
96
100
  "nWorkers" => 4,
97
- "plugins" => ["groonga", "search", "crud", "dump", "system"],
101
+ "plugins" => default_plugins,
98
102
  "schema" => [],
99
103
  "replicas" => [
100
104
  {
@@ -141,7 +145,7 @@ class CatalogGeneratorTest < Test::Unit::TestCase
141
145
  @generator.add_dataset("Droonga", :replicas => replicas)
142
146
  dataset = {
143
147
  "nWorkers" => 4,
144
- "plugins" => ["groonga", "search", "crud", "dump", "system"],
148
+ "plugins" => default_plugins,
145
149
  "schema" => {},
146
150
  "replicas" => replicas,
147
151
  }
metadata CHANGED
@@ -1,31 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: droonga-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Droonga Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-29 00:00:00.000000000 Z
11
+ date: 2014-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rroonga
14
+ name: archive-zip
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.1
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.0.1
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: groonga-command-parser
28
+ name: cool.io
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '>='
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: json
42
+ name: drndump
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '>='
@@ -53,33 +53,47 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: cool.io
56
+ name: droonga-client
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '>='
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 0.1.9
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 0.1.9
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: droonga-message-pack-packer
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '>='
74
74
  - !ruby/object:Gem::Version
75
- version: 1.0.1
75
+ version: 1.0.2
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: 1.0.2
83
+ - !ruby/object:Gem::Dependency
84
+ name: groonga-command-parser
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
76
90
  type: :runtime
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - '>='
81
95
  - !ruby/object:Gem::Version
82
- version: 1.0.1
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: faraday
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +123,7 @@ dependencies:
109
123
  - !ruby/object:Gem::Version
110
124
  version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
- name: archive-zip
126
+ name: json
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - '>='
@@ -122,6 +136,20 @@ dependencies:
122
136
  - - '>='
123
137
  - !ruby/object:Gem::Version
124
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rroonga
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '>='
144
+ - !ruby/object:Gem::Version
145
+ version: 4.0.4
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: 4.0.4
125
153
  - !ruby/object:Gem::Dependency
126
154
  name: sigdump
127
155
  requirement: !ruby/object:Gem::Requirement
@@ -137,21 +165,21 @@ dependencies:
137
165
  - !ruby/object:Gem::Version
138
166
  version: '0'
139
167
  - !ruby/object:Gem::Dependency
140
- name: droonga-client
168
+ name: slop
141
169
  requirement: !ruby/object:Gem::Requirement
142
170
  requirements:
143
171
  - - '>='
144
172
  - !ruby/object:Gem::Version
145
- version: 0.1.9
173
+ version: '0'
146
174
  type: :runtime
147
175
  prerelease: false
148
176
  version_requirements: !ruby/object:Gem::Requirement
149
177
  requirements:
150
178
  - - '>='
151
179
  - !ruby/object:Gem::Version
152
- version: 0.1.9
180
+ version: '0'
153
181
  - !ruby/object:Gem::Dependency
154
- name: drndump
182
+ name: sys-proctable
155
183
  requirement: !ruby/object:Gem::Requirement
156
184
  requirements:
157
185
  - - '>='
@@ -165,7 +193,7 @@ dependencies:
165
193
  - !ruby/object:Gem::Version
166
194
  version: '0'
167
195
  - !ruby/object:Gem::Dependency
168
- name: rake
196
+ name: kramdown
169
197
  requirement: !ruby/object:Gem::Requirement
170
198
  requirements:
171
199
  - - '>='
@@ -193,7 +221,7 @@ dependencies:
193
221
  - !ruby/object:Gem::Version
194
222
  version: '0'
195
223
  - !ruby/object:Gem::Dependency
196
- name: test-unit
224
+ name: packnga
197
225
  requirement: !ruby/object:Gem::Requirement
198
226
  requirements:
199
227
  - - '>='
@@ -207,7 +235,7 @@ dependencies:
207
235
  - !ruby/object:Gem::Version
208
236
  version: '0'
209
237
  - !ruby/object:Gem::Dependency
210
- name: test-unit-notify
238
+ name: rake
211
239
  requirement: !ruby/object:Gem::Requirement
212
240
  requirements:
213
241
  - - '>='
@@ -221,7 +249,7 @@ dependencies:
221
249
  - !ruby/object:Gem::Version
222
250
  version: '0'
223
251
  - !ruby/object:Gem::Dependency
224
- name: test-unit-rr
252
+ name: test-unit
225
253
  requirement: !ruby/object:Gem::Requirement
226
254
  requirements:
227
255
  - - '>='
@@ -235,7 +263,7 @@ dependencies:
235
263
  - !ruby/object:Gem::Version
236
264
  version: '0'
237
265
  - !ruby/object:Gem::Dependency
238
- name: packnga
266
+ name: test-unit-notify
239
267
  requirement: !ruby/object:Gem::Requirement
240
268
  requirements:
241
269
  - - '>='
@@ -249,7 +277,7 @@ dependencies:
249
277
  - !ruby/object:Gem::Version
250
278
  version: '0'
251
279
  - !ruby/object:Gem::Dependency
252
- name: kramdown
280
+ name: test-unit-rr
253
281
  requirement: !ruby/object:Gem::Requirement
254
282
  requirements:
255
283
  - - '>='
@@ -271,7 +299,7 @@ executables:
271
299
  - droonga-engine-absorb-data
272
300
  - droonga-engine-catalog-generate
273
301
  - droonga-engine-catalog-modify
274
- - droonga-engine-data-publisher
302
+ - droonga-engine-configure
275
303
  - droonga-engine-join
276
304
  - droonga-engine-serf-event-handler
277
305
  - droonga-engine-service
@@ -298,7 +326,7 @@ files:
298
326
  - bin/droonga-engine-absorb-data
299
327
  - bin/droonga-engine-catalog-generate
300
328
  - bin/droonga-engine-catalog-modify
301
- - bin/droonga-engine-data-publisher
329
+ - bin/droonga-engine-configure
302
330
  - bin/droonga-engine-join
303
331
  - bin/droonga-engine-serf-event-handler
304
332
  - bin/droonga-engine-service
@@ -306,6 +334,11 @@ files:
306
334
  - bin/droonga-engine-worker
307
335
  - doc/text/news.md
308
336
  - droonga-engine.gemspec
337
+ - install.sh
338
+ - install/centos/droonga-engine
339
+ - install/centos/functions.sh
340
+ - install/debian/droonga-engine
341
+ - install/debian/functions.sh
309
342
  - lib/droonga/adapter.rb
310
343
  - lib/droonga/adapter_runner.rb
311
344
  - lib/droonga/address.rb
@@ -322,8 +355,10 @@ files:
322
355
  - lib/droonga/catalog/version2_validator.rb
323
356
  - lib/droonga/catalog/volume.rb
324
357
  - lib/droonga/catalog/volume_collection.rb
358
+ - lib/droonga/catalog_fetcher.rb
325
359
  - lib/droonga/catalog_generator.rb
326
360
  - lib/droonga/catalog_loader.rb
361
+ - lib/droonga/catalog_modifier.rb
327
362
  - lib/droonga/collector.rb
328
363
  - lib/droonga/collector_message.rb
329
364
  - lib/droonga/collector_runner.rb
@@ -334,6 +369,7 @@ files:
334
369
  - lib/droonga/command/droonga_engine.rb
335
370
  - lib/droonga/command/droonga_engine_service.rb
336
371
  - lib/droonga/command/droonga_engine_worker.rb
372
+ - lib/droonga/command/remote.rb
337
373
  - lib/droonga/command/serf_event_handler.rb
338
374
  - lib/droonga/data_absorber.rb
339
375
  - lib/droonga/dispatcher.rb
@@ -364,6 +400,7 @@ files:
364
400
  - lib/droonga/loggable.rb
365
401
  - lib/droonga/logger.rb
366
402
  - lib/droonga/message_matcher.rb
403
+ - lib/droonga/node_status.rb
367
404
  - lib/droonga/output_message.rb
368
405
  - lib/droonga/path.rb
369
406
  - lib/droonga/planner.rb
@@ -377,6 +414,7 @@ files:
377
414
  - lib/droonga/plugin_loader.rb
378
415
  - lib/droonga/plugin_registry.rb
379
416
  - lib/droonga/plugins/basic.rb
417
+ - lib/droonga/plugins/catalog.rb
380
418
  - lib/droonga/plugins/crud.rb
381
419
  - lib/droonga/plugins/dump.rb
382
420
  - lib/droonga/plugins/error.rb
@@ -407,6 +445,7 @@ files:
407
445
  - lib/droonga/searcher/mecab_filter.rb
408
446
  - lib/droonga/serf.rb
409
447
  - lib/droonga/serf_downloader.rb
448
+ - lib/droonga/service_installation.rb
410
449
  - lib/droonga/session.rb
411
450
  - lib/droonga/single_step.rb
412
451
  - lib/droonga/single_step_definition.rb
@@ -424,11 +463,13 @@ files:
424
463
  - lib/droonga/watcher.rb
425
464
  - lib/droonga/worker_process_agent.rb
426
465
  - sample/cluster/Rakefile
466
+ - sample/droonga-engine.yaml
427
467
  - sample/mecab_filter/data.grn
428
468
  - sample/mecab_filter/ddl.grn
429
469
  - sample/mecab_filter/search_with_mecab_filter.json
430
470
  - sample/mecab_filter/search_without_mecab_filter.json
431
471
  - test/command/config/default/catalog.json
472
+ - test/command/config/default/droonga-engine.yaml
432
473
  - test/command/config/version1/catalog.json
433
474
  - test/command/fixture/documents.jsons
434
475
  - test/command/fixture/event.jsons
@@ -462,6 +503,8 @@ files:
462
503
  - test/command/suite/add/with-values.test
463
504
  - test/command/suite/add/without-key.expected
464
505
  - test/command/suite/add/without-key.test
506
+ - test/command/suite/catalog/fetch.expected
507
+ - test/command/suite/catalog/fetch.test
465
508
  - test/command/suite/dump/column/index.catalog.json
466
509
  - test/command/suite/dump/column/index.expected
467
510
  - test/command/suite/dump/column/index.test
@@ -658,6 +701,7 @@ files:
658
701
  - test/unit/helper/sandbox.rb
659
702
  - test/unit/helper/stub_worker.rb
660
703
  - test/unit/helper/watch_helper.rb
704
+ - test/unit/plugins/catalog/test_fetch.rb
661
705
  - test/unit/plugins/crud/test_add.rb
662
706
  - test/unit/plugins/groonga/select/test_adapter_input.rb
663
707
  - test/unit/plugins/groonga/select/test_adapter_output.rb
@@ -708,12 +752,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
708
752
  version: '0'
709
753
  requirements: []
710
754
  rubyforge_project:
711
- rubygems_version: 2.0.14
755
+ rubygems_version: 2.4.1
712
756
  signing_key:
713
757
  specification_version: 4
714
758
  summary: Droonga engine
715
759
  test_files:
716
760
  - test/command/config/default/catalog.json
761
+ - test/command/config/default/droonga-engine.yaml
717
762
  - test/command/config/version1/catalog.json
718
763
  - test/command/fixture/documents.jsons
719
764
  - test/command/fixture/event.jsons
@@ -747,6 +792,8 @@ test_files:
747
792
  - test/command/suite/add/with-values.test
748
793
  - test/command/suite/add/without-key.expected
749
794
  - test/command/suite/add/without-key.test
795
+ - test/command/suite/catalog/fetch.expected
796
+ - test/command/suite/catalog/fetch.test
750
797
  - test/command/suite/dump/column/index.catalog.json
751
798
  - test/command/suite/dump/column/index.expected
752
799
  - test/command/suite/dump/column/index.test
@@ -943,6 +990,7 @@ test_files:
943
990
  - test/unit/helper/sandbox.rb
944
991
  - test/unit/helper/stub_worker.rb
945
992
  - test/unit/helper/watch_helper.rb
993
+ - test/unit/plugins/catalog/test_fetch.rb
946
994
  - test/unit/plugins/crud/test_add.rb
947
995
  - test/unit/plugins/groonga/select/test_adapter_input.rb
948
996
  - test/unit/plugins/groonga/select/test_adapter_output.rb
@@ -974,4 +1022,3 @@ test_files:
974
1022
  - test/unit/test_sweeper.rb
975
1023
  - test/unit/test_watch_schema.rb
976
1024
  - test/unit/test_watcher.rb
977
- has_rdoc:
@@ -1,66 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # Copyright (C) 2014 Droonga Project
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 version 2.1 as published by the Free Software Foundation.
8
- #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
13
- #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
-
18
- require "ostruct"
19
- require "optparse"
20
- require "pathname"
21
- require "fileutils"
22
- require "webrick"
23
-
24
- require "droonga/engine/version"
25
- require "droonga/path"
26
-
27
- options = OpenStruct.new
28
- options.base_dir = ENV[Droonga::Path::BASE_DIR_ENV_NAME] || Dir.pwd
29
- options.port = 10032
30
-
31
- parser = OptionParser.new
32
- parser.version = Droonga::Engine::VERSION
33
-
34
- parser.on("--base-dir=PATH",
35
- "Path to the base directory the catalog.json is located in.",
36
- "(#{options.base_dir})") do |path|
37
- options.base_dir = path
38
- end
39
- parser.on("--port=PORT", Integer,
40
- "Port number to listen.",
41
- "(#{options.port})") do |port|
42
- options.port = port
43
- end
44
- parser.on("--published-file=PATH",
45
- "Path to the file to be published.") do |path|
46
- options.published_file = path
47
- end
48
-
49
- parser.parse!(ARGV)
50
-
51
- include WEBrick
52
-
53
- published_dir = Droonga::Path.published(options.port)
54
- FileUtils.mkdir_p(published_dir.to_s)
55
- published_file = Pathname(options.published_file).expand_path
56
- FileUtils.copy(published_file.to_s, published_dir + published_file.basename)
57
-
58
- server = HTTPServer.new(:Port => options.port,
59
- :DocumentRoot => published_dir)
60
-
61
- trap("INT") do
62
- server.shutdown
63
- FileUtils.rm_rf(published_dir.to_s)
64
- end
65
-
66
- server.start