Sha256: 5fe22a83f45d4424e6ed81c9246c08ff545802a5b5425db37eb1f4931d862fc0

Contents?: true

Size: 1.1 KB

Versions: 87

Compression:

Stored size: 1.1 KB

Contents

# Boot Sequence

include KLog::Logging

CONFIG_KEY = :rails_app_generator

log.kv 'working folder', Dir.pwd

KConfig.configure do |config|
  config.handlebars.defaults.add_all_defaults
end

def k_builder
  @k_builder ||= KBuilder::BaseBuilder.init(KConfig.configuration(CONFIG_KEY))
end

KConfig.configure(CONFIG_KEY) do |config|
  builder_folder    = Dir.pwd
  base_folder       = File.expand_path('../', builder_folder)
  global_template   = File.expand_path('~/dev/kgems/k_templates/templates')

  config.template_folders.add(:global_template    , global_template)
  config.template_folders.add(:template           , File.expand_path('.templates', Dir.pwd))

  config.target_folders.add(:app                  , base_folder)
  config.target_folders.add(:docs                 , :app, 'docs')
  config.target_folders.add(:builder              , builder_folder)
end

KConfig.configuration(CONFIG_KEY).debug

area = KManager.add_area(CONFIG_KEY)
resource_manager = area.resource_manager
resource_manager
  .fileset
  .glob('*.rb', exclude: ['boot.rb'])
  .glob('generators/**/*.rb')
resource_manager.add_resources

KManager.boot

Version data entries

87 entries across 87 versions & 1 rubygems

Version Path
rails_app_generator-0.3.6 .builders/boot.rb
rails_app_generator-0.3.5 .builders/boot.rb
rails_app_generator-0.3.4 .builders/boot.rb
rails_app_generator-0.3.3 .builders/boot.rb
rails_app_generator-0.3.2 .builders/boot.rb
rails_app_generator-0.3.1 .builders/boot.rb
rails_app_generator-0.3.0 .builders/boot.rb
rails_app_generator-0.2.43 .builders/boot.rb
rails_app_generator-0.2.42 .builders/boot.rb
rails_app_generator-0.2.41 .builders/boot.rb
rails_app_generator-0.2.40 .builders/boot.rb
rails_app_generator-0.2.39 .builders/boot.rb
rails_app_generator-0.2.38 .builders/boot.rb
rails_app_generator-0.2.37 .builders/boot.rb
rails_app_generator-0.2.36 .builders/boot.rb
rails_app_generator-0.2.35 .builders/boot.rb
rails_app_generator-0.2.34 .builders/boot.rb
rails_app_generator-0.2.33 .builders/boot.rb
rails_app_generator-0.2.32 .builders/boot.rb
rails_app_generator-0.2.31 .builders/boot.rb