geordi 6.0.1 → 7.0.2

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: 57407a29854dbd2b1b1d854d652377db25791fd36353cfdcbd56a2dfbddb5a1d
4
- data.tar.gz: 27f83bb707fc85575e348b6f83ce74b86baffe1d224a6fe3794ee19a3ed7ff00
3
+ metadata.gz: e8c141d6bb76920354f1a772f6d7a3f88f4ee41fc11766ae40c9bc664ae3d914
4
+ data.tar.gz: e1d000833fb2d445b164529da4051fc25c846b7b0a5c12a0469a3fe745e6c2da
5
5
  SHA512:
6
- metadata.gz: 6e3cfe2af06cde2485cd95d1e2b48743bc37e7b7987bf5f1f337d60f919de6014c719d472875940c8f8b5b53da1453e0e7f923e28e1b31d671c4a105531f3f78
7
- data.tar.gz: 49317f106b384e010f9c7854691f298f9e8909531c956a3a57989d496bb9cc324c9ed388818697d0ca55f8522b2c3ae7af369c774d854049e0b5ed7fd157c8a3
6
+ metadata.gz: d9f630cfa71810205a6db1b23c304c13e14b7ad3380fb71539940e1c0af6802f74b13c6461f673e3aaa456a89dfc2a3b74fda29a865c605d4c5e4ce8890c1cfb
7
+ data.tar.gz: dab2ddb18a29a96872478cd896951608ffdf2baa37c604e6124522810241fb5ecee69f9c2cafdde791992914d02fa926e195556592a5e82e067f37eadd7797f3
@@ -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,7 +6,24 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
6
6
  ## Unreleased
7
7
 
8
8
  ### Compatible changes
9
+
10
+ ### Breaking changes
11
+
12
+
13
+ ## 7.0.2 2021-10-06
14
+
15
+ ### Compatible changes
16
+ * fix `YAML.safe_load` for `psych` >= 4
17
+
18
+ ## 7.0.1 2021-08-13
19
+
20
+ ### Compatible changes
21
+ * Fix missing `thor` dependency
22
+
23
+ ## 7.0.0 2021-08-25
24
+
9
25
  ### Breaking changes
26
+ * Drop support for Ruby < 2.5.0
10
27
 
11
28
 
12
29
  ## 6.1.0 2021-07-15
data/Gemfile CHANGED
@@ -9,5 +9,6 @@ gem 'rspec'
9
9
  gem 'highline'
10
10
  gem 'parallel_tests'
11
11
  gem 'launchy'
12
- gem 'byebug'
12
+ gem 'pry-byebug'
13
13
  gem 'tracker_api'
14
+ gem 'cucumber', '~> 4'
data/Gemfile.lock CHANGED
@@ -1,12 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- geordi (6.0.1)
4
+ geordi (7.0.2)
5
5
  thor (~> 1)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
+ activesupport (6.1.4.1)
11
+ concurrent-ruby (~> 1.0, >= 1.0.2)
12
+ i18n (>= 1.6, < 2)
13
+ minitest (>= 5.1)
14
+ tzinfo (~> 2.0)
15
+ zeitwerk (~> 2.3)
10
16
  addressable (2.7.0)
11
17
  public_suffix (>= 2.0.2, < 5.0)
12
18
  aruba (0.14.14)
@@ -20,30 +26,42 @@ GEM
20
26
  descendants_tracker (~> 0.0.4)
21
27
  ice_nine (~> 0.11.0)
22
28
  thread_safe (~> 0.3, >= 0.3.1)
23
- backports (3.18.2)
24
29
  builder (3.2.4)
25
- byebug (10.0.2)
30
+ byebug (11.1.3)
26
31
  childprocess (1.0.1)
27
32
  rake (< 13.0)
33
+ coderay (1.1.3)
28
34
  coercible (1.0.0)
29
35
  descendants_tracker (~> 0.0.1)
36
+ concurrent-ruby (1.1.9)
30
37
  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)
