geordi 9.4.1 → 9.5.1

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: acfbd833f5f9da8e6b157b99109fdb1568d496678446b80d23f972e997601fb6
4
- data.tar.gz: 4baee0e83ea956375deb9a379ae620e2c27482045e5f1a0b75f2fcc16017de57
3
+ metadata.gz: 506036483e1c31f8fab13388d6f92168227df95506f56ce5e28241f9ef867fc1
4
+ data.tar.gz: 85ef8a779e3e699865d0eb3f589fd252dd345771946daaed057e3615fcca1ca5
5
5
  SHA512:
6
- metadata.gz: 0b98db037dd7d2b647236996c529102e486c30abb7b5037b138db6048ad366a6dfb39d367df8354f3a2a51441eb59382ff908d777bca04a6320efb6ea1fc1562
7
- data.tar.gz: 4fd187318f0439a29e1ecf59de2bfebabc3de278b02a82a9b1587e493b11a6d2a24e74f25d702108b3b45b1fd252ad4c1360e66e1399ec034db3684cfce826a6
6
+ metadata.gz: fb8e5d65caf516ff4a4a5da1655ba5cf8001d8d0c875b68908e39e993dfbde7a3cdb4b887318192cb5bf22f5e2555a5d7796061c72fb2cf745c23c87a71c2ade
7
+ data.tar.gz: 9ddb734143d4162be8e6cf053f7b9aa35f7c72c69558caedcdb4ed9021b6c16b1bfd3ee84d6c13ad089b4af154d0bd0a197873355ab0dafaebc26710150f38d4
data/CHANGELOG.md CHANGED
@@ -10,11 +10,25 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
10
10
  ### Breaking changes
11
11
 
12
12
 
13
- ## 9.4.1 2023-01-09
13
+ # 9.5.1 - 2023-04-26
14
+
15
+ ### Compatible changes
16
+
17
+ * `cucumber` command: Support the passing of options without "="
18
+
19
+
20
+ # 9.5.0 2023-03-22
14
21
 
15
22
  ### Compatible changes
23
+ * `commit` command: The pivotal tracker story is linked in the description of the commit
24
+ * `server` command: Use `daho.im` instead of `vcap.me` when offering the local development URL
25
+ * `rspec` command: chromedriver is updated automatically, if auto-update is configured and the app uses selenium-webdriver
26
+
16
27
 
17
- - Ruby 3.2 support
28
+ ## 9.4.1 2023-01-09
29
+
30
+ ### Compatible changes
31
+ * Ruby 3.2 support
18
32
 
19
33
 
20
34
  ## 9.4.0 2022-12-09
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- geordi (9.4.1)
4
+ geordi (9.5.1)
5
5
  thor (~> 1)
6
6
 
7
7
  GEM
data/geordi.gemspec CHANGED
@@ -31,8 +31,4 @@ Gem::Specification.new do |spec|
31
31
 
32
32
  spec.add_runtime_dependency 'thor', '~> 1'
33
33
  # Development dependencies are defined in the Gemfile (therefore no `spec.add_development_dependency` directives)
34
-
35
- spec.post_install_message = <<-ATTENTION
36
- Support for sequential running of integration tests tagged with @solo has been dropped.
37
- ATTENTION
38
34
  end
@@ -52,22 +52,21 @@ def cucumber(*args)
52
52
  invoke_geordi 'chromedriver_update', quiet_if_matching: true
53
53
  end
54
54
 
55
- cmd_opts, files = args.partition { |f| f.start_with? '-' }
56
- cmd_opts << '--format' << 'pretty' << '--backtrace' if options.debug
55
+ arguments = args
56
+ arguments << '--format' << 'pretty' << '--backtrace' if options.debug
57
57
 
58
58
  # Parallel run of all given features + reruns ##############################
59
59
  Interaction.announce 'Running features'
60
- normal_run_successful = Geordi::Cucumber.new.run(files, cmd_opts, verbose: options.verbose)
60
+ normal_run_successful = Geordi::Cucumber.new.run(arguments, verbose: options.verbose)
61
61
 
62
62
  unless normal_run_successful
63
- cmd_opts << '--profile' << 'rerun'
64
-
63
+ arguments << '--profile' << 'rerun'
65
64
  # Reruns
66
65
  (options.rerun + 1).times do |i|
67
66
  Interaction.fail 'Features failed.' if i == options.rerun # All reruns done?
68
67
 
