geordi 3.1.0 → 4.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/.ruby-version +1 -1
  4. data/CHANGELOG.md +66 -11
  5. data/Gemfile.lock +1 -1
  6. data/README.md +127 -132
  7. data/Rakefile +18 -8
  8. data/exe/dumple +10 -0
  9. data/geordi.gemspec +1 -0
  10. data/lib/geordi/COMMAND_TEMPLATE +4 -2
  11. data/lib/geordi/cli.rb +1 -1
  12. data/lib/geordi/commands/bundle_install.rb +1 -1
  13. data/lib/geordi/commands/capistrano.rb +1 -1
  14. data/lib/geordi/commands/chromedriver_update.rb +2 -2
  15. data/lib/geordi/commands/commit.rb +1 -6
  16. data/lib/geordi/commands/console.rb +12 -6
  17. data/lib/geordi/commands/create_databases.rb +7 -5
  18. data/lib/geordi/commands/cucumber.rb +17 -12
  19. data/lib/geordi/commands/delete_dumps.rb +0 -1
  20. data/lib/geordi/commands/deploy.rb +17 -17
  21. data/lib/geordi/commands/drop_databases.rb +0 -6
  22. data/lib/geordi/commands/dump.rb +10 -19
  23. data/lib/geordi/commands/firefox.rb +3 -6
  24. data/lib/geordi/commands/migrate.rb +4 -4
  25. data/lib/geordi/commands/rake.rb +7 -3
  26. data/lib/geordi/commands/rspec.rb +8 -12
  27. data/lib/geordi/commands/security_update.rb +24 -25
  28. data/lib/geordi/commands/server.rb +4 -4
  29. data/lib/geordi/commands/setup.rb +7 -16
  30. data/lib/geordi/commands/shell.rb +7 -4
  31. data/lib/geordi/commands/tests.rb +4 -4
  32. data/lib/geordi/commands/unit.rb +3 -3
  33. data/lib/geordi/commands/update.rb +4 -15
  34. data/lib/geordi/commands/vnc.rb +2 -4
  35. data/lib/geordi/commands/with_rake.rb +3 -3
  36. data/lib/geordi/commands/yarn_install.rb +1 -1
  37. data/lib/geordi/cucumber.rb +7 -5
  38. data/lib/geordi/dump_loader.rb +1 -1
  39. data/lib/geordi/gitpt.rb +10 -52
  40. data/lib/geordi/interaction.rb +1 -1
  41. data/lib/geordi/remote.rb +16 -4
  42. data/lib/geordi/settings.rb +155 -0
  43. data/lib/geordi/util.rb +36 -18
  44. data/lib/geordi/version.rb +1 -1
  45. metadata +7 -33
  46. data/exe/cap-all +0 -4
  47. data/exe/console-for +0 -4
  48. data/exe/cuc +0 -4
  49. data/exe/cuc-show +0 -4
  50. data/exe/cuc-vnc-setup +0 -4
  51. data/exe/deploy-to-production +0 -4
  52. data/exe/dump-for +0 -8
  53. data/exe/gitpt +0 -4
  54. data/exe/load-dump +0 -4
  55. data/exe/migrate-all +0 -4
  56. data/exe/rs +0 -4
  57. data/exe/run_tests +0 -4
  58. data/exe/shell-for +0 -4
  59. data/exe/tests +0 -4
  60. data/lib/geordi/commands/eurest.rb +0 -4
data/Rakefile CHANGED
@@ -32,21 +32,31 @@ You may abbreviate commands by typing only their first letters, e.g. `geordi
32
32
  con` will boot a development console, `geordi set -t` will setup a project and
33
33
  run tests afterwards.
34
34
 
35
- For details on commands, e.g. supported options, you may always run
36
- `geordi help <command>`.
37
-
35
+ You can always run `geordi help <command>` to quickly look up command help.
38
36
  TEXT
39
37
 
40
38
  Geordi::CLI.all_commands.sort.each do |_, command|
