Navigation Menu

Skip to content

Commit

Permalink
Rename "status" to "system.status"
Browse files Browse the repository at this point in the history
Because there is a known Groonga command "status".
  • Loading branch information
piroor committed Jun 25, 2014
1 parent 224b6a7 commit be007d2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/droonga/catalog_generator.rb
Expand Up @@ -20,7 +20,7 @@ class CatalogGenerator
DEFAULT_DATASET = "Default"
DEFAULT_HOSTS = ["127.0.0.1"]
DEFAULT_N_WORKERS = 4
DEFAULT_PLUGINS = ["groonga", "search", "crud", "dump", "status"]
DEFAULT_PLUGINS = ["groonga", "search", "crud", "dump", "system"]
DEFAULT_PORT = 10031
DEFAULT_TAG = "droonga"

Expand Down
Expand Up @@ -17,11 +17,11 @@

module Droonga
module Plugins
module Status
module System
extend Plugin
register("status")

class Handler < Droonga::Handler
class StatusHandler < Droonga::Handler
action.synchronous = true

def handle(message)
Expand All @@ -42,8 +42,8 @@ def handle(message)
end

define_single_step do |step|
step.name = "status"
step.handler = Handler
step.name = "system.status"
step.handler = StatusHandler
step.collector = Collectors::Or
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/command/config/default/catalog.json
Expand Up @@ -4,7 +4,7 @@
"datasets": {
"Default": {
"nWorkers": 4,
"plugins": ["groonga", "crud", "search", "dump", "status"],
"plugins": ["groonga", "crud", "search", "dump", "system"],
"replicas": [
{
"dimension": "_key",
Expand Down
@@ -1,7 +1,7 @@
{
"inReplyTo": "request-id",
"statusCode": 200,
"type": "status.result",
"type": "system.status.result",
"body": {
"nodes": {
"127.0.0.1:23003/droonga": {
Expand Down
@@ -1,5 +1,5 @@
{
"type": "status",
"type": "system.status",
"dataset": "Default",
"body": {}
}
Expand Up @@ -13,9 +13,9 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

require "droonga/plugins/status"
require "droonga/plugins/system"

class StatusHandlerTest < Test::Unit::TestCase
class SystemStatusHandlerTest < Test::Unit::TestCase
def setup
setup_handler
end
Expand All @@ -31,10 +31,10 @@ def setup_handler
@dispatcher = StubDispatcher.new
@messenger.dispatcher = @dispatcher
@loop = nil
@handler = Droonga::Plugins::Status::Handler.new("name",
@worker.context,
@messenger,
@loop)
@handler = Droonga::Plugins::System::StatusHandler.new("name",
@worker.context,
@messenger,
@loop)
end

def teardown_handler
Expand Down

0 comments on commit be007d2

Please sign in to comment.