Module: Devtools

Defined in:
lib/devtools.rb,
lib/devtools.rb,
lib/devtools/flay.rb,
lib/devtools/config.rb,
lib/devtools/project.rb,
lib/devtools/rake/flay.rb,
lib/devtools/project/initializer.rb,
lib/devtools/project/initializer/rake.rb,
lib/devtools/project/initializer/rspec.rb

Overview

Devtools self initialization

Defined Under Namespace

Modules: Flay, Rake Classes: Config, Project

Constant Summary collapse

ROOT =
Pathname.new(__FILE__).parent.parent.freeze
PROJECT_ROOT =
Pathname.pwd.freeze
SHARED_PATH =
ROOT.join('shared').freeze
SHARED_SPEC_PATH =
SHARED_PATH.join('spec').freeze
DEFAULT_CONFIG_PATH =
ROOT.join('default/config').freeze
RAKE_FILES_GLOB =
ROOT.join('tasks/**/*.rake').to_s.freeze
LIB_DIRECTORY_NAME =
'lib'.freeze
SPEC_DIRECTORY_NAME =
'spec'.freeze
RAKE_FILE_NAME =
'Rakefile'.freeze
SHARED_SPEC_PATTERN =
'{shared,support}/**/*.rb'.freeze
UNIT_TEST_PATH_REGEXP =
%r{\bspec/unit/}.freeze
DEFAULT_CONFIG_DIR_NAME =
'config'.freeze
PROJECT =

The project devtools is active for

Project.new(PROJECT_ROOT)

Class Method Summary collapse

Class Method Details

.init_rake_tasksself

Initialize project and load tasks

Should only be called from your $application_root/Rakefile

Returns:

  • (self)


56
57
58
59
# File 'lib/devtools.rb', line 56

def self.init_rake_tasks
  Project::Initializer::Rake.call
  self
end

.notify_metric_violation(msg) ⇒ undefined

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

React to metric violation

Parameters:

  • msg (String)

Returns:

  • (undefined)


45
46
47
# File 'lib/devtools.rb', line 45

def self.notify_metric_violation(msg)
  abort(msg)
end

.projectProject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return project

Returns:



75
76
77
# File 'lib/devtools.rb', line 75

def self.project
  PROJECT
end

.rootPathname

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return devtools root path

Returns:

  • (Pathname)


66
67
68
# File 'lib/devtools.rb', line 66

def self.root
  ROOT
end