geordi 2.12.3 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +8 -2
  4. data/CHANGELOG.md +8 -0
  5. data/Gemfile +2 -6
  6. data/Gemfile.lock +20 -25
  7. data/README.md +8 -28
  8. data/Rakefile +6 -10
  9. data/{bin → exe}/b +0 -0
  10. data/{bin → exe}/cap-all +0 -0
  11. data/{bin → exe}/console-for +0 -0
  12. data/{bin → exe}/cuc +0 -0
  13. data/{bin → exe}/cuc-show +0 -0
  14. data/{bin → exe}/cuc-vnc-setup +0 -0
  15. data/{bin → exe}/deploy-to-production +0 -0
  16. data/{bin → exe}/dump-for +0 -0
  17. data/{bin → exe}/dumple +0 -0
  18. data/{bin → exe}/geordi +0 -2
  19. data/{bin → exe}/gitpt +0 -0
  20. data/{bin → exe}/launchy_browser +0 -0
  21. data/{bin → exe}/load-dump +0 -0
  22. data/{bin → exe}/migrate-all +0 -0
  23. data/{bin → exe}/rs +0 -0
  24. data/{bin → exe}/run_tests +0 -0
  25. data/{bin → exe}/shell-for +0 -0
  26. data/{bin → exe}/tests +0 -0
  27. data/geordi.gemspec +23 -20
  28. data/lib/geordi/COMMAND_TEMPLATE +2 -3
  29. data/lib/geordi/capistrano_config.rb +7 -7
  30. data/lib/geordi/chromedriver_updater.rb +7 -7
  31. data/lib/geordi/cli.rb +1 -6
  32. data/lib/geordi/commands/_setup_vnc.rb +1 -1
  33. data/lib/geordi/commands/apache_site.rb +3 -3
  34. data/lib/geordi/commands/bundle_install.rb +2 -2
  35. data/lib/geordi/commands/capistrano.rb +2 -3
  36. data/lib/geordi/commands/chromedriver_update.rb +0 -9
  37. data/lib/geordi/commands/clean.rb +2 -4
  38. data/lib/geordi/commands/commit.rb +0 -1
  39. data/lib/geordi/commands/console.rb +2 -2
  40. data/lib/geordi/commands/create_database_yml.rb +2 -2
  41. data/lib/geordi/commands/create_databases.rb +2 -2
  42. data/lib/geordi/commands/cucumber.rb +20 -20
  43. data/lib/geordi/commands/delete_dumps.rb +9 -9
  44. data/lib/geordi/commands/deploy.rb +12 -13
  45. data/lib/geordi/commands/drop_databases.rb +12 -14
  46. data/lib/geordi/commands/dump.rb +5 -6
  47. data/lib/geordi/commands/eurest.rb +2 -2
  48. data/lib/geordi/commands/firefox.rb +3 -3
  49. data/lib/geordi/commands/png_optimize.rb +13 -12
  50. data/lib/geordi/commands/rake.rb +2 -2
  51. data/lib/geordi/commands/remove_executable_flags.rb +1 -1
  52. data/lib/geordi/commands/rspec.rb +6 -6
  53. data/lib/geordi/commands/security_update.rb +12 -12
  54. data/lib/geordi/commands/server.rb +5 -5
  55. data/lib/geordi/commands/setup.rb +5 -5
  56. data/lib/geordi/commands/shell.rb +2 -2
  57. data/lib/geordi/commands/unit.rb +1 -1
  58. data/lib/geordi/commands/update.rb +5 -5
  59. data/lib/geordi/commands/vnc.rb +1 -1
  60. data/lib/geordi/commands/with_rake.rb +1 -1
  61. data/lib/geordi/commands/yarn_install.rb +2 -2
  62. data/lib/geordi/cucumber.rb +28 -29
  63. data/lib/geordi/db_cleaner.rb +28 -28
  64. data/lib/geordi/dump_loader.rb +3 -3
  65. data/lib/geordi/firefox_for_selenium.rb +11 -12
  66. data/lib/geordi/gitpt.rb +13 -13
  67. data/lib/geordi/remote.rb +6 -6
  68. data/lib/geordi/util.rb +18 -24
  69. data/lib/geordi/version.rb +1 -1
  70. metadata +25 -42
  71. data/features/commit.feature +0 -17
  72. data/features/console.feature +0 -7
  73. data/features/cucumber.feature +0 -261
  74. data/features/deploy.feature +0 -66
  75. data/features/docker.feature +0 -86
  76. data/features/dump.feature +0 -34
  77. data/features/firefox.feature +0 -44
  78. data/features/server.feature +0 -31
  79. data/features/setup.feature +0 -11
  80. data/features/shell.feature +0 -78
  81. data/features/step_definitions/docker_command_steps.rb +0 -21
  82. data/features/step_definitions/miscellaneous_steps.rb +0 -11
  83. data/features/support/aruba.rb +0 -60
  84. data/features/support/env.rb +0 -9
  85. data/features/support/step_definitions/aruba_backport_steps.rb +0 -5
  86. data/lib/geordi/commands/docker.rb +0 -42
  87. data/lib/geordi/docker.rb +0 -116
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5895784a1a8f9b3736ad75362cb39de63e9fd9d6a110c797ae2db1a80afce5fe
4
- data.tar.gz: 15479d1cd51aca6abf203687facbfc6636bb67e137b5a31ebb7a28e3d430bda2
3
+ metadata.gz: bcd8074a50a0c81d4e0b7e2beaef07e8508018a494ae9b3cc288bb29c0b9e796
4
+ data.tar.gz: a8091353e0d315e6e37f93227688a89d74b7b01abcf4d4a4339271aaaf65e50a
5
5
  SHA512:
