geordi 5.2.3 → 5.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/README.md +9 -9
- data/lib/geordi/commands/delete_dumps.rb +26 -28
- data/lib/geordi/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 559fa220792042ae1d84411772b63a5f4526df68f5ac4eefbb008ac63705d72d
|
4
|
+
data.tar.gz: e43a552812daed79454864bed854720537ee2e9d8d303212b5dde4d8ef0b1694
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0193eed8c9af5cadd36498a4b0eb5b6364a58e20e93ef3619af3dc934b16f61652b9b703e00049109592e6b324c7854d3d56cfe5aa14ca8948e5d6ed1320a548'
|
7
|
+
data.tar.gz: d7afc3e6ac2b5c3255fedd1f6e2a3f8fa1469c822c64f1ed1471a46ab0208c1f1f6084ee17b0edee79f07d0bce1d64d7768dcfaddffed61dfdd6664863851a49
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,12 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
10
10
|
### Breaking changes
|
11
11
|
|
12
12
|
|
13
|
+
## 5.2.4 2021-01-29
|
14
|
+
|
15
|
+
### Compatible changes
|
16
|
+
* Fix and improve delete-dumps command (now supporting multiple arguments)
|
17
|
+
|
18
|
+
|
13
19
|
## 5.2.3 2021-01-27
|
14
20
|
|
15
21
|
### Compatible changes
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -111,13 +111,13 @@ in `.geordi.yml` in the project root.
|
|
111
111
|
### `geordi delete-dumps [DIRECTORY]`
|
112
112
|
Delete database dump files (*.dump).
|
113
113
|
|
114
|
-
Example: `geordi
|
114
|
+
Example: `geordi delete-dumps` or `geordi delete-dumps ~/tmp/dumps`
|
115
115
|
|
116
|
-
Recursively
|
116
|
+
Recursively searches for files ending in `.dump` and offers to delete them. When
|
117
117
|
no argument is given, two default directories are searched for dump files: the
|
118
118
|
current working directory and `~/dumps` (for dumps created with geordi).
|
119
119
|
|
120
|
-
|
120
|
+
Will ask for confirmation before actually deleting files.
|
121
121
|
|
122
122
|
|
123
123
|
### `geordi deploy [STAGE]`
|
@@ -169,9 +169,11 @@ There are three subcommands:
|
|
169
169
|
|
170
170
|
- `geordi docker setup`
|
171
171
|
Fetches all docker containers.
|
172
|
+
|
172
173
|
- `geordi docker shell`
|
173
174
|
Runs the docker service named 'main'.
|
174
|
-
Append `--secondary` to open a second shell in
|
175
|
+
Append `--secondary` to open a second shell in an already running container.
|
176
|
+
|
175
177
|
- `geordi docker vnc`
|
176
178
|
Opens a VNC viewer to connect to the VNC server in the container.
|
177
179
|
|
@@ -424,11 +426,9 @@ Once you have completed your modifications, please update CHANGELOG and README
|
|
424
426
|
as needed. Use `rake readme` to regenerate the Geordi section of the README from
|
425
427
|
the command documentations.
|
426
428
|
|
427
|
-
Make sure tests are green in the
|
428
|
-
|
429
|
-
|
430
|
-
Before releasing your changes, wait for the Travis results to see that tests
|
431
|
-
passed in all Ruby versions.
|
429
|
+
Make sure tests are green in the oldest supported Ruby version. Before releasing
|
430
|
+
a new gem version, wait for the CI results to see that tests are green in all
|
431
|
+
Ruby versions.
|
432
432
|
|
433
433
|
|
434
434
|
Adding a new command
|
@@ -1,43 +1,41 @@
|
|
1
1
|
desc 'delete-dumps [DIRECTORY]', 'Delete database dump files (*.dump)'
|
2
2
|
long_desc <<-LONGDESC
|
3
|
-
Example: `geordi
|
3
|
+
Example: `geordi delete-dumps` or `geordi delete-dumps ~/tmp/dumps`
|
4
4
|
|
5
|
-
Recursively
|
5
|
+
Recursively searches for files ending in `.dump` and offers to delete them. When
|
6
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
|
+
Will ask for confirmation before actually deleting files.
|
10
10
|
LONGDESC
|
11
11
|
|
12
|
-
def delete_dumps(
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
]
|
19
|
-
else
|
20
|
-
[dump_directory]
|
12
|
+
def delete_dumps(*locations)
|
13
|
+
Interaction.announce 'Retrieving dump files'
|
14
|
+
|
15
|
+
dump_files = []
|
16
|
+
if locations.empty?
|
17
|
+
locations = [ File.join(Dir.home, 'dumps'), Dir.pwd ]
|
21
18
|
end
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
locations.map! &File.method(:expand_path)
|
20
|
+
|
21
|
+
Interaction.note "Looking in #{locations.join(', ')}"
|
22
|
+
locations.each do |dir|
|
23
|
+
directory = File.expand_path(dir)
|
24
|
+
unless File.directory? File.realdirpath(directory)
|
25
|
+
Interaction.warn "Directory #{directory} does not exist. Skipping."
|
27
26
|
next
|
28
27
|
end
|
29
|
-
|
28
|
+
dump_files.concat Dir.glob("#{directory}/**/*.dump")
|
30
29
|
end
|
30
|
+
deletable_dumps = dump_files.flatten.uniq.sort.select &File.method(:file?)
|
31
|
+
|
31
32
|
if deletable_dumps.empty?
|
32
|
-
Interaction.
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
Interaction.prompt('Delete those dumps', 'n', /y|yes/) || raise('Cancelled.')
|
40
|
-
deletable_dumps.each do |dump|
|
41
|
-
File.delete dump unless File.directory? dump
|
33
|
+
Interaction.note 'No dump files found'
|
34
|
+
else
|
35
|
+
puts deletable_dumps
|
36
|
+
Interaction.prompt('Delete these files?', 'n', /y|yes/) || Interaction.fail('Cancelled.')
|
37
|
+
|
38
|
+
deletable_dumps.each &File.method(:delete)
|
39
|
+
Interaction.success 'Done.'
|
42
40
|
end
|
43
41
|
end
|
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: 5.2.
|
4
|
+
version: 5.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
121
|
+
rubygems_version: 3.1.4
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: Collection of command line tools we use in our daily work with Ruby, Rails
|