Sha256: 4efc93675b63439d84e8342a8960f7b6b1e15dd9936c4a9747dc60efc903ab3b

Contents?: true

Size: 1.29 KB

Versions: 1

Compression:

Stored size: 1.29 KB

Contents

require 'yaml'

def git_commit message
  git add: '-A'
  git commit: "-a -m '#{message}'"
end

def root
  @root ||= File.expand_path File.dirname __FILE__
end

def read_template *path
  File.read File.join root, "templates", *path
end

def perform task
  eval File.read File.join root, "templates", "#{task}.rb"
rescue => e
  puts "error on performing #{task}"
  raise e
end

def config
  return @config if @config
  config_path = '/tmp/crosstie/config.yml'
  if File.exist? config_path
    @config = YAML.load(File.read(config_path))
    File.delete config_path
  else
    @config = {}
  end
  @config
end

perform :git_init
perform :change_source
perform :install_gems
perform :bundle_install
perform :add_gitignore
# perform :stop_robots # stop google
perform :skeleton
perform :config_timezone
perform :config_scaffold
perform :serve_static
perform :database_example
perform :figaro
perform :active_job
perform :simple_form
perform :rspec
perform :guard
perform :static_pages
perform :web_console
perform :devise
perform :rails_layout # authform for device
perform :user
# perform :ldap # who needs this
perform :controller_helpers
perform :authentication_token
perform :rolify
perform :authorization
perform :helper
perform :resources
perform :seeds
git_commit "project created"
perform :run_test
perform :run_seeds

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
crosstie-0.0.7 lib/crosstie/base.rb