6
- metadata.gz: 6f647a99c2815d66971739927401b527e2c01fcf74dd461fe5941c73b2fd3e68996be2871a9007f76b2dcf54388c377d9838d662e32fc2185e4a976daefbd26a
7
- data.tar.gz: 3e041fe4095f22db1071a774024e3d0efda2c5ad15066cfd4fec33b2aa4547230f22194e1ac7af26c9a1977110e03a58c2f6282494812bc076762271572f9a51
6
+ metadata.gz: b6147e0cbddbcba812f1ea87f03544c0cefd6f40f766b6971275ec5c8efb25f307d47623508bb2990b7cdbd88ed540c51de51920faa59236e5a2034b2cfa9d68
7
+ data.tar.gz: '078962b0bac78764315e54f2f104354966cc775f18bd9a6d514069c8972bcf3dd4c96cb8b58e0ddf42b233032c12c7d00eb3af24b67970548bb297915d7394b7'
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.5
1
+ 2.0.0
data/.travis.yml CHANGED
@@ -1,8 +1,13 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - '1.8.7'
5
- - '2.6.3'
4
+ - '2.0.0'
5
+ - '2.1.10'
6
+ - '2.2.10'
7
+ - '2.3.8'
8
+ - '2.4.10'
9
+ - '2.5.8'
10
+ - '2.6.6'
6
11
 
7
12
  gemfile:
8
13
  - 'Gemfile'
@@ -10,6 +15,7 @@ gemfile:
10
15
  dist: trusty
11
16
 
12
17
  install:
18
+ - gem install bundler:1.17.3
13
19
  # Replace default Travis CI bundler script with a version that doesn't
14
20
  # explode when lockfile doesn't match recently bumped version
15
21
  - bundle install --no-deployment --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
data/CHANGELOG.md CHANGED
@@ -11,6 +11,14 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
11
11
  ### Breaking changes
12
12
 
13
13
 
14
+ ## 3.0.0 2020-05-04
15
+
16
+ ### Compatible changes
17
+
18
+ ### Breaking changes
19
+ - 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.
20
+
21
+
14
22
  ## 2.11.0 2020-05-04
15
23
 
16
24
  ### Compatible changes
data/Gemfile CHANGED
@@ -4,13 +4,9 @@ source 'http://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  gem 'aruba'
7
- gem 'contracts', '=0.9'
8
7
  gem 'rspec-mocks'
9
8
  gem 'highline'
10
9
  gem 'parallel_tests'
11
10
  gem 'launchy'