41
- unless command.hidden?
42
- geordi_section << "### `geordi #{command.usage}`\n\n"
43
- geordi_section << "#{command.description.sub /(\.)?$/, '.'}\n\n"
44
- geordi_section << "#{command.long_description.strip}\n\n" if command.long_description
39
+ next if command.hidden?
40
+
41
+ geordi_section << "\n### `geordi #{command.usage}`\n"
42
+ geordi_section << "#{command.description.sub /(\.)?$/, '.'}\n\n"
43
+ geordi_section << "#{command.long_description.strip}\n\n" if command.long_description
44
+
45
+ if command.options.any?
46
+ geordi_section << "**Options**\n"
47
+ # Taken from thor-1.0.1/lib/thor/base.rb:557
48
+ command.options.values.each do |option|
49
+ next if option.hide
50
+
51
+ geordi_section << "- `#{option.usage}`"
52
+ geordi_section << ": #{option.description}" if option.description
53
+ geordi_section << "\n"
54
+ end
45
55
  geordi_section << "\n"
46
56
  end
47
57
  end
48
58
 
49
59
  updated_readme = readme.sub(geordi_section_regex, geordi_section)
50
60
  File.open('README.md', 'w') { |f| f.puts updated_readme.strip }
51
- puts 'README.me updated.'
61
+ puts 'README.md updated.'
52
62
  end
data/exe/dumple CHANGED
@@ -3,6 +3,7 @@
3
3
  require 'erb'
4
4
 
5
5
  fail_gently = ARGV.include?("--fail-gently")
6
+ compress = ARGV.include?("--compress")
6
7
 
7
8
  if ARGV.include?("-i")
8
9
  puts "*******************************************************"
@@ -96,6 +97,15 @@ begin
96
97
 
97
98
  system "chmod 600 #{dump_path}"
98
99
 
100
+ if compress
101
+ puts "> Compressing the dump ..."
102
+
103
+ # gzip compresses in place
104
+ compress_success = system("gzip #{dump_path}")
105
+ compress_success or raise "Compressing the dump failed"
106
+ dump_path << ".gz"
107
+ end
108
+
99
109
  dump_size_kb = (File.size(dump_path) / 1024).round
100
110
 
101
111
  puts "> Dumped to #{dump_path} (#{dump_size_kb} KB)"
@@ -27,5 +27,6 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.post_install_message = <<-ATTENTION
29
29
  * Binary `geordi` installed
30
+ * Geordi 4.0.0 has removed its deprecated executables. If you want to invoke these commands like before, you may create aliases on your machine. For the alias mapping, please refer to https://github.com/makandra/geordi/commit/68fa92acb146ebde3acb92d7b9556bd4eaa2b4ff
30
31
  ATTENTION
31
32
  end
@@ -12,14 +12,16 @@ Detailed description with anything the user needs to know.
12
12
 
13
13
  Short and long description are printed on the console AND included in the README
14
14
  by `rake update_readme`. Thus, please format descriptions in a way that's reader
15
- friendly both in Markdown and the console.
15
+ friendly both in Markdown and the console. In particular, note that simple line
16
+ breaks (\n) will be squished. Only paragraphs (\n\n) will work both on the bash
17
+ and in Markdown.
16
18
  LONGDESC
17
19
 
18
20
  option :opt, type: :boolean, aliases: '-o', banner: 'VALUE_NAME', desc: 'If set, VALUE_NAME will be used for something'
19
21
 
20
22
  def example
21
23
  # Invoke other commands like this:
22
- invoke_cmd 'other_command', 'argument', an: 'option'
24
+ invoke_geordi 'other_command', 'argument', an: 'option'
23
25
 
24
26
  Interaction.fail 'Option missing' unless options.opt?
25
27
 
@@ -18,7 +18,7 @@ module Geordi
18
18
  private
19
19
 
20
20
  # fix weird implementation of #invoke
21
- def invoke_cmd(name, *args)
21
+ def invoke_geordi(name, *args)
22
22
  options = args.last.is_a?(Hash) ? args.pop : {}
23
23
  invoke(name, args, options)
24
24
  end
@@ -2,6 +2,6 @@ desc 'bundle-install', 'Run bundle install if required', hide: true
2
2
  def bundle_install
3
3
  if File.exist?('Gemfile') && !system('bundle check > /dev/null 2>&1')
4
4
  Interaction.announce 'Bundling'
5
- Util.system! 'bundle install'
5
+ Util.run!('bundle install')
6
6
  end
7
7
  end
@@ -17,6 +17,6 @@ def capistrano(*args)
17
17
  command = "bundle exec cap #{stage} " + args.join(' ')
18
18
  Interaction.note_cmd command
19
19
 
