geordi 6.0.0.pre.rc1 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eee4c378b0fe08b20405c74876813d2e23eda1e09c92dae4a19146af9f414a2d
4
- data.tar.gz: 48bfb8c877fedf002b46aa1f09ea7dde284c9b1358f1c8f1f9c39a0bc3381c03
3
+ metadata.gz: c6ae1c9d784901988ec50b26da29a634e3105e5b2210803d55e02ecc9b219d79
4
+ data.tar.gz: 3c7294df5febf88bd97ddb2da25d6d0815d1fffb4ad9f4adfa59b1f96de53f09
5
5
  SHA512:
6
- metadata.gz: e24c228acd4170e540b76accc1708bf7df44f3650052c200abfdb2f297770e7660f017a176bd0edbc74202d08c1c4df9d3c05289d91c06501ebcb7f32d28839f
7
- data.tar.gz: e817b989c4254f3482a888418fef3ca57f493901cce611ab970faaaf8db6ff259ea67f7417ffb6b964bb6f1063e926afe0503ace94c1ce497e9c92c494c41ec0
6
+ metadata.gz: 495984bebb832bf7a3ac9c5539b591c8e89641cc382e4e10089b5c62fe97b3440d0be1c4ac6f27c6f7c04b571a6a662899a30f660855084a9c8ef640094f51da
7
+ data.tar.gz: '0821bd104debdc847d1699d9f5b80c3b553110d0027d632d2acf6a2a739d20005372de6788aeff225d7616c8d0200c9fc1fe4e5ff7f4f177e5bf3256f1084df0'
@@ -8,25 +8,17 @@ on:
8
8
  - master
9
9
  jobs:
10
10
  test:
11
- runs-on: ubuntu-18.04
11
+ runs-on: ubuntu-20.04
12
12
  strategy:
13
13
  fail-fast: false
14
14
  matrix:
15
15
  include:
16
- - ruby: 2.2.10
17
- gemfile: Gemfile
18
- - ruby: 2.3.8
19
- gemfile: Gemfile
20
- - ruby: 2.4.10
21
- gemfile: Gemfile
22
- - ruby: 2.5.8
23
- gemfile: Gemfile
24
- - ruby: 2.6.6
25
- gemfile: Gemfile
26
- - ruby: 2.7.2
27
- gemfile: Gemfile
28
- - ruby: 3.0.0
29
- gemfile: Gemfile
16
+ - ruby: 2.5.7
17
+ gemfile: Gemfile
18
+ - ruby: 2.7.4
19
+ gemfile: Gemfile
20
+ - ruby: 3.0.2
21
+ gemfile: Gemfile
30
22
  env:
31
23
  BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
32
24
  steps:
@@ -37,7 +29,7 @@ jobs:
37
29
  ruby-version: "${{ matrix.ruby }}"
38
30
  - name: Bundle
39
31
  run: |
40
- gem install bundler:1.17.3
32
+ gem install bundler:2.2.26
41
33
  bundle install --no-deployment
42
34
  - name: Install VNC viewer
43
35
  run: |
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2
1
+ 2.5.7
data/CHANGELOG.md CHANGED
@@ -6,19 +6,38 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
6
6
  ## Unreleased
7
7
 
8
8
  ### Compatible changes
9
- * Removed support for serial execution of scenarios tagged with @solo.
9
+ ### Breaking changes
10
+
11
+
12
+ ## 7.0.0 2021-08-25
10
13
 
11
14
  ### Breaking changes
12
15
 