12
-
13
- if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.8.7')
14
- gem 'pry'
15
- gem 'tracker_api'
16
- end
11
+ gem 'pry'
12
+ gem 'tracker_api'
data/Gemfile.lock CHANGED
@@ -1,48 +1,44 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- geordi (2.12.3)
5
- thor (~> 0.18.0)
4
+ geordi (3.0.0)
5
+ thor (~> 1)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
10
  addressable (2.3.8)
11
- aruba (0.8.1)
12
- childprocess (~> 0.5.6)
13
- contracts (~> 0.9)
14
- cucumber (>= 1.3.19)
15
- rspec-expectations (>= 2.99)
11
+ aruba (0.6.2)
12
+ childprocess (>= 0.3.6)
13
+ cucumber (>= 1.1.1)
14
+ rspec-expectations (>= 2.7.0)
16
15
  axiom-types (0.1.1)
17
16
  descendants_tracker (~> 0.0.4)
18
17
  ice_nine (~> 0.11.0)
19
18
  thread_safe (~> 0.3, >= 0.3.1)
20
- builder (3.2.4)
21
- childprocess (0.5.9)
22
- ffi (~> 1.0, >= 1.0.11)
23
- coderay (1.1.3)
19
+ builder (3.2.3)
20
+ childprocess (1.0.1)
21
+ rake (< 13.0)
22
+ coderay (1.1.2)
24
23
  coercible (1.0.0)
25
24
  descendants_tracker (~> 0.0.1)
26
- contracts (0.9)
27
25
  cucumber (1.3.20)
28
26
  builder (>= 2.1.2)
29
27
  diff-lcs (>= 1.1.3)
30
28
  gherkin (~> 2.12)
31
29
  multi_json (>= 1.7.5, < 2.0)
32
30
  multi_test (>= 0.1.2)
33
- declarative (0.0.20)
31
+ declarative (0.0.10)
34
32
  declarative-option (0.1.0)
35
33
  descendants_tracker (0.0.4)
36
34
  thread_safe (~> 0.3, >= 0.3.1)
37
35
  diff-lcs (1.2.5)
38
36
  equalizer (0.0.11)
39
- excon (0.78.0)
40
- faraday (1.1.0)
37
+ excon (0.73.0)
38
+ faraday (0.17.3)
41
39
  multipart-post (>= 1.2, < 3)
42
- ruby2_keywords
43
- faraday_middleware (1.0.0)
44
- faraday (~> 1.0)
45
- ffi (1.9.18)
40
+ faraday_middleware (0.14.0)
41
+ faraday (>= 0.7.4, < 1.0)
46
42
  gherkin (2.12.2)
47
43
  multi_json (~> 1.3)
48
44
  highline (1.6.21)
@@ -50,8 +46,8 @@ GEM
50
46
  launchy (2.4.3)
51
47
  addressable (~> 2.3)
52
48
  method_source (1.0.0)
53
- mimemagic (0.3.5)
54
- multi_json (1.15.0)
49
+ mimemagic (0.3.4)
50
+ multi_json (1.13.1)
55
51
  multi_test (0.1.2)
56
52
  multipart-post (2.1.1)
57
53
  parallel (0.5.16)
@@ -60,6 +56,7 @@ GEM
60
56
  pry (0.13.1)
61
57
  coderay (~> 1.1)
62
58
  method_source (~> 1.0)
59
+ rake (10.5.0)
63
60
  representable (3.0.4)
64
61
  declarative (< 0.1.0)
65
62
  declarative-option (< 0.2.0)
@@ -71,10 +68,9 @@ GEM
71
68
  diff-lcs (>= 1.2.0, < 2.0)
72
69
  rspec-support (~> 3.4.0)
73
70
  rspec-support (3.4.1)
74
- ruby2_keywords (0.0.2)
75
- thor (0.18.1)
71
+ thor (1.0.1)
76
72
  thread_safe (0.3.6)
77
- tracker_api (1.11.0)
73
+ tracker_api (1.10.0)
78
74
  addressable
79
75
  equalizer
80
76
  excon
@@ -96,7 +92,6 @@ PLATFORMS
96
92
 
97
93
  DEPENDENCIES
98
94
  aruba