69
68
  Interaction.announce "Rerun ##{i + 1} of #{options.rerun}"
70
- break if Geordi::Cucumber.new.run([], cmd_opts, verbose: options.verbose, parallel: false)
69
+ break if Geordi::Cucumber.new.run(arguments, verbose: options.verbose, parallel: false)
71
70
  end
72
71
  end
73
72
 
@@ -8,11 +8,11 @@ with `db:migrate`.
8
8
  LONGDESC
9
9
 
10
10
  def migrate
11
- invoke_geordi 'bundle_install'
12
- invoke_geordi 'yarn_install'
13
- Interaction.announce 'Migrating'
14
-
15
11
  if File.directory?('db/migrate')
12
+ invoke_geordi 'bundle_install'
13
+ invoke_geordi 'yarn_install'
14
+ Interaction.announce 'Migrating'
15
+
16
16
  if Util.file_containing?('Gemfile', /parallel_tests/)
17
17
  Interaction.note 'Development and parallel test databases'
18
18
  puts
@@ -10,8 +10,15 @@ LONGDESC
10
10
 
11
11
  def rspec(*files)
12
12
  if File.exist?('spec/spec_helper.rb')
13
+ require 'geordi/settings'
14
+
15
+ settings = Geordi::Settings.new
16
+
13
17
  invoke_geordi 'bundle_install'
14
18
  invoke_geordi 'yarn_install'
19
+ if settings.auto_update_chromedriver && Util.gem_available?('selenium-webdriver')
20
+ invoke_geordi 'chromedriver_update', quiet_if_matching: true
21
+ end
15
22
 
16
23
  Interaction.announce 'Running specs'
17
24
 
@@ -12,7 +12,7 @@ def server(port = nil)
12
12
 
13
13
  Interaction.announce 'Booting a development server'
14
14
  port ||= options.port
15
- Interaction.note "URL: http://#{File.basename(Dir.pwd)}.vcap.me:#{port}"
15
+ Interaction.note "URL: http://#{File.basename(Dir.pwd)}.daho.im:#{port}"
16
16
  puts
17
17
 
18
18
  command = Util.server_command
@@ -8,9 +8,14 @@ require File.expand_path('settings', __dir__)
8
8
 
9
9
  module Geordi
10
10
  class Cucumber
11
+ def run(arguments, options = {})
12
+ split_arguments = arguments.map { |arg| arg.split('=') }.flatten
13
+
14
+ self.argv = split_arguments.map do |arg|
15
+ # Ensure arguments containing white space are kept together
16
+ arg.match?(/\S\s\S/) ? %('#{arg}') : arg
17
+ end
11
18
 
12
- def run(files, cucumber_options, options = {})
13
- self.argv = files + cucumber_options.map { |option| option.split('=') }.flatten
14
19
  self.settings = Geordi::Settings.new
15
20
 
16
21
  consolidate_rerun_txt_files
@@ -32,24 +37,30 @@ module Geordi
32
37
  unless argv.include?('--format') || argv.include?('-f')
33
38
  format_args = spinner_available? ? ['--format', 'CucumberSpinner::CuriousProgressBarFormatter'] : ['--format', 'progress']
34
39
  end
40
+ if argv.include?('rerun')
41
+ drop_command_line_features!
42
+ end
35
43
  [ Util.binstub_or_fallback('cucumber'), format_args, escape_shell_args(argv)].flatten.compact.join(' ')
36
44
  end
37
45
 
38
46
  def parallel_execution_command
39
47
  Interaction.note 'Using parallel_tests'
40
- self.argv = argv - command_line_features
48
+ drop_command_line_features!
41
49
 
42
50
  type_arg = Util.gem_version('parallel_tests') > Gem::Version.new('0.7.0') ? 'cucumber' : 'features'
43
51
  features = features_to_run
44
52
  features = find_all_features_recursively('features') if features.empty?
45
-
46
53
  [
47
54
  'bundle exec parallel_test -t ' + type_arg,
48
- %(-o '#{command_line_options.join(' ')}'),
55
+ %(-o "#{command_line_options.join(' ')}"),
49
56
  "-- #{features.join(' ')}",
50
57
  ].compact.join(' ')
51
58
  end
52
59
 
60
+ def drop_command_line_features!
61
+ self.argv = argv - command_line_features
62
+ end
63
+
53
64
  def escape_shell_args(*args)
54
65
  args.flatten.collect do |arg|
