Module: Cure

Defined in:
lib/cure/cli/generate_command.rb,
lib/cure.rb,
lib/cure/log.rb,
lib/cure/config.rb,
lib/cure/planner.rb,
lib/cure/version.rb,
lib/cure/database.rb,
lib/cure/launcher.rb,
lib/cure/validators.rb,
lib/cure/cli/command.rb,
lib/cure/coordinator.rb,
lib/cure/dsl/builder.rb,
lib/cure/dsl/queries.rb,
lib/cure/dsl/metadata.rb,
lib/cure/dsl/template.rb,
lib/cure/dsl/exporters.rb,
lib/cure/dsl/validator.rb,
lib/cure/dsl/extraction.rb,
lib/cure/export/manager.rb,
lib/cure/extract/filter.rb,
lib/cure/cli/new_command.rb,
lib/cure/cli/run_command.rb,
lib/cure/dsl/source_files.rb,
lib/cure/extract/variable.rb,
lib/cure/builder/candidate.rb,
lib/cure/extract/extractor.rb,
lib/cure/validator/manager.rb,
lib/cure/extract/csv_lookup.rb,
lib/cure/dsl/transformations.rb,
lib/cure/extract/named_range.rb,
lib/cure/validator/base_rule.rb,
lib/cure/validator/candidate.rb,
lib/cure/builder/base_builder.rb,
lib/cure/helpers/file_helpers.rb,
lib/cure/helpers/perf_helpers.rb,
lib/cure/export/base_processor.rb,
lib/cure/extract/base_processor.rb,
lib/cure/helpers/object_helpers.rb,
lib/cure/strategy/base_strategy.rb,
lib/cure/strategy/full_strategy.rb,
lib/cure/generator/erb_generator.rb,
lib/cure/generator/hex_generator.rb,
lib/cure/strategy/match_strategy.rb,
lib/cure/strategy/regex_strategy.rb,
lib/cure/strategy/split_strategy.rb,
lib/cure/generator/base_generator.rb,
lib/cure/generator/case_generator.rb,
lib/cure/generator/eval_generator.rb,
lib/cure/generator/guid_generator.rb,
lib/cure/generator/proc_generator.rb,
lib/cure/strategy/append_strategy.rb,
lib/cure/transformation/candidate.rb,
lib/cure/transformation/transform.rb,
lib/cure/generator/faker_generator.rb,
lib/cure/strategy/contain_strategy.rb,
lib/cure/strategy/prepend_strategy.rb,
lib/cure/extract/variable_processor.rb,
lib/cure/generator/number_generator.rb,
lib/cure/generator/redact_generator.rb,
lib/cure/generator/static_generator.rb,
lib/cure/strategy/end_with_strategy.rb,
lib/cure/generator/variable_generator.rb,
lib/cure/strategy/start_with_strategy.rb,
lib/cure/extract/named_range_processor.rb,
lib/cure/generator/character_generator.rb,
lib/cure/strategy/history/history_cache.rb,
lib/cure/generator/placeholder_generator.rb

Overview

Singleton Strategy for storing data across all processes

Defined Under Namespace

Modules: Builder, Cli, Configuration, Database, Dsl, Export, Extract, Generator, Helpers, History, Log, Strategy, Transformation, Validator, Validators Classes: Coordinator, DatabaseService, DatabaseSource, Launcher, Planner

Constant Summary collapse

VERSION =
"0.4.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject (readonly)

Returns the value of attribute config.



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

def config
  @config
end

.loggerObject



20
21
22
23
24
25
26
27
# File 'lib/cure.rb', line 20

def logger
  @logger ||= Logger.new($stdout).tap do |log|
    log.progname = name
    log.formatter = proc do |severity, _datetime, _progname, msg|
      "[#{severity}] #{msg}\n"
    end
  end
end

Class Method Details

.init(&block) ⇒ Object



29
30
31
32
# File 'lib/cure.rb', line 29

def init(&block)
  launcher = Cure::Launcher.new
  launcher.with_config(&block)
end

.init_from_file(file_path) ⇒ Object



34
35
36
37
# File 'lib/cure.rb', line 34

def init_from_file(file_path)
  launcher = Cure::Launcher.new
  launcher.with_config_file(file_path)
end