geordi 3.0.2 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/.ruby-version +1 -1
  4. data/CHANGELOG.md +44 -6
  5. data/Gemfile.lock +1 -1
  6. data/README.md +138 -118
  7. data/Rakefile +18 -8
  8. data/geordi.gemspec +1 -0
  9. data/lib/geordi/COMMAND_TEMPLATE +3 -1
  10. data/lib/geordi/commands/chromedriver_update.rb +2 -2
  11. data/lib/geordi/commands/commit.rb +1 -6
  12. data/lib/geordi/commands/console.rb +9 -4
  13. data/lib/geordi/commands/create_databases.rb +2 -1
  14. data/lib/geordi/commands/cucumber.rb +15 -10
  15. data/lib/geordi/commands/delete_dumps.rb +0 -1
  16. data/lib/geordi/commands/deploy.rb +11 -11
  17. data/lib/geordi/commands/drop_databases.rb +0 -6
  18. data/lib/geordi/commands/dump.rb +9 -18
  19. data/lib/geordi/commands/firefox.rb +2 -5
  20. data/lib/geordi/commands/migrate.rb +1 -1
  21. data/lib/geordi/commands/rake.rb +3 -1
  22. data/lib/geordi/commands/rspec.rb +5 -9
  23. data/lib/geordi/commands/security_update.rb +65 -9
  24. data/lib/geordi/commands/server.rb +1 -1
  25. data/lib/geordi/commands/setup.rb +2 -11
  26. data/lib/geordi/commands/shell.rb +7 -4
  27. data/lib/geordi/commands/unit.rb +1 -1
  28. data/lib/geordi/commands/update.rb +0 -11
  29. data/lib/geordi/commands/vnc.rb +1 -3
  30. data/lib/geordi/commands/with_rake.rb +1 -1
  31. data/lib/geordi/cucumber.rb +6 -4
  32. data/lib/geordi/dump_loader.rb +3 -1
  33. data/lib/geordi/gitpt.rb +9 -51
  34. data/lib/geordi/remote.rb +14 -2
  35. data/lib/geordi/settings.rb +155 -0
  36. data/lib/geordi/util.rb +12 -4
  37. data/lib/geordi/version.rb +1 -1
  38. metadata +7 -33
  39. data/exe/cap-all +0 -4
  40. data/exe/console-for +0 -4
  41. data/exe/cuc +0 -4
  42. data/exe/cuc-show +0 -4
  43. data/exe/cuc-vnc-setup +0 -4
  44. data/exe/deploy-to-production +0 -4
  45. data/exe/dump-for +0 -8
  46. data/exe/gitpt +0 -4
  47. data/exe/load-dump +0 -4
  48. data/exe/migrate-all +0 -4
  49. data/exe/rs +0 -4
  50. data/exe/run_tests +0 -4
  51. data/exe/shell-for +0 -4
  52. data/exe/tests +0 -4
  53. data/lib/geordi/commands/eurest.rb +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d986326069739e97e8b46b2ce91a663b6093e9a664c178f531db389604e1541d
4
- data.tar.gz: 1e859ace1b375e7991f4bae8ef4bb7119b8225dfe4c37a945ec6e745c3a5911b
3
+ metadata.gz: e713daa0ffee8f9a861ebdc77dcfb4bffe177f2342b05ae7fc442494d4384c18
4
+ data.tar.gz: 36b09dd4952b71a1f3851b6cbcb9e5f823d575a707b6ebae9bdd4e459d366a68
5
5
  SHA512:
