ci-helper 0.4.2 → 0.5.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: 2b4de79227e8355d1648143f4d35abcd08c1ddf9be79f4ad32521c734a4fb74e
4
- data.tar.gz: 9d0d15a617492173e9e331fd973fe71894ed4d2f81ac512e2ba2ca754507c23f
3
+ metadata.gz: e63b9bd4d1eedc9ec6cb16d7ad4889017c70d016aef38309e41bdd9f2766fe5b
4
+ data.tar.gz: d583e5d4938c3c031259062de7977377dd449c554a78ebe10d6bd784fb634d50
5
5
  SHA512:
6
- metadata.gz: c3025f9be4194acd855eabe134d7b1f28f2209e84e11f4e5d974b32ef086f85b6a37bb226303b674dd2b4151b17250a9b3f613df66369a1c346b99f83dc28426
7
- data.tar.gz: 48a8fddce07d4587935d4901e912a0e6e58d41c281251e87668d283892c9b722878c0429214c96c7b474347461dca56fec4d5b0bad8b72cbc97e095469a160df
6
+ metadata.gz: 6bc0d44ab1199a98b7384ff617559b66beb6ce9bf6785952a3e48b0ca573756257c0ed54ef2289ffd5fae7118ffc4540e9cd2486918e9a7222839b923a95cd6a
7
+ data.tar.gz: 3b5179eeb48c25ae650598e9a024c80954768ff8c8bc579cd57bf9d7986a9e6e62d22559471287b020f3caf16b7368af2794303dcdd27666da54e7700e6a9d3c
@@ -6,10 +6,6 @@ on:
6
6
  pull_request:
7
7
  branches: [master]
8
8
 
9
-
10
- env:
11
- FULL_COVERAGE_CHECK: true
12
-
13
9
  jobs:
14
10
  full-check:
15
11
  runs-on: ubuntu-latest
@@ -18,7 +14,7 @@ jobs:
18
14
  - uses: actions/checkout@v2
19
15
  - uses: ruby/setup-ruby@v1
20
16
  with:
21
- ruby-version: 3
17
+ ruby-version: "3.1"
22
18
  bundler-cache: true
23
19
  - name: Build and install gem to systems gems
24
20
  run: bundle exec rake install
@@ -36,7 +32,6 @@ jobs:
36
32
  github-token: ${{ secrets.GITHUB_TOKEN }}
37
33
  specs:
38
34
  runs-on: ubuntu-latest
39
- continue-on-error: ${{ matrix.experimental }}
40
35
 
41
36
  env:
42
37
  FULL_TEST_COVERAGE_CHECK: false
@@ -44,12 +39,7 @@ jobs:
44
39
  strategy:
45
40
  fail-fast: false
46
41
  matrix:
47
- ruby: [2.5, 2.6, 2.7]
48
- experimental: [false]
49
- include:
50
- - ruby: head
51
- experimental: true
52
-
42
+ ruby: ["2.7", "3.0"]
53
43
 
54
44
  steps:
55
45
  - uses: actions/checkout@v2
data/.gitignore CHANGED
@@ -6,5 +6,3 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
-
10
- Gemfile.lock
data/.rubocop.yml CHANGED
@@ -3,7 +3,7 @@ inherit_gem:
3
3
 
4
4
  AllCops:
5
5
  DisplayCopNames: true
6
- TargetRubyVersion: 2.5
6
+ TargetRubyVersion: 2.7
7
7
 
8
8
  Naming/MethodParameterName:
9
9
  AllowedNames: ["x", "y", "z"]
