geordi 4.1.1 → 4.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/.travis.yml +5 -0
- data/CHANGELOG.md +15 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +45 -27
- data/README.md +17 -2
- data/Rakefile +1 -1
- data/exe/dumple +9 -4
- data/geordi.gemspec +3 -3
- data/lib/geordi/chromedriver_updater.rb +2 -2
- data/lib/geordi/commands/chromedriver_update.rb +8 -1
- data/lib/geordi/commands/cucumber.rb +7 -2
- data/lib/geordi/commands/dump.rb +14 -4
- data/lib/geordi/remote.rb +3 -2
- data/lib/geordi/settings.rb +11 -2
- data/lib/geordi/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c5a8befcc3bb1f14b4bd0803491b56ccb7db92daf47aa45eb73f359988ab768
|
|
4
|
+
data.tar.gz: 244b132d249d3e0d0d851ad79bae5890736e52f202a7bb2bf0c80b3a6d821195
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f57ac5bb0f1e804e2d53ab30e0b5c3742835eabfd5d58755dd4a06b55d5065bc0f3fa7b4d00bca9b4f72ae2329042339203ced4336830c534585e684241570c
|
|
7
|
+
data.tar.gz: 52c77c467efc9ecf3fc8f26dc713b38d26e79977a55604921ffe62b1f2808562e9f770d0c11ba59045f595df54d07c3a91b8b926361ae00e0330625bc3418c75
|
data/.travis.yml
CHANGED
|
@@ -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
|
data/CHANGELOG.md
CHANGED
|
@@ -5,10 +5,25 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
|
+
|
|
8
9
|
### Compatible changes
|
|
9
10
|
### Breaking changes
|
|
10
11
|
|
|
11
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
|
+
|
|
12
27
|
## 4.1.1 2020-08-28
|
|
13
28
|
### Compatible changes
|
|
14
29
|
|
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'
|
data/Gemfile.lock
CHANGED
|
@@ -7,70 +7,87 @@ PATH
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: http://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
addressable (2.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
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.
|
|
27
|
+
coderay (1.1.3)
|
|
23
28
|
coercible (1.0.0)
|
|
24
29
|
descendants_tracker (~> 0.0.1)
|
|
25
|
-
|
|
30
|
+
contracts (0.16.0)
|
|
31
|
+
cucumber (3.0.0)
|
|
26
32
|
builder (>= 2.1.2)
|
|
27
|
-
|
|
28
|
-
|
|
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.
|
|
51
|
+
diff-lcs (1.4.4)
|
|
36
52
|
equalizer (0.0.11)
|
|
37
|
-
excon (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
|
-
|
|
43
|
-
|
|
44
|
-
highline (
|
|
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.
|
|
50
|
-
multi_json (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 (
|
|
54
|
-
parallel_tests (
|
|
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
|
-
|
|
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.
|
|
81
|
+
rspec-expectations (3.9.2)
|
|
65
82
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
66
|
-
rspec-support (~> 3.
|
|
67
|
-
rspec-mocks (3.
|
|
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.
|
|
70
|
-
rspec-support (3.
|
|
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.
|
|
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
|
@@ -39,6 +39,13 @@ Example: `geordi chromedriver_update`
|
|
|
39
39
|
This command will find and install the matching chromedriver for the currently
|
|
40
40
|
installed Chrome.
|
|
41
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
|
+
|
|
46
|
+
**Options**
|
|
47
|
+
- `[--quiet-if-matching], [--no-quiet-if-matching]`: Suppress notification if chromedriver and chrome versions match
|
|
48
|
+
|
|
42
49
|
|
|
43
50
|
### `geordi clean`
|
|
44
51
|
Remove unneeded files from the current directory.
|
|
@@ -169,10 +176,18 @@ offer to edit the whitelist instead.
|
|
|
169
176
|
- `[--postgres=PORT_OR_SOCKET]`: Use Postgres port or socket
|
|
170
177
|
- `[--mysql=PORT_OR_SOCKET]`: Use MySQL/MariaDB port or socket
|
|
171
178
|
|
|
172
|
-
|
|
173
179
|
### `geordi dump [TARGET]`
|
|
174
180
|
Handle (remote) database dumps.
|
|
175
181
|
|
|
182
|
+
If you are using multiple databases per environment, pass the database name like this:
|
|
183
|
+
|
|
184
|
+
geordi dump -d primary
|
|
185
|
+
|
|
186
|
+
Loading a dump into one of multiple local databases is not supported yet.
|
|
187
|
+
|
|
188
|
+
When called with the `--load` option, sources the specified dump into the
|
|
189
|
+
development database.
|
|
190
|
+
|
|
176
191
|
`geordi dump` (without arguments) dumps the development database with `dumple`.
|
|
177
192
|
|
|
178
193
|
`geordi dump -l tmp/staging.dump` (with the `--load` option) sources the
|
|
@@ -407,7 +422,7 @@ To try Geordi locally, call it like this:
|
|
|
407
422
|
|
|
408
423
|
# -I means "add the following directory to load path"
|
|
409
424
|
ruby -Ilib exe/geordi
|
|
410
|
-
|
|
425
|
+
|
|
411
426
|
# From another directory
|
|
412
427
|
ruby -I ../geordi/lib ../geordi/exe/geordi
|
|
413
428
|
|
data/Rakefile
CHANGED
data/exe/dumple
CHANGED
|
@@ -45,9 +45,13 @@ begin
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
config = YAML::load(ERB.new(File.read(config_path)).result)
|
|
48
|
+
environment, database = ARGV.reject{ |arg| arg[0].chr == '-' }
|
|
49
|
+
environment ||= 'production'
|
|
50
|
+
config = config[environment] or raise "No #{environment} database found.\nUsage: dumple ENVIRONMENT [DATABASE]"
|
|
48
51
|
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
if database
|
|
53
|
+
config = config[database] or raise %(Unknown #{environment} database "#{database}")
|
|
54
|
+
end
|
|
51
55
|
|
|
52
56
|
dump_dir = "#{ENV['HOME']}/dumps"
|
|
53
57
|
unless File.directory?(dump_dir)
|
|
@@ -61,7 +65,8 @@ begin
|
|
|
61
65
|
dump_path = "#{dump_dir}/#{config['database']}_#{Time.now.strftime("%Y%m%d_%H%M%S")}.dump"
|
|
62
66
|
end
|
|
63
67
|
|
|
64
|
-
|
|
68
|
+
given_database = database ? %(#{database} ) : ""
|
|
69
|
+
puts "> Dumping #{given_database}database for \"#{environment}\" environment ..."
|
|
65
70
|
|
|
66
71
|
host = config['host']
|
|
67
72
|
port = config['port']
|
|
@@ -90,7 +95,7 @@ begin
|
|
|
90
95
|
command << " --port=#{port}" if port
|
|
91
96
|
command
|
|
92
97
|
else
|
|
93
|
-
raise "Adapter \"#{config['adapter']} is not supported"
|
|
98
|
+
raise "Adapter \"#{config['adapter']}\" is not supported"
|
|
94
99
|
end
|
|
95
100
|
success = system(dump_command)
|
|
96
101
|
success or raise "Creating the dump failed"
|
data/geordi.gemspec
CHANGED
|
@@ -11,13 +11,13 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
|
|
12
12
|
spec.summary = 'Collection of command line tools we use in our daily work with Ruby, Rails and Linux at makandra.'
|
|
13
13
|
spec.description = 'Collection of command line tools we use in our daily work with Ruby, Rails and Linux at makandra.'
|
|
14
|
-
spec.homepage = '
|
|
14
|
+
spec.homepage = 'https://makandra.com'
|
|
15
15
|
spec.license = 'MIT'
|
|
16
16
|
|
|
17
17
|
# Specify which files should be added to the gem when it is released.
|
|
18
18
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
19
19
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
20
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(
|
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec|features)/}) }
|
|
21
21
|
end
|
|
22
22
|
spec.bindir = 'exe'
|
|
23
23
|
spec.executables = spec.files.grep(%r(^exe/)) { |f| File.basename(f) }
|
|
@@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
|
|
28
28
|
spec.post_install_message = <<-ATTENTION
|
|
29
29
|
* Binary `geordi` installed
|
|
30
|
-
* Geordi 4
|
|
30
|
+
* Geordi 4 has removed its deprecated executables. If you want to invoke these commands like before, you may create aliases on your machine. For the alias mapping, please refer to https://github.com/makandra/geordi/commit/68fa92acb146ebde3acb92d7b9556bd4eaa2b4ff
|
|
31
31
|
ATTENTION
|
|
32
32
|
end
|
|
@@ -5,12 +5,12 @@ require 'tempfile'
|
|
|
5
5
|
module Geordi
|
|
6
6
|
class ChromedriverUpdater
|
|
7
7
|
|
|
8
|
-
def run
|
|
8
|
+
def run(options)
|
|
9
9
|
chrome_version = determine_chrome_version
|
|
10
10
|
chromedriver_version = determine_chromedriver_version
|
|
11
11
|
|
|
12
12
|
if skip_update?(chrome_version, chromedriver_version)
|
|
13
|
-
Interaction.
|
|
13
|
+
Interaction.note("No update required, you are using for both executables the same version #{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'))
|
|
@@ -4,10 +4,17 @@ Example: `geordi chromedriver_update`
|
|
|
4
4
|
|
|
5
5
|
This command will find and install the matching chromedriver for the currently
|
|
6
6
|
installed Chrome.
|
|
7
|
+
|
|
8
|
+
Setting `auto_update_chromedriver` to `true` in your global Geordi config file
|
|
9
|
+
(`~/.config/geordi/global.yml`), will automatically update chromedriver before
|
|
10
|
+
cucumber tests, in case Chrome and chromedriver versions don't match
|
|
7
11
|
LONGDESC
|
|
8
12
|
|
|
13
|
+
option :quiet_if_matching, type: :boolean, default: false,
|
|
14
|
+
desc: 'Suppress notification if chromedriver and chrome versions match'
|
|
15
|
+
|
|
9
16
|
def chromedriver_update
|
|
10
17
|
require 'geordi/chromedriver_updater'
|
|
11
18
|
|
|
12
|
-
ChromedriverUpdater.new.run
|
|
19
|
+
ChromedriverUpdater.new.run(options)
|
|
13
20
|
end
|
|
@@ -37,7 +37,7 @@ def cucumber(*args)
|
|
|
37
37
|
if args.empty?
|
|
38
38
|
# This is not testable as there is no way to stub `git` :(
|
|
39
39
|
if options.modified?
|
|
40
|
-
modified_features = `git status --short`.split(
|
|
40
|
+
modified_features = `git status --short`.split("\n").map do |line|
|
|
41
41
|
indicators = line.slice!(0..2) # Remove leading indicators
|
|
42
42
|
line if line.include?('.feature') && !indicators.include?('D')
|
|
43
43
|
end.compact
|
|
@@ -45,7 +45,7 @@ def cucumber(*args)
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
if options.containing
|
|
48
|
-
matching_features = `grep -lri '#{options.containing}' --include=*.feature features/`.split(
|
|
48
|
+
matching_features = `grep -lri '#{options.containing}' --include=*.feature features/`.split("\n")
|
|
49
49
|
args = matching_features.uniq
|
|
50
50
|
end
|
|
51
51
|
end
|
|
@@ -53,8 +53,13 @@ def cucumber(*args)
|
|
|
53
53
|
if File.directory?('features')
|
|
54
54
|
require 'geordi/cucumber'
|
|
55
55
|
|
|
56
|
+
settings = Geordi::Settings.new
|
|
57
|
+
|
|
56
58
|
invoke_geordi 'bundle_install'
|
|
57
59
|
invoke_geordi 'yarn_install'
|
|
60
|
+
if settings.auto_update_chromedriver
|
|
61
|
+
invoke_geordi 'chromedriver_update', quiet_if_matching: true
|
|
62
|
+
end
|
|
58
63
|
|
|
59
64
|
cmd_opts, files = args.partition { |f| f.start_with? '-' }
|
|
60
65
|
cmd_opts << '--format' << 'pretty' << '--backtrace' if options.debug
|
data/lib/geordi/commands/dump.rb
CHANGED
|
@@ -10,13 +10,21 @@ specified target's database and downloads it to `tmp/`.
|
|
|
10
10
|
|
|
11
11
|
`geordi dump staging -l` (with a Capistrano deploy target and the `--load`
|
|
12
12
|
option) sources the dump into the development database after downloading it.
|
|
13
|
+
|
|
14
|
+
If you are using multiple databases per environment, pass the database name like this:
|
|
15
|
+
|
|
16
|
+
geordi dump -d primary
|
|
17
|
+
|
|
18
|
+
Loading a dump into one of multiple local databases is not supported yet.
|
|
13
19
|
DESC
|
|
14
20
|
|
|
15
21
|
option :load, aliases: '-l', type: :string, desc: 'Load a dump', banner: '[DUMP_FILE]'
|
|
22
|
+
option :database, aliases: '-d', type: :string, desc: 'Database name, if there are multiple databases', banner: 'NAME'
|
|
16
23
|
|
|
17
24
|
def dump(target = nil, *_args)
|
|
18
25
|
require 'geordi/dump_loader'
|
|
19
26
|
require 'geordi/remote'
|
|
27
|
+
database = options[:database] ? "#{options[:database]} " : ''
|
|
20
28
|
|
|
21
29
|
if target.nil?
|
|
22
30
|
if options.load
|
|
@@ -33,12 +41,14 @@ def dump(target = nil, *_args)
|
|
|
33
41
|
|
|
34
42
|
else
|
|
35
43
|
Interaction.announce 'Dumping the development database'
|
|
36
|
-
Util.run!(
|
|
37
|
-
Interaction.success
|
|
44
|
+
Util.run!("dumple development #{database}")
|
|
45
|
+
Interaction.success "Successfully dumped the #{database}development database."
|
|
38
46
|
end
|
|
39
47
|
|
|
40
48
|
else
|
|
41
|
-
|
|
49
|
+
database_label = options[:database] ? " (#{database}database)" : ""
|
|
50
|
+
|
|
51
|
+
Interaction.announce "Dumping the database of #{target}#{database_label}"
|
|
42
52
|
dump_path = Geordi::Remote.new(target).dump(options)
|
|
43
53
|
|
|
44
54
|
if options.load
|
|
@@ -47,7 +57,7 @@ def dump(target = nil, *_args)
|
|
|
47
57
|
Interaction.announce "Sourcing dump into the #{loader.config['database']} db"
|
|
48
58
|
loader.load
|
|
49
59
|
|
|
50
|
-
Interaction.success "Your #{loader.config['database']} database has now the data of #{target}."
|
|
60
|
+
Interaction.success "Your #{loader.config['database']} database has now the data of #{target}#{database_label}."
|
|
51
61
|
end
|
|
52
62
|
end
|
|
53
63
|
end
|
data/lib/geordi/remote.rb
CHANGED
|
@@ -31,9 +31,10 @@ module Geordi
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
def dump(options = {})
|
|
34
|
+
database = options[:database] ? " #{options[:database]}" : ''
|
|
34
35
|
# Generate dump on the server
|
|
35
36
|
shell options.merge({
|
|
36
|
-
remote_command: "dumple #{@config.env} --for_download",
|
|
37
|
+
remote_command: "dumple #{@config.env}#{database} --for_download",
|
|
37
38
|
})
|
|
38
39
|
|
|
39
40
|
destination_directory = File.join(@config.root, 'tmp')
|
|
@@ -45,7 +46,7 @@ module Geordi
|
|
|
45
46
|
server = @config.primary_server
|
|
46
47
|
Util.run!("scp -C #{@config.user(server)}@#{server}:#{REMOTE_DUMP_PATH} #{destination_path}")
|
|
47
48
|
|
|
48
|
-
Interaction.success "Dumped the #{@stage} database to #{relative_destination}."
|
|
49
|
+
Interaction.success "Dumped the#{database} #{@stage} database to #{relative_destination}."
|
|
49
50
|
|
|
50
51
|
destination_path
|
|
51
52
|
end
|
data/lib/geordi/settings.rb
CHANGED
|
@@ -8,7 +8,7 @@ module Geordi
|
|
|
8
8
|
GLOBAL_SETTINGS_FILE_NAME = Util.testing? ? './tmp/global_settings.yml'.freeze : File.join(ENV['HOME'], '.config/geordi/global.yml').freeze
|
|
9
9
|
LOCAL_SETTINGS_FILE_NAME = Util.testing? ? './tmp/local_settings.yml'.freeze : './.geordi.yml'.freeze
|
|
10
10
|
|
|
11
|
-
ALLOWED_GLOBAL_SETTINGS = %w[ pivotal_tracker_api_key ].freeze
|
|
11
|
+
ALLOWED_GLOBAL_SETTINGS = %w[ pivotal_tracker_api_key auto_update_chromedriver ].freeze
|
|
12
12
|
ALLOWED_LOCAL_SETTINGS = %w[ use_vnc pivotal_tracker_project_ids ].freeze
|
|
13
13
|
|
|
14
14
|
def initialize
|
|
@@ -25,6 +25,15 @@ module Geordi
|
|
|
25
25
|
save_global_settings
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
+
def auto_update_chromedriver
|
|
29
|
+
@global_settings["auto_update_chromedriver"] || false
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def auto_update_chromedriver=(value)
|
|
33
|
+
@global_settings['auto_update_chromedriver'] = value
|
|
34
|
+
save_global_settings
|
|
35
|
+
end
|
|
36
|
+
|
|
28
37
|
# Local settings
|
|
29
38
|
# They should not be changed by geordi to avoid unexpected diffs, therefore
|
|
30
39
|
# there are no setters for these settings
|
|
@@ -129,7 +138,7 @@ module Geordi
|
|
|
129
138
|
def inquire_pt_api_key
|
|
130
139
|
Geordi::Interaction.warn 'Your settings are missing or invalid.'
|
|
131
140
|
Geordi::Interaction.warn "Please configure your Pivotal Tracker access."
|
|
132
|
-
token = Geordi::Interaction.prompt
|
|
141
|
+
token = Geordi::Interaction.prompt('Your API key:').to_s # Just be sure
|
|
133
142
|
self.pivotal_tracker_api_key = token
|
|
134
143
|
puts
|
|
135
144
|
|
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: 4.
|
|
4
|
+
version: 4.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: 2020-
|
|
11
|
+
date: 2020-10-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|
|
@@ -97,13 +97,13 @@ files:
|
|
|
97
97
|
- lib/geordi/settings.rb
|
|
98
98
|
- lib/geordi/util.rb
|
|
99
99
|
- lib/geordi/version.rb
|
|
100
|
-
homepage:
|
|
100
|
+
homepage: https://makandra.com
|
|
101
101
|
licenses:
|
|
102
102
|
- MIT
|
|
103
103
|
metadata: {}
|
|
104
104
|
post_install_message: |
|
|
105
105
|
* Binary `geordi` installed
|
|
106
|
-
* Geordi 4
|
|
106
|
+
* Geordi 4 has removed its deprecated executables. If you want to invoke these commands like before, you may create aliases on your machine. For the alias mapping, please refer to https://github.com/makandra/geordi/commit/68fa92acb146ebde3acb92d7b9556bd4eaa2b4ff
|
|
107
107
|
rdoc_options: []
|
|
108
108
|
require_paths:
|
|
109
109
|
- lib
|
|
@@ -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
|