geordi 3.2.0 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +5 -0
  4. data/CHANGELOG.md +69 -1
  5. data/Gemfile +2 -1
  6. data/Gemfile.lock +46 -28
  7. data/README.md +132 -140
  8. data/Rakefile +19 -9
  9. data/exe/dumple +19 -4
  10. data/geordi.gemspec +3 -2
  11. data/lib/geordi/COMMAND_TEMPLATE +4 -2
  12. data/lib/geordi/chromedriver_updater.rb +2 -2
  13. data/lib/geordi/cli.rb +1 -1
  14. data/lib/geordi/commands/bundle_install.rb +1 -1
  15. data/lib/geordi/commands/capistrano.rb +1 -1
  16. data/lib/geordi/commands/chromedriver_update.rb +10 -3
  17. data/lib/geordi/commands/commit.rb +0 -5
  18. data/lib/geordi/commands/console.rb +11 -13
  19. data/lib/geordi/commands/create_databases.rb +7 -5
  20. data/lib/geordi/commands/cucumber.rb +22 -19
  21. data/lib/geordi/commands/delete_dumps.rb +0 -1
  22. data/lib/geordi/commands/deploy.rb +17 -17
  23. data/lib/geordi/commands/drop_databases.rb +0 -6
  24. data/lib/geordi/commands/dump.rb +20 -18
  25. data/lib/geordi/commands/firefox.rb +3 -6
  26. data/lib/geordi/commands/migrate.rb +4 -4
  27. data/lib/geordi/commands/rake.rb +7 -3
  28. data/lib/geordi/commands/rspec.rb +8 -12
  29. data/lib/geordi/commands/security_update.rb +24 -25
  30. data/lib/geordi/commands/server.rb +4 -4
  31. data/lib/geordi/commands/setup.rb +7 -16
  32. data/lib/geordi/commands/shell.rb +7 -8
  33. data/lib/geordi/commands/tests.rb +4 -4
  34. data/lib/geordi/commands/unit.rb +3 -3
  35. data/lib/geordi/commands/update.rb +4 -15
  36. data/lib/geordi/commands/vnc.rb +2 -4
  37. data/lib/geordi/commands/with_rake.rb +3 -3
  38. data/lib/geordi/commands/yarn_install.rb +1 -1
  39. data/lib/geordi/cucumber.rb +3 -3
  40. data/lib/geordi/dump_loader.rb +1 -1
  41. data/lib/geordi/gitpt.rb +1 -1
  42. data/lib/geordi/interaction.rb +1 -1
  43. data/lib/geordi/remote.rb +5 -4
  44. data/lib/geordi/settings.rb +11 -2
  45. data/lib/geordi/util.rb +35 -17
  46. data/lib/geordi/version.rb +1 -1
  47. metadata +7 -34
  48. data/exe/cap-all +0 -4
  49. data/exe/console-for +0 -4
  50. data/exe/cuc +0 -4
  51. data/exe/cuc-show +0 -4
  52. data/exe/cuc-vnc-setup +0 -4
  53. data/exe/deploy-to-production +0 -4
  54. data/exe/dump-for +0 -8
  55. data/exe/gitpt +0 -4
  56. data/exe/load-dump +0 -4
  57. data/exe/migrate-all +0 -4
  58. data/exe/rs +0 -4
  59. data/exe/run_tests +0 -4
  60. data/exe/shell-for +0 -4
  61. data/exe/tests +0 -4
  62. data/lib/geordi/commands/eurest.rb +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e775f88b224275cf01077937ba959b27666c1ae7ac18b58548a62bfa31161a12
4
- data.tar.gz: 4e0efdb89bbf65b69a9753e8e05978b094915b613b1ded6ef1c1ea4716be0ea7
3
+ metadata.gz: 7c5a8befcc3bb1f14b4bd0803491b56ccb7db92daf47aa45eb73f359988ab768
4
+ data.tar.gz: 244b132d249d3e0d0d851ad79bae5890736e52f202a7bb2bf0c80b3a6d821195
5
5
  SHA512:
6
- metadata.gz: 56146e32a18966efbe63a58074d158b888410cf19520150d175f3220be709820b7b05ed6f95df5f80993ed163ba9b59232f1d1f67c3bd43d2055e9b2d66cd812
7
- data.tar.gz: e8e41bb61713a5f32dd4039cadee5b11a9f08bac20cad738e61975ea741bfd76cdf5e2d64a166579e701eda472f95f4f8ce15da27181fa0a8b11b748f5d222d3
6
+ metadata.gz: 3f57ac5bb0f1e804e2d53ab30e0b5c3742835eabfd5d58755dd4a06b55d5065bc0f3fa7b4d00bca9b4f72ae2329042339203ced4336830c534585e684241570c
7
+ data.tar.gz: 52c77c467efc9ecf3fc8f26dc713b38d26e79977a55604921ffe62b1f2808562e9f770d0c11ba59045f595df54d07c3a91b8b926361ae00e0330625bc3418c75
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.5
@@ -8,12 +8,17 @@ rvm:
8
8
  - '2.4.10'