38
+ cucumber (4.0.0)
39
+ builder (~> 3.2, >= 3.2.3)
40
+ cucumber-core (~> 7.0, >= 7.0.0)
41
+ cucumber-cucumber-expressions (~> 10.1, >= 10.1.0)
42
+ cucumber-gherkin (~> 13.0, >= 13.0.0)
43
+ cucumber-html-formatter (~> 6.0, >= 6.0.1)
44
+ cucumber-messages (~> 12.1, >= 12.1.1)
45
+ cucumber-wire (~> 3.0, >= 3.0.0)
46
+ diff-lcs (~> 1.3, >= 1.3)
47
+ multi_test (~> 0.1, >= 0.1.2)
48
+ sys-uname (~> 1.0, >= 1.0.2)
49
+ cucumber-core (7.0.0)
50
+ cucumber-gherkin (~> 13.0, >= 13.0.0)
51
+ cucumber-messages (~> 12.1, >= 12.1.1)
52
+ cucumber-tag-expressions (~> 2.0, >= 2.0.4)
53
+ cucumber-cucumber-expressions (10.3.0)
54
+ cucumber-gherkin (13.0.0)
55
+ cucumber-messages (~> 12.0, >= 12.0.0)
56
+ cucumber-html-formatter (6.0.3)
57
+ cucumber-messages (~> 12.1, >= 12.1.1)
58
+ cucumber-messages (12.4.0)
59
+ protobuf-cucumber (~> 3.10, >= 3.10.8)
60
+ cucumber-tag-expressions (2.0.4)
61
+ cucumber-wire (3.0.0)
62
+ cucumber-core (~> 7.0, >= 7.0.0)
63
+ cucumber-cucumber-expressions (~> 10.1, >= 10.1.0)
64
+ cucumber-messages (~> 12.1, >= 12.1.1)
47
65
  declarative (0.0.10)
48
66
  declarative-option (0.1.0)
49
67
  descendants_tracker (0.0.4)
@@ -56,15 +74,19 @@ GEM
56
74
  faraday_middleware (0.14.0)
57
75
  faraday (>= 0.7.4, < 1.0)
58
76
  ffi (1.12.2)
59
- gherkin (5.1.0)
60
77
  highline (2.0.3)
78
+ i18n (1.8.10)
79
+ concurrent-ruby (~> 1.0)
61
80
  ice_nine (0.11.2)
62
81
  launchy (2.4.3)
63
82
  addressable (~> 2.3)
83
+ method_source (1.0.0)
84
+ middleware (0.1.0)
64
85
  mimemagic (0.3.9)
65
86
  nokogiri (~> 1)
66
87
  rake
67
88
  mini_portile2 (2.4.0)
89
+ minitest (5.14.4)
68
90
  multi_json (1.15.0)
69
91
  multi_test (0.1.2)
70
92
  multipart-post (2.1.1)
@@ -73,6 +95,17 @@ GEM
73
95
  parallel (1.19.2)
74
96
  parallel_tests (2.32.0)
75
97
  parallel
98
+ protobuf-cucumber (3.10.8)
99
+ activesupport (>= 3.2)
100
+ middleware
101
+ thor
102
+ thread_safe
103
+ pry (0.13.1)
104
+ coderay (~> 1.1)
105
+ method_source (~> 1.0)
106
+ pry-byebug (3.9.0)
107
+ byebug (~> 11.0)
108
+ pry (~> 0.13.0)
76
109
  public_suffix (3.1.1)
77
110
  rake (12.3.3)
78
111
  representable (3.0.4)
@@ -92,6 +125,8 @@ GEM
92
125
  diff-lcs (>= 1.2.0, < 2.0)
93
126
  rspec-support (~> 3.10.0)
94
127
  rspec-support (3.10.0)
128
+ sys-uname (1.2.2)
129
+ ffi (~> 1.1)
95
130
  thor (1.0.1)
96
131
  thread_safe (0.3.6)
97
132
  tracker_api (1.11.0)
@@ -104,26 +139,30 @@ GEM
104
139
  multi_json
105
140
  representable
106
141
  virtus
142
+ tzinfo (2.0.4)
143
+ concurrent-ruby (~> 1.0)
107
144
  uber (0.1.0)