55
66
  arg.gsub(/([\\ "])/) { |_match| "\\#{Regexp.last_match(1)}" }
@@ -57,8 +68,10 @@ module Geordi
57
68
  end
58
69
 
59
70
  def show_features_to_run
60
- if command_line_options.include? 'rerun'
71
+ if command_line_options.include?('rerun')
61
72
  Interaction.note 'Rerunning failed scenarios'
73
+ elsif command_line_tag_options.any?
74
+ Interaction.note "Only features matching tag option #{command_line_tag_options.join(',')}"
62
75
  elsif features_to_run.empty?
63
76
  Interaction.note 'All features in features/'
64
77
  else
@@ -111,6 +124,14 @@ module Geordi
111
124
  end
112
125
  end
113
126
 
127
+ def command_line_tag_options
128
+ [].tap do |tag_options|
129
+ command_line_options.each_cons(2) do |option, tags|
130
+ tag_options << tags if option =~ /--tags|-t/
131
+ end
132
+ end
133
+ end
134
+
114
135
  def consolidate_rerun_txt_files
115
136
  parallel_rerun_files = Dir.glob('parallel_rerun*.txt')
116
137
  unless parallel_rerun_files.empty?
data/lib/geordi/gitpt.rb CHANGED
@@ -22,7 +22,7 @@ module Geordi
22
22
 
23
23
  story = choose_story
24
24
  if story
25
- create_commit "[##{story.id}] #{story.name}", *git_args
25
+ create_commit "[##{story.id}] #{story.name}", "Story: #{story.url}", *git_args
26
26
  end
27
27
  end
28
28
 
@@ -76,7 +76,7 @@ module Geordi
76
76
 
77
77
  def applicable_stories
78
78
  if Util.testing?
79
- return ENV['GEORDI_TESTING_NO_PT_STORIES'] == 'true' ? [] : [OpenStruct.new(id: 12, name: 'Test Story')]
79
+ return ENV['GEORDI_TESTING_NO_PT_STORIES'] == 'true' ? [] : [OpenStruct.new(id: 12, name: 'Test Story', url: 'https://www.story-url.com')]
80
80
  end
81
81
 
82
82
  projects = load_projects
@@ -128,11 +128,11 @@ module Geordi
128
128
  nil # Return nothing
129
129
  end
130
130
 
131
- def create_commit(message, *git_args)
131
+ def create_commit(title, description, *git_args)
132
132
  extra = highline.ask("\nAdd an optional message").strip
133
- message << ' - ' << extra if extra != ''
133
+ title << ' - ' << extra if extra != ''
134
134
 
135
- Util.run!(['git', 'commit', '--allow-empty', '-m', message, *git_args])
135
+ Util.run!(['git', 'commit', '--allow-empty', '-m', title, '-m', description, *git_args])
136
136
  end
137
137
 
138
138
  def bold(string)
@@ -103,7 +103,7 @@ module Geordi
103
103
  invalid_keys = settings.keys - allowed_keys
104
104
  unless invalid_keys.empty?
105
105
  Interaction.warn "Unknown settings in #{file}: #{invalid_keys.join(", ")}"
106
- Interaction.note "Supported settings in #{file} are: #{allowed_keys.join(", ")}"
106
+ puts "Supported settings in #{file} are: #{allowed_keys.join(", ")}"
107
107
  end
108
108
  end
109
109
 
@@ -1,3 +1,3 @@
1
1
  module Geordi
2
- VERSION = '9.4.1'.freeze
2
+ VERSION = '9.5.1'.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: 9.4.1
4
+ version: 9.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-09 00:00:00.000000000 Z
11
+ date: 2023-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -101,10 +101,7 @@ metadata:
101
101
  bug_tracker_uri: https://github.com/makandra/geordi/issues
102
102
  changelog_uri: https://github.com/makandra/geordi/blob/master/CHANGELOG.md
103
103
  rubygems_mfa_required: 'true'
104
- post_install_message: 'Support for sequential running of integration tests tagged
105
- with @solo has been dropped.
106
-
107
- '
104
+ post_install_message:
108
105
  rdoc_options: []
109
106
  require_paths:
110
107
  - lib
@@ -119,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
116
  - !ruby/object:Gem::Version
120
117
  version: '0'
121
118
  requirements: []
122
- rubygems_version: 3.3.9
119
+ rubygems_version: 3.2.32
123
120
  signing_key:
124
121
  specification_version: 4
125
122
  summary: Collection of command line tools we use in our daily work with Ruby, Rails