9
9
  - '2.5.8'
10
10
  - '2.6.6'
11
+ - '2.7.1'
11
12
 
12
13
  gemfile:
13
14
  - 'Gemfile'
14
15
 
15
16
  dist: trusty
16
17
 
18
+ before_install:
19
+ - sudo apt-get install -y vnc4server
20
+ # Fake required password for vncserver
21
+ - mkdir ~/.vnc && touch ~/.vnc/passwd && chmod 700 ~/.vnc/passwd
17
22
  install:
18
23
  - gem install bundler:1.17.3
19
24
  # Replace default Travis CI bundler script with a version that doesn't
@@ -4,13 +4,81 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
-
8
7
  ## Unreleased
9
8
 
10
9
  ### Compatible changes
11
10
  ### Breaking changes
12
11
 
13
12
 
13
+ ## 4.2.0 2020-10-02
14
+
15
+ ### Compatible changes
16
+ * Add `auto_update_chromedriver` as global setting option to automatically update chromedriver before cucumber
17
+ tests, if Chrome and chromedriver versions don't match.
18
+ * Dump command: Add support for multiple databases (#103 by @kajatiger)
19
+ * Add Ruby 2.7 to list of supported Ruby versions
20
+ * Fix #115: `geordi cucumber --modified` command, that corrupted filenames like:
21
+ ```
22
+ No such file or directory tures/pages.feature
23
+ ```
24
+ * Avoid writing an instance of HighLine::String to Geordi config files (closes #114)
25
+
26
+
27
+ ## 4.1.1 2020-08-28
28
+ ### Compatible changes
29
+
30
+ * Fixed: System calls are not executed properly if no bin stub is present. This resulted in errors like:
31
+
32
+ ```
33
+ % geordi rspec
34
+
35
+ # Running specs
36
+ > All specs at once (using parallel_tests)
37
+
38
+ x Specs failed.
39
+ ```
40
+
41
+ or
42
+
43
+ ```
44
+ % geordi migrate
45
+
46
+ # Migrating
47
+ > Development and parallel test databases
48
+
49
+ x Something went wrong.
50
+ ```
51
+
52
+
53
+ ## 4.1.0 2020-08-18
54
+
55
+ ### Compatible changes
56
+
57
+ - Added dumple option `--compress` to compress after dumping
58
+
59
+ ## 4.0.1 2020-08-11
60
+
61
+ ### Compatible changes
62
+
63
+ - Fix `geordi migrate` command, that fails with:
64
+
65
+ ```
66
+ Don't know how to build task 'db:migrate parallel:prepare'
67
+ ```
68
+
69
+
70
+ ## 4.0.0 2020-07-30
71
+
72
+ ### Compatible changes
73
+ - Improved documentation; README now includes command options.
74
+ - Fix #90: `geordi console`, `geordi deploy`, `geordi rake` and `geordi shell` now work correctly if the project hasn't been bundled before
75
+
76
+ ### Breaking changes
77
+ - Removed deprecated executables
78
+ - Removed `eurest` command
79
+ - Respect binstubs if available, otherwise fallback to geordi's previous behaviour. Note that this might cause failures, when your binstubs are not working. Please have a look at #109 for how a failure might look like and how you can fix it.
80
+
81
+
14
82
  ## 3.2.0 2020-07-15
15
83
 
16
84
  ### Compatible changes
data/Gemfile CHANGED
@@ -3,7 +3,8 @@ source 'http://rubygems.org'
3
3
  # Specify your gem's dependencies in geordi.gemspec
4
4
  gemspec
5
5
 
6
- gem 'aruba'
6
+ gem 'aruba', '< 1' # Drops support for Ruby 2.2-
7
+ gem 'rake', '< 13' # Drops support for Ruby 2.1
7
8
  gem 'rspec-mocks'
8
9
  gem 'highline'
9
10
  gem 'parallel_tests'
@@ -1,76 +1,93 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- geordi (3.2.0)
4
+ geordi (4.1.1)
5
5
  thor (~> 1)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- addressable (2.3.8)
11
- aruba (0.6.2)
12
- childprocess (>= 0.3.6)
13
- cucumber (>= 1.1.1)
14
- rspec-expectations (>= 2.7.0)
10
+ addressable (2.7.0)
11
+ public_suffix (>= 2.0.2, < 5.0)
12
+ aruba (0.14.14)
13
+ childprocess (>= 0.6.3, < 4.0.0)
14
+ contracts (~> 0.9)
15
+ cucumber (>= 1.3.19)
16
+ ffi (~> 1.9)
17
+ rspec-expectations (>= 2.99)
18
+ thor (>= 0.19, < 2.0)
15
19
  axiom-types (0.1.1)
16
20
  descendants_tracker (~> 0.0.4)
17
21
  ice_nine (~> 0.11.0)
18
22
  thread_safe (~> 0.3, >= 0.3.1)
19
- builder (3.2.3)
23
+ backports (3.18.2)
24
+ builder (3.2.4)
20
25
  childprocess (1.0.1)
21
26
  rake (< 13.0)
22
- coderay (1.1.2)
27
+ coderay (1.1.3)
23
28
  coercible (1.0.0)
24
29
  descendants_tracker (~> 0.0.1)
25
- cucumber (1.3.20)
30
+ contracts (0.16.0)
31
+ cucumber (3.0.0)
26
32
  builder (>= 2.1.2)
27
- diff-lcs (>= 1.1.3)
28
- gherkin (~> 2.12)
33
+ cucumber-core (~> 3.0.0)
34
+ cucumber-expressions (~> 4.0.3)
35
+ cucumber-wire (~> 0.0.1)
36
+ diff-lcs (~> 1.3)
37
+ gherkin (~> 4.0)
29
38
  multi_json (>= 1.7.5, < 2.0)
30
39
  multi_test (>= 0.1.2)
40
+ cucumber-core (3.0.0)
41
+ backports (>= 3.8.0)
42
+ cucumber-tag_expressions (>= 1.0.1)
43
+ gherkin (>= 4.1.3)
44
+ cucumber-expressions (4.0.4)
45
+ cucumber-tag_expressions (2.0.2)
46
+ cucumber-wire (0.0.1)
31
47
  declarative (0.0.10)
32
48
  declarative-option (0.1.0)
33
49
  descendants_tracker (0.0.4)
34
50
  thread_safe (~> 0.3, >= 0.3.1)
35
- diff-lcs (1.2.5)
51
+ diff-lcs (1.4.4)
36
52
  equalizer (0.0.11)
37
- excon (0.73.0)
53
+ excon (0.76.0)
38
54
  faraday (0.17.3)
39
55
  multipart-post (>= 1.2, < 3)
40
56
  faraday_middleware (0.14.0)
41
57
  faraday (>= 0.7.4, < 1.0)
42
- gherkin (2.12.2)
43
- multi_json (~> 1.3)
44
- highline (1.6.21)
58
+ ffi (1.12.2)
59
+ gherkin (4.1.3)
60
+ highline (2.0.3)
45
61
  ice_nine (0.11.2)
46
62
  launchy (2.4.3)
47
63
  addressable (~> 2.3)
48
64
  method_source (1.0.0)
49
- mimemagic (0.3.4)
50
- multi_json (1.13.1)
65
+ mimemagic (0.3.5)
66
+ multi_json (1.15.0)
51
67
  multi_test (0.1.2)
52
68
  multipart-post (2.1.1)
53
- parallel (0.5.16)
54
- parallel_tests (0.6.18)
69
+ parallel (1.13.0)
70
+ parallel_tests (2.23.0)
55
71
  parallel
56
72
  pry (0.13.1)
57
73
  coderay (~> 1.1)
58
74
  method_source (~> 1.0)
59
- rake (10.5.0)
75
+ public_suffix (2.0.5)
76
+ rake (12.3.3)
60
77
  representable (3.0.4)
61
78
  declarative (< 0.1.0)
62
79
  declarative-option (< 0.2.0)
63
80
  uber (< 0.2.0)
64
- rspec-expectations (3.4.0)
81
+ rspec-expectations (3.9.2)
65
82
  diff-lcs (>= 1.2.0, < 2.0)
66
- rspec-support (~> 3.4.0)
67
- rspec-mocks (3.4.1)
83
+ rspec-support (~> 3.9.0)
84
+ rspec-mocks (3.9.1)
68
85
  diff-lcs (>= 1.2.0, < 2.0)
69
- rspec-support (~> 3.4.0)
70
- rspec-support (3.4.1)
86
+ rspec-support (~> 3.9.0)
87
+ rspec-support (3.9.3)
71
88
  thor (1.0.1)
72
89
  thread_safe (0.3.6)
73
- tracker_api (1.10.0)
90
+ tracker_api (1.11.0)
74
91
  addressable
75
92
  equalizer
76
93
  excon
@@ -91,12 +108,13 @@ PLATFORMS
91
108
  ruby
92
109
 
93
110
  DEPENDENCIES
94
- aruba
111
+ aruba (< 1)
95
112
  geordi!
96
113
  highline
97
114
  launchy
98
115
  parallel_tests
99
116
  pry
117
+ rake (< 13)
100
118
  rspec-mocks
101
119
  tracker_api
102
120
 
data/README.md CHANGED
@@ -19,96 +19,96 @@ You may abbreviate commands by typing only their first letters, e.g. `geordi
19
19
  con` will boot a development console, `geordi set -t` will setup a project and
20
20
  run tests afterwards.
21
21
 
22
- For details on commands, e.g. supported options, you may always run
23
- `geordi help <command>`.
22
+ You can always run `geordi help <command>` to quickly look up command help.
24
23
 
25
24
  ### `geordi apache-site VIRTUAL_HOST`
26
-
27
25
  Enable the given virtual host, disabling all others.
28
26
 
29
27
 
30
28
  ### `geordi capistrano COMMAND`
31
-
32
29
  Run a capistrano command on all deploy targets.
33
30
 
34
31
  Example: `geordi capistrano deploy`
35
32
 
36
33
 
37
34
  ### `geordi chromedriver-update`
38
-
39
35
  Update the chromedriver.
40
36
 
41
37
  Example: `geordi chromedriver_update`
42
38
 
43
- This command will find and install the matching chromedriver for the currently installed Chrome.
39
+ This command will find and install the matching chromedriver for the currently
40
+ installed Chrome.
44
41
 
42
+ Setting `auto_update_chromedriver` to `true` in your global Geordi config file
43
+ (`~/.config/geordi/global.yml`), will automatically update chromedriver before
44
+ cucumber tests, in case Chrome and chromedriver versions don't match
45
45
 
46
- ### `geordi clean`
46
+ **Options**
47
+ - `[--quiet-if-matching], [--no-quiet-if-matching]`: Suppress notification if chromedriver and chrome versions match
47
48
 
49
+
50
+ ### `geordi clean`
48
51
  Remove unneeded files from the current directory.
49
52
 
50
53
 
51
54
  ### `geordi commit`
52
-
53
55
  Commit using a story title from Pivotal Tracker.
54
56
 
55
57
  Example: `geordi commit`
56
58
 
57
59
  Any extra arguments are forwarded to `git commit -m <message>`.
58
60
 
59
- If there are no staged changes, prints a warning but will continue to create
60
- an empty commit.
61
-
62
61
  On the first execution we ask for your Pivotal Tracker API token. It will be
63
62
  stored in `~/.config/geordi/global.yml`.
64
63
 
65
64
 
66
65
  ### `geordi console [TARGET]`
67
-
68
66
  Open a Rails console locally or on a Capistrano deploy target.
69
67
 
70
- Open a local Rails console: `geordi console`
71
-
72
- Open a Rails console on `staging`: `geordi console staging`
73
-
74
- Lets you select the server to connect to from a menu when called with `--select-server` or the alias `-s`:
68
+ Local (development): `geordi console`
75
69
 
76
- geordi console staging -s
70
+ Remote: `geordi console staging`
77
71
 
78
- If you already know the number of the server you want to connect to, just pass it along:
72
+ Selecting the server: `geordi console staging -s` shows a menu with all available
73
+ servers. When passed a number, directly connects to the selected server.
79
74
 
80
- geordi console staging -s2
75
+ **Options**
76
+ - `-s, [--select-server=[SERVER_NUMBER]]`: Select a server to connect to
81
77
 
82
78
 
83
79
  ### `geordi cucumber [FILES and OPTIONS]`
84
-
85
80
  Run Cucumber features.
86
81
 
87
82
  Example: `geordi cucumber features/authentication_feature:3`
88
83
 
89
- Runs Cucumber as you want: with `bundle exec`, using parallel tests, with
90
- a VNC session holding Selenium test browsers, support for using a dedicated
91
- testing firefox and beta support for rerunning failed scenarios.
84
+ Runs Cucumber with `bundle exec`, using parallel tests, with a VNC session
85
+ holding Selenium test browsers, support for using a dedicated testing browser
86
+ and beta support for re-running failed scenarios.
92
87
 
93
88
  - *@solo:* Generally, features are run in parallel. However, scenarios tagged
94
- with @solo are excluded and will be run sequentially, _after_ the parallel run.
89
+ with @solo are excluded from the parallel run and executed sequentially instead.
95
90
 
96
- - *Debugging:* Sometimes, the dot-printing Cucumber formatter does not show
97
- errors. In case a feature fails without a message, try running it with `--debug`
98
- or `-d`.
91
+ - *Debugging:* In some cases, the dot-printing Cucumber formatter swallows
92
+ errors. In case a feature fails without an error message, try running it with
93
+ `--debug` or `-d`.
99
94
 
100
95
  - *Options:* Any unknown option will be passed through to Cucumber,
101
- e.g. `--format pretty`.
96
+ e.g. `--format=pretty`. Make sure to connect option and value with an equals
97
+ sign, i.e. have each option a contiguous string.
102
98
 
103
99
  - *VNC:* By default, test browsers will run in a VNC session. When using a
104
- headless test browser anyway, you can disable VNC by putting the following
105
- config into `.geordi.yml` in the project root:
100
+ headless test browser anyway, you can disable VNC by setting `use_vnc: false`
101
+ in `.geordi.yml` in the project root.
106
102
 
107
- use_vnc: false
103
+ **Options**
104
+ - `-m, [--modified], [--no-modified]`: Run all modified features
105
+ - `-c, [--containing=STRING]`: Run all features that contain STRING
106
+ - `-v, [--verbose], [--no-verbose]`: Show the test run command
107
+ - `-d, [--debug], [--no-debug]`: Run Cucumber with `-f pretty -b`, which helps hunting down bugs
108
+ - `-r, [--rerun=N]`: Rerun features up to N times while failing
108
109
 
109
110
 
110
111
  ### `geordi delete-dumps [DIRECTORY]`
111
-
112
112
  Delete database dump files (*.dump).
113
113
 
114
114
  Example: `geordi delete_dumps` or `geordi delete_dumps ~/tmp/dumps`
@@ -121,7 +121,6 @@ Geordi will ask for confirmation before actually deleting files.
121
121
 
122
122
 
123
123
  ### `geordi deploy [STAGE]`
124
-
125
124
  Guided deployment across branches.
126
125
 
127
126
  Example: `geordi deploy` or `geordi deploy p[roduction]` or `geordi deploy --current-branch`
@@ -129,18 +128,18 @@ Example: `geordi deploy` or `geordi deploy p[roduction]` or `geordi deploy --cur
129
128
  Merge, push and deploy with a single command! **It always tells what it will do
130
129
  before it does it.** There are different scenarios where this command is handy:
131
130
 
132
- 1) *Production deploy:* From the master branch, run `geordi deploy production`.
133
- This will merge `master` to `production`, push and deploy to production.
131
+ - *Production deploy:* From the master branch, run `geordi deploy production`.
132
+ This will merge `master` to `production`, push and deploy to production.
134
133
 
135
- 2) *Feature branch deploy:* From a feature branch, run `geordi deploy staging`.
136
- This will merge the feature branch to `master`, push and deploy to staging.
134
+ - *Feature branch deploy:* From a feature branch, run `geordi deploy staging`.
135
+ This will merge the feature branch to `master`, push and deploy to staging.
137
136
 
138
- To deploy a feature branch directly without merging, run
139
- `geordi deploy --current-branch`. This feature depends on the environment
140
- variable `DEPLOY_BRANCH` to be picked up in the respective deploy file.
137
+ To deploy a feature branch directly without merging, run
138
+ `geordi deploy --current-branch`. This feature depends on the environment
139
+ variable `DEPLOY_BRANCH` to be picked up in the respective deploy file.
141
140
 
142
- 3) *Simple deploy:* If the source branch matches the target branch, merging will
143
- be skipped.
141
+ - *Simple deploy:* If the source branch matches the target branch, merging will
142
+ be skipped.
144
143
 
145
144
  Calling the command without arguments will infer the target stage from the
146
145
  current branch and fall back to master/staging.
@@ -153,9 +152,12 @@ When your project is running Capistrano 3, deployment will use `cap deploy`
153
152
  instead of `cap deploy:migrations`. You can force using `deploy` by passing the
154
153
  -M option: `geordi deploy -M staging`.
155
154
 
155
+ **Options**
156
+ - `-M, [--no-migrations], [--no-no-migrations]`: Run cap deploy instead of cap deploy:migrations
157
+ - `-c, [--current-branch], [--no-current-branch]`: Set DEPLOY_BRANCH to the current branch during deploy
156
158
 
157
- ### `geordi drop-databases`
158
159
 
160
+ ### `geordi drop-databases`
159
161
  Interactively delete local databases.
160
162
 
161
163
  Example: `geordi drop_databases`
@@ -165,61 +167,60 @@ and offer to delete them. Excluded are databases that are whitelisted. This come
165
167
  in handy when you're keeping your currently active projects in the whitelist files
166
168
  and perform regular housekeeping with Geordi.
167
169
 
168
- When called with `-P` or `-M` options, only handles Postgres resp. MySQL/MariaDB.
169
-
170
- When called with `--postgres <port or local socket>` or `--mysql <port or local socket>`,
171
- will instruct the underlying management commands to use those connection methods
172
- instead of the defaults. This is useful when running multiple installations.
173
-
174
170
  Geordi will ask for confirmation before actually dropping databases and will
175
171
  offer to edit the whitelist instead.
176
172
 
173
+ **Options**
174
+ - `-P, [--postgres-only], [--no-postgres-only]`: Only clean Postgres
175
+ - `-M, [--mysql-only], [--no-mysql-only]`: Only clean MySQL/MariaDB
176
+ - `[--postgres=PORT_OR_SOCKET]`: Use Postgres port or socket
177
+ - `[--mysql=PORT_OR_SOCKET]`: Use MySQL/MariaDB port or socket
177
178
 
178
179
  ### `geordi dump [TARGET]`
180
+ Handle (remote) database dumps.
179
181
 
180
- Handle dumps (see `geordi help dump` for details).
182
+ If you are using multiple databases per environment, pass the database name like this:
181
183
 
182
- When called without arguments, dumps the development database with `dumple`.
184
+ geordi dump -d primary
183
185
 
184
- geordi dump
186
+ Loading a dump into one of multiple local databases is not supported yet.
185
187
 
186
188
  When called with the `--load` option, sources the specified dump into the
187
189
  development database.
188
190
 
189
- geordi dump -l tmp/staging.dump
191
+ `geordi dump` (without arguments) dumps the development database with `dumple`.
190
192
 
191
- When called with a capistrano deploy target (e.g. `staging`), remotely dumps
192
- the specified target's database and downloads it to `tmp/`.
193
+ `geordi dump -l tmp/staging.dump` (with the `--load` option) sources the
194
+ specified dump file into the development database.
193
195
 
194
- geordi dump staging
196
+ `geordi dump staging` (with a Capistrano deploy target) remotely dumps the
197
+ specified target's database and downloads it to `tmp/`.
195
198
 
196
- When called with a capistrano deploy target and the `--load` option, sources the
197
- dump into the development database after downloading it.
199
+ `geordi dump staging -l` (with a Capistrano deploy target and the `--load`
200
+ option) sources the dump into the development database after downloading it.
198
201
 
199
- geordi dump staging -l
202
+ **Options**
203
+ - `-l, [--load=[DUMP_FILE]]`: Load a dump
200
204
 
201
205
 
202
206
  ### `geordi firefox COMMAND`
203
-
204
207
  Run a command with VNC and test browser set up (alias: chrome).
205
208
 
206
209
  Example: `geordi firefox b cucumber` or `geordi firefox --setup 24.0`
207
210
 
208
211
  Useful when you need Firefox for Selenium or the VNC set up, but can't use the
209
- `geordi cucumber` command.
210
-
211
- *Install* a special Firefox by calling with `--setup <version>`.
212
+ `geordi cucumber` command. This command is aliased `chrome` for users running
213
+ Selenium in Chrome.
212
214
 
213
- This command is aliased `chrome` for users running Selenium in Chrome.
215
+ **Options**
216
+ - `[--setup=FIREFOX_VERSION]`: Install a special test runner Firefox with the given version
214
217
 
215
218
 
216
219
  ### `geordi help [COMMAND]`
217
-
218
220
  Describe available commands or one specific command.
219
221
 
220
222
 
221
223
  ### `geordi migrate`
222
-
223
224
  Migrate all databases.
224
225
 
225
226
  Example: `geordi migrate`
@@ -230,7 +231,6 @@ with `db:migrate`.
230
231
 
231
232
 
232
233
  ### `geordi png-optimize PATH`
233
-
234
234
  Optimize .png files.
235
235
 
236
236
  Example: `geordi png-optimize some/directory`
@@ -241,7 +241,6 @@ Example: `geordi png-optimize some/directory`
241
241
 
242
242
 
243
243
  ### `geordi rake TASK`
244
-
245
244
  Run a rake task in several Rails environments.
246
245
 
247
246
  Example: `geordi rake db:migrate`
@@ -254,59 +253,56 @@ Example: `geordi rake db:migrate`
254
253
 
255
254
 
256
255
  ### `geordi remove-executable-flags`
257
-
258
256
  Remove executable-flags from files that should not be executable.
259
257
 
260
258
 
261
259
  ### `geordi rspec [FILES]`
262
-
263
260
  Run RSpec.
264
261
 
265
262
  Example: `geordi rspec spec/models/user_spec.rb:13`
266
263
 
267
- Runs RSpec as you want: with RSpec 1/2 detection, `bundle exec`, rspec_spinner
268
- detection, etc.
264
+ Runs RSpec with RSpec 1/2 support, parallel_tests detection and `bundle exec`.
269
265
 
270
266
 
271
267
  ### `geordi security-update [STEP]`
272
-
273
268
  Support for performing security updates.
274
269
 
275
- Preparation for security update: `geordi security-update`
276
-
277
- Checks out production and pulls.
270
+ Preparation for security update: `geordi security-update`. Checks out production
271
+ and pulls.
278
272
 
279
- After performing the update: `geordi security-update finish`
273
+ After performing the update: `geordi security-update finish`. Switches branches,
274
+ pulls, pushes and deploys as required by our workflow.
280
275
 
281
- Switches branches, pulls, pushes and deploys as required by our workflow. Tells
282
- what it will do before it does it. In detail:
276
+ This command tells what it will do before it does it. In detail:
283
277
 
284
- 1. Asks user, if tests are green
278
+ 1. Ask user if tests are green
285
279
 
286
- 2. Pushes production
280
+ 2. Push production
287
281
 
288
- 3. Checks out master and pulls
282
+ 3. Check out master and pull
289
283
 
290
- 4. Merges production and pushes in master
284
+ 4. Merge production and push in master
291
285
 
292
- 5. Deploys staging first, if there is a staging environment
286
+ 5. Deploy staging, if there is a staging environment
293
287
 
294
- 6. Asks user, if deployment log is okay and application is still running on staging
288
+ 6. Ask user if deployment log is okay and staging application is still running
295
289
 
296
- 7. Deploys other stages
290
+ 7. Deploy other stages
297
291
 
298
- 8. Asks user, if deployment log is okay and application is still running on all other stages
292
+ 8. Ask user if deployment log is okay and application is still running on all stages
299
293
 
300
- 9. Informs user about the next steps
294
+ 9. Inform user about the next (manual) steps
301
295
 
302
296
 
303
297
  ### `geordi server [PORT]`
304
-
305
298
  Start a development server.
306
299
 
300
+ **Options**
301
+ - `-p, [--port=PORT]`: Choose a port
302
+ - `-P, [--public], [--no-public]`: Make the server accessible from the local network
307
303
 
308
- ### `geordi setup`
309
304
 
305
+ ### `geordi setup`
310
306
  Setup a project for the first time.
311
307
 
312
308
  Example: `geordi setup`
@@ -315,71 +311,51 @@ Check out a repository and cd into its directory. Then let `setup` do the tiring
315
311
  work: run `bundle install`, create `database.yml`, create databases, migrate
316
312
  (all if applicable).
317
313
 
318
- If a local bin/setup file is found, Geordi skips these steps runs bin/setup
319
- for setup instead.
320
-
321
- After setting up, loads a remote database dump into the development db when
322
- called with the `--dump` option:
314
+ If a local bin/setup file is found, Geordi skips its routine and runs bin/setup
315
+ instead.
323
316
 
324
- geordi setup -d staging
325
-
326
- After setting up, runs all tests when called with the `--test` option:
327
-
328
- geordi setup -t
317
+ **Options**
318
+ - `-d, [--dump=TARGET]`: After setup, dump the TARGET db and source it into the development db
319
+ - `-t, [--test], [--no-test]`: After setup, run tests
329
320
 
330
321
 
331
322
  ### `geordi shell TARGET`
332
-
333
323
  Open a shell on a Capistrano deploy target.
334
324
 
335
325
  Example: `geordi shell production`
336
326
 
337
- Lets you select the server to connect to from a menu when called with `--select-server` or the alias `-s`:
327
+ Selecting the server: `geordi shell staging -s` shows a menu with all available
328
+ servers. When passed a number, directly connects to the selected server.
338
329
 
339
- geordi shell production -s
340
-
341
- If you already know the number of the server you want to connect to, just pass it along:
342
-
343
- geordi shell production -s2
330
+ **Options**
331
+ - `-s, [--select-server=[SERVER_NUMBER]]`: Select a server to connect to
344
332
 
345
333
 
346
334
  ### `geordi tests`
347
-
348
335
  Run all employed tests.
349
336
 
350
337
 
351
338
  ### `geordi unit`
352
-
353
339
  Run Test::Unit.
354
340
 
355
341
 
356
342
  ### `geordi update`
357
-
358
343
  Bring a project up to date.
359
344
 
360
345
  Example: `geordi update`
361
346
 
362
347
  Performs: `git pull`, `bundle install` (if necessary) and migrates (if applicable).
363
348
 
364
- After updating, loads a dump into the development db when called with the
365
- `--dump` option:
366
-
367
- geordi update -d staging
368
-
369
- After updating, runs all tests when called with the `--test` option:
370
-
371
- geordi update -t
372
-
373
- See `geordi help update` for details.
349
+ **Options**
350
+ - `-d, [--dump=TARGET]`: After updating, dump the TARGET db and source it into the development db
351
+ - `-t, [--test], [--no-test]`: After updating, run tests
374
352
 
375
353
 
376
354
  ### `geordi version`
377
-
378
355
  Print the current version of geordi.
379
356
 
380
357
 
381
358
  ### `geordi vnc`
382
-
383
359
  Show the hidden VNC window.
384
360
 
385
361
  Example: `geordi vnc` or `geordi vnc --setup`
@@ -387,8 +363,8 @@ Example: `geordi vnc` or `geordi vnc --setup`
387
363
  Launch a VNC session to the hidden screen where `geordi cucumber` runs Selenium
388
364
  tests.
389
365
 
390
- When called with `--setup`, will guide through the setup of VNC.
391
-
366
+ **Options**
367
+ - `[--setup], [--no-setup]`: Guide through the setup of VNC
392
368
 
393
369
  b
394
370
  ---
@@ -398,7 +374,7 @@ working directory. If no `Gemfile` is present just runs the given command:
398
374
 
399
375
  b spec spec/models
400
376
 
401
- More information at http://makandracards.com/makandra/684-automatically-run-bundle-exec-if-required
377
+ See http://makandracards.com/makandra/684-automatically-run-bundle-exec-if-required
402
378
 
403
379
 
404
380
  dumple
@@ -408,7 +384,7 @@ Stores a timestamped database dump for the given Rails environment in `~/dumps`:
408
384
 
409
385
  dumple development
410
386
 
411
- More information at http://makandracards.com/makandra/1008-dump-your-database-with-dumple
387
+ See http://makandracards.com/makandra/1008-dump-your-database-with-dumple
412
388
 
413
389
 
414
390
  launchy_browser
@@ -421,21 +397,37 @@ browser, as opposed to opening it within the VNC window.
421
397
  Contributing
422
398
  ============
423
399
 
424
- * Run the tests for the oldest supported ruby version with `bundle exec rake`. Ensure that all other ruby versions in the `travis.yml` pass as well after pushing your feature branch and triggering the travis build.
425
- * Update this `README`. The whole `geordi` section is auto-generated
426
- by `rake readme`.
427
- * Document your changes in the `CHANGELOG.md` file.
400
+ When making changes to Geordi, please make sure your code is tested. Not all,
401
+ but most features of Geordi can be tested. See other tests for inspiration.
402
+
403
+ Once you have completed your modifications, please update CHANGELOG and README
404
+ as needed. Use `rake readme` to regenerate the Geordi section of the README from
405
+ the command documentations.
406
+
407
+ Make sure tests are green in the default Ruby *plus* in the oldest Ruby > 1.8
408
+ that you have installed on your system (1.8.7 support has been dropped).
409
+
410
+ Before releasing your changes, wait for the Travis results to see that tests
411
+ passed in all Ruby versions.
412
+
428
413
 
429
414
  Adding a new command
430
415
  ---------------
431
416
 
432
417
  Copy `lib/geordi/COMMAND_TEMPLATE` to `lib/geordi/commands/your_command` and
433
- edit it to do what you need it to do. Usually, it is hard to automatedly test
434
- Geordi commands, so make sure you've manually tested it. You can do so by
435
- calling your local geordi like so (adjust paths to your needs):
436
-
437
- # @option -I: add directory to load path
438
- ruby -I ../geordi/lib ../geordi/bin/geordi <command>
439
-
440
- # with debugger
441
- ruby -r byebug -I ../geordi/lib ../geordi/bin/geordi <command>
418
+ edit it to do what you need it to do. Please add a feature test for the new
419
+ command; see features/ for inspiration.
420
+
421
+ To try Geordi locally, call it like this:
422
+
423
+ # -I means "add the following directory to load path"
424
+ ruby -Ilib exe/geordi
425
+
426
+ # From another directory
427
+ ruby -I ../geordi/lib ../geordi/exe/geordi
428
+
429
+ # With debugger
430
+ ruby -r byebug -I ../geordi/lib ../geordi/exe/geordi
431
+
432
+ You can also *install* Geordi locally from its project directory with
433
+ `rake install`. Make sure to switch to the expected Ruby version before.