99
- contracts (= 0.9)
100
95
  geordi!
101
96
  highline
102
97
  launchy
data/README.md CHANGED
@@ -54,11 +54,6 @@ Commit using a story title from Pivotal Tracker.
54
54
 
55
55
  Example: `geordi commit`
56
56
 
57
- Any extra arguments are forwarded to `git commit -m <message>`.
58
-
59
- If there are no staged changes, prints a warning but will continue to create
60
- an empty commit.
61
-
62
57
  On the first execution we ask for your Pivotal Tracker API token. It will be
63
58
  stored in `~/.gitpt`.
64
59
 
@@ -140,23 +135,6 @@ instead of `cap deploy:migrations`. You can force using `deploy` by passing the
140
135
  -M option: `geordi deploy -M staging`.
141
136
 
142
137
 
143
- ### `geordi docker`
144
-
145
- Manage docker containers for the current project.
146
-
147
- Manage docker containers to run your project dockerized.
148
-
149
- It expects a docker-compose file that specifies all services, and a service
150
- named "main" that opens a shell for the project.
151
-
152
- There are two subcommands:
153
-
154
- - geordi docker setup
155
- Builds all docker containers.
156
- - geordi docker shell
157
- Runs the docker service named 'main'.
158
-
159
-
160
138
  ### `geordi drop-databases`
161
139
 
162
140
  Interactively delete local databases.
@@ -400,6 +378,14 @@ browser, as opposed to opening it within the VNC window.
400
378
  Contributing
401
379
  ============
402
380
 
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
+
386
+ Adding a new command
387
+ ---------------
388
+
403
389
  Copy `lib/geordi/COMMAND_TEMPLATE` to `lib/geordi/commands/your_command` and
404
390
  edit it to do what you need it to do. Usually, it is hard to automatedly test
405
391
  Geordi commands, so make sure you've manually tested it. You can do so by
@@ -410,9 +396,3 @@ calling your local geordi like so (adjust paths to your needs):
410
396
 
411
397
  # with debugger
412
398
  ruby -r byebug -I ../geordi/lib ../geordi/bin/geordi <command>
413
-
414
- Don't forget to update this README. The whole `geordi` section is auto-generated
415
- by `rake readme`. Also remember to add your changes to the CHANGELOG.
416
-
417
- Geordi is (partially) tested with Cucumber and Aruba. Run `bundle exec rake` to test the gem against you current Ruby
418
- version. The `travis.yml` contains all Ruby versions the gem is and needs to be tested with.
data/Rakefile CHANGED
@@ -2,18 +2,14 @@ require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
3
3
 
4
4
  desc 'Default: Run all tests'
5
- task :default => :features
5
+ task default: :features
6
6
 
7
7
  task :features do
8
- if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.8.7')
9
- system 'bundle exec cucumber'
10
- else
11
- system 'bundle exec cucumber --tags "~@ruby>=1.9"'
12
- end
8
+ system 'bundle exec cucumber'
13
9
  end
14
10
 
15
11
  task :readme do
16
- require File.expand_path('../lib/geordi/cli', __FILE__)
12
+ require File.expand_path('lib/geordi/cli', __dir__)
17
13
 
18
14
  readme = File.read('README.md')
19
15
  geordi_section_regex = /
@@ -43,9 +39,9 @@ For details on commands, e.g. supported options, you may always run
43
39
 
44
40
  Geordi::CLI.all_commands.sort.each do |_, command|
45
41
  unless command.hidden?
46
- geordi_section << "### `geordi #{ command.usage }`\n\n"
47
- geordi_section << "#{ command.description.sub /(\.)?$/, '.' }\n\n"
48
- geordi_section << "#{ command.long_description.strip }\n\n" if command.long_description
42
+ geordi_section << "### `geordi #{command.usage}`\n\n"
43
+ geordi_section << "#{command.description.sub /(\.)?$/, '.'}\n\n"
44
+ geordi_section << "#{command.long_description.strip}\n\n" if command.long_description
49
45
  geordi_section << "\n"
50
46
  end
51
47
  end
