module ArchestryLookup

     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 4 chars;

#######    ########    #######    ########    ########
     #######    ########    #######    ########    ########
/ / / /    License    \ \ \ \

Copyleft culture, Copyright (C) is prohibited here This work is licensed under a CC BY-SA 4.0 Creative Commons Attribution-ShareAlike 4.0 License Refer to the creativecommons.org/licenses/by-sa/4.0/

#######    ########    #######    ########    ########

/ / / / Code Climate \ \ \ \ Language = ruby Indent = space; 2 chars;

#######    ########    #######    ########    ########

Public Class Methods

logger() click to toggle source
# File lib/tooling/log.rb, line 14
def self.logger
  @logger ||= Log.new('info')
end
run(state) click to toggle source

Files

# File lib/archestry_lookup.rb, line 22
def run(state)
  ['tooling', 'sql', 'objects', 'schema', "context/#{state[:myAppName].downcase}"].each do  |folderName|
    Dir[File.join(__dir__, "#{folderName}/**", '*.rb')].each { |file| require_relative file}                                
  end
  
  args = ArchestryLookup::Schema.getMFVSchema
  state[:timing] = Process.clock_gettime(Process::CLOCK_MONOTONIC)

  ArchestryLookup::Sql.preSql(state)
  ArchestryLookup::Sql.archestry_model_lookup(args, state)
  ArchestryLookup::Objects.lookup_post(args, state)
        
  if state[:json] == 'obj'
    return args
  else
    json = JSON.pretty_generate(args) #json = Oj.dump(args) ## NO GIT-PREFERRED PRETTY OUTPUT IN OJ
    FileUtils.rm("#{state[:json]}")
    FileUtils.mkdir_p("#{state[:jsonFolder]}")          
    File.open(state[:json], 'w') { |file| file.write(json) }
  end      
end