Class: Mbeditor::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/mbeditor/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/mbeditor/configuration.rb', line 11

def initialize
  @allowed_environments = [:development]
  @workspace_root = nil
  @excluded_paths = %w[.git tmp log node_modules .bundle coverage vendor/bundle]
  @rubocop_command = "rubocop"
  @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      = nil # seconds; nil disables (no timeout on git subprocesses)
end

Instance Attribute Details

#allowed_environmentsObject

Returns the value of attribute allowed_environments.



5
6
7
# File 'lib/mbeditor/configuration.rb', line 5

def allowed_environments
  @allowed_environments
end

#authenticate_withObject

Returns the value of attribute authenticate_with.



5
6
7
# File 'lib/mbeditor/configuration.rb', line 5

def authenticate_with
  @authenticate_with
end

#base_branch_candidatesObject

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_pathsObject

Returns the value of attribute excluded_paths.



5
6
7
# File 'lib/mbeditor/configuration.rb', line 5

def excluded_paths
  @excluded_paths
end

#git_timeoutObject

Returns the value of attribute git_timeout.



5
6
7
# File 'lib/mbeditor/configuration.rb', line 5

def git_timeout
  @git_timeout
end

#lint_timeoutObject

Returns the value of attribute lint_timeout.



5
6
7
# File 'lib/mbeditor/configuration.rb', line 5

def lint_timeout
  @lint_timeout
end

#redmine_api_keyObject

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_enabledObject

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_sourceObject

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_urlObject

Returns the value of attribute redmine_url.



5
6
7
# File 'lib/mbeditor/configuration.rb', line 5

def redmine_url
  @redmine_url
end

#rubocop_commandObject

Returns the value of attribute rubocop_command.



5
6
7
# File 'lib/mbeditor/configuration.rb', line 5

def rubocop_command
  @rubocop_command
end

#test_commandObject

Returns the value of attribute test_command.



5
6
7
# File 'lib/mbeditor/configuration.rb', line 5

def test_command
  @test_command
end

#test_frameworkObject

Returns the value of attribute test_framework.



5
6
7
# File 'lib/mbeditor/configuration.rb', line 5

def test_framework
  @test_framework
end

#test_timeoutObject

Returns the value of attribute test_timeout.



5
6
7
# File 'lib/mbeditor/configuration.rb', line 5

def test_timeout
  @test_timeout
end

#workspace_rootObject

Returns the value of attribute workspace_root.



5
6
7
# File 'lib/mbeditor/configuration.rb', line 5

def workspace_root
  @workspace_root
end