ci-helper 0.4.2 → 0.6.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: 2b4de79227e8355d1648143f4d35abcd08c1ddf9be79f4ad32521c734a4fb74e
4
- data.tar.gz: 9d0d15a617492173e9e331fd973fe71894ed4d2f81ac512e2ba2ca754507c23f
3
+ metadata.gz: c65325f8b34b50a47de3b66dd16aee7b9e91d4cdd0be32ec258c88f8a0e105e7
4
+ data.tar.gz: 99c2668bcef68f533f9c96a716fca23f1ed3e82f0abb582c70187c61033ee48a
5
5
  SHA512:
6
- metadata.gz: c3025f9be4194acd855eabe134d7b1f28f2209e84e11f4e5d974b32ef086f85b6a37bb226303b674dd2b4151b17250a9b3f613df66369a1c346b99f83dc28426
7
- data.tar.gz: 48a8fddce07d4587935d4901e912a0e6e58d41c281251e87668d283892c9b722878c0429214c96c7b474347461dca56fec4d5b0bad8b72cbc97e095469a160df
6
+ metadata.gz: 23217662314854d1ac37e90494fb21e3f8d1fbfe7dd4c9b7b1166d918d00d1e6bbf2b624c95591a8a8e200a593620a56c5f5f563c0a614ea740073694d2451a5
7
+ data.tar.gz: 48a8b8bec14dbca6b5819ab06c0ebeaba2066755c804163e387e084668c22ba17f49311044dca51b62fe15873c2ebcf314ae8b8d6ed2c86c4c2abb7534277a84
@@ -6,19 +6,15 @@ 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
16
12
 
17
13
  steps:
18
- - uses: actions/checkout@v2
14
+ - uses: actions/checkout@v4
19
15
  - uses: ruby/setup-ruby@v1
20
16
  with:
21
- ruby-version: 3
17
+ ruby-version: "3.2"
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,15 +39,10 @@ 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", "3.1"]
53
43
 
54
44
  steps:
55
- - uses: actions/checkout@v2
45
+ - uses: actions/checkout@v4
56
46
  - uses: ruby/setup-ruby@v1
57
47
  with:
58
48
  ruby-version: ${{ matrix.ruby }}
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 CHANGED
@@ -3,3 +3,12 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
+
7
+ gem "bundler"
8
+ gem "bundler-audit"
9
+ gem "pry"
10
+ gem "rake"
11
+ gem "rspec"
12
+ gem "rubocop-config-umbrellio"
13
+ gem "simplecov"
14
+ gem "simplecov-lcov"
data/Gemfile.lock ADDED
@@ -0,0 +1,140 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ci-helper (0.6.0)
5
+ colorize (~> 1.1)
6
+ dry-inflector (~> 1.0)
7
+ umbrellio-sequel-plugins (~> 0.14)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activesupport (7.1.2)
13
+ base64
14
+ bigdecimal
15
+ concurrent-ruby (~> 1.0, >= 1.0.2)
16
+ connection_pool (>= 2.2.5)
17
+ drb
18
+ i18n (>= 1.6, < 2)
19
+ minitest (>= 5.1)
20
+ mutex_m
21
+ tzinfo (~> 2.0)
22
+ ast (2.4.2)
23
+ base64 (0.2.0)
24
+ bigdecimal (3.1.4)
25
+ bundler-audit (0.9.1)
26
+ bundler (>= 1.2.0, < 3)
27
+ thor (~> 1.0)
28
+ coderay (1.1.3)
29
+ colorize (1.1.0)
30
+ concurrent-ruby (1.2.2)
31
+ connection_pool (2.4.1)
32
+ diff-lcs (1.5.0)
33
+ docile (1.4.0)
34
+ drb (2.2.0)
35
+ ruby2_keywords
36
+ dry-inflector (1.0.0)
37
+ i18n (1.14.1)
38
+ concurrent-ruby (~> 1.0)
39
+ json (2.7.1)
40
+ method_source (1.0.0)
41
+ minitest (5.20.0)
42
+ mutex_m (0.2.0)
43
+ parallel (1.23.0)
44
+ parser (3.2.2.4)
45
+ ast (~> 2.4.1)
46
+ racc
47
+ pry (0.14.2)
48
+ coderay (~> 1.1)
49
+ method_source (~> 1.0)
50
+ racc (1.7.3)
51
+ rack (3.0.8)
52
+ rainbow (3.1.1)
53
+ rake (13.1.0)
54
+ regexp_parser (2.8.3)
55
+ rexml (3.2.6)
56
+ rspec (3.12.0)
57
+ rspec-core (~> 3.12.0)
58
+ rspec-expectations (~> 3.12.0)
59
+ rspec-mocks (~> 3.12.0)
60
+ rspec-core (3.12.2)
61
+ rspec-support (~> 3.12.0)
62
+ rspec-expectations (3.12.3)
63
+ diff-lcs (>= 1.2.0, < 2.0)
64
+ rspec-support (~> 3.12.0)
65
+ rspec-mocks (3.12.6)
66
+ diff-lcs (>= 1.2.0, < 2.0)
67
+ rspec-support (~> 3.12.0)
68
+ rspec-support (3.12.1)
69
+ rubocop (1.50.2)
70
+ json (~> 2.3)
71
+ parallel (~> 1.10)
72
+ parser (>= 3.2.0.0)
73
+ rainbow (>= 2.2.2, < 4.0)
74
+ regexp_parser (>= 1.8, < 3.0)
75
+ rexml (>= 3.2.5, < 4.0)
76
+ rubocop-ast (>= 1.28.0, < 2.0)
77
+ ruby-progressbar (~> 1.7)
78
+ unicode-display_width (>= 2.4.0, < 3.0)
79
+ rubocop-ast (1.30.0)
80
+ parser (>= 3.2.1.0)
81
+ rubocop-capybara (2.19.0)
82
+ rubocop (~> 1.41)
83
+ rubocop-config-umbrellio (1.50.0.85)
84
+ rubocop (~> 1.50.0)
85
+ rubocop-performance (~> 1.17.0)
86
+ rubocop-rails (~> 2.19.0)
87
+ rubocop-rake (~> 0.6.0)
88
+ rubocop-rspec (~> 2.20.0)
89
+ rubocop-sequel (~> 0.3.3)
90
+ rubocop-performance (1.17.1)
91
+ rubocop (>= 1.7.0, < 2.0)
92
+ rubocop-ast (>= 0.4.0)
93
+ rubocop-rails (2.19.1)
94
+ activesupport (>= 4.2.0)
95
+ rack (>= 1.1)
96
+ rubocop (>= 1.33.0, < 2.0)
97
+ rubocop-rake (0.6.0)
98
+ rubocop (~> 1.0)
99
+ rubocop-rspec (2.20.0)
100
+ rubocop (~> 1.33)
101
+ rubocop-capybara (~> 2.17)
102
+ rubocop-sequel (0.3.4)
103
+ rubocop (~> 1.0)
104
+ ruby-progressbar (1.13.0)
105
+ ruby2_keywords (0.0.5)
106
+ sequel (5.75.0)
107
+ bigdecimal
108
+ simplecov (0.22.0)
109
+ docile (~> 1.1)
110
+ simplecov-html (~> 0.11)
111
+ simplecov_json_formatter (~> 0.1)
112
+ simplecov-html (0.12.3)
113
+ simplecov-lcov (0.8.0)
114
+ simplecov_json_formatter (0.1.4)
115
+ symbiont-ruby (0.7.0)
116
+ thor (1.3.0)
117
+ tzinfo (2.0.6)
118
+ concurrent-ruby (~> 1.0)
119
+ umbrellio-sequel-plugins (0.14.0.189)
120
+ sequel
121
+ symbiont-ruby
122
+ unicode-display_width (2.5.0)
123
+
124
+ PLATFORMS
125
+ arm64-darwin-23
126
+ x86_64-linux
127
+
128
+ DEPENDENCIES
129
+ bundler
130
+ bundler-audit
131
+ ci-helper!
132
+ pry
133
+ rake
134
+ rspec
135
+ rubocop-config-umbrellio
136
+ simplecov
137
+ simplecov-lcov
138
+
139
+ BUNDLED WITH
140
+ 2.4.21
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"
@@ -24,16 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ["lib"]
26
26
 