20
- Util.system!(command, fail_message: 'Capistrano failed. Have a look!')
20
+ Util.run!(command, fail_message: 'Capistrano failed. Have a look!')
21
21
  end
22
22
  end
@@ -1,9 +1,9 @@
1
1
  desc 'chromedriver-update', 'Update the chromedriver'
2
-
3
2
  long_desc <<-LONGDESC
4
3
  Example: `geordi chromedriver_update`
5
4
 
6
- This command will find and install the matching chromedriver for the currently installed Chrome.
5
+ This command will find and install the matching chromedriver for the currently
6
+ installed Chrome.
7
7
  LONGDESC
8
8
 
9
9
  def chromedriver_update
@@ -1,15 +1,11 @@
1
1
  desc 'commit', 'Commit using a story title from Pivotal Tracker'
2
-
3
2
  long_desc <<-LONGDESC
4
3
  Example: `geordi commit`
5
4
 
6
5
  Any extra arguments are forwarded to `git commit -m <message>`.
7
6
 
8
- If there are no staged changes, prints a warning but will continue to create
9
- an empty commit.
10
-
11
7
  On the first execution we ask for your Pivotal Tracker API token. It will be
12
- stored in `~/.gitpt`.
8
+ stored in `~/.config/geordi/global.yml`.
13
9
  LONGDESC
14
10
 
15
11
  def commit(*git_args)
@@ -18,6 +14,5 @@ Unsupported Ruby Version #{RUBY_VERSION}. `geordi commit` requires Ruby 2.1+.
18
14
  TEXT
19
15
 
20
16
  require 'geordi/gitpt'
21
-
22
17
  Gitpt.new.run(git_args)
23
18
  end
@@ -1,22 +1,28 @@
1
1
  desc 'console [TARGET]', 'Open a Rails console locally or on a Capistrano deploy target'
2
2
  long_desc <<-LONGDESC
3
- Open a local Rails console: `geordi console`
3
+ Local (development): `geordi console`
4
4
 
5
- Open a Rails console on `staging`: `geordi console staging`
6
- LONGDESC
5
+ Remote: `geordi console staging`
7
6
 
7
+ Selecting the server: `geordi console staging -s` shows a menu with all available
8
+ servers. When passed a number, directly connects to the selected server.
9
+ LONGDESC
8
10
 
9
- option :select_server, default: false, type: :boolean, aliases: '-s'
11
+ # This option is duplicated in shelll.rb
12
+ option :select_server, type: :string, aliases: '-s', banner: '[SERVER_NUMBER]',
13
+ desc: 'Select a server to connect to'
10
14
 
11
15
  def console(target = 'development', *_args)
12
16
  require 'geordi/remote'
17
+ invoke_geordi 'bundle_install'
13
18
 
14
19
  if target == 'development'
15
- invoke_cmd 'yarn_install'
20
+ invoke_geordi 'yarn_install'
16
21
 
17
22
  Interaction.announce 'Opening a local Rails console'
18
23
 
19
- Util.system! Util.console_command(target)
24
+ command = Util.console_command(target)
25
+ Util.run!(command)
20
26
  else
21
27
  Interaction.announce 'Opening a Rails console on ' + target
22
28
 
@@ -1,15 +1,17 @@
1
1
  desc 'create-databases', 'Create all databases', hide: true
2
2
  def create_databases
3
- invoke_cmd 'create_database_yml'
4
- invoke_cmd 'bundle_install'
3
+ invoke_geordi 'create_database_yml'
4
+ invoke_geordi 'bundle_install'
5
5
 
6
6
  Interaction.announce 'Creating databases'
7
7
 
8
8
  if File.exist?('config/database.yml')
9
- command = 'bundle exec rake db:create:all'
10
- command << ' parallel:create' if Util.file_containing?('Gemfile', /parallel_tests/)
9
+ command = []
10
+ command << Util.binstub_or_fallback('rake')
11
+ command << 'db:create:all'
12
+ command << 'parallel:create' if Util.file_containing?('Gemfile', /parallel_tests/)
11
13
 
12
- Util.system! command
14
+ Util.run!(command)
13
15
  else
14
16
  puts 'config/database.yml does not exist. Nothing to do.'
15
17
  end
@@ -2,19 +2,24 @@ desc 'cucumber [FILES and OPTIONS]', 'Run Cucumber features'
2
2
  long_desc <<-LONGDESC
3
3
  Example: `geordi cucumber features/authentication_feature:3`