data/{bin → exe}/b RENAMED
File without changes
File without changes
File without changes
data/{bin → exe}/cuc RENAMED
File without changes
File without changes
File without changes
File without changes
File without changes
data/{bin → exe}/dumple RENAMED
File without changes
data/{bin → exe}/geordi RENAMED
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
4
-
5
3
  require 'geordi/util'
6
4
 
7
5
  Geordi::Util.installing_missing_gems do
data/{bin → exe}/gitpt RENAMED
File without changes
File without changes
File without changes
File without changes
data/{bin → exe}/rs RENAMED
File without changes
File without changes
File without changes
data/{bin → exe}/tests RENAMED
File without changes
data/geordi.gemspec CHANGED
@@ -1,28 +1,31 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "geordi/version"
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'geordi/version'
4
4
 
5
- Gem::Specification.new do |s|
6
- s.name = "geordi"
7
- s.version = Geordi::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["Henning Koch"]
10
- s.email = ["henning.koch@makandra.de"]
11
- s.homepage = "http://makandra.com"
12
- s.summary = 'Collection of command line tools we use in our daily work with Ruby, Rails and Linux at makandra.'
13
- s.description = 'Collection of command line tools we use in our daily work with Ruby, Rails and Linux at makandra.'
14
- s.license = 'MIT'
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'geordi'
7
+ spec.version = Geordi::VERSION
8
+ spec.required_ruby_version = '>= 2.0.0'
9
+ spec.authors = ['Henning Koch']
10
+ spec.email = ['henning.koch@makandra.de']
15
11
 
16
- s.rubyforge_project = "geordi"
12
+ spec.summary = 'Collection of command line tools we use in our daily work with Ruby, Rails and Linux at makandra.'
13
+ spec.description = 'Collection of command line tools we use in our daily work with Ruby, Rails and Linux at makandra.'
14
+ spec.homepage = 'http://makandra.com'
15
+ spec.license = 'MIT'
17
16
 
18
- s.files = `git ls-files`.split("\n")
19
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
- s.require_paths = ["lib"]
17
+ # Specify which files should be added to the gem when it is released.
18
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
20
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
+ end
22
+ spec.bindir = 'exe'
23
+ spec.executables = spec.files.grep(%r(^exe/)) { |f| File.basename(f) }
24
+ spec.require_paths = ['lib']
22
25
 
23
- s.add_runtime_dependency 'thor', '~> 0.18.0'
26
+ spec.add_runtime_dependency 'thor', '~> 1'
24
27
 
25
- s.post_install_message = <<-ATTENTION
28
+ spec.post_install_message = <<-ATTENTION
26
29
  * Binary `geordi` installed
27
30
  ATTENTION
28
31
  end
@@ -15,12 +15,11 @@ by `rake update_readme`. Thus, please format descriptions in a way that's reader
15
15
  friendly both in Markdown and the console.
16
16
  LONGDESC
17
17
 
18
- option :opt, :type => :boolean, :aliases => '-o', :banner => 'VALUE_NAME',
19
- :desc => 'If set, VALUE_NAME will be used for something'
18
+ option :opt, type: :boolean, aliases: '-o', banner: 'VALUE_NAME', desc: 'If set, VALUE_NAME will be used for something'
20
19
 
21
20
  def example
22
21
  # Invoke other commands like this:
23
- invoke_cmd 'other_command', 'argument', :an => 'option'
22
+ invoke_cmd 'other_command', 'argument', an: 'option'
24
23
 
25
24
  fail 'Option missing' unless options.opt?
26
25
 
@@ -10,8 +10,8 @@ module Geordi
10
10
  end
11
11
 
12
12
  def user(server)
