Class: Mbeditor::Configuration
- Inherits:
-
Object
- Object
- Mbeditor::Configuration
- Defined in:
- lib/mbeditor/configuration.rb
Instance Attribute Summary collapse
-
#allowed_environments ⇒ Object
Returns the value of attribute allowed_environments.
-
#authenticate_with ⇒ Object
Returns the value of attribute authenticate_with.
-
#authentication_cache_ttl ⇒ Object
Returns the value of attribute authentication_cache_ttl.
-
#babel_standalone_path ⇒ Object
Returns the value of attribute babel_standalone_path.
-
#base_branch_candidates ⇒ Object
Returns the value of attribute base_branch_candidates.
-
#excluded_paths ⇒ Object
Returns the value of attribute excluded_paths.
-
#git_timeout ⇒ Object
Returns the value of attribute git_timeout.
-
#js_global_identifiers ⇒ Object
Returns the value of attribute js_global_identifiers.
-
#js_syntax_check ⇒ Object
Returns the value of attribute js_syntax_check.
-
#lint_timeout ⇒ Object
Returns the value of attribute lint_timeout.
-
#mount_path ⇒ Object
Returns the value of attribute mount_path.
-
#redmine_api_key ⇒ Object
Returns the value of attribute redmine_api_key.
-
#redmine_enabled ⇒ Object
Returns the value of attribute redmine_enabled.
-
#redmine_ticket_source ⇒ Object
Returns the value of attribute redmine_ticket_source.
-
#redmine_url ⇒ Object
Returns the value of attribute redmine_url.
-
#related_files_custom_paths ⇒ Object
Returns the value of attribute related_files_custom_paths.
-
#resilient_routing ⇒ Object
Returns the value of attribute resilient_routing.
-
#rubocop_command ⇒ Object
Returns the value of attribute rubocop_command.
-
#rubocop_server ⇒ Object
Returns the value of attribute rubocop_server.
-
#ruby_def_include_dirs ⇒ Object
Returns the value of attribute ruby_def_include_dirs.
-
#ruby_lsp ⇒ Object
Returns the value of attribute ruby_lsp.
-
#ruby_lsp_command ⇒ Object
Returns the value of attribute ruby_lsp_command.
-
#ruby_lsp_timeout ⇒ Object
Returns the value of attribute ruby_lsp_timeout.
-
#search_respect_gitignore ⇒ Object
Returns the value of attribute search_respect_gitignore.
-
#search_timeout ⇒ Object
Returns the value of attribute search_timeout.
-
#test_command ⇒ Object
Returns the value of attribute test_command.
-
#test_framework ⇒ Object
Returns the value of attribute test_framework.
-
#test_timeout ⇒ Object
Returns the value of attribute test_timeout.
-
#workspace_root ⇒ Object
Returns the value of attribute workspace_root.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/mbeditor/configuration.rb', line 16 def initialize @allowed_environments = [:development] @workspace_root = nil @excluded_paths = %w[.git tmp log node_modules .bundle coverage vendor/bundle public/assets storage] @rubocop_command = "rubocop" @rubocop_server = true # use rubocop's --server daemon (rubocop >= 1.31) for ~10x faster lint; false forces --no-server @redmine_enabled = false @redmine_url = nil @redmine_api_key = nil @redmine_ticket_source = :commit # :commit (scan commit messages) or :branch (leading digits of branch name) @test_framework = nil # :minitest or :rspec — auto-detected when nil @test_command = nil # e.g. "bundle exec ruby -Itest" or "bundle exec rspec" @test_timeout = 60 # seconds @lint_timeout = 15 # seconds for RuboCop/haml-lint subprocesses @base_branch_candidates = %w[origin/develop origin/main origin/master develop main master] @git_timeout = 10 # seconds; nil disables (no timeout on git subprocesses) @search_timeout = 15 # seconds; wall-clock bound on every search subprocess, nil disables @search_respect_gitignore = false # true skips .gitignore'd files in project search and definition lookups @ruby_def_include_dirs = %w[app/models app/controllers app/helpers app/concerns] @related_files_custom_paths = [] @authentication_cache_ttl = 0 @js_global_identifiers = [] # extra ambient JS globals for the editor (runtime-only names invisible to static scan, e.g. %w[Routes I18n]) @js_syntax_check = :auto # save-time babel parse check via host mini_racer + babel-standalone; false disables @babel_standalone_path = nil # explicit path to babel-standalone JS; nil auto-detects via the asset pipeline @ruby_lsp = :auto # use the host's ruby-lsp for Ruby definitions/hover/completion when available; false disables @ruby_lsp_command = nil # override the ruby-lsp launch command (String or Array); nil auto-resolves bin/ruby-lsp > gem > bundle exec @ruby_lsp_timeout = 3 # seconds per LSP request before falling back to the built-in services @mount_path = nil # explicit URL prefix override; nil falls through to detection/"/mbeditor" @resilient_routing = true # serve /mbeditor from middleware so the editor survives a broken host routes.rb; false is the escape hatch end |
Instance Attribute Details
#allowed_environments ⇒ Object
Returns the value of attribute allowed_environments.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def allowed_environments @allowed_environments end |
#authenticate_with ⇒ Object
Returns the value of attribute authenticate_with.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def authenticate_with @authenticate_with end |
#authentication_cache_ttl ⇒ Object
Returns the value of attribute authentication_cache_ttl.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def authentication_cache_ttl @authentication_cache_ttl end |
#babel_standalone_path ⇒ Object
Returns the value of attribute babel_standalone_path.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def babel_standalone_path @babel_standalone_path end |
#base_branch_candidates ⇒ Object
Returns the value of attribute base_branch_candidates.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def base_branch_candidates @base_branch_candidates end |
#excluded_paths ⇒ Object
Returns the value of attribute excluded_paths.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def excluded_paths @excluded_paths end |
#git_timeout ⇒ Object
Returns the value of attribute git_timeout.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def git_timeout @git_timeout end |
#js_global_identifiers ⇒ Object
Returns the value of attribute js_global_identifiers.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def js_global_identifiers @js_global_identifiers end |
#js_syntax_check ⇒ Object
Returns the value of attribute js_syntax_check.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def js_syntax_check @js_syntax_check end |
#lint_timeout ⇒ Object
Returns the value of attribute lint_timeout.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def lint_timeout @lint_timeout end |
#mount_path ⇒ Object
Returns the value of attribute mount_path.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def mount_path @mount_path end |
#redmine_api_key ⇒ Object
Returns the value of attribute redmine_api_key.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def redmine_api_key @redmine_api_key end |
#redmine_enabled ⇒ Object
Returns the value of attribute redmine_enabled.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def redmine_enabled @redmine_enabled end |
#redmine_ticket_source ⇒ Object
Returns the value of attribute redmine_ticket_source.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def redmine_ticket_source @redmine_ticket_source end |
#redmine_url ⇒ Object
Returns the value of attribute redmine_url.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def redmine_url @redmine_url end |
#related_files_custom_paths ⇒ Object
Returns the value of attribute related_files_custom_paths.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def @related_files_custom_paths end |
#resilient_routing ⇒ Object
Returns the value of attribute resilient_routing.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def resilient_routing @resilient_routing end |
#rubocop_command ⇒ Object
Returns the value of attribute rubocop_command.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def rubocop_command @rubocop_command end |
#rubocop_server ⇒ Object
Returns the value of attribute rubocop_server.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def rubocop_server @rubocop_server end |
#ruby_def_include_dirs ⇒ Object
Returns the value of attribute ruby_def_include_dirs.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def ruby_def_include_dirs @ruby_def_include_dirs end |
#ruby_lsp ⇒ Object
Returns the value of attribute ruby_lsp.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def ruby_lsp @ruby_lsp end |
#ruby_lsp_command ⇒ Object
Returns the value of attribute ruby_lsp_command.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def ruby_lsp_command @ruby_lsp_command end |
#ruby_lsp_timeout ⇒ Object
Returns the value of attribute ruby_lsp_timeout.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def ruby_lsp_timeout @ruby_lsp_timeout end |
#search_respect_gitignore ⇒ Object
Returns the value of attribute search_respect_gitignore.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def search_respect_gitignore @search_respect_gitignore end |
#search_timeout ⇒ Object
Returns the value of attribute search_timeout.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def search_timeout @search_timeout end |
#test_command ⇒ Object
Returns the value of attribute test_command.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def test_command @test_command end |
#test_framework ⇒ Object
Returns the value of attribute test_framework.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def test_framework @test_framework end |
#test_timeout ⇒ Object
Returns the value of attribute test_timeout.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def test_timeout @test_timeout end |
#workspace_root ⇒ Object
Returns the value of attribute workspace_root.
5 6 7 |
# File 'lib/mbeditor/configuration.rb', line 5 def workspace_root @workspace_root end |