geordi 12.1.1 → 12.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -1
- data/Gemfile +1 -0
- data/Gemfile.lock +3 -1
- data/README.md +24 -34
- data/Rakefile +16 -1
- data/lib/geordi/capistrano_config.rb +16 -6
- data/lib/geordi/commands/deploy.rb +6 -2
- data/lib/geordi/dump_loader.rb +1 -0
- data/lib/geordi/gitlinear.rb +1 -0
- data/lib/geordi/remote.rb +1 -0
- data/lib/geordi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9e766c4baaefc4065662e1efa4004110d2ba16eb4da7021cffbf1bea8b83b77
|
4
|
+
data.tar.gz: e131a2fccc5ba9db7b992c58fe42b402fcc59651d7c52935cb8a2f6b543d0c85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f9b6cb8eb4446380a744db6abb19f15a040ab6a2d0bbca5d54454d46ec308d687d2e4a11ddabc51c37bccbe0033cbf43882dcb69fedc4e9398cd09071df88a3
|
7
|
+
data.tar.gz: c36974d65e12a0b4020cf1dfe5e9303dc8bba71aa3082ff675a002fb6d68469af7da4e5774d67c233414755cb8a068fb8f7dd46d2d3ac8069ec963c515d9bb3d
|
data/CHANGELOG.md
CHANGED
@@ -6,11 +6,23 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
6
6
|
## Unreleased
|
7
7
|
|
8
8
|
### Compatible changes
|
9
|
-
* `geordi commit` will now auto-suggest a matching issue based on the current branch
|
10
9
|
|
11
10
|
### Breaking changes
|
12
11
|
|
13
12
|
|
13
|
+
## 12.2.0 2025-07-03
|
14
|
+
|
15
|
+
### Compatible changes
|
16
|
+
* `geordi deploy` will now respect the configured deploy branch from teh Capistrano config. Previously, it would choose "production" for a deploy to the production stage, and master/main else.
|
17
|
+
|
18
|
+
|
19
|
+
## 12.1.0 2025-05-03
|
20
|
+
|
21
|
+
### Compatible changes
|
22
|
+
* `geordi commit` will now auto-suggest a matching issue based on the current branch
|
23
|
+
* Some improvements and fixes
|
24
|
+
|
25
|
+
|
14
26
|
## 12.0.0 2025-02-25
|
15
27
|
|
16
28
|
### Compatible changes
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
geordi (12.
|
4
|
+
geordi (12.2.0)
|
5
5
|
thor (~> 1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
|
+
abbrev (0.1.2)
|
10
11
|
addressable (2.7.0)
|
11
12
|
public_suffix (>= 2.0.2, < 5.0)
|
12
13
|
aruba (0.14.14)
|
@@ -88,6 +89,7 @@ PLATFORMS
|
|
88
89
|
ruby
|
89
90
|
|
90
91
|
DEPENDENCIES
|
92
|
+
abbrev
|
91
93
|
aruba (< 1)
|
92
94
|
cucumber (~> 9)
|
93
95
|
geordi!
|
data/README.md
CHANGED
@@ -48,7 +48,7 @@ On the first execution we ask for your Linear API token. It will be
|
|
48
48
|
stored in `~/.config/geordi/global.yml`.
|
49
49
|
|
50
50
|
**Options**
|
51
|
-
- `-m, --from-main,
|
51
|
+
- `-m, --from-main, --from-master`: Branch from master instead of the current branch
|
52
52
|
|
53
53
|
|
54
54
|
### `geordi capistrano COMMAND`
|
@@ -98,7 +98,7 @@ servers. When passed a number, directly connects to the selected server.
|
|
98
98
|
IRB flags can be given as `irb_flags: '...'` in the global Geordi config file (`~/.config/geordi/global.yml`).
|
99
99
|
|
100
100
|
**Options**
|
101
|
-
- `-s,
|
101
|
+
- `-s, --select-server=[SERVER_NUMBER]`: Select a server to connect to
|
102
102
|
|
103
103
|
|
104
104
|
### `geordi cucumber [FILES and OPTIONS]`
|
@@ -117,11 +117,11 @@ In order to limit processes in a parallel run, you can set an environment
|
|
117
117
|
variable like this: `PARALLEL_TEST_PROCESSORS=6 geordi cucumber`
|
118
118
|
|
119
119
|
**Options**
|
120
|
-
- `-m,
|
121
|
-
- `-c,
|
122
|
-
- `-v,
|
123
|
-
- `-d,
|
124
|
-
- `-r,
|
120
|
+
- `-m, --modified`: Run all modified features
|
121
|
+
- `-c, --containing=STRING`: Run all features that contain STRING
|
122
|
+
- `-v, --verbose`: Show the test run command
|
123
|
+
- `-d, --debug`: Run Cucumber with `-f pretty -b`, which helps hunting down bugs
|
124
|
+
- `-r, --rerun=N`: Rerun features up to N times while failing
|
125
125
|
|
126
126
|
|
127
127
|
### `geordi delete-dumps [DIRECTORY]`
|
@@ -170,8 +170,8 @@ instead of `cap deploy:migrations`. You can force using `deploy` by passing the
|
|
170
170
|
-M option: `geordi deploy -M staging`.
|
171
171
|
|
172
172
|
**Options**
|
173
|
-
- `-M,
|
174
|
-
- `-c,
|
173
|
+
- `-M, --no-migrations`: Run cap deploy instead of cap deploy:migrations
|
174
|
+
- `-c, --current-branch`: Set DEPLOY_BRANCH to the current branch during deploy
|
175
175
|
|
176
176
|
|
177
177
|
### `geordi drop-databases`
|
@@ -191,11 +191,11 @@ Geordi will ask for confirmation before actually dropping databases and will
|
|
191
191
|
offer to edit the whitelist instead.
|
192
192
|
|
193
193
|
**Options**
|
194
|
-
- `-P,
|
195
|
-
- `-M,
|
196
|
-
-
|
197
|
-
-
|
198
|
-
- `-S,
|
194
|
+
- `-P, --postgres-only`: Only clean PostgreSQL
|
195
|
+
- `-M, --mysql-only`: Only clean MySQL/MariaDB
|
196
|
+
- `--postgres=PORT_OR_SOCKET`: Use PostgreSQL port or socket
|
197
|
+
- `--mysql=PORT_OR_SOCKET`: Use MySQL/MariaDB port or socket
|
198
|
+
- `-S, --sudo`: Access databases as root
|
199
199
|
|
200
200
|
|
201
201
|
### `geordi dump [TARGET]`
|
@@ -225,8 +225,8 @@ not match, please issue separate commands for dumping (`dump -d`) and sourcing
|
|
225
225
|
(`dump -l -d`).
|
226
226
|
|
227
227
|
**Options**
|
228
|
-
- `-l,
|
229
|
-
- `-d,
|
228
|
+
- `-l, --load=[DUMP_FILE]`: Load a dump
|
229
|
+
- `-d, --database=NAME`: Target database, if there are multiple databases
|
230
230
|
|
231
231
|
|
232
232
|
### `geordi help [COMMAND]`
|
@@ -288,25 +288,15 @@ and pulls, and will tell each step before performing it.
|
|
288
288
|
|
289
289
|
Part two after performing the update: `geordi security-update finish`. Switches
|
290
290
|
branches, pulls, pushes and deploys as required by our workflow. This as well
|
291
|
-
will tell each step before performing it.
|
292
|
-
|
293
|
-
1. Ask user if tests are green
|
294
|
-
2. Push production
|
295
|
-
3. Check out master and pull
|
296
|
-
4. Merge production and push in master
|
297
|
-
5. Deploy staging, if there is a staging environment
|
298
|
-
6. Ask user if deployment log is okay and staging application is still running
|
299
|
-
7. Deploy other stages
|
300
|
-
8. Ask user if deployment log is okay and application is still running on all stages
|
301
|
-
9. Inform user about the next (manual) steps
|
291
|
+
will tell each step before performing it.
|
302
292
|
|
303
293
|
|
304
294
|
### `geordi server [PORT]`
|
305
295
|
Start a development server.
|
306
296
|
|
307
297
|
**Options**
|
308
|
-
- `-p,
|
309
|
-
- `-P,
|
298
|
+
- `-p, --port=PORT`: Choose a port
|
299
|
+
- `-P, --public`: Make the server accessible from the local network
|
310
300
|
|
311
301
|
|
312
302
|
### `geordi setup`
|
@@ -322,8 +312,8 @@ If a local bin/setup file is found, Geordi skips its routine and runs bin/setup
|
|
322
312
|
instead.
|
323
313
|
|
324
314
|
**Options**
|
325
|
-
- `-d,
|
326
|
-
- `-t,
|
315
|
+
- `-d, --dump=TARGET`: After setup, dump the TARGET db and source it into the development db
|
316
|
+
- `-t, --test`: After setup, run tests
|
327
317
|
|
328
318
|
|
329
319
|
### `geordi shell TARGET`
|
@@ -335,7 +325,7 @@ Selecting the server: `geordi shell staging -s` shows a menu with all available
|
|
335
325
|
servers. When passed a number, directly connects to the selected server.
|
336
326
|
|
337
327
|
**Options**
|
338
|
-
- `-s,
|
328
|
+
- `-s, --select-server=[SERVER_NUMBER]`: Select a server to connect to
|
339
329
|
|
340
330
|
|
341
331
|
### `geordi tests [FILES]`
|
@@ -365,8 +355,8 @@ Example: `geordi update`
|
|
365
355
|
Performs: `git pull`, `bundle install` (if necessary) and migrates (if applicable).
|
366
356
|
|
367
357
|
**Options**
|
368
|
-
- `-d,
|
369
|
-
- `-t,
|
358
|
+
- `-d, --dump=TARGET`: After updating, dump the TARGET db and source it into the development db
|
359
|
+
- `-t, --test`: After updating, run tests
|
370
360
|
|
371
361
|
|
372
362
|
### `geordi version`
|
data/Rakefile
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
+
require_relative 'lib/geordi/interaction'
|
2
|
+
|
1
3
|
require 'bundler'
|
2
4
|
Bundler::GemHelper.install_tasks
|
3
5
|
|
6
|
+
# Run this before releasing
|
7
|
+
Rake::Task['release:guard_clean'].enhance [:check]
|
8
|
+
|
4
9
|
desc 'Default: Run all tests'
|
5
10
|
task default: [:rspec, :features]
|
6
11
|
|
@@ -12,6 +17,12 @@ task :rspec do
|
|
12
17
|
system 'bundle exec rspec'
|
13
18
|
end
|
14
19
|
|
20
|
+
task :check do
|
21
|
+
Geordi::Interaction.prompt('Are all specs & features green?', 'y', /y|yes/) || Geordi::Interaction.fail('Please run all tests with `rake`.')
|
22
|
+
Geordi::Interaction.prompt('Have you updated the README?', 'y', /y|yes/) || Geordi::Interaction.fail('Please update the README with `rake readme`.')
|
23
|
+
Geordi::Interaction.prompt('Have you updated the CHANGELOG', 'y', /y|yes/) || Geordi::Interaction.fail('Please update the CHANGELOG with the latest changes.')
|
24
|
+
end
|
25
|
+
|
15
26
|
task :readme do
|
16
27
|
require File.expand_path('lib/geordi/cli', __dir__)
|
17
28
|
|
@@ -53,7 +64,11 @@ You can always run `geordi help <command>` to quickly look up command help.
|
|
53
64
|
if visible_options.any?
|
54
65
|
geordi_section << "**Options**\n"
|
55
66
|
visible_options.values.each do |option|
|
56
|
-
|
67
|
+
usage = option.usage
|
68
|
+
.gsub(/\[(--.*?)\]/, '\1')
|
69
|
+
.sub(/, --no-[\w-]+, --skip-[\w-]+$/, '')
|
70
|
+
|
71
|
+
geordi_section << "- `#{usage}`"
|
57
72
|
geordi_section << ": #{option.description}" if option.description
|
58
73
|
geordi_section << "\n"
|
59
74
|
end
|
@@ -18,6 +18,20 @@ module Geordi
|
|
18
18
|
deploy_info.scan(/^\s*server\s*['"](.*?)['"]/).flatten
|
19
19
|
end
|
20
20
|
|
21
|
+
def branch
|
22
|
+
deploy_info[/
|
23
|
+
# Marker
|
24
|
+
^\s*set.:branch,
|
25
|
+
|
26
|
+
# Might be followed by ENV['DEPLOY_BRANCH']
|
27
|
+
.*
|
28
|
+
|
29
|
+
# Assume the last word in quotes will be the right branch
|
30
|
+
# (\1 matches the opening quote character)
|
31
|
+
(['"])(\w+)\1\s*$
|
32
|
+
/x, 2]
|
33
|
+
end
|
34
|
+
|
21
35
|
def primary_server
|
22
36
|
# Actually, servers may have a :primary property. From Capistrano 3, the
|
23
37
|
# first listed server is the primary one by default, which is a good-
|
@@ -43,14 +57,10 @@ module Geordi
|
|
43
57
|
|
44
58
|
def load_deploy_info
|
45
59
|
lines = []
|
46
|
-
|
47
|
-
|
48
|
-
if stage
|
49
|
-
lines += File.readlines(File.join(root, "config/deploy/#{stage}.rb"))
|
50
|
-
end
|
51
|
-
|
60
|
+
lines += File.readlines(File.join(root, "config/deploy/#{stage}.rb")).push("\n") if stage
|
52
61
|
lines += File.readlines(File.join(root, 'config/deploy.rb'))
|
53
62
|
|
63
|
+
self.deploy_info = ''
|
54
64
|
lines.each do |line|
|
55
65
|
next if line =~ /^\s*#/ # Omit comment lines
|
56
66
|
line.chomp! if line =~ /[\\,]\s*$/ # Join wrapped lines
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require_relative '../capistrano_config'
|
2
|
+
|
1
3
|
desc 'deploy [STAGE]', 'Guided deployment across branches'
|
2
4
|
long_desc <<-LONGDESC
|
3
5
|
Example: `geordi deploy` or `geordi deploy p[roduction]` or `geordi deploy --current-branch`
|
@@ -47,6 +49,8 @@ def deploy(target_stage = nil)
|
|
47
49
|
|
48
50
|
# Ask for required information
|
49
51
|
target_stage ||= Interaction.prompt 'Deployment stage:', branch_stage_map.fetch(Util.current_branch, 'staging')
|
52
|
+
capistrano_config = CapistranoConfig.new(target_stage)
|
53
|
+
|
50
54
|
if options.current_branch
|
51
55
|
stage_file = "config/deploy/#{target_stage}.rb"
|
52
56
|
Util.file_containing?(stage_file, 'DEPLOY_BRANCH') || Interaction.fail(<<~ERROR)
|
@@ -57,10 +61,10 @@ def deploy(target_stage = nil)
|
|
57
61
|
ERROR
|
58
62
|
|
59
63
|
source_branch = target_branch = Util.current_branch
|
60
|
-
else
|
64
|
+
else # Normal deploy
|
61
65
|
source_branch = Interaction.prompt 'Source branch:', Util.current_branch
|
62
66
|
|
63
|
-
deploy_branch =
|
67
|
+
deploy_branch = capistrano_config.branch
|
64
68
|
deploy_branch ||= Util.git_default_branch
|
65
69
|
target_branch = Interaction.prompt 'Deploy branch:', deploy_branch
|
66
70
|
end
|
data/lib/geordi/dump_loader.rb
CHANGED
data/lib/geordi/gitlinear.rb
CHANGED
data/lib/geordi/remote.rb
CHANGED
data/lib/geordi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geordi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.
|
4
|
+
version: 12.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|