geordi 5.2.2 → 6.0.0.pre.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +6 -6
- data/.rspec +2 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +39 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +15 -4
- data/README.md +27 -50
- data/exe/dumple +7 -0
- data/geordi.gemspec +3 -2
- data/lib/geordi/chromedriver_updater.rb +7 -7
- data/lib/geordi/cli.rb +6 -6
- data/lib/geordi/commands/branch.rb +12 -0
- data/lib/geordi/commands/commit.rb +1 -1
- data/lib/geordi/commands/console.rb +1 -1
- data/lib/geordi/commands/cucumber.rb +4 -31
- data/lib/geordi/commands/delete_dumps.rb +26 -28
- data/lib/geordi/commands/docker.rb +14 -6
- data/lib/geordi/commands/drop_databases.rb +0 -2
- data/lib/geordi/commands/dump.rb +3 -0
- data/lib/geordi/commands/remove_executable_flags.rb +2 -1
- data/lib/geordi/commands/rspec.rb +4 -1
- data/lib/geordi/commands/shell.rb +0 -2
- data/lib/geordi/cucumber.rb +4 -100
- data/lib/geordi/db_cleaner.rb +5 -5
- data/lib/geordi/docker.rb +71 -4
- data/lib/geordi/dump_loader.rb +1 -1
- data/lib/geordi/gitpt.rb +156 -70
- data/lib/geordi/interaction.rb +5 -3
- data/lib/geordi/remote.rb +2 -1
- data/lib/geordi/settings.rb +38 -38
- data/lib/geordi/util.rb +4 -14
- data/lib/geordi/version.rb +1 -1
- metadata +9 -12
- data/exe/launchy_browser +0 -15
- data/lib/geordi/commands/_setup_vnc.rb +0 -64
- data/lib/geordi/commands/firefox.rb +0 -32
- data/lib/geordi/commands/vnc.rb +0 -18
- data/lib/geordi/firefox_for_selenium.rb +0 -200
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eee4c378b0fe08b20405c74876813d2e23eda1e09c92dae4a19146af9f414a2d
|
4
|
+
data.tar.gz: 48bfb8c877fedf002b46aa1f09ea7dde284c9b1358f1c8f1f9c39a0bc3381c03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e24c228acd4170e540b76accc1708bf7df44f3650052c200abfdb2f297770e7660f017a176bd0edbc74202d08c1c4df9d3c05289d91c06501ebcb7f32d28839f
|
7
|
+
data.tar.gz: e817b989c4254f3482a888418fef3ca57f493901cce611ab970faaaf8db6ff259ea67f7417ffb6b964bb6f1063e926afe0503ace94c1ce497e9c92c494c41ec0
|
data/.github/workflows/test.yml
CHANGED
@@ -25,6 +25,8 @@ jobs:
|
|
25
25
|
gemfile: Gemfile
|
26
26
|
- ruby: 2.7.2
|
27
27
|
gemfile: Gemfile
|
28
|
+
- ruby: 3.0.0
|
29
|
+
gemfile: Gemfile
|
28
30
|
env:
|
29
31
|
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
|
30
32
|
steps:
|
@@ -33,16 +35,14 @@ jobs:
|
|
33
35
|
uses: ruby/setup-ruby@v1
|
34
36
|
with:
|
35
37
|
ruby-version: "${{ matrix.ruby }}"
|
36
|
-
- name: Install vncserver
|
37
|
-
run: |
|
38
|
-
sudo apt-get update
|
39
|
-
sudo apt-get install -y tightvncserver
|
40
|
-
# Fake required password for vncserver
|
41
|
-
mkdir ~/.vnc && touch ~/.vnc/passwd && chmod 700 ~/.vnc/passwd
|
42
38
|
- name: Bundle
|
43
39
|
run: |
|
44
40
|
gem install bundler:1.17.3
|
45
41
|
bundle install --no-deployment
|
42
|
+
- name: Install VNC viewer
|
43
|
+
run: |
|
44
|
+
sudo apt-get update
|
45
|
+
sudo apt-get install -y xtightvncviewer
|
46
46
|
- name: Run tests
|
47
47
|
run: bundle exec rake
|
48
48
|
|
data/.rspec
ADDED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.2
|
data/CHANGELOG.md
CHANGED
@@ -1,33 +1,68 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
|
-
|
5
4
|
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
5
|
|
7
6
|
## Unreleased
|
8
7
|
|
9
8
|
### Compatible changes
|
9
|
+
* Removed support for serial execution of scenarios tagged with @solo.
|
10
10
|
|
11
11
|
### Breaking changes
|
12
12
|
|
13
|
+
## 6.0.0 2021-04-06
|
13
14
|
|
14
|
-
|
15
|
+
### Compatible changes
|
16
|
+
* `geordi commit` will continue even if one of the given projects is inaccessible. It will only fail if no stories could be found at all.
|
17
|
+
|
18
|
+
### Breaking changes
|
19
|
+
* Removed VNC test browser support for integration tests.
|
20
|
+
* Please use a headless Chrome setup <https://makandracards.com/makandra/492109-capybara-running-tests-with-headless-chrome>.
|
21
|
+
* You might also want to get rid of your local VNC server `sudo apt remove tightvncserver`.
|
22
|
+
|
23
|
+
## 5.4.0 2021-02-01
|
15
24
|
|
16
25
|
### Compatible changes
|
26
|
+
* Add `geordi branch` command that checks out a feature branch based on a story from Pivotal Tracker
|
27
|
+
* Faster MySQL dumping with [`--single-transaction` and `--quick`](https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_single-transaction)
|
28
|
+
* Allow pivotal tracker ids in the global config file
|
29
|
+
* Fix missing require for `Fileutils` in the dump load command (#145)
|
30
|
+
* Document `PARALLEL_TEST_PROCESSORS`
|
31
|
+
|
17
32
|
|
33
|
+
## 5.3.0 2021-02-01
|
34
|
+
|
35
|
+
### Compatible changes
|
36
|
+
* Changed: Dumping and loading a database will not keep the database dump in `tmp/` but delete it once the operation finishes successfully. Example: `geordi dump staging -l` will remove the file `tmp/staging.dump` after it loaded the dump.
|
37
|
+
|
38
|
+
|
39
|
+
## 5.2.4 2021-01-29
|
40
|
+
|
41
|
+
### Compatible changes
|
42
|
+
* Fix and improve delete-dumps command (now supporting multiple arguments)
|
43
|
+
|
44
|
+
|
45
|
+
## 5.2.3 2021-01-27
|
46
|
+
|
47
|
+
### Compatible changes
|
48
|
+
* Remove auto-bundling from `geordi shell` and remote `geordi console`
|
49
|
+
|
50
|
+
|
51
|
+
## 5.2.2 2020-12-17
|
52
|
+
|
53
|
+
### Compatible changes
|
18
54
|
* Ignore ACL settings when loading a PostgreSQL dump
|
19
55
|
|
20
56
|
|
21
57
|
## 5.2.1 2020-12-15
|
22
58
|
|
23
59
|
### Compatible changes
|
24
|
-
|
25
60
|
* Fix a bug regarding `geordi vnc` which was introduced in 5.1.0
|
26
61
|
|
62
|
+
|
27
63
|
## 5.2.0 2020-12-14
|
28
64
|
|
29
65
|
### Compatible changes
|
30
|
-
|
31
66
|
* Geordi update will exit with a warning when Ruby version changes during pull.
|
32
67
|
* Add `geordi docker` command with support for opening a shell for dockerized dev environments.
|
33
68
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
geordi (
|
4
|
+
geordi (6.0.0)
|
5
5
|
thor (~> 1)
|
6
6
|
|
7
7
|
GEM
|
@@ -62,10 +62,15 @@ GEM
|
|
62
62
|
launchy (2.4.3)
|
63
63
|
addressable (~> 2.3)
|
64
64
|
method_source (1.0.0)
|
65
|
-
mimemagic (0.3.
|
65
|
+
mimemagic (0.3.9)
|
66
|
+
nokogiri (~> 1)
|
67
|
+
rake
|
68
|
+
mini_portile2 (2.4.0)
|
66
69
|
multi_json (1.15.0)
|
67
70
|
multi_test (0.1.2)
|
68
71
|
multipart-post (2.1.1)
|
72
|
+
nokogiri (1.9.1)
|
73
|
+
mini_portile2 (~> 2.4.0)
|
69
74
|
parallel (1.19.2)
|
70
75
|
parallel_tests (2.32.0)
|
71
76
|
parallel
|
@@ -78,10 +83,16 @@ GEM
|
|
78
83
|
declarative (< 0.1.0)
|
79
84
|
declarative-option (< 0.2.0)
|
80
85
|
uber (< 0.2.0)
|
86
|
+
rspec (3.10.0)
|
87
|
+
rspec-core (~> 3.10.0)
|
88
|
+
rspec-expectations (~> 3.10.0)
|
89
|
+
rspec-mocks (~> 3.10.0)
|
90
|
+
rspec-core (3.10.1)
|
91
|
+
rspec-support (~> 3.10.0)
|
81
92
|
rspec-expectations (3.10.0)
|
82
93
|
diff-lcs (>= 1.2.0, < 2.0)
|
83
94
|
rspec-support (~> 3.10.0)
|
84
|
-
rspec-mocks (3.10.
|
95
|
+
rspec-mocks (3.10.2)
|
85
96
|
diff-lcs (>= 1.2.0, < 2.0)
|
86
97
|
rspec-support (~> 3.10.0)
|
87
98
|
rspec-support (3.10.0)
|
@@ -115,7 +126,7 @@ DEPENDENCIES
|
|
115
126
|
parallel_tests
|
116
127
|
pry
|
117
128
|
rake (< 13)
|
118
|
-
rspec
|
129
|
+
rspec
|
119
130
|
tracker_api
|
120
131
|
|
121
132
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -25,6 +25,15 @@ You can always run `geordi help <command>` to quickly look up command help.
|
|
25
25
|
Enable the given virtual host, disabling all others.
|
26
26
|
|
27
27
|
|
28
|
+
### `geordi branch`
|
29
|
+
Check out a feature branch based on a story from Pivotal Tracker.
|
30
|
+
|
31
|
+
Example: `geordi branch`
|
32
|
+
|
33
|
+
On the first execution we ask for your Pivotal Tracker API token. It will be
|
34
|
+
stored in `~/.config/geordi/global.yml`.
|
35
|
+
|
36
|
+
|
28
37
|
### `geordi capistrano COMMAND`
|
29
38
|
Run a capistrano command on all deploy targets.
|
30
39
|
|
@@ -81,12 +90,8 @@ Run Cucumber features.
|
|
81
90
|
|
82
91
|
Example: `geordi cucumber features/authentication_feature:3`
|
83
92
|
|
84
|
-
Runs Cucumber with `bundle exec`, using parallel tests
|
85
|
-
|
86
|
-
and beta support for re-running failed scenarios.
|
87
|
-
|
88
|
-
- *@solo:* Generally, features are run in parallel. However, scenarios tagged
|
89
|
-
with @solo are excluded from the parallel run and executed sequentially instead.
|
93
|
+
Runs Cucumber with `bundle exec`, using parallel tests and with support for re-running
|
94
|
+
failed scenarios.
|
90
95
|
|
91
96
|
- *Debugging:* In some cases, the dot-printing Cucumber formatter swallows
|
92
97
|
errors. In case a feature fails without an error message, try running it with
|
@@ -96,9 +101,8 @@ errors. In case a feature fails without an error message, try running it with
|
|
96
101
|
e.g. `--format=pretty`. Make sure to connect option and value with an equals
|
97
102
|
sign, i.e. have each option a contiguous string.
|
98
103
|
|
99
|
-
-
|
100
|
-
|
101
|
-
in `.geordi.yml` in the project root.
|
104
|
+
- In order to limit processes in a parallel run, you can set an environment
|
105
|
+
variable like this: `PARALLEL_TEST_PROCESSORS=6 geordi cucumber`
|
102
106
|
|
103
107
|
**Options**
|
104
108
|
- `-m, [--modified], [--no-modified]`: Run all modified features
|
@@ -111,13 +115,13 @@ in `.geordi.yml` in the project root.
|
|
111
115
|
### `geordi delete-dumps [DIRECTORY]`
|
112
116
|
Delete database dump files (*.dump).
|
113
117
|
|
114
|
-
Example: `geordi
|
118
|
+
Example: `geordi delete-dumps` or `geordi delete-dumps ~/tmp/dumps`
|
115
119
|
|
116
|
-
Recursively
|
120
|
+
Recursively searches for files ending in `.dump` and offers to delete them. When
|
117
121
|
no argument is given, two default directories are searched for dump files: the
|
118
122
|
current working directory and `~/dumps` (for dumps created with geordi).
|
119
123
|
|
120
|
-
|
124
|
+
Will ask for confirmation before actually deleting files.
|
121
125
|
|
122
126
|
|
123
127
|
### `geordi deploy [STAGE]`
|
@@ -169,10 +173,14 @@ There are three subcommands:
|
|
169
173
|
|
170
174
|
- `geordi docker setup`
|
171
175
|
Fetches all docker containers.
|
176
|
+
|
172
177
|
- `geordi docker shell`
|
173
178
|
Runs the docker service named 'main'.
|
179
|
+
Append `--secondary` to open a second shell in an already running container.
|
180
|
+
|
174
181
|
- `geordi docker vnc`
|
175
182
|
Opens a VNC viewer to connect to the VNC server in the container.
|
183
|
+
Append `--setup` to be guided through the setup of VNC viewer.
|
176
184
|
|
177
185
|
|
178
186
|
### `geordi drop-databases`
|
@@ -220,19 +228,6 @@ Loading a dump into one of multiple local databases is not supported yet.
|
|
220
228
|
- `-d, [--database=NAME]`: Database name, if there are multiple databases
|
221
229
|
|
222
230
|
|
223
|
-
### `geordi firefox COMMAND`
|
224
|
-
Run a command with VNC and test browser set up (alias: chrome).
|
225
|
-
|
226
|
-
Example: `geordi firefox b cucumber` or `geordi firefox --setup 24.0`
|
227
|
-
|
228
|
-
Useful when you need Firefox for Selenium or the VNC set up, but can't use the
|
229
|
-
`geordi cucumber` command. This command is aliased `chrome` for users running
|
230
|
-
Selenium in Chrome.
|
231
|
-
|
232
|
-
**Options**
|
233
|
-
- `[--setup=FIREFOX_VERSION]`: Install a special test runner Firefox with the given version
|
234
|
-
|
235
|
-
|
236
231
|
### `geordi help [COMMAND]`
|
237
232
|
Describe available commands or one specific command.
|
238
233
|
|
@@ -278,7 +273,10 @@ Run RSpec.
|
|
278
273
|
|
279
274
|
Example: `geordi rspec spec/models/user_spec.rb:13`
|
280
275
|
|
281
|
-
Runs RSpec with
|
276
|
+
Runs RSpec with version 1/2 support, parallel_tests detection and `bundle exec`.
|
277
|
+
|
278
|
+
In order to limit processes in a parallel run, you can set an environment
|
279
|
+
variable like this: `PARALLEL_TEST_PROCESSORS=6 geordi rspec`
|
282
280
|
|
283
281
|
|
284
282
|
### `geordi security-update [STEP]`
|
@@ -371,18 +369,6 @@ Performs: `git pull`, `bundle install` (if necessary) and migrates (if applicabl
|
|
371
369
|
### `geordi version`
|
372
370
|
Print the current version of geordi.
|
373
371
|
|
374
|
-
|
375
|
-
### `geordi vnc`
|
376
|
-
Show the hidden VNC window.
|
377
|
-
|
378
|
-
Example: `geordi vnc` or `geordi vnc --setup`
|
379
|
-
|
380
|
-
Launch a VNC session to the hidden screen where `geordi cucumber` runs Selenium
|
381
|
-
tests.
|
382
|
-
|
383
|
-
**Options**
|
384
|
-
- `[--setup], [--no-setup]`: Guide through the setup of VNC
|
385
|
-
|
386
372
|
b
|
387
373
|
---
|
388
374
|
|
@@ -406,13 +392,6 @@ Stores a timestamped database dump for the given Rails environment in `~/dumps`:
|
|
406
392
|
- `--compress`: After dumping, run gzip to compress the dump in place
|
407
393
|
|
408
394
|
|
409
|
-
launchy_browser
|
410
|
-
---------------
|
411
|
-
|
412
|
-
Used by the `geordi cucumber` command. Makes launchy open pages in the user's
|
413
|
-
browser, as opposed to opening it within the VNC window.
|
414
|
-
|
415
|
-
|
416
395
|
Contributing
|
417
396
|
============
|
418
397
|
|
@@ -423,11 +402,9 @@ Once you have completed your modifications, please update CHANGELOG and README
|
|
423
402
|
as needed. Use `rake readme` to regenerate the Geordi section of the README from
|
424
403
|
the command documentations.
|
425
404
|
|
426
|
-
Make sure tests are green in the
|
427
|
-
|
428
|
-
|
429
|
-
Before releasing your changes, wait for the Travis results to see that tests
|
430
|
-
passed in all Ruby versions.
|
405
|
+
Make sure tests are green in the oldest supported Ruby version. Before releasing
|
406
|
+
a new gem version, wait for the CI results to see that tests are green in all
|
407
|
+
Ruby versions.
|
431
408
|
|
432
409
|
|
433
410
|
Adding a new command
|
data/exe/dumple
CHANGED
@@ -78,6 +78,13 @@ begin
|
|
78
78
|
command << " -p\"#{config['password']}\""
|
79
79
|
command << " #{config['database']}"
|
80
80
|
command << " -r #{dump_path}"
|
81
|
+
# Using a transaction to allow concurrent request while creating a dump.
|
82
|
+
# This works only reliable for InnoDB tables.
|
83
|
+
# More details: https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_single-transaction
|
84
|
+
command << ' --single-transaction'
|
85
|
+
# Disable buffering in memory to avoid a memory overflow for large tables
|
86
|
+
# More details https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_quick
|
87
|
+
command << ' --quick'
|
81
88
|
if port
|
82
89
|
command << " -h#{host || '127.0.0.1'} -P#{port}"
|
83
90
|
else
|
data/geordi.gemspec
CHANGED
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
spec.add_runtime_dependency 'thor', '~> 1'
|
27
27
|
|
28
|
-
|
29
|
-
|
28
|
+
spec.post_install_message = <<-ATTENTION
|
29
|
+
Support for sequential running of integration tests tagged with @solo has been dropped.
|
30
|
+
ATTENTION
|
30
31
|
end
|
@@ -10,7 +10,7 @@ module Geordi
|
|
10
10
|
chromedriver_version = determine_chromedriver_version
|
11
11
|
|
12
12
|
if skip_update?(chrome_version, chromedriver_version)
|
13
|
-
Interaction.
|
13
|
+
Interaction.success "No update required: both Chrome and chromedriver are on v#{chrome_version}!" unless options[:quiet_if_matching]
|
14
14
|
else
|
15
15
|
chromedriver_zip = download_chromedriver(chrome_version)
|
16
16
|
unzip(chromedriver_zip, File.expand_path('~/bin'))
|
@@ -18,7 +18,7 @@ module Geordi
|
|
18
18
|
chromedriver_zip.unlink
|
19
19
|
|
20
20
|
# We need to determine the version again, as it could be nil in case no chromedriver was installed before
|
21
|
-
Interaction.
|
21
|
+
Interaction.success "Chromedriver updated to v#{determine_chromedriver_version}."
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -31,7 +31,7 @@ module Geordi
|
|
31
31
|
end
|
32
32
|
|
33
33
|
if !status.success? || chrome_version.nil?
|
34
|
-
Interaction.fail('Could not determine the
|
34
|
+
Interaction.fail('Could not determine the version of Google Chrome.')
|
35
35
|
else
|
36
36
|
chrome_version.to_i
|
37
37
|
end
|
@@ -46,7 +46,7 @@ module Geordi
|
|
46
46
|
end
|
47
47
|
|
48
48
|
if !status.success? || chromedriver_version.nil?
|
49
|
-
Interaction.fail('Could not determine the
|
49
|
+
Interaction.fail('Could not determine the version of chromedriver.')
|
50
50
|
else
|
51
51
|
chromedriver_version.to_i
|
52
52
|
end
|
@@ -68,7 +68,7 @@ module Geordi
|
|
68
68
|
|
69
69
|
file
|
70
70
|
else
|
71
|
-
Interaction.fail("Could not download chromedriver
|
71
|
+
Interaction.fail("Could not download chromedriver v#{latest_version}.")
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
@@ -79,7 +79,7 @@ module Geordi
|
|
79
79
|
if response.is_a?(Net::HTTPSuccess)
|
80
80
|
response.body.to_s
|
81
81
|
else
|
82
|
-
Interaction.fail("Could not
|
82
|
+
Interaction.fail("Could not download the chromedriver v#{chrome_version}.")
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
@@ -87,7 +87,7 @@ module Geordi
|
|
87
87
|
_stdout_str, _error_str, status = Open3.capture3('unzip', '-d', output_dir, '-o', zip.path)
|
88
88
|
|
89
89
|
unless status.success?
|
90
|
-
Interaction.fail("Could not unzip #{zip.path}")
|
90
|
+
Interaction.fail("Could not unzip #{zip.path}.")
|
91
91
|
end
|
92
92
|
end
|
93
93
|
end
|
data/lib/geordi/cli.rb
CHANGED
@@ -15,12 +15,12 @@ module Geordi
|
|
15
15
|
class_eval File.read(file), file
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
no_commands do
|
19
|
+
# fix weird implementation of #invoke
|
20
|
+
def invoke_geordi(name, *args)
|
21
|
+
options = args.last.is_a?(Hash) ? args.pop : {}
|
22
|
+
invoke(name, args, options)
|
23
|
+
end
|
24
24
|
end
|
25
25
|
|
26
26
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
desc 'branch', 'Check out a feature branch based on a story from Pivotal Tracker'
|
2
|
+
long_desc <<-LONGDESC
|
3
|
+
Example: `geordi branch`
|
4
|
+
|
5
|
+
On the first execution we ask for your Pivotal Tracker API token. It will be
|
6
|
+
stored in `~/.config/geordi/global.yml`.
|
7
|
+
LONGDESC
|
8
|
+
|
9
|
+
def branch
|
10
|
+
require 'geordi/gitpt'
|
11
|
+
Gitpt.new.run_branch
|
12
|
+
end
|