Sha256: 33165583e873bb341d322090bcf405cdbdf6cb6aa7d045b33bb987e96874da40

Contents?: true

Size: 1015 Bytes

Versions: 29

Compression:

Stored size: 1015 Bytes

Contents

desc 'setup', 'Setup a project for the first time'
long_desc <<-LONGDESC
Example: `geordi setup`

Check out a repository and cd into its directory. Then let `setup` do the tiring
work: run `bundle install`, create `database.yml`, create databases, migrate
(all if applicable).

If a local bin/setup file is found, Geordi skips its routine and runs bin/setup
instead.
LONGDESC

option :dump, type: :string, aliases: '-d', banner: 'TARGET',
  desc: 'After setup, dump the TARGET db and source it into the development db'
option :test, type: :boolean, aliases: '-t', desc: 'After setup, run tests'

def setup
  if File.exist? 'bin/setup'
    Interaction.announce 'Running bin/setup'
    Interaction.note "Geordi's own setup routine is skipped"

    Util.run!('bin/setup')
  else
    invoke_geordi 'create_databases'
    invoke_geordi 'migrate'
  end

  Interaction.success 'Successfully set up the project.'

  invoke_geordi 'dump', options.dump, load: true if options.dump
  invoke_geordi 'tests' if options.test
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
geordi-9.5.1 lib/geordi/commands/setup.rb
geordi-9.5.0 lib/geordi/commands/setup.rb
geordi-9.4.1 lib/geordi/commands/setup.rb
geordi-9.4.0 lib/geordi/commands/setup.rb
geordi-9.3.1 lib/geordi/commands/setup.rb
geordi-9.3.0 lib/geordi/commands/setup.rb
geordi-9.2.0 lib/geordi/commands/setup.rb
geordi-9.1.0 lib/geordi/commands/setup.rb
geordi-9.0.0 lib/geordi/commands/setup.rb
geordi-8.0.0 lib/geordi/commands/setup.rb
geordi-7.0.2 lib/geordi/commands/setup.rb
geordi-7.0.1 lib/geordi/commands/setup.rb
geordi-7.0.0 lib/geordi/commands/setup.rb
geordi-6.1.0 lib/geordi/commands/setup.rb
geordi-6.0.1 lib/geordi/commands/setup.rb
geordi-6.0.0 lib/geordi/commands/setup.rb
geordi-6.0.0.pre.rc1 lib/geordi/commands/setup.rb
geordi-5.4.0 lib/geordi/commands/setup.rb
geordi-5.3.0 lib/geordi/commands/setup.rb
geordi-5.2.4 lib/geordi/commands/setup.rb