Sha256: 9a04f8219ca666bf60b399a3c6e5aaeae1238a377e415d5054b30c7d37e6bb2d

Contents?: true

Size: 995 Bytes

Versions: 40

Compression:

Stored size: 995 Bytes

Contents

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

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

After setting up, loads a dump into the development db when called with the
`--dump` option:

    geordi setup -d staging

After setting up, runs all tests when called with the `--test` option:

    geordi setup -t

See `geordi help setup` for details.
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
  invoke_cmd 'create_databases'
  invoke_cmd 'migrate'

  success 'Successfully set up the project.'

  invoke_cmd 'dump', options.dump, :load => true if options.dump
  invoke_cmd 'tests' if options.test
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
geordi-2.4.0 lib/geordi/commands/setup.rb
geordi-2.3.0 lib/geordi/commands/setup.rb
geordi-2.2.0 lib/geordi/commands/setup.rb
geordi-2.1.0 lib/geordi/commands/setup.rb
geordi-2.0.0 lib/geordi/commands/setup.rb
geordi-1.10.0 lib/geordi/commands/setup.rb
geordi-1.9.1 lib/geordi/commands/setup.rb
geordi-1.9.0 lib/geordi/commands/setup.rb
geordi-1.8.0 lib/geordi/commands/setup.rb
geordi-1.7.1 lib/geordi/commands/setup.rb
geordi-1.7.0 lib/geordi/commands/setup.rb
geordi-1.6.5 lib/geordi/commands/setup.rb
geordi-1.6.4 lib/geordi/commands/setup.rb
geordi-1.6.3 lib/geordi/commands/setup.rb
geordi-1.6.2 lib/geordi/commands/setup.rb
geordi-1.6.1 lib/geordi/commands/setup.rb
geordi-1.6.0 lib/geordi/commands/setup.rb
geordi-1.5.2 lib/geordi/commands/setup.rb
geordi-1.5.1 lib/geordi/commands/setup.rb
geordi-1.5.0 lib/geordi/commands/setup.rb