Sha256: 12dc615947f2cf8b9173815e223dd387cab042c03ebce9e3993644b1c94ae1cf
Contents?: true
Size: 1.21 KB
Versions: 5
Compression:
Stored size: 1.21 KB
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 these steps runs bin/setup for setup instead. After setting up, loads a remote database 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 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.system! 'bin/setup' else invoke_cmd 'create_databases' invoke_cmd 'migrate' end Interaction.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
5 entries across 5 versions & 1 rubygems