Class: Shards::Workflow::ByApi

Inherits:
Base
  • Object
show all
Defined in:
lib/shards/workflow/by_api.rb

Direct Known Subclasses

CreateByApi, DeleteByApi, FingerprintsByApi

Instance Attribute Summary collapse

Attributes inherited from Base

#answer, #blank_db, #client, #config, #current_loop, #domain, #flow, #location, #params, #pointer, #pointer_history, #site, #stage, #step, #success, #wf

Instance Method Summary collapse

Methods inherited from Base

#add_ask_blank_db_step, #application_reload_shards_task, #ask_blank_db, #ask_for_exit, #ask_for_exit_and_restart, #ask_for_repeat, #ask_question, #check_database_presence_in_server, #check_domain_dns_presence, #check_domain_presence_in_sites, #check_fingerprints, #check_fingerprints2, #check_shard_presence_in_shards, #choose_one, #clean_repo_and_exit, #commit_changes, #create_database, #decamelize, #default_path, #dns_upsert, #file, #finish_successfully, #format_options, #get_file, #host, #initialize, #loop_step, #path, #previous_pointer, #puppet_agent_update, #raise_wrong_text, #run_step, #shared_file, #shared_steps, #start, #start_at, #validate_blank_db_shard, #validate_client, #validate_domain, #validate_in_index, #validate_location, #validate_min_size, #validate_regex, #validate_stage, #validation, #yaml

Constructor Details

This class inherits a constructor from Shards::Workflow::Base

Instance Attribute Details

#logObject

Returns the value of attribute log.



8
9
10
# File 'lib/shards/workflow/by_api.rb', line 8

def log
  @log
end

Instance Method Details

#output_message(message) ⇒ Object



16
17
18
19
# File 'lib/shards/workflow/by_api.rb', line 16

def output_message message
  @log||="The Shards Gem is starting a workflow by API\n"
  @log << "#{pointer} -> #{message} #{Time.now.to_s}\n"
end

#write_yaml_filesObject



10
11
12
13
14
# File 'lib/shards/workflow/by_api.rb', line 10

def write_yaml_files
  stage.add_domain domain
  site.add_site
  output_message config.repo.diff
end