Module: Mbeditor

Defined in:
lib/mbeditor.rb,
lib/mbeditor/engine.rb,
lib/mbeditor/version.rb,
lib/mbeditor/route_map.rb,
lib/mbeditor/mount_path.rb,
lib/mbeditor/configuration.rb,
lib/mbeditor/private_routes.rb,
lib/mbeditor/cable_log_filter.rb,
app/services/mbeditor/git_service.rb,
lib/mbeditor/rack/resilient_router.rb,
app/channels/mbeditor/editor_channel.rb,
app/services/mbeditor/process_runner.rb,
app/services/mbeditor/schema_service.rb,
app/services/mbeditor/redmine_service.rb,
app/services/mbeditor/git_diff_service.rb,
app/services/mbeditor/git_info_service.rb,
lib/mbeditor/rack/silence_ping_request.rb,
app/controllers/mbeditor/git_controller.rb,
app/services/mbeditor/exclusion_matcher.rb,
app/services/mbeditor/file_tree_service.rb,
app/services/mbeditor/git_blame_service.rb,
app/services/mbeditor/availability_probe.rb,
app/services/mbeditor/js_members_service.rb,
app/services/mbeditor/code_search_service.rb,
app/services/mbeditor/test_runner_service.rb,
app/services/mbeditor/editor_state_service.rb,
app/controllers/mbeditor/editors_controller.rb,
app/services/mbeditor/js_definition_service.rb,
app/services/mbeditor/ri_definition_service.rb,
lib/mbeditor/rack/handle_pending_migrations.rb,
app/services/mbeditor/file_operation_service.rb,
app/services/mbeditor/search_replace_service.rb,
app/services/mbeditor/ruby_definition_service.rb,
app/services/mbeditor/git_commit_graph_service.rb,
app/services/mbeditor/git_file_history_service.rb,
app/controllers/mbeditor/application_controller.rb,
app/services/mbeditor/git_combined_diff_service.rb,
app/services/mbeditor/git_commit_detail_service.rb,
app/services/mbeditor/rails_related_files_service.rb

Defined Under Namespace

Modules: GitInfoService, GitService, MountPath, PrivateRoutes, ProcessRunner, Rack, RailsRelatedFilesService, TestRunnerService Classes: ApplicationController, AvailabilityProbe, CableLogFilter, CodeSearchService, Configuration, EditorChannel, EditorStateService, EditorsController, Engine, ExclusionMatcher, FileOperationService, FileTreeService, GitBlameService, GitCombinedDiffService, GitCommitDetailService, GitCommitGraphService, GitController, GitDiffService, GitFileHistoryService, JsDefinitionService, JsMembersService, RedmineConfigError, RedmineDisabledError, RedmineService, RiDefinitionService, RubyDefinitionService, SchemaService, SearchReplaceService

Constant Summary collapse

VERSION =
"0.7.5"
ROUTE_MAP =

Single source of truth for the engine’s routes.

Both the engine’s own route set (config/routes.rb via Mbeditor::Engine.routes.draw) and the (later) private, isolated route set draw from this same proc, so the two can never drift apart.

proc do
  root to: 'editors#index'

  get    'ping',            to: 'editors#ping'
  get    'workspace',       to: 'editors#workspace'
  get    'files',           to: 'editors#files'
  get    'file',            to: 'editors#show'
  get    'raw',             to: 'editors#raw'
  post   'file',            to: 'editors#save'
  post   'create_file',     to: 'editors#create_file'
  post   'create_dir',      to: 'editors#create_dir'
  patch  'rename',          to: 'editors#rename'
  delete 'delete',          to: 'editors#destroy_path'
  get    'state',           to: 'editors#state'
  post   'state',           to: 'editors#save_state'
  get    'branch_state',    to: 'editors#branch_state'
  post   'branch_state',    to: 'editors#save_branch_state'
  post   'prune_branch_states', to: 'editors#prune_branch_states'
  get  'file_history', to: 'editors#file_history'
  post 'file_history', to: 'editors#save_file_history'
  get    'search',          to: 'editors#search'
  post   'replace_in_files', to: 'editors#replace_in_files'
  get    'definition',      to: 'editors#definition'
  get    'js_definition',   to: 'editors#js_definition'
  get    'js_members',      to: 'editors#js_members'
  get    'module_members',  to: 'editors#module_members'
  get    'file_includes',   to: 'editors#file_includes'
  get    'client_config',   to: 'editors#client_config'
  get    'related_files',   to: 'editors#related_files'
  get    'model_schema',    to: 'editors#model_schema'
  get    'changelog',       to: 'editors#changelog'
  get    'git_info',        to: 'editors#git_info'
  get    'git_status',      to: 'editors#git_status'
  get    'manifest.webmanifest',            to: 'editors#pwa_manifest',   format: false
  get    'sw.js',                           to: 'editors#pwa_sw',         format: false
  get    'mbeditor-icon.svg',               to: 'editors#pwa_icon',       format: false
  get    'monaco_worker.js',                to: 'editors#monaco_worker',  format: false
  get    'ts_worker.js',                    to: 'editors#ts_worker',      format: false
  get    'monaco-editor/*asset_path',       to: 'editors#monaco_asset', format: false
  get    'min-maps/*asset_path',            to: 'editors#monaco_asset', format: false
  post   'lint',            to: 'editors#lint'
  post   'quick_fix',       to: 'editors#quick_fix'
  post   'format',          to: 'editors#format_file'
  post   'test',            to: 'editors#run_test'

  # ── Git & Code Review ──────────────────────────────────────────────────────
  get 'git/diff',           to: 'git#diff'
  get 'git/blame',          to: 'git#blame'
  get 'git/file_history',   to: 'git#file_history'
  get 'git/commit_graph',   to: 'git#commit_graph'
  get 'git/commit_detail',  to: 'git#commit_detail'
  get 'git/combined_diff',  to: 'git#combined_diff'

  # Redmine integration (enabled via config.mbeditor.redmine_enabled)
  get 'redmine/issue/:id', to: 'git#redmine_issue', as: :redmine_issue
end
CableBaseClass =
defined?(ActionCable::Channel::Base) ? ActionCable::Channel::Base : Object

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject



14
15
16
# File 'lib/mbeditor.rb', line 14

def configuration
  @configuration ||= Configuration.new
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



18
19
20
# File 'lib/mbeditor.rb', line 18

def configure
  yield(configuration)
end