geordi 10.0.1 → 10.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c7bc7a0b4c7982397b4da62d99cc4679c5f5d30fcf521597272bfb939416b7e
4
- data.tar.gz: 6976e0f9466a4fe4b34c72e717886e0d3bb8474e9d363ff4df1fe2606e983337
3
+ metadata.gz: 3324f1c6c2c99a458d355b5a83a915ff96c80a2307f7245780a254df5a2d03fe
4
+ data.tar.gz: c8d1fdfd659292dfa1aaa7e2feb08ffdca7c4ce996b295637249b6f2d970e852
5
5
  SHA512:
6
- metadata.gz: ca94d0a41906b50c342dbc5e8c6bef1e17368fe7ea2eea6b4ce7f0ef9441ab1c27754b1f38fe9a149445a93506a19a52f54b305164d62944e136f7ae81d5a96c
7
- data.tar.gz: 276578dab3ca5e01acc336176c22454a0f990403daf884ecb2193aade3dff24f41ccdbc3d3a2945d0b1707ef102742adb057b3f5d8a683f6a3aab826781aba21
6
+ metadata.gz: 89e43ce2db60271bf2cbde52c6255c4331b64c719bfe7ffb28187976513b7efaeceb94da2d2cfbf2427162dd68cd84320cd9cf55e2b8f883f1669076826d7b87
7
+ data.tar.gz: 5f27fa4ef40ef8c5f135151fb919fbe6626adad1885b96494e51a4e9137895d9b12c51256ff157158d2e1d2a8c87cd36a12526b7cfe9ab73b8ac23d7e37b9623
data/CHANGELOG.md CHANGED
@@ -9,11 +9,20 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
9
9
 
10
10
  ### Breaking changes
11
11
 
12
+
13
+ # 10.1.0 2024-07-23
14
+
15
+ ### Compatible changes
16
+
17
+ * `tests`-command: When paths to cucumber and rspec tests are passed as arguments both cucumber and rspec are run.
18
+
19
+
12
20
  # 10.0.1 2024-05-23
13
21
 
14
22
  ### Compatible changes
15
23
  * `dump`-command: The dropdb and createdb commands now also mind the configuration in the database.yml.
16
24
 
25
+
17
26
  # 10.0.0 2024-03-07
18
27
 
19
28
  ### Compatible changes
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- geordi (10.0.1)
4
+ geordi (10.1.0)
5
5
  thor (~> 1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -336,8 +336,8 @@ Run all employed tests.
336
336
  When running `geordi tests` without any arguments, all unit tests, rspec specs
337
337
  and cucumber features will be run.
338
338
 
339
- When passing arguments, Geordi will forward them to either `rspec` or `cucumber`,
340
- depending on what the first argument indicates.
339
+ When passing file paths or directories as arguments, Geordi will forward them to `rspec` and `cucumber`.
340
+ All rspec specs and cucumber features matching the given paths will be run.
341
341
 
342
342
 
343
343
  ### `geordi unit`
@@ -3,8 +3,8 @@ long_desc <<-LONGDESC
3
3
  When running `geordi tests` without any arguments, all unit tests, rspec specs
4
4
  and cucumber features will be run.
5
5
 
6
- When passing arguments, Geordi will forward them to either `rspec` or `cucumber`,
7
- depending on what the first argument indicates.
6
+ When passing file paths or directories as arguments, Geordi will forward them to `rspec` and `cucumber`.
7
+ All rspec specs and cucumber features matching the given paths will be run.
8
8
  LONGDESC
9
9
 
10
10
  def tests(*args)
@@ -14,14 +14,13 @@ def tests(*args)
14
14
 
15
15
  if args.empty?
16
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
17
  else
22
- Interaction.fail error_message
23
- end
18
+ rspec_paths = args.select { |a| Util.rspec_path?(a) }
19
+ cucumber_paths = args.select { |a| Util.cucumber_path?(a) }
24
20
 
21
+ invoke('rspec', rspec_paths, opts) if rspec_paths.any?
22
+ invoke('cucumber', cucumber_paths, opts) if cucumber_paths.any?
23
+ end
25
24
  else
26
25
  rake_result = invoke_geordi 'with_rake'
27
26
 
data/lib/geordi/util.rb CHANGED
@@ -209,6 +209,14 @@ module Geordi
209
209
  version_string = testing? ? ENV['GEORDI_TESTING_RUBY_VERSION'] : RUBY_VERSION
210
210
  Gem::Version.new(version_string)
211
211
  end
212
+
213
+ def cucumber_path?(path)
214
+ %r{(^|\/)features|\.feature($|:)}.match?(path)
215
+ end
216
+
217
+ def rspec_path?(path)
218
+ %r{(^|\/)spec|_spec\.rb($|:)}.match?(path)
219
+ end
212
220
  end
213
221
  end
214
222
  end
@@ -1,3 +1,3 @@
1
1
  module Geordi
2
- VERSION = '10.0.1'.freeze
2
+ VERSION = '10.1.0'.freeze
3
3
  end
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: 10.0.1
4
+ version: 10.1.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: 2024-05-29 00:00:00.000000000 Z
11
+ date: 2024-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  requirements: []
120
- rubygems_version: 3.5.11
120
+ rubygems_version: 3.2.3
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: Collection of command line tools we use in our daily work with Ruby, Rails