Module: FilePattern::Constants

Includes:
Regexp::Constants
Included in:
FilePattern
Defined in:
app/models/file_pattern.rb,
app/models/file_pattern.rb

Constant Summary collapse

Patterns =

ordered from ambiguous to specific, common to rare

[
{:suffix =>'.rb', :name => :model, :sub_directory => 'app/models/'}, 
{:suffix =>'_test.rb', :name => :test, :sub_directory => 'test/unit/'}, 
{:suffix =>'.rb', :name => :script, :sub_directory => 'script/'}, 
{:suffix =>'_test.rb', :name => :integration_test, :sub_directory => 'test/integration/'}, 
{:suffix =>'_test.rb', :name => :long_test, :sub_directory => 'test/long_test/'}, 
{:suffix =>'_assertions.rb', :name => :assertions, :sub_directory => 'test/assertions/'}, 
{:suffix =>'_assertions_test.rb', :name => :assertions_test, :sub_directory => 'test/unit/'}
]
All =
Patterns.map {|s| FilePattern.new(s)}
Directory_delimiter =
/\//
Basename_character_regexp =
/[[:word:]\. -]/
Basename_regexp =
Basename_character_regexp*Many
Pathname_character_regexp =
/[[:word:]\. \/-]/
Relative_pathname_regexp =
Start_string*Pathname_character_regexp*Many*End_string
Absolute_pathname_regexp =
Start_string*Directory_delimiter*Pathname_character_regexp*Many*End_string
Relative_directory_regexp =
Start_string*Pathname_character_regexp*Many*End_string
Absolute_directory_regexp =
Start_string*Directory_delimiter*Pathname_character_regexp*Many*End_string
Project_root_directory =
FilePattern.project_root_dir?($0)

Constants included from Regexp::Constants

Regexp::Constants::Any, Regexp::Constants::Any_binary_char_string, Regexp::Constants::Default_options, Regexp::Constants::End_string, Regexp::Constants::End_string_less_newline, Regexp::Constants::Many, Regexp::Constants::Optional, Regexp::Constants::Start_string