13
- ## 6.0.0 2021-04-06
16
+ * Drop support for Ruby < 2.5.0
17
+
18
+
19
+ ## 6.1.0 2021-07-15
20
+
21
+ ### Compatible changes
22
+ * Improve parsing of Capistrano files ([#162](https://github.com/makandra/geordi/issues/162))
23
+ * `geordi tests` now takes test files as arguments and passes them to either RSpec or Cucumber ([#152](https://github.com/makandra/geordi/issues/152))
24
+
25
+
26
+ ## 6.0.0 2021-06-02
14
27
 
15
28
  ### Compatible changes
16
29
  * `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
30
 
18
31
  ### Breaking changes
19
- * Removed VNC test browser support for integration tests.
32
+ * Removed VNC test browser support for integration tests – Headless Chrome has
33
+ matured and is almost a drop-in replacement. Also, key binding issues have
34
+ increased with VNC and recent Linux.
20
35
  * Please use a headless Chrome setup <https://makandracards.com/makandra/492109-capybara-running-tests-with-headless-chrome>.
21
36
  * You might also want to get rid of your local VNC server `sudo apt remove tightvncserver`.
37
+ * Removed support for serial execution of scenarios tagged with @solo. Serial
38
+ execution is not needed with Headless Chrome, as Headless instances cannot
39
+ interfere (like, stealing focus).
40
+
22
41
 
23
42
  ## 5.4.0 2021-02-01
24
43
 
data/Gemfile CHANGED
@@ -9,5 +9,7 @@ gem 'rspec'
9
9
  gem 'highline'
10
10
  gem 'parallel_tests'
11
11
  gem 'launchy'
12
- gem 'pry'
12
+ gem 'pry-byebug'
13
13
  gem 'tracker_api'
14
+ gem 'thor', '~> 1'
15
+ gem 'cucumber', '~> 4'
data/Gemfile.lock CHANGED
@@ -1,12 +1,17 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- geordi (6.0.0)
5
- thor (~> 1)
4
+ geordi (7.0.0)
6
5
 
7
6
  GEM
8
7
  remote: http://rubygems.org/
9
8
  specs:
9
+ activesupport (6.1.4.1)
10
+ concurrent-ruby (~> 1.0, >= 1.0.2)
11
+ i18n (>= 1.6, < 2)
12
+ minitest (>= 5.1)
13
+ tzinfo (~> 2.0)
14
+ zeitwerk (~> 2.3)
10
15
  addressable (2.7.0)
11
16
  public_suffix (>= 2.0.2, < 5.0)
12
17
  aruba (0.14.14)
@@ -20,30 +25,42 @@ GEM
20
25
  descendants_tracker (~> 0.0.4)
21
26
  ice_nine (~> 0.11.0)
22
27
  thread_safe (~> 0.3, >= 0.3.1)
23
- backports (3.18.2)
24
28
  builder (3.2.4)
29
+ byebug (11.1.3)
25
30
  childprocess (1.0.1)
26
31
  rake (< 13.0)
27
32
  coderay (1.1.3)
28
33
  coercible (1.0.0)
29
34
  descendants_tracker (~> 0.0.1)
35
+ concurrent-ruby (1.1.9)
30
36
  contracts (0.16.0)
31
- cucumber (3.2.0)
32
- builder (>= 2.1.2)
33
- cucumber-core (~> 3.2.0)
34
- cucumber-expressions (~> 6.0.1)
35
- cucumber-wire (~> 0.0.1)
36
- diff-lcs (~> 1.3)
37
- gherkin (~> 5.1.0)
38
- multi_json (>= 1.7.5, < 2.0)
39
- multi_test (>= 0.1.2)
40
- cucumber-core (3.2.1)
41
- backports (>= 3.8.0)
42
- cucumber-tag_expressions (~> 1.1.0)
43
- gherkin (~> 5.0)
44
- cucumber-expressions (6.0.1)
45
- cucumber-tag_expressions (1.1.1)
46
- cucumber-wire (0.0.1)
37
+ cucumber (4.0.0)
38
+ builder (~> 3.2, >= 3.2.3)
39
+ cucumber-core (~> 7.0, >= 7.0.0)
40
+ cucumber-cucumber-expressions (~> 10.1, >= 10.1.0)
41
+ cucumber-gherkin (~> 13.0, >= 13.0.0)
42
+ cucumber-html-formatter (~> 6.0, >= 6.0.1)
43
+ cucumber-messages (~> 12.1, >= 12.1.1)
44
+ cucumber-wire (~> 3.0, >= 3.0.0)
45
+ diff-lcs (~> 1.3, >= 1.3)
46
+ multi_test (~> 0.1, >= 0.1.2)
47
+ sys-uname (~> 1.0, >= 1.0.2)
48
+ cucumber-core (7.0.0)
49
+ cucumber-gherkin (~> 13.0, >= 13.0.0)
50
+ cucumber-messages (~> 12.1, >= 12.1.1)
51
+ cucumber-tag-expressions (~> 2.0, >= 2.0.4)
52
+ cucumber-cucumber-expressions (10.3.0)
53
+ cucumber-gherkin (13.0.0)
54
+ cucumber-messages (~> 12.0, >= 12.0.0)
55
+ cucumber-html-formatter (6.0.3)
56
+ cucumber-messages (~> 12.1, >= 12.1.1)
57
+ cucumber-messages (12.4.0)
58
+ protobuf-cucumber (~> 3.10, >= 3.10.8)
59
+ cucumber-tag-expressions (2.0.4)
60
+ cucumber-wire (3.0.0)
61
+ cucumber-core (~> 7.0, >= 7.0.0)
62
+ cucumber-cucumber-expressions (~> 10.1, >= 10.1.0)
63
+ cucumber-messages (~> 12.1, >= 12.1.1)
47
64
  declarative (0.0.10)
48
65
  declarative-option (0.1.0)
49
66
  descendants_tracker (0.0.4)
@@ -56,16 +73,19 @@ GEM
56
73
  faraday_middleware (0.14.0)
57
74
  faraday (>= 0.7.4, < 1.0)
58
75
  ffi (1.12.2)
59
- gherkin (5.1.0)
60
76
  highline (2.0.3)
77
+ i18n (1.8.10)
78
+ concurrent-ruby (~> 1.0)
61
79
  ice_nine (0.11.2)
62
80
  launchy (2.4.3)
63
81
  addressable (~> 2.3)
64
82
  method_source (1.0.0)
83
+ middleware (0.1.0)
65
84
  mimemagic (0.3.9)
66
85
  nokogiri (~> 1)
67
86
  rake
68
87
  mini_portile2 (2.4.0)
88
+ minitest (5.14.4)
69
89
  multi_json (1.15.0)
70
90
  multi_test (0.1.2)
71
91
  multipart-post (2.1.1)
@@ -74,9 +94,17 @@ GEM
74
94
  parallel (1.19.2)
75
95
  parallel_tests (2.32.0)
76
96
  parallel
97
+ protobuf-cucumber (3.10.8)
98
+ activesupport (>= 3.2)
99
+ middleware
100
+ thor
101
+ thread_safe
77
102
  pry (0.13.1)
78
103
  coderay (~> 1.1)
79
104
  method_source (~> 1.0)
105
+ pry-byebug (3.9.0)
106
+ byebug (~> 11.0)
107
+ pry (~> 0.13.0)
80
108
  public_suffix (3.1.1)
81
109
  rake (12.3.3)
82
110
  representable (3.0.4)
@@ -96,6 +124,8 @@ GEM
96
124
  diff-lcs (>= 1.2.0, < 2.0)
97
125
  rspec-support (~> 3.10.0)
98
126
  rspec-support (3.10.0)
127
+ sys-uname (1.2.2)
128
+ ffi (~> 1.1)
99
129
  thor (1.0.1)
100
130
  thread_safe (0.3.6)
101
131
  tracker_api (1.11.0)
@@ -108,26 +138,31 @@ GEM
108
138
  multi_json
109
139
  representable
110
140
  virtus
141
+ tzinfo (2.0.4)
142
+ concurrent-ruby (~> 1.0)
111
143
  uber (0.1.0)
112
144
  virtus (1.0.5)
113
145
  axiom-types (~> 0.1)
114
146
  coercible (~> 1.0)
115
147
  descendants_tracker (~> 0.0, >= 0.0.3)
116
148
  equalizer (~> 0.0, >= 0.0.9)
149
+ zeitwerk (2.4.2)
117
150
 
118
151
  PLATFORMS
119
152
  ruby
120
153
 
121
154
  DEPENDENCIES
122
155
  aruba (< 1)
156
+ cucumber (~> 4)
123
157
  geordi!
124
158
  highline
125
159
  launchy
126
160
  parallel_tests
127
- pry
161
+ pry-byebug
128
162
  rake (< 13)
129
163
  rspec
164
+ thor (~> 1)
130
165
  tracker_api
131
166
 
132
167
  BUNDLED WITH
133
- 1.17.3
168
+ 2.2.26
data/README.md CHANGED
@@ -90,19 +90,15 @@ Run Cucumber features.
90
90
 
91
91
  Example: `geordi cucumber features/authentication_feature:3`
92
92
 
93
- Runs Cucumber with `bundle exec`, using parallel tests and with support for re-running
94
- failed scenarios.
93
+ Runs Cucumber with `bundle exec`, using parallel tests and with support for
94
+ re-running failed scenarios.
95
95
 
96
- - *Debugging:* In some cases, the dot-printing Cucumber formatter swallows
97
- errors. In case a feature fails without an error message, try running it with
98
- `--debug` or `-d`.
96
+ Any unknown option will be passed through to Cucumber, e.g. `--format=pretty`.
97
+ Make sure to connect option and value with an equals sign, i.e. have each option
98
+ a contiguous string.
99
99
 
100
- - *Options:* Any unknown option will be passed through to Cucumber,
101
- e.g. `--format=pretty`. Make sure to connect option and value with an equals
102
- sign, i.e. have each option a contiguous string.
103
-
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`
100
+ In order to limit processes in a parallel run, you can set an environment
101
+ variable like this: `PARALLEL_TEST_PROCESSORS=6 geordi cucumber`
106
102
 
107
103
  **Options**
108
104
  - `-m, [--modified], [--no-modified]`: Run all modified features
@@ -346,9 +342,15 @@ servers. When passed a number, directly connects to the selected server.
346
342
  - `-s, [--select-server=[SERVER_NUMBER]]`: Select a server to connect to
347
343
 
348
344
 
349
- ### `geordi tests`
345
+ ### `geordi tests [FILES]`
350
346
  Run all employed tests.
351
347
 
348
+ When running `geordi tests` without any arguments, all unit tests, rspec specs
349
+ and cucumber features will be run.
350
+
351
+ When passing arguments, Geordi will forward them to either `rspec` or `cucumber`,
352
+ depending on what the first argument indicates.
353
+
352
354
 
353
355
  ### `geordi unit`
354
356
  Run Test::Unit.
data/geordi.gemspec CHANGED
@@ -5,27 +5,27 @@ require 'geordi/version'
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'geordi'
7
7
  spec.version = Geordi::VERSION
8
- spec.required_ruby_version = '>= 2.2.0'
8
+ spec.required_ruby_version = '>= 2.3.0'
9
9
  spec.authors = ['Henning Koch']
10
10
  spec.email = ['henning.koch@makandra.de']
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
- spec.description = 'Collection of command line tools we use in our daily work with Ruby, Rails and Linux at makandra.'
13
+ spec.description = spec.summary
14
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{^(spec|features)/}) }
20
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
21
  end
22
22
  spec.bindir = 'exe'
23
23
  spec.executables = spec.files.grep(%r(^exe/)) { |f| File.basename(f) }
24
24
  spec.require_paths = ['lib']
25
25
 
26
- spec.add_runtime_dependency 'thor', '~> 1'
26
+ # Development dependencies are defined in the Gemfile (therefore no `spec.add_development_dependency` directives)
27
27
 
28
28
  spec.post_install_message = <<-ATTENTION
29
- Support for sequential running of integration tests tagged with @solo has been dropped.
29
+ Support for sequential running of integration tests tagged with @solo has been dropped.
30
30
  ATTENTION
31
31
  end
@@ -11,7 +11,7 @@ module Geordi
11
11
 
12
12
  def user(server)
13
13
  cap2user = deploy_info[/^\s*set\s*:user,\s*['"](.*?)['"]/, 1]
14
- cap2user || deploy_info[/^\s*server\s*['"]#{server}['"],.*user.{1,4}['"](.*?)['"]/m, 1]
14
+ cap2user || deploy_info[/^\s*server\s*['"]#{server}['"],.*user.{1,4}['"](.*?)['"]/, 1]
15
15
  end
16
16
 
17
17
  def servers
@@ -42,14 +42,23 @@ module Geordi
42
42
  attr_accessor :deploy_info, :stage
43
43
 
44
44
  def load_deploy_info
45
+ lines = []
45
46
  self.deploy_info = ''
46
47
 
47
48
  if stage
48
- deploy_info << File.read(File.join(root, "config/deploy/#{stage}.rb"))
49
- deploy_info << "\n"
49
+ lines += File.readlines(File.join(root, "config/deploy/#{stage}.rb"))
50
50
  end
51
51
 
52
- deploy_info << File.read(File.join(root, 'config/deploy.rb'))
52
+ lines += File.readlines(File.join(root, 'config/deploy.rb'))
53
+
54
+ lines.each do |line|
55
+ next if line =~ /^\s*#/ # Omit comment lines
56
+ line.chomp! if line =~ /[\\,]\s*$/ # Join wrapped lines
57
+
58
+ deploy_info << line
59
+ end
60
+
61
+ deploy_info
53
62
  end
54
63
 
55
64
  def find_project_root!
@@ -57,11 +66,11 @@ module Geordi
57
66
 
58
67
  until File.exist?(File.join(current, 'Capfile'))
59
68
  if current == '/' || current == '/home' || !File.directory?(current)
60
- raise <<-ERROR
61
- Could not locate Capfile.
69
+ raise <<~ERROR
70
+ Could not locate Capfile.
62
71
 
63
- Are you calling me from within a Rails project?
64
- Maybe Capistrano is not installed in this project.
72
+ Are you calling me from within a Rails project?
73
+ Maybe Capistrano is not installed in this project.
65
74
  ERROR
66
75
  else
67
76
  current = File.dirname(current)
@@ -2,19 +2,15 @@ desc 'cucumber [FILES and OPTIONS]', 'Run Cucumber features'
2
2
  long_desc <<-LONGDESC
3
3
  Example: `geordi cucumber features/authentication_feature:3`
4
4
 
5
- Runs Cucumber with `bundle exec`, using parallel tests and with support for re-running
6
- failed scenarios.
5
+ Runs Cucumber with `bundle exec`, using parallel tests and with support for
6
+ re-running failed scenarios.
7
7
 
8
- - *Debugging:* In some cases, the dot-printing Cucumber formatter swallows
9
- errors. In case a feature fails without an error message, try running it with
10
- `--debug` or `-d`.
8
+ Any unknown option will be passed through to Cucumber, e.g. `--format=pretty`.
9
+ Make sure to connect option and value with an equals sign, i.e. have each option
10
+ a contiguous string.
11
11
 
12
- - *Options:* Any unknown option will be passed through to Cucumber,
13
- e.g. `--format=pretty`. Make sure to connect option and value with an equals
14
- sign, i.e. have each option a contiguous string.
15
-
16
- - In order to limit processes in a parallel run, you can set an environment
17
- variable like this: `PARALLEL_TEST_PROCESSORS=6 geordi cucumber`
12
+ In order to limit processes in a parallel run, you can set an environment
13
+ variable like this: `PARALLEL_TEST_PROCESSORS=6 geordi cucumber`
18
14
  LONGDESC
19
15
 
20
16
  option :modified, aliases: '-m', type: :boolean,
@@ -48,11 +48,11 @@ def deploy(target_stage = nil)
48
48
  target_stage ||= Interaction.prompt 'Deployment stage:', branch_stage_map.fetch(Util.current_branch, 'staging')
49
49
  if options.current_branch
50
50
  stage_file = "config/deploy/#{target_stage}.rb"
51
- Util.file_containing?(stage_file, 'DEPLOY_BRANCH') || Interaction.fail(<<-ERROR)
52
- To deploy from the current branch, configure #{stage_file} to respect the
53
- environment variable DEPLOY_BRANCH. Example:
51
+ Util.file_containing?(stage_file, 'DEPLOY_BRANCH') || Interaction.fail(<<~ERROR)
52
+ To deploy from the current branch, configure #{stage_file} to respect the
53
+ environment variable DEPLOY_BRANCH. Example:
54
54
 
55
- set :branch, ENV['DEPLOY_BRANCH'] || 'master'
55
+ set :branch, ENV['DEPLOY_BRANCH'] || 'master'
56
56
  ERROR
57
57
 
58
58
  source_branch = target_branch = Util.current_branch
@@ -1,14 +1,38 @@
1
- desc 'tests', 'Run all employed tests'
2
- def tests
3
- rake_result = invoke_geordi 'with_rake'
4
-
5
- # Since `rake` usually is configured to run all tests, only run them if `rake`
6
- # did not perform
7
- if rake_result == :did_not_perform
8
- invoke_geordi 'unit'
9
- invoke_geordi 'rspec'
10
- invoke_geordi 'cucumber'
11
- end
1
+ desc 'tests [FILES]', 'Run all employed tests'
2
+ long_desc <<-LONGDESC
3
+ When running `geordi tests` without any arguments, all unit tests, rspec specs
4
+ and cucumber features will be run.
5
+
6
+ When passing arguments, Geordi will forward them to either `rspec` or `cucumber`,
7
+ depending on what the first argument indicates.
8
+ LONGDESC
9
+
10
+ def tests(*args)
11
+ if args.any?
12
+ args, opts = Thor::Options.split(args)
13
+ error_message = "When passing arguments, the first argument must be either an RSpec or a Cucumber path."
14
+
15
+ if args.empty?
16
+ Interaction.fail error_message
17
+ elsif args.first.start_with? 'spec'
18
+ invoke 'rspec', args, opts
19
+ elsif args.first.start_with? 'features'
20
+ invoke 'cucumber', args, opts
21
+ else
22
+ Interaction.fail error_message
23
+ end
12
24
 
13
- Interaction.success 'Successfully ran tests.'
25
+ else
26
+ rake_result = invoke_geordi 'with_rake'
27
+
28
+ # Since `rake` usually is configured to run all tests, only run them if `rake`
29
+ # did not perform
30
+ if rake_result == :did_not_perform
31
+ invoke_geordi 'unit'
32
+ invoke_geordi 'rspec'
33
+ invoke_geordi 'cucumber'
34
+ end
35
+
36
+ Interaction.success 'Successfully ran tests.'
37
+ end
14
38
  end
@@ -30,15 +30,15 @@ module Geordi
30
30
  end
31
31
  all_dbs = list_all_dbs(dbtype)
32
32
  tmp = Tempfile.open("geordi_whitelist_#{dbtype}")
33
- tmp.write <<-HEREDOC
34
- # Put each whitelisted database on a new line.
35
- # System databases will never be deleted.
36
- # When you whitelist foo, foo_development and foo_test\\d* are whitelisted, too.
37
- # This works even if foo does not exist. Also, you will only see foo in this list.
38
- #
39
- # Syntax: keep foo
40
- # drop bar
41
- HEREDOC
33
+ tmp.write <<~HEREDOC
34
+ # Put each whitelisted database on a new line.
35
+ # System databases will never be deleted.
36
+ # When you whitelist foo, foo_development and foo_test\\d* are whitelisted, too.
37
+ # This works even if foo does not exist. Also, you will only see foo in this list.
38
+ #
39
+ # Syntax: keep foo
40
+ # drop bar
41
+ HEREDOC
42
42
  tmpfile_content = Array.new
43
43
  all_dbs.each do |db|
44
44
  next if is_whitelisted?(dbtype, db)
@@ -65,11 +65,11 @@ HEREDOC
65
65
  tmpfile_content.push(['keep', db_name]) unless db_name.empty?
66
66
  end
67
67
  if warn_manual_whitelist
68
- Interaction.warn <<-ERROR_MSG.gsub(/^\s*/, '')
69
- Your whitelist #{whitelist} seems to have been generated manually.
70
- In that case, make sure to use only one database name per line and omit the 'keep' prefix."
68
+ Interaction.warn <<~ERROR_MSG
69
+ Your whitelist #{whitelist} seems to have been generated manually.
70
+ In that case, make sure to use only one database name per line and omit the 'keep' prefix."
71
71
 
72
- Launching the editor.
72
+ Launching the editor.
73
73
  ERROR_MSG
74
74
  end
75
75
  tmpfile_content.sort_by! { |k| k[1] }
data/lib/geordi/docker.rb CHANGED
@@ -50,8 +50,8 @@ module Geordi
50
50
  end
51
51
 
52
52
  puts
53
- puts Util.strip_heredoc <<-TEXT
54
- Done. You can view the VNC window with `geordi docker vnc`.
53
+ puts <<~TEXT
54
+ Done. You can view the VNC window with `geordi docker vnc`.
55
55
  TEXT
56
56
 
57
57
  Interaction.success 'Happy cuking!'
data/lib/geordi/gitpt.rb CHANGED
@@ -16,8 +16,8 @@ module Geordi
16
16
  end
17
17
 
18
18
  def run_commit(git_args)
19
- Interaction.warn <<-WARNING unless Util.staged_changes?
20
- No staged changes. Will create an empty commit.
19
+ Interaction.warn <<~WARNING unless Util.staged_changes?
20
+ No staged changes. Will create an empty commit.
21
21
  WARNING
22
22
 
23
23
  story = choose_story
@@ -173,7 +173,7 @@ No staged changes. Will create an empty commit.
173
173
  stdout_str.strip.split(' ').map(&:chars).map(&:first).join.downcase
174
174
  end
175
175
 
176
- git_user_initials = Interaction.prompt 'Enter your initals:', git_user_initials
176
+ git_user_initials = Interaction.prompt 'Enter your initials:', git_user_initials
177
177
 
178
178
  if git_user_initials.nil?
179
179
  Interaction.fail('Could not determine the git user\'s initials.')
@@ -138,7 +138,7 @@ module Geordi
138
138
  project_ids = File.read('.pt_project_id')
139
139
  puts # Make sure to start on a new line (e.g. when invoked after a #print)
140
140
  Geordi::Interaction.warn "The usage of the .pt_project_id file is deprecated."
141
- Geordi::Interaction.note Util.strip_heredoc(<<-INSTRUCTIONS)
141
+ Geordi::Interaction.note(<<~INSTRUCTIONS)
142
142
  Please remove this file from your project and add or extend the .geordi.yml file with the following content:
143
143
  pivotal_tracker_project_ids: #{project_ids}
144
144
  INSTRUCTIONS
data/lib/geordi/util.rb CHANGED
@@ -182,12 +182,6 @@ module Geordi
182
182
  !!ENV['GEORDI_TESTING']
183
183
  end
184
184
 
185
- def strip_heredoc(string)
186
- leading_whitespace = (string.match(/\A( +)[^ ]+/) || [])[1]
187
- string.gsub! /^#{leading_whitespace}/, '' if leading_whitespace
188
- string
189
- end
190
-
191
185
  end
192
186
  end
193
187
  end
@@ -1,3 +1,3 @@
1
1
  module Geordi
2
- VERSION = '6.0.0-rc1'.freeze
2
+ VERSION = '7.0.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geordi
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0.pre.rc1
4
+ version: 7.0.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: 2021-05-20 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: thor
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1'
11
+ date: 2021-08-25 00:00:00.000000000 Z
12
+ dependencies: []
27
13
  description: Collection of command line tools we use in our daily work with Ruby,
28
14
  Rails and Linux at makandra.
29
15
  email:
@@ -99,8 +85,10 @@ homepage: https://makandra.com
99
85
  licenses:
100
86
  - MIT
101
87
  metadata: {}
102
- post_install_message: " Support for sequential running of integration tests tagged
103
- with @solo has been dropped.\n"
88
+ post_install_message: 'Support for sequential running of integration tests tagged
89
+ with @solo has been dropped.
90
+
91
+ '
104
92
  rdoc_options: []
105
93
  require_paths:
106
94
  - lib
@@ -108,14 +96,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
108
96
  requirements:
109
97
  - - ">="
110
98
  - !ruby/object:Gem::Version
111
- version: 2.2.0
99
+ version: 2.3.0
112
100
  required_rubygems_version: !ruby/object:Gem::Requirement
113
101
  requirements:
114
- - - ">"
102
+ - - ">="
115
103
  - !ruby/object:Gem::Version
116
- version: 1.3.1
104
+ version: '0'
117
105
  requirements: []
118
- rubygems_version: 3.0.3
106
+ rubygems_version: 3.2.26
119
107
  signing_key:
120
108
  specification_version: 4
121
109
  summary: Collection of command line tools we use in our daily work with Ruby, Rails