-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from AresMUSH/dev
Beta 33
- Loading branch information
Showing
47 changed files
with
441 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module AresMUSH | ||
module Migrations | ||
class MigrationBeta33Update | ||
def require_restart | ||
false | ||
end | ||
|
||
def migrate | ||
Global.logger.debug "Adding pm shortcut and page markers." | ||
config = DatabaseMigrator.read_config_file("page.yml") | ||
config['page']['shortcuts']['pm'] = 'page' | ||
config['page']['page_start_marker'] = '<' | ||
config['page']['page_end_marker'] = '>' | ||
DatabaseMigrator.write_config_file("page.yml", config) | ||
|
||
Global.logger.debug "Adding glance format." | ||
default_config = DatabaseMigrator.read_distr_config_file("describe.yml") | ||
config = DatabaseMigrator.read_config_file("describe.yml") | ||
config['describe']['glance_format'] = default_config['describe']['glance_format'] | ||
DatabaseMigrator.write_config_file("describe.yml", config) | ||
|
||
Global.logger.debug "Adding job category shortcut." | ||
config = DatabaseMigrator.read_config_file("jobs.yml") | ||
config['jobs']['shortcuts']['job/category'] = 'job/cat' | ||
DatabaseMigrator.write_config_file("jobs.yml", config) | ||
|
||
Global.logger.debug "Adding whisper shortcuts." | ||
config = DatabaseMigrator.read_config_file("scenes.yml") | ||
config['scenes']['shortcuts']['whisp'] = 'whisper' | ||
config['scenes']['shortcuts']['mutter'] = 'whisper' | ||
config['scenes']['shortcuts'].delete 'whisper' | ||
DatabaseMigrator.write_config_file("scenes.yml", config) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module AresMUSH | ||
module Help | ||
class SearchHelpRequestHandler | ||
def handle(request) | ||
|
||
searchText = (request.args[:searchText] || "").strip | ||
|
||
topics_by_name = Help.find_topic(searchText).uniq.sort | ||
topics_by_text = Global.help_reader.help_text.select { |k, v| v =~ /\b#{searchText}\b/i }.keys.uniq.sort | ||
|
||
{ | ||
probable_matches: topics_by_name.map { |t| | ||
{ | ||
id: t, | ||
name: t.titleize, | ||
summary: (Help.topic_index[t] || {})['summary'] | ||
} | ||
}, | ||
possible_matches: topics_by_text.empty? ? nil : topics_by_text.map { |t| | ||
{ | ||
id: t, | ||
name: t.titleize, | ||
summary: (Help.topic_index[t] || {})['summary'] | ||
} | ||
} | ||
} | ||
|
||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.