6
- metadata.gz: 0c6fd3c2e616e309751be4e32fbc34680add641a3b9b87e843a28da0514f0b64d19ada3928f1f14426ddf12ed9dec12c702cf8e1d345346b7e5e763f959e65b9
7
- data.tar.gz: a3f45c1931254a0a61fd06dbdaad148cad1fa6627518e1209797a41c6c55816ef0a9cefee6a95444dec2f819960298bac0e4ccfcb132fc3011b4ee43429e8e05
6
+ metadata.gz: c1f9c002b9035c57ccef219eae0a1f51b64b22ef74ed37ec2a18257b6c230ab3dd1d2f457f93a60df0bf409b5c4ab69b02af9bf2f43ea8c9ba0fe44799616b57
7
+ data.tar.gz: 6c74ac5333a1a44b3c5ecd8522829e3984b7e1c2fdd2c37d29c99fe5e450a95945a6d8de6c8103ab5b3d58f09ef83f137f2b95bc8c3ea68163cf8c2fba0451f8
data/.gitignore CHANGED
@@ -3,6 +3,5 @@
3
3
  .idea
4
4
  pkg/*
5
5
  .DS_Store
6
- .pt_project_id
7
6
  tmp
8
7
  .byebug_history
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.5
@@ -1,23 +1,63 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
5
  This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
5
6
 
6
-
7
7
  ## Unreleased
8
+ ### Compatible changes
9
+ ### Breaking changes
8
10
 
11
+
12
+ ## 4.0.1 2020-08-11
9
13
  ### Compatible changes
10
14
 
15
+ * Fix `geordi migrate` command, that fails with:
16
+
17
+ ```
18
+ Don't know how to build task 'db:migrate parallel:prepare'
19
+ ```
20
+
21
+
22
+ ## 4.0.0 2020-07-30
23
+
24
+ ### Compatible changes
25
+ - Improved documentation; README now includes command options.
26
+ - Fix #90: `geordi console`, `geordi deploy`, `geordi rake` and `geordi shell` now work correctly if the project hasn't been bundled before
27
+
11
28
  ### Breaking changes
29
+ - Removed deprecated executables
30
+ - Removed `eurest` command
31
+ - 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.
12
32
 
13
33
 
14
- ## 3.0.2 2020-05-18
34
+ ## 3.2.0 2020-07-15
15
35
 
16
36
  ### Compatible changes
37
+ - Improvement #43: `--select-server` option on `geordi shell` and `geordi console` can take the number of the server to connect to it directly and to skip the menu.
38
+ - Add a `.geordi.yml` file to change multiple settings in the project and `~/.config/geordi/global.yml` for global settings.
39
+ - Deprecated the `.pt_project_id` file in favor of `.geordi.yml`.
40
+ - Deprecated the `~/.gitpt` file in favor of `~/.config/geordi/global.yml`.
41
+ - Add #91: Now there is an option to start cucumber without a VNC session. This is configured by the .geordi.yml file.
42
+ - Fixed `git#staged_changes?` detection on Ruby < 2.5.
17
43
 
18
- - Fix #95: Method change from `! *.include?` to `*.exclude?` was not valid as we do not have active support in Geordi. Affected commands where `geordi cucumber` and `geordi deploy`.
19
44
 
20
- ### Breaking changes
45
+ ## 3.1.0 2020-06-03
46
+
47
+ ### Compatible changes
48
+ - Update security-update for improved workflow (#89): Deploy staging first and ask user, if application is still running. Then deploy other stages.
49
+
50
+
51
+ ## 3.0.3 2020-05-27
52
+
53
+ ### Compatible changes
54
+ - Fix #98: Changing the `config/database.yml` reader from `YAML.load` to `YAML.safe_load` dropped the support for aliases. We now allow aliases and the classes `Time` and `Symbol`. If we encounter further issues with this approach a revert to `YAML.load` would be an option, too.
55
+
56
+
57
+ ## 3.0.2 2020-05-18
58
+
59
+ ### Compatible changes
60
+ - Fix #95: Method change from `! *.include?` to `*.exclude?` was not valid as we do not have active support in Geordi. Affected commands were `geordi cucumber` and `geordi deploy`.
21
61
 
22
62
 
23
63
  ## 3.0.1 2020-05-13
@@ -29,8 +69,6 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
29
69
 
30
70
  ## 3.0.0 2020-05-04
31
71
 
32
- ### Compatible changes
33
-
34
72
  ### Breaking changes
35
73
  - Remove support for Ruby 1.8.7 and Ruby 1.9.3. Bug fixes might still be backported to 2.x, but we will not add any features to 2.x anymore. Please consider to upgrade the Ruby version of your project.
36
74
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- geordi (3.0.2)
4
+ geordi (4.0.1)
5
5
  thor (~> 1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -19,77 +19,89 @@ 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
 
45
42
 
46
43
  ### `geordi clean`
47
-
48
44
  Remove unneeded files from the current directory.
49
45
 
50
46
 
51
47
  ### `geordi commit`
52
-
53
48
  Commit using a story title from Pivotal Tracker.
54
49
 
55
50
  Example: `geordi commit`
56
51
 
52
+ Any extra arguments are forwarded to `git commit -m <message>`.
53
+
57
54
  On the first execution we ask for your Pivotal Tracker API token. It will be
58
- stored in `~/.gitpt`.
55
+ stored in `~/.config/geordi/global.yml`.
59
56
 
60
57
 
61
58
  ### `geordi console [TARGET]`
62
-
63
59
  Open a Rails console locally or on a Capistrano deploy target.
64
60
 
65
- Open a local Rails console: `geordi console`
61
+ Local (development): `geordi console`
66
62
 
67
- Open a Rails console on `staging`: `geordi console staging`
63
+ Remote: `geordi console staging`
68
64
 
65
+ Selecting the server: `geordi console staging -s` shows a menu with all available
66
+ servers. When passed a number, directly connects to the selected server.
67
+
68
+ **Options**
69
+ - `-s, [--select-server=[SERVER_NUMBER]]`: Select a server to connect to
69
70
 
70
- ### `geordi cucumber [FILES and OPTIONS]`
71
71
 
72
+ ### `geordi cucumber [FILES and OPTIONS]`
72
73
  Run Cucumber features.
73
74
 
74
75
  Example: `geordi cucumber features/authentication_feature:3`
75
76
 
76
- Runs Cucumber as you want: with `bundle exec`, using parallel tests, with
77
- a VNC session holding Selenium test browsers, support for using a dedicated
78
- testing firefox and beta support for rerunning failed scenarios.
77
+ Runs Cucumber with `bundle exec`, using parallel tests, with a VNC session
78
+ holding Selenium test browsers, support for using a dedicated testing browser
79
+ and beta support for re-running failed scenarios.
79
80
 
80
81
  - *@solo:* Generally, features are run in parallel. However, scenarios tagged
81
- with @solo are excluded and will be run sequentially, _after_ the parallel run.
82
+ with @solo are excluded from the parallel run and executed sequentially instead.
82
83
 
83
- - *Debugging:* Sometimes, the dot-printing Cucumber formatter does not show
84
- errors. In case a feature fails without a message, try running it with `--debug`
85
- or `-d`.
84
+ - *Debugging:* In some cases, the dot-printing Cucumber formatter swallows
85
+ errors. In case a feature fails without an error message, try running it with
86
+ `--debug` or `-d`.
86
87
 
87
88
  - *Options:* Any unknown option will be passed through to Cucumber,
88
- e.g. `--format pretty`.
89
+ e.g. `--format=pretty`. Make sure to connect option and value with an equals
90
+ sign, i.e. have each option a contiguous string.
89
91
 
92
+ - *VNC:* By default, test browsers will run in a VNC session. When using a
93
+ headless test browser anyway, you can disable VNC by setting `use_vnc: false`
94
+ in `.geordi.yml` in the project root.
90
95
 
91
- ### `geordi delete-dumps [DIRECTORY]`
96
+ **Options**
97
+ - `-m, [--modified], [--no-modified]`: Run all modified features
98
+ - `-c, [--containing=STRING]`: Run all features that contain STRING
99
+ - `-v, [--verbose], [--no-verbose]`: Show the test run command
100
+ - `-d, [--debug], [--no-debug]`: Run Cucumber with `-f pretty -b`, which helps hunting down bugs
101
+ - `-r, [--rerun=N]`: Rerun features up to N times while failing
92
102
 
103
+
104
+ ### `geordi delete-dumps [DIRECTORY]`
93
105
  Delete database dump files (*.dump).
94
106
 
95
107
  Example: `geordi delete_dumps` or `geordi delete_dumps ~/tmp/dumps`
@@ -102,7 +114,6 @@ Geordi will ask for confirmation before actually deleting files.
102
114
 
103
115
 
104
116
  ### `geordi deploy [STAGE]`
105
-
106
117
  Guided deployment across branches.
107
118
 
108
119
  Example: `geordi deploy` or `geordi deploy p[roduction]` or `geordi deploy --current-branch`
@@ -110,18 +121,18 @@ Example: `geordi deploy` or `geordi deploy p[roduction]` or `geordi deploy --cur
110
121
  Merge, push and deploy with a single command! **It always tells what it will do
111
122
  before it does it.** There are different scenarios where this command is handy:
112
123
 
113
- 1) *Production deploy:* From the master branch, run `geordi deploy production`.
114
- This will merge `master` to `production`, push and deploy to production.
124
+ - *Production deploy:* From the master branch, run `geordi deploy production`.
125
+ This will merge `master` to `production`, push and deploy to production.
115
126
 
116
- 2) *Feature branch deploy:* From a feature branch, run `geordi deploy staging`.
117
- This will merge the feature branch to `master`, push and deploy to staging.
127
+ - *Feature branch deploy:* From a feature branch, run `geordi deploy staging`.
128
+ This will merge the feature branch to `master`, push and deploy to staging.
118
129
 
119
- To deploy a feature branch directly without merging, run
120
- `geordi deploy --current-branch`. This feature depends on the environment
121
- variable `DEPLOY_BRANCH` to be picked up in the respective deploy file.
130
+ To deploy a feature branch directly without merging, run
131
+ `geordi deploy --current-branch`. This feature depends on the environment
132
+ variable `DEPLOY_BRANCH` to be picked up in the respective deploy file.
122
133
 
123
- 3) *Simple deploy:* If the source branch matches the target branch, merging will
124
- be skipped.
134
+ - *Simple deploy:* If the source branch matches the target branch, merging will
135
+ be skipped.
125
136
 
126
137
  Calling the command without arguments will infer the target stage from the
127
138
  current branch and fall back to master/staging.
@@ -134,9 +145,12 @@ When your project is running Capistrano 3, deployment will use `cap deploy`
134
145
  instead of `cap deploy:migrations`. You can force using `deploy` by passing the
135
146
  -M option: `geordi deploy -M staging`.
136
147
 
148
+ **Options**
149
+ - `-M, [--no-migrations], [--no-no-migrations]`: Run cap deploy instead of cap deploy:migrations
150
+ - `-c, [--current-branch], [--no-current-branch]`: Set DEPLOY_BRANCH to the current branch during deploy
137
151
 
138
- ### `geordi drop-databases`
139
152
 
153
+ ### `geordi drop-databases`
140
154
  Interactively delete local databases.
141
155
 
142
156
  Example: `geordi drop_databases`
@@ -146,61 +160,52 @@ and offer to delete them. Excluded are databases that are whitelisted. This come
146
160
  in handy when you're keeping your currently active projects in the whitelist files
147
161
  and perform regular housekeeping with Geordi.
148
162
 
149
- When called with `-P` or `-M` options, only handles Postgres resp. MySQL/MariaDB.
150
-
151
- When called with `--postgres <port or local socket>` or `--mysql <port or local socket>`,
152
- will instruct the underlying management commands to use those connection methods
153
- instead of the defaults. This is useful when running multiple installations.
154
-
155
163
  Geordi will ask for confirmation before actually dropping databases and will
156
164
  offer to edit the whitelist instead.
157
165
 
166
+ **Options**
167
+ - `-P, [--postgres-only], [--no-postgres-only]`: Only clean Postgres
168
+ - `-M, [--mysql-only], [--no-mysql-only]`: Only clean MySQL/MariaDB
169
+ - `[--postgres=PORT_OR_SOCKET]`: Use Postgres port or socket
170
+ - `[--mysql=PORT_OR_SOCKET]`: Use MySQL/MariaDB port or socket
158
171
 
159
- ### `geordi dump [TARGET]`
160
-
161
- Handle dumps (see `geordi help dump` for details).
162
-
163
- When called without arguments, dumps the development database with `dumple`.
164
172
 
165
- geordi dump
166
-
167
- When called with the `--load` option, sources the specified dump into the
168
- development database.
173
+ ### `geordi dump [TARGET]`
174
+ Handle (remote) database dumps.
169
175
 
170
- geordi dump -l tmp/staging.dump
176
+ `geordi dump` (without arguments) dumps the development database with `dumple`.
171
177
 
172
- When called with a capistrano deploy target (e.g. `staging`), remotely dumps
173
- the specified target's database and downloads it to `tmp/`.
178
+ `geordi dump -l tmp/staging.dump` (with the `--load` option) sources the
179
+ specified dump file into the development database.
174
180
 
175
- geordi dump staging
181
+ `geordi dump staging` (with a Capistrano deploy target) remotely dumps the
182
+ specified target's database and downloads it to `tmp/`.
176
183
 
177
- When called with a capistrano deploy target and the `--load` option, sources the
178
- dump into the development database after downloading it.
184
+ `geordi dump staging -l` (with a Capistrano deploy target and the `--load`
185
+ option) sources the dump into the development database after downloading it.
179
186
 
180
- geordi dump staging -l
187
+ **Options**
188
+ - `-l, [--load=[DUMP_FILE]]`: Load a dump
181
189
 
182
190
 
183
191
  ### `geordi firefox COMMAND`
184
-
185
192
  Run a command with VNC and test browser set up (alias: chrome).
186
193
 
187
194
  Example: `geordi firefox b cucumber` or `geordi firefox --setup 24.0`
188
195
 
189
196
  Useful when you need Firefox for Selenium or the VNC set up, but can't use the
190
- `geordi cucumber` command.
191
-
192
- *Install* a special Firefox by calling with `--setup <version>`.
197
+ `geordi cucumber` command. This command is aliased `chrome` for users running
198
+ Selenium in Chrome.
193
199
 
194
- This command is aliased `chrome` for users running Selenium in Chrome.
200
+ **Options**
201
+ - `[--setup=FIREFOX_VERSION]`: Install a special test runner Firefox with the given version
195
202
 
196
203
 
197
204
  ### `geordi help [COMMAND]`
198
-
199
205
  Describe available commands or one specific command.
200
206
 
201
207
 
202
208
  ### `geordi migrate`
203
-
204
209
  Migrate all databases.
205
210
 
206
211
  Example: `geordi migrate`
@@ -211,7 +216,6 @@ with `db:migrate`.
211
216
 
212
217
 
213
218
  ### `geordi png-optimize PATH`
214
-
215
219
  Optimize .png files.
216
220
 
217
221
  Example: `geordi png-optimize some/directory`
@@ -222,7 +226,6 @@ Example: `geordi png-optimize some/directory`
222
226
 
223
227
 
224
228
  ### `geordi rake TASK`
225
-
226
229
  Run a rake task in several Rails environments.
227
230
 
228
231
  Example: `geordi rake db:migrate`
@@ -235,39 +238,56 @@ Example: `geordi rake db:migrate`
235
238
 
236
239
 
237
240
  ### `geordi remove-executable-flags`
238
-
239
241
  Remove executable-flags from files that should not be executable.
240
242
 
241
243
 
242
244
  ### `geordi rspec [FILES]`
243
-
244
245
  Run RSpec.
245
246
 
246
247
  Example: `geordi rspec spec/models/user_spec.rb:13`
247
248
 
248
- Runs RSpec as you want: with RSpec 1/2 detection, `bundle exec`, rspec_spinner
249
- detection, etc.
249
+ Runs RSpec with RSpec 1/2 support, parallel_tests detection and `bundle exec`.
250
250
 
251
251
 
252
252
  ### `geordi security-update [STEP]`
253
-
254
253
  Support for performing security updates.
255
254
 
256
- Preparation for security update: `geordi security-update`
255
+ Preparation for security update: `geordi security-update`. Checks out production
256
+ and pulls.
257
257
 
258
- After performing the update: `geordi security-update finish`
258
+ After performing the update: `geordi security-update finish`. Switches branches,
259
+ pulls, pushes and deploys as required by our workflow.
259
260
 
260
- Switches branches, pulls, pushes and deploys as required by our workflow. Tells
261
- what it will do before it does it.
261
+ This command tells what it will do before it does it. In detail:
262
262
 
263
+ 1. Ask user if tests are green
263
264
 
264
- ### `geordi server [PORT]`
265
+ 2. Push production
265
266
 
267
+ 3. Check out master and pull
268
+
269
+ 4. Merge production and push in master
270
+
271
+ 5. Deploy staging, if there is a staging environment
272
+
273
+ 6. Ask user if deployment log is okay and staging application is still running
274
+
275
+ 7. Deploy other stages
276
+
277
+ 8. Ask user if deployment log is okay and application is still running on all stages
278
+
279
+ 9. Inform user about the next (manual) steps
280
+
281
+
282
+ ### `geordi server [PORT]`
266
283
  Start a development server.
267
284
 
285
+ **Options**
286
+ - `-p, [--port=PORT]`: Choose a port
287
+ - `-P, [--public], [--no-public]`: Make the server accessible from the local network
268
288
 
269
- ### `geordi setup`
270
289
 
290
+ ### `geordi setup`
271
291
  Setup a project for the first time.
272
292
 
273
293
  Example: `geordi setup`
@@ -276,67 +296,51 @@ Check out a repository and cd into its directory. Then let `setup` do the tiring
276
296
  work: run `bundle install`, create `database.yml`, create databases, migrate
277
297
  (all if applicable).
278
298
 
279
- If a local bin/setup file is found, Geordi skips these steps runs bin/setup
280
- for setup instead.
281
-
282
- After setting up, loads a remote database dump into the development db when
283
- called with the `--dump` option:
299
+ If a local bin/setup file is found, Geordi skips its routine and runs bin/setup
300
+ instead.
284
301
 
285
- geordi setup -d staging
286
-
287
- After setting up, runs all tests when called with the `--test` option:
288
-
289
- geordi setup -t
302
+ **Options**
303
+ - `-d, [--dump=TARGET]`: After setup, dump the TARGET db and source it into the development db
304
+ - `-t, [--test], [--no-test]`: After setup, run tests
290
305
 
291
306
 
292
307
  ### `geordi shell TARGET`
293
-
294
308
  Open a shell on a Capistrano deploy target.
295
309
 
296
310
  Example: `geordi shell production`
297
311
 
298
- Lets you select the server to connect to when called with `--select-server`:
312
+ Selecting the server: `geordi shell staging -s` shows a menu with all available
313
+ servers. When passed a number, directly connects to the selected server.
299
314
 
300
- geordi shell production -s
315
+ **Options**
316
+ - `-s, [--select-server=[SERVER_NUMBER]]`: Select a server to connect to
301
317
 
302
318
 
303
319
  ### `geordi tests`
304
-
305
320
  Run all employed tests.
306
321
 
307
322
 
308
323
  ### `geordi unit`
309
-
310
324
  Run Test::Unit.
311
325
 
312
326
 
313
327
  ### `geordi update`
314
-
315
328
  Bring a project up to date.
316
329
 
317
330
  Example: `geordi update`
318
331
 
319
332
  Performs: `git pull`, `bundle install` (if necessary) and migrates (if applicable).
320
333
 
321
- After updating, loads a dump into the development db when called with the
322
- `--dump` option:
323
-
324
- geordi update -d staging
325
-
326
- After updating, runs all tests when called with the `--test` option:
327
-
328
- geordi update -t
329
-
330
- See `geordi help update` for details.
334
+ **Options**
335
+ - `-d, [--dump=TARGET]`: After updating, dump the TARGET db and source it into the development db
336
+ - `-t, [--test], [--no-test]`: After updating, run tests
331
337
 
332
338
 
333
339
  ### `geordi version`
334
-
335
340
  Print the current version of geordi.
336
341
 
337
342
 
338
343
  ### `geordi vnc`
339
-
340
344
  Show the hidden VNC window.
341
345
 
342
346
  Example: `geordi vnc` or `geordi vnc --setup`
@@ -344,8 +348,8 @@ Example: `geordi vnc` or `geordi vnc --setup`
344
348
  Launch a VNC session to the hidden screen where `geordi cucumber` runs Selenium
345
349
  tests.
346
350
 
347
- When called with `--setup`, will guide through the setup of VNC.
348
-
351
+ **Options**
352
+ - `[--setup], [--no-setup]`: Guide through the setup of VNC
349
353
 
350
354
  b
351
355
  ---
@@ -355,7 +359,7 @@ working directory. If no `Gemfile` is present just runs the given command:
355
359
 
356
360
  b spec spec/models
357
361
 
358
- More information at http://makandracards.com/makandra/684-automatically-run-bundle-exec-if-required
362
+ See http://makandracards.com/makandra/684-automatically-run-bundle-exec-if-required
359
363
 
360
364
 
361
365
  dumple
@@ -365,7 +369,7 @@ Stores a timestamped database dump for the given Rails environment in `~/dumps`:
365
369
 
366
370
  dumple development
367
371
 
368
- More information at http://makandracards.com/makandra/1008-dump-your-database-with-dumple
372
+ See http://makandracards.com/makandra/1008-dump-your-database-with-dumple
369
373
 
370
374
 
371
375
  launchy_browser
@@ -378,21 +382,37 @@ browser, as opposed to opening it within the VNC window.
378
382
  Contributing
379
383
  ============
380
384
 
381
- * 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.
382
- * Update this `README`. The whole `geordi` section is auto-generated
383
- by `rake readme`.
384
- * Document your changes in the `CHANGELOG.md` file.
385
+ When making changes to Geordi, please make sure your code is tested. Not all,
386
+ but most features of Geordi can be tested. See other tests for inspiration.
387
+
388
+ Once you have completed your modifications, please update CHANGELOG and README
389
+ as needed. Use `rake readme` to regenerate the Geordi section of the README from
390
+ the command documentations.
391
+
392
+ Make sure tests are green in the default Ruby *plus* in the oldest Ruby > 1.8
393
+ that you have installed on your system (1.8.7 support has been dropped).
394
+
395
+ Before releasing your changes, wait for the Travis results to see that tests
396
+ passed in all Ruby versions.
397
+
385
398
 
386
399
  Adding a new command
387
400
  ---------------
388
401
 
389
402
  Copy `lib/geordi/COMMAND_TEMPLATE` to `lib/geordi/commands/your_command` and
390
- edit it to do what you need it to do. Usually, it is hard to automatedly test
391
- Geordi commands, so make sure you've manually tested it. You can do so by
392
- calling your local geordi like so (adjust paths to your needs):
403
+ edit it to do what you need it to do. Please add a feature test for the new
404
+ command; see features/ for inspiration.
405
+
406
+ To try Geordi locally, call it like this:
393
407
 
394
- # @option -I: add directory to load path
395
- ruby -I ../geordi/lib ../geordi/bin/geordi <command>
408
+ # -I means "add the following directory to load path"
409
+ ruby -Ilib exe/geordi
396
410
 
397
- # with debugger
398
- ruby -r byebug -I ../geordi/lib ../geordi/bin/geordi <command>
411
+ # From another directory
412
+ ruby -I ../geordi/lib ../geordi/exe/geordi
413
+
414
+ # With debugger
415
+ ruby -r byebug -I ../geordi/lib ../geordi/exe/geordi
416
+
417
+ You can also *install* Geordi locally from its project directory with
418
+ `rake install`. Make sure to switch to the expected Ruby version before.