4
4
 
5
- Runs Cucumber as you want: with `bundle exec`, using parallel tests, with
6
- a VNC session holding Selenium test browsers, support for using a dedicated
7
- testing firefox and beta support for rerunning failed scenarios.
5
+ Runs Cucumber with `bundle exec`, using parallel tests, with a VNC session
6
+ holding Selenium test browsers, support for using a dedicated testing browser
7
+ and beta support for re-running failed scenarios.
8
8
 
9
9
  - *@solo:* Generally, features are run in parallel. However, scenarios tagged
10
- with @solo are excluded and will be run sequentially, _after_ the parallel run.
10
+ with @solo are excluded from the parallel run and executed sequentially instead.
11
11
 
12
- - *Debugging:* Sometimes, the dot-printing Cucumber formatter does not show
13
- errors. In case a feature fails without a message, try running it with `--debug`
14
- or `-d`.
12
+ - *Debugging:* In some cases, the dot-printing Cucumber formatter swallows
13
+ errors. In case a feature fails without an error message, try running it with
14
+ `--debug` or `-d`.
15
15
 
16
16
  - *Options:* Any unknown option will be passed through to Cucumber,
17
- e.g. `--format pretty`.
17
+ e.g. `--format=pretty`. Make sure to connect option and value with an equals
18
+ sign, i.e. have each option a contiguous string.
19
+
20
+ - *VNC:* By default, test browsers will run in a VNC session. When using a
21
+ headless test browser anyway, you can disable VNC by setting `use_vnc: false`
22
+ in `.geordi.yml` in the project root.
18
23
  LONGDESC
19
24
 
20
25
  option :modified, aliases: '-m', type: :boolean,
@@ -22,9 +27,9 @@ option :modified, aliases: '-m', type: :boolean,
22
27
  option :containing, aliases: '-c', banner: 'STRING',
23
28
  desc: 'Run all features that contain STRING'
24
29
  option :verbose, aliases: '-v', type: :boolean,
25
- desc: 'Print the testrun command'
30
+ desc: 'Show the test run command'
26
31
  option :debug, aliases: '-d', type: :boolean,
27
- desc: 'Run with `-f pretty -b` which helps hunting down bugs'
32
+ desc: 'Run Cucumber with `-f pretty -b`, which helps hunting down bugs'
28
33
  option :rerun, aliases: '-r', type: :numeric, default: 0,
29
34
  desc: 'Rerun features up to N times while failing'
30
35
 
@@ -48,8 +53,8 @@ def cucumber(*args)
48
53
  if File.directory?('features')
49
54
  require 'geordi/cucumber'
50
55
 
51
- invoke_cmd 'bundle_install'
52
- invoke_cmd 'yarn_install'
56
+ invoke_geordi 'bundle_install'
57
+ invoke_geordi 'yarn_install'
53
58
 
54
59
  cmd_opts, files = args.partition { |f| f.start_with? '-' }
55
60
  cmd_opts << '--format' << 'pretty' << '--backtrace' if options.debug
@@ -7,7 +7,6 @@ no argument is given, two default directories are searched for dump files: the
7
7
  current working directory and `~/dumps` (for dumps created with geordi).
8
8
 
9
9
  Geordi will ask for confirmation before actually deleting files.
10
-
11
10
  LONGDESC
12
11
 
13
12
  def delete_dumps(dump_directory = nil)