data/Gemfile.lock ADDED
@@ -0,0 +1,120 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ci-helper (0.5.0)
5
+ colorize (~> 0.8)
6
+ dry-inflector (~> 0.2)
7
+ umbrellio-sequel-plugins (~> 0.4)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activesupport (7.0.2.4)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 1.6, < 2)
15
+ minitest (>= 5.1)
16
+ tzinfo (~> 2.0)
17
+ ast (2.4.2)
18
+ bundler-audit (0.9.0.1)
19
+ bundler (>= 1.2.0, < 3)
20
+ thor (~> 1.0)
21
+ coderay (1.1.3)
22
+ colorize (0.8.1)
23
+ concurrent-ruby (1.1.10)
24
+ diff-lcs (1.5.0)
25
+ docile (1.4.0)
26
+ dry-inflector (0.2.1)
27
+ i18n (1.10.0)
28
+ concurrent-ruby (~> 1.0)
29
+ method_source (1.0.0)
30
+ minitest (5.15.0)
31
+ parallel (1.22.1)
32
+ parser (3.1.2.0)
33
+ ast (~> 2.4.1)
34
+ pry (0.14.1)
35
+ coderay (~> 1.1)
36
+ method_source (~> 1.0)
37
+ rack (2.2.3)
38
+ rainbow (3.1.1)
39
+ rake (13.0.6)
40
+ regexp_parser (2.3.1)
41
+ rexml (3.2.5)
42
+ rspec (3.11.0)
43
+ rspec-core (~> 3.11.0)
44
+ rspec-expectations (~> 3.11.0)
45
+ rspec-mocks (~> 3.11.0)
46
+ rspec-core (3.11.0)
47
+ rspec-support (~> 3.11.0)
48
+ rspec-expectations (3.11.0)
49
+ diff-lcs (>= 1.2.0, < 2.0)
50
+ rspec-support (~> 3.11.0)
51
+ rspec-mocks (3.11.1)
52
+ diff-lcs (>= 1.2.0, < 2.0)
53
+ rspec-support (~> 3.11.0)
54
+ rspec-support (3.11.0)
55
+ rubocop (1.25.1)
56
+ parallel (~> 1.10)
57
+ parser (>= 3.1.0.0)
58
+ rainbow (>= 2.2.2, < 4.0)
59
+ regexp_parser (>= 1.8, < 3.0)
60
+ rexml
61
+ rubocop-ast (>= 1.15.1, < 2.0)
62
+ ruby-progressbar (~> 1.7)
63
+ unicode-display_width (>= 1.4.0, < 3.0)
64
+ rubocop-ast (1.17.0)
65
+ parser (>= 3.1.1.0)
66
+ rubocop-config-umbrellio (1.25.0.61)
67
+ rubocop (~> 1.25.0)
68
+ rubocop-performance (~> 1.13.0)
69
+ rubocop-rails (~> 2.13.0)
70
+ rubocop-rake (~> 0.6.0)
71
+ rubocop-rspec (~> 2.7.0)
72
+ rubocop-sequel (~> 0.3.3)
73
+ rubocop-performance (1.13.3)
74
+ rubocop (>= 1.7.0, < 2.0)
75
+ rubocop-ast (>= 0.4.0)
76
+ rubocop-rails (2.13.2)
77
+ activesupport (>= 4.2.0)
78
+ rack (>= 1.1)
79
+ rubocop (>= 1.7.0, < 2.0)
80
+ rubocop-rake (0.6.0)
81
+ rubocop (~> 1.0)
82
+ rubocop-rspec (2.7.0)
83
+ rubocop (~> 1.19)
84
+ rubocop-sequel (0.3.3)
85
+ rubocop (~> 1.0)
86
+ ruby-progressbar (1.11.0)
87
+ sequel (5.56.0)
88
+ simplecov (0.21.2)
89
+ docile (~> 1.1)
90
+ simplecov-html (~> 0.11)
91
+ simplecov_json_formatter (~> 0.1)
92
+ simplecov-html (0.12.3)
93
+ simplecov-lcov (0.8.0)
94
+ simplecov_json_formatter (0.1.4)
95
+ symbiont-ruby (0.7.0)
96
+ thor (1.2.1)
97
+ tzinfo (2.0.4)
98
+ concurrent-ruby (~> 1.0)
99
+ umbrellio-sequel-plugins (0.5.1.27)
100
+ sequel
101
+ symbiont-ruby
102
+ unicode-display_width (2.1.0)
103
+
104
+ PLATFORMS
105
+ ruby
106
+ x86_64-linux
107
+
108
+ DEPENDENCIES
109
+ bundler
110
+ bundler-audit
111
+ ci-helper!
112
+ pry
113
+ rake
114
+ rspec
115
+ rubocop-config-umbrellio
116
+ simplecov
117
+ simplecov-lcov
118
+
119
+ BUNDLED WITH
120
+ 2.3.13
data/ci_helper.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = "CIHelper is a gem with Continuous Integration helpers for Ruby"
13
13
  spec.homepage = "https://github.com/umbrellio/ci_helper"
14
14
  spec.license = "MIT"
15
- spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  spec.metadata["source_code_uri"] = "https://github.com/umbrellio/ci_helper"
@@ -29,7 +29,7 @@ module CIHelper
29
29
  end
30
30
 
31
31
  def job_constants
32
- @job_constants ||= config.values.reject(&:nil?).flat_map(&:keys).uniq
32
+ @job_constants ||= config.values.compact.flat_map(&:keys).uniq
33
33
  end
34
34
 
35
35
  def with_database?
@@ -37,7 +37,12 @@ module CIHelper
37
37
  end
38
38
 
39
39
  def config
40
- @config ||= YAML.load_file(options[:config_path])
40
+ @config ||= begin
41
+ path = options[:config_path]
42
+ # :nocov:
43
+ YAML.respond_to?(:unsafe_load_file) ? YAML.unsafe_load_file(path) : YAML.load_file(path)
44
+ # :nocov:
45
+ end
41
46
  end
42
47
  end
43
48
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CIHelper
4
- VERSION = "0.4.2"
4
+ VERSION = "0.5.0"
5
5
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "logger"
4
+ require "open3"
4
5
  require "sequel/timestamp_migrator_undo_extension"
5
6
 
6
7
  class SequelManagement
@@ -30,7 +31,10 @@ class SequelManagement
30
31
 
31
32
  logger.info "Begin rolling back new migrations"
32
33
 
33
- original_migrations = `#{git_command}`.split.map { |path| File.basename(path) }
34
+ migration_files, _, status = Open3.capture3(git_command)
35
+ abort "Can't get list of migration files" unless status.success?
36
+
37
+ original_migrations = migration_files.split.map { |path| File.basename(path) }
34
38
  migrations_to_rollback = (migrator.applied_migrations - original_migrations).sort.reverse
35
39
 
36
40
  next if migrations_to_rollback.empty?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci-helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JustAnotherDude
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-30 00:00:00.000000000 Z
11
+ date: 2022-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -178,6 +178,7 @@ files:
178
178
  - ".rspec"
179
179
  - ".rubocop.yml"
180
180
  - Gemfile
181
+ - Gemfile.lock
181
182
  - LICENSE.txt
182
183
  - README.md
183
184
  - Rakefile
@@ -216,14 +217,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
216
217
  requirements:
217
218
  - - ">="
218
219
  - !ruby/object:Gem::Version
219
- version: 2.5.0
220
+ version: 2.7.0
220
221
  required_rubygems_version: !ruby/object:Gem::Requirement
221
222
  requirements:
222
223
  - - ">="
223
224
  - !ruby/object:Gem::Version
224
225
  version: '0'
225
226
  requirements: []
226
- rubygems_version: 3.2.15
227
+ rubygems_version: 3.3.12
227
228
  signing_key:
228
229
  specification_version: 4
229
230
  summary: Continuous Integration helpers for Ruby