13
- cap2user = deploy_info[ /^\s*set\s*:user,\s*['"](.*?)['"]/, 1 ]
14
- cap2user || deploy_info[ /^\s*server\s*['"]#{ server }['"],.*user.{1,4}['"](.*?)['"]/m, 1 ]
13
+ cap2user = deploy_info[/^\s*set\s*:user,\s*['"](.*?)['"]/, 1]
14
+ cap2user || deploy_info[/^\s*server\s*['"]#{server}['"],.*user.{1,4}['"](.*?)['"]/m, 1]
15
15
  end
16
16
 
17
17
  def servers
@@ -26,11 +26,11 @@ module Geordi
26
26
  end
27
27
 
28
28
  def remote_root
29
- File.join deploy_info[ /^\s*set\s*:deploy_to,\s*['"](.*?)['"]/, 1 ], 'current'
29
+ File.join deploy_info[/^\s*set\s*:deploy_to,\s*['"](.*?)['"]/, 1], 'current'
30
30
  end
31
31
 
32
32
  def env
33
- deploy_info[ /^\s*set\s*:rails_env,\s*['"](.*?)['"]/, 1 ]
33
+ deploy_info[/^\s*set\s*:rails_env,\s*['"](.*?)['"]/, 1]
34
34
  end
35
35
 
36
36
  def shell
@@ -45,17 +45,17 @@ module Geordi
45
45
  self.deploy_info = ''
46
46
 
47
47
  if stage
48
- deploy_info << File.read(File.join root, "config/deploy/#{ stage }.rb")
48
+ deploy_info << File.read(File.join(root, "config/deploy/#{stage}.rb"))
49
49
  deploy_info << "\n"
50
50
  end
51
51
 
52
- deploy_info << File.read(File.join root, 'config/deploy.rb')
52
+ deploy_info << File.read(File.join(root, 'config/deploy.rb'))
53
53
  end
54
54
 
55
55
  def find_project_root!
56
56
  current = ENV['RAILS_ROOT'] || Dir.pwd
57
57
 
58
- until File.exists?(File.join(current, 'Capfile'))
58
+ until File.exist?(File.join(current, 'Capfile'))
59
59
  if current == '/' || current == '/home' || !File.directory?(current)
60
60
  raise <<-ERROR
61
61
  Could not locate Capfile.
@@ -27,12 +27,12 @@ module Geordi
27
27
 
28
28
  def determine_chrome_version
29
29
  stdout_str, _error_str, status = Open3.capture3('google-chrome', '--version')
30
- chrome_version = if !stdout_str.nil?
30
+ chrome_version = unless stdout_str.nil?
31
31
  stdout_str[/\AGoogle Chrome (\d+)/, 1]
32
32
  end
33
33
 
34
34
  if !status.success? || chrome_version.nil?
35
- fail('Could not determine the current Google Chrome version')
35
+ raise('Could not determine the current Google Chrome version')
36
36
  else
37
37
  chrome_version.to_i
38
38
  end
@@ -42,12 +42,12 @@ module Geordi
42
42
  return unless Open3.capture2('which chromedriver')[1].success?
43
43
 
44
44
  stdout_str, _error_str, status = Open3.capture3('chromedriver', '-v')
45
- chromedriver_version = if !stdout_str.nil?
45
+ chromedriver_version = unless stdout_str.nil?
46
46
  stdout_str[/\AChromeDriver (\d+)/, 1]
47
47
  end
48
48
 
49
49
  if !status.success? || chromedriver_version.nil?
50
- fail('Could not determine the current chromedriver version')
50
+ raise('Could not determine the current chromedriver version')
51
51
  else
52
52
  chromedriver_version.to_i
53
53
  end
@@ -69,7 +69,7 @@ module Geordi
69
69
 
70
70
  file
71
71
  else
72
- fail("Could not download chromedriver version #{latest_version}")
72
+ raise("Could not download chromedriver version #{latest_version}")
73
73
  end
74
74
  end
75
75
 
@@ -80,7 +80,7 @@ module Geordi
80
80
  if response.is_a?(Net::HTTPSuccess)
81
81
  response.body.to_s
82
82
  else
83
- fail("Could not find the latest version for Google Chrome version #{chrome_version}")
83
+ raise("Could not find the latest version for Google Chrome version #{chrome_version}")
84
84
  end
85
85
  end
86
86
 
@@ -88,7 +88,7 @@ module Geordi
88
88
  _stdout_str, _error_str, status = Open3.capture3('unzip', '-d', output_dir, '-o', zip.path)
89
89
 
90
90
  unless status.success?
91
- fail("Could not unzip #{zip.path}")
91
+ raise("Could not unzip #{zip.path}")
92
92
  end
93
93
  end
94
94
  end