@@ -5,18 +5,18 @@ Example: `geordi deploy` or `geordi deploy p[roduction]` or `geordi deploy --cur
5
5
  Merge, push and deploy with a single command! **It always tells what it will do
6
6
  before it does it.** There are different scenarios where this command is handy:
7
7
 
8
- 1) *Production deploy:* From the master branch, run `geordi deploy production`.
9
- This will merge `master` to `production`, push and deploy to production.
8
+ - *Production deploy:* From the master branch, run `geordi deploy production`.
9
+ This will merge `master` to `production`, push and deploy to production.
10
10
 
11
- 2) *Feature branch deploy:* From a feature branch, run `geordi deploy staging`.
12
- This will merge the feature branch to `master`, push and deploy to staging.
11
+ - *Feature branch deploy:* From a feature branch, run `geordi deploy staging`.
12
+ This will merge the feature branch to `master`, push and deploy to staging.
13
13
 
14
- To deploy a feature branch directly without merging, run
15
- `geordi deploy --current-branch`. This feature depends on the environment
16
- variable `DEPLOY_BRANCH` to be picked up in the respective deploy file.
14
+ To deploy a feature branch directly without merging, run
15
+ `geordi deploy --current-branch`. This feature depends on the environment
16
+ variable `DEPLOY_BRANCH` to be picked up in the respective deploy file.
17
17
 
18
- 3) *Simple deploy:* If the source branch matches the target branch, merging will
19
- be skipped.
18
+ - *Simple deploy:* If the source branch matches the target branch, merging will
19
+ be skipped.
20
20
 
21
21
  Calling the command without arguments will infer the target stage from the
22
22
  current branch and fall back to master/staging.
@@ -66,7 +66,7 @@ set :branch, ENV['DEPLOY_BRANCH'] || 'master'
66
66
  push_needed = false if Util.testing? # Hard to test
67
67
 
68
68
  Interaction.announce "Checking whether your #{source_branch} branch is ready" ############
69
- Util.system! "git checkout #{source_branch}"
69
+ Util.run!("git checkout #{source_branch}")
70
70
  if (`git status -s | wc -l`.strip != '0') && !Util.testing?
71
71
  Interaction.warn "Your #{source_branch} branch holds uncommitted changes."
72
72
  Interaction.prompt('Continue anyway?', 'n', /y|yes/) || raise('Cancelled.')
@@ -76,14 +76,14 @@ set :branch, ENV['DEPLOY_BRANCH'] || 'master'
76
76
 
77
77
  if merge_needed
78
78
  Interaction.announce "Checking what's in your #{target_branch} branch right now" #######
79
- Util.system! "git checkout #{target_branch} && git pull"
79
+ Util.run!("git checkout #{target_branch} && git pull")
80
80
  end
81
81
 
82
82
  Interaction.announce 'You are about to:' #################################################
83
83
  Interaction.note "Merge branch #{source_branch} into #{target_branch}" if merge_needed
84
84
  if push_needed
85
85
  Interaction.note 'Push these commits:' if push_needed
86
- Util.system! "git --no-pager log origin/#{target_branch}..#{source_branch} --oneline"
86
+ Util.run!("git --no-pager log origin/#{target_branch}..#{source_branch} --oneline")
87
87
  end
88
88
  Interaction.note "Deploy to #{target_stage}"
89
89
  Interaction.note "From current branch #{source_branch}" if options.current_branch
@@ -94,22 +94,22 @@ set :branch, ENV['DEPLOY_BRANCH'] || 'master'
94
94
  git_call << "git merge #{source_branch}" if merge_needed
95
95
  git_call << 'git push' if push_needed
96
96
 
97
+ invoke_geordi 'bundle_install'
98
+
97
99
  capistrano_call = "cap #{target_stage} deploy"
98
100
  capistrano_call << ':migrations' unless Util.gem_major_version('capistrano') == 3 || options.no_migrations
99
101
  capistrano_call = "bundle exec #{capistrano_call}" if Util.file_containing?('Gemfile', /capistrano/)
100
102
  capistrano_call = "DEPLOY_BRANCH=#{source_branch} #{capistrano_call}" if options.current_branch
101
103
 
102
104
  if git_call.any?
103
- Util.system! git_call.join(' && '), show_cmd: true
105
+ Util.run!(git_call.join(' && '), show_cmd: true)
104
106
  end
105
107
 
106
- invoke_cmd 'bundle_install'
107
-
108
- Util.system! capistrano_call, show_cmd: true
108
+ Util.run!(capistrano_call, show_cmd: true)
109
109
 
110
110
  Interaction.success 'Deployment complete.'
111
111
  else
112
- Util.system! "git checkout #{source_branch}"
112
+ Util.run!("git checkout #{source_branch}")
113
113
  Interaction.fail 'Deployment cancelled.'
114
114
  end
115
115
  end
@@ -7,12 +7,6 @@ and offer to delete them. Excluded are databases that are whitelisted. This come
7
7
  in handy when you're keeping your currently active projects in the whitelist files
8
8
  and perform regular housekeeping with Geordi.
9
9
 
10
- When called with `-P` or `-M` options, only handles Postgres resp. MySQL/MariaDB.
11
-
12
- When called with `--postgres <port or local socket>` or `--mysql <port or local socket>`,
13
- will instruct the underlying management commands to use those connection methods
14
- instead of the defaults. This is useful when running multiple installations.
15
-
16
10
  Geordi will ask for confirmation before actually dropping databases and will
17
11
  offer to edit the whitelist instead.
18
12
  LONGDESC
@@ -1,27 +1,18 @@
1
- desc 'dump [TARGET]', 'Handle dumps (see `geordi help dump` for details)'
1
+ desc 'dump [TARGET]', 'Handle (remote) database dumps'
2
2
  long_desc <<-DESC
3
- When called without arguments, dumps the development database with `dumple`.
3
+ `geordi dump` (without arguments) dumps the development database with `dumple`.
4
4
 
5
- geordi dump
5
+ `geordi dump -l tmp/staging.dump` (with the `--load` option) sources the
6
+ specified dump file into the development database.
6
7
 
7
- When called with the `--load` option, sources the specified dump into the
8
- development database.
8
+ `geordi dump staging` (with a Capistrano deploy target) remotely dumps the
9
+ specified target's database and downloads it to `tmp/`.
9
10
 
10
- geordi dump -l tmp/staging.dump
11
-
12
- When called with a capistrano deploy target (e.g. `staging`), remotely dumps
13
- the specified target's database and downloads it to `tmp/`.
14
-
15
- geordi dump staging
16
-
17
- When called with a capistrano deploy target and the `--load` option, sources the
18
- dump into the development database after downloading it.
19
-
20
- geordi dump staging -l
11
+ `geordi dump staging -l` (with a Capistrano deploy target and the `--load`
12
+ option) sources the dump into the development database after downloading it.
21
13
  DESC
22
14
 
23
- option :load, aliases: ['-l'], type: :string, desc: 'Load a dump'
24
- option :select_server, default: false, type: :boolean, aliases: '-s'
15
+ option :load, aliases: '-l', type: :string, desc: 'Load a dump', banner: '[DUMP_FILE]'
25
16
 
26
17
  def dump(target = nil, *_args)
27
18
  require 'geordi/dump_loader'
@@ -42,7 +33,7 @@ def dump(target = nil, *_args)
42
33
 
43
34
  else
44
35
  Interaction.announce 'Dumping the development database'
45
- Util.system! 'dumple development'
36
+ Util.run!('dumple development')
46
37
  Interaction.success 'Successfully dumped the development database.'
47
38
  end
48
39
 
@@ -3,11 +3,8 @@ long_desc <<-LONGDESC
3
3
  Example: `geordi firefox b cucumber` or `geordi firefox --setup 24.0`
4
4
 
5
5
  Useful when you need Firefox for Selenium or the VNC set up, but can't use the
6
- `geordi cucumber` command.
7
-
8
- *Install* a special Firefox by calling with `--setup <version>`.
9
-
10
- This command is aliased `chrome` for users running Selenium in Chrome.
6
+ `geordi cucumber` command. This command is aliased `chrome` for users running
7
+ Selenium in Chrome.
11
8
  LONGDESC
12
9
 
13
10
  option :setup, banner: 'FIREFOX_VERSION',
@@ -28,7 +25,7 @@ def firefox(*command)
28
25
 
29
26
  puts
30
27
  Interaction.note_cmd command.join(' ')
31
- system *command # Util.system! would reset the Firefox PATH
28
+ system *command # Util.run! would reset the Firefox PATH
32
29
  end
33
30
  end
34
31
 
@@ -8,8 +8,8 @@ with `db:migrate`.
8
8
  LONGDESC
9
9
 
10
10
  def migrate
11
- invoke_cmd 'bundle_install'
12
- invoke_cmd 'yarn_install'
11
+ invoke_geordi 'bundle_install'
12
+ invoke_geordi 'yarn_install'
13
13
  Interaction.announce 'Migrating'
14
14
 
15
15
  if File.directory?('db/migrate')
@@ -17,9 +17,9 @@ def migrate
17
17
  Interaction.note 'Development and parallel test databases'
18
18
  puts
19
19
 
20
- Util.system! 'bundle exec rake db:migrate parallel:prepare'
20
+ Util.run!([Util.binstub_or_fallback('rake'), 'db:migrate', 'parallel:prepare'])
21
21
  else
22
- invoke_cmd 'rake', 'db:migrate'
22
+ invoke_geordi 'rake', 'db:migrate'
23
23
  end
24
24
  else
25
25
  Interaction.note 'No migrations directory found.'