108
145
  virtus (1.0.5)
109
146
  axiom-types (~> 0.1)
110
147
  coercible (~> 1.0)
111
148
  descendants_tracker (~> 0.0, >= 0.0.3)
112
149
  equalizer (~> 0.0, >= 0.0.9)
150
+ zeitwerk (2.4.2)
113
151
 
114
152
  PLATFORMS
115
153
  ruby
116
154
 
117
155
  DEPENDENCIES
118
156
  aruba (< 1)
119
- byebug
157
+ cucumber (~> 4)
120
158
  geordi!
121
159
  highline
122
160
  launchy
123
161
  parallel_tests
162
+ pry-byebug
124
163
  rake (< 13)
125
164
  rspec
126
165
  tracker_api
127
166
 
128
167
  BUNDLED WITH
129
- 1.17.3
168
+ 2.2.26
data/geordi.gemspec CHANGED
@@ -5,25 +5,26 @@ 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
26
  spec.add_runtime_dependency 'thor', '~> 1'
27
+ # Development dependencies are defined in the Gemfile (therefore no `spec.add_development_dependency` directives)
27
28
 
28
29
  spec.post_install_message = <<-ATTENTION
29
30
  Support for sequential running of integration tests tagged with @solo has been dropped.
@@ -66,11 +66,11 @@ module Geordi
66
66
 
67
67
  until File.exist?(File.join(current, 'Capfile'))
68
68
  if current == '/' || current == '/home' || !File.directory?(current)
69
- raise <<-ERROR
70
- Could not locate Capfile.
69
+ raise <<~ERROR
70
+ Could not locate Capfile.
71
71
 
72
- Are you calling me from within a Rails project?
73
- 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.
74
74
  ERROR
75
75
  else
76
76
  current = File.dirname(current)
@@ -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
@@ -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!'
@@ -14,8 +14,15 @@ module Geordi
14
14
  require 'yaml'
15
15
 
16
16
  evaluated_config_file = ERB.new(File.read('config/database.yml')).result
17
+
17
18
  # Allow aliases and a special set of classes like symbols and time objects
18
- @config ||= YAML.safe_load(evaluated_config_file, [Symbol, Time], [], true)
19
+ permitted_classes = [Symbol, Time]
20
+ @config ||= if Gem::Version.new(Psych::VERSION) >= Gem::Version.new('3.1.0')
21
+ YAML.safe_load(evaluated_config_file, permitted_classes: permitted_classes, aliases: true)
22
+ else
23
+ YAML.safe_load(evaluated_config_file, permitted_classes, [], true)
24
+ end
25
+
19
26
  @config['development']
20
27
  end
21
28
  alias_method :config, :development_database_config
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
@@ -103,8 +103,6 @@ No staged changes. Will create an empty commit.
103
103
  menu.header = 'Choose a story'
104
104
 
105
105
  stories.each do |story|
106
- print '.' # Progress
107
-
108
106
  state = story.current_state
109
107
  owners = story.owners
110
108
  owner_is_me = owners.collect(&:id).include?(my_id)
@@ -173,7 +171,7 @@ No staged changes. Will create an empty commit.
173
171
  stdout_str.strip.split(' ').map(&:chars).map(&:first).join.downcase
174
172
  end
175
173
 
176
- git_user_initials = Interaction.prompt 'Enter your initals:', git_user_initials
174
+ git_user_initials = Interaction.prompt 'Enter your initials:', git_user_initials
177
175
 
178
176
  if git_user_initials.nil?
179
177
  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.1'.freeze
2
+ VERSION = '7.0.2'.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: 6.0.1
4
+ version: 7.0.2
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-07-15 00:00:00.000000000 Z
11
+ date: 2021-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -110,14 +110,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
110
  requirements:
111
111
  - - ">="
112
112
  - !ruby/object:Gem::Version
113
- version: 2.2.0
113
+ version: 2.3.0
114
114
  required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  requirements: []
120
- rubygems_version: 3.0.3
120
+ rubygems_version: 3.2.26
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