27
- spec.add_runtime_dependency "colorize", "~> 0.8"
28
- spec.add_runtime_dependency "dry-inflector", "~> 0.2"
29
- spec.add_runtime_dependency "umbrellio-sequel-plugins", "~> 0.4"
30
-
31
- spec.add_development_dependency "bundler"
32
- spec.add_development_dependency "bundler-audit"
33
- spec.add_development_dependency "pry"
34
- spec.add_development_dependency "rake"
35
- spec.add_development_dependency "rspec"
36
- spec.add_development_dependency "rubocop-config-umbrellio"
37
- spec.add_development_dependency "simplecov"
38
- spec.add_development_dependency "simplecov-lcov"
27
+ spec.add_runtime_dependency "colorize", "~> 1.1"
28
+ spec.add_runtime_dependency "dry-inflector", "~> 1.0"
29
+ spec.add_runtime_dependency "umbrellio-sequel-plugins", "~> 0.14"
39
30
  end
@@ -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.6.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, error, status = Open3.capture3(git_command)
35
+ abort "Can't get list of migration files:\n#{error}" 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.6.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: 2023-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -16,154 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.8'
19
+ version: '1.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.8'
26
+ version: '1.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: dry-inflector
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.2'
33
+ version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.2'
40
+ version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: umbrellio-sequel-plugins
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.4'
47
+ version: '0.14'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.4'
55
- - !ruby/object:Gem::Dependency
56
- name: bundler
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: bundler-audit
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: pry
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: rake
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: rspec
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: rubocop-config-umbrellio
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: simplecov
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: simplecov-lcov
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
54
+ version: '0.14'
167
55
  description: CIHelper is a gem with Continuous Integration helpers for Ruby
168
56
  email:
169
57
  - vanyaz158@gmail.com
@@ -178,6 +66,7 @@ files:
178
66
  - ".rspec"
179
67
  - ".rubocop.yml"
180
68
  - Gemfile
69
+ - Gemfile.lock
181
70
  - LICENSE.txt
182
71
  - README.md
183
72
  - Rakefile
@@ -216,14 +105,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
216
105
  requirements:
217
106
  - - ">="
218
107
  - !ruby/object:Gem::Version
219
- version: 2.5.0
108
+ version: 2.7.0
220
109
  required_rubygems_version: !ruby/object:Gem::Requirement
221
110
  requirements:
222
111
  - - ">="
223
112
  - !ruby/object:Gem::Version
224
113
  version: '0'
225
114
  requirements: []
226
- rubygems_version: 3.2.15
115
+ rubygems_version: 3.4.21
227
116
  signing_key:
228
117
  specification_version: 4
229
118
  summary: Continuous Integration helpers for Ruby