ci-helper 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +61 -0
- data/.rubocop.yml +4 -0
- data/README.md +3 -1
- data/lib/ci_helper/cli.rb +8 -7
- data/lib/ci_helper/commands.rb +3 -0
- data/lib/ci_helper/version.rb +1 -1
- metadata +7 -7
- data/.github/workflows/ruby.yml +0 -84
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b4de79227e8355d1648143f4d35abcd08c1ddf9be79f4ad32521c734a4fb74e
|
4
|
+
data.tar.gz: 9d0d15a617492173e9e331fd973fe71894ed4d2f81ac512e2ba2ca754507c23f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3025f9be4194acd855eabe134d7b1f28f2209e84e11f4e5d974b32ef086f85b6a37bb226303b674dd2b4151b17250a9b3f613df66369a1c346b99f83dc28426
|
7
|
+
data.tar.gz: 48a8fddce07d4587935d4901e912a0e6e58d41c281251e87668d283892c9b722878c0429214c96c7b474347461dca56fec4d5b0bad8b72cbc97e095469a160df
|
@@ -0,0 +1,61 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [master]
|
6
|
+
pull_request:
|
7
|
+
branches: [master]
|
8
|
+
|
9
|
+
|
10
|
+
env:
|
11
|
+
FULL_COVERAGE_CHECK: true
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
full-check:
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v2
|
19
|
+
- uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: 3
|
22
|
+
bundler-cache: true
|
23
|
+
- name: Build and install gem to systems gems
|
24
|
+
run: bundle exec rake install
|
25
|
+
- name: Run Linter
|
26
|
+
run: bundle exec ci-helper RubocopLint
|
27
|
+
- name: Check missed spec suffixes
|
28
|
+
run: bundle exec ci-helper CheckSpecSuffixes --extra-paths spec/*.rb --ignored-paths spec/*_helper.rb
|
29
|
+
- name: Run specs
|
30
|
+
run: bundle exec ci-helper RunSpecs
|
31
|
+
- name: Audit
|
32
|
+
run: bundle exec ci-helper BundlerAudit
|
33
|
+
- name: Coveralls
|
34
|
+
uses: coverallsapp/github-action@master
|
35
|
+
with:
|
36
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
37
|
+
specs:
|
38
|
+
runs-on: ubuntu-latest
|
39
|
+
continue-on-error: ${{ matrix.experimental }}
|
40
|
+
|
41
|
+
env:
|
42
|
+
FULL_TEST_COVERAGE_CHECK: false
|
43
|
+
|
44
|
+
strategy:
|
45
|
+
fail-fast: false
|
46
|
+
matrix:
|
47
|
+
ruby: [2.5, 2.6, 2.7]
|
48
|
+
experimental: [false]
|
49
|
+
include:
|
50
|
+
- ruby: head
|
51
|
+
experimental: true
|
52
|
+
|
53
|
+
|
54
|
+
steps:
|
55
|
+
- uses: actions/checkout@v2
|
56
|
+
- uses: ruby/setup-ruby@v1
|
57
|
+
with:
|
58
|
+
ruby-version: ${{ matrix.ruby }}
|
59
|
+
bundler-cache: true
|
60
|
+
- name: Run specs
|
61
|
+
run: bundle exec rspec
|
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -31,8 +31,10 @@ A command can accept list of options (parameters). Option values are passed thro
|
|
31
31
|
For example, the BundlerAudit command accepts the ignored_advisories option
|
32
32
|
You can set a value of this option by setting the flag `--ignored-advisories ignored-advisory`.
|
33
33
|
It should be noted that all hyphens in flag names are automatically replaced with underscores.
|
34
|
+
If command accepts array as option's value, you can separate values with either commas or spaces.
|
34
35
|
```bash
|
35
|
-
$ ci-helper BundlerAudit --ignored-advisories first,second
|
36
|
+
$ ci-helper BundlerAudit --ignored-advisories first,second # Valid
|
37
|
+
$ ci-helper BundlerAudit --ignored-advisories first second # Valid too!
|
36
38
|
```
|
37
39
|
|
38
40
|
List of available commands:
|
data/lib/ci_helper/cli.rb
CHANGED
@@ -26,13 +26,14 @@ module CIHelper
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def parse_options_from(args)
|
29
|
-
args
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
29
|
+
args
|
30
|
+
.slice_when { |_el_before, el_after| el_after.start_with?("--") }
|
31
|
+
.each_with_object({}) do |commands, options|
|
32
|
+
key = Tools::Inflector.instance.underscore(commands.shift.split("--").last)
|
33
|
+
raise "Invalid options" if key.empty?
|
34
|
+
value = commands.size <= 1 ? commands.first : commands
|
35
|
+
options[key.to_sym] = value || ""
|
36
|
+
end
|
36
37
|
end
|
37
38
|
|
38
39
|
def perform_command!
|
data/lib/ci_helper/commands.rb
CHANGED
data/lib/ci_helper/version.rb
CHANGED
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.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JustAnotherDude
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -173,7 +173,7 @@ extensions: []
|
|
173
173
|
extra_rdoc_files: []
|
174
174
|
files:
|
175
175
|
- ".editorconfig"
|
176
|
-
- ".github/workflows/
|
176
|
+
- ".github/workflows/test.yml"
|
177
177
|
- ".gitignore"
|
178
178
|
- ".rspec"
|
179
179
|
- ".rubocop.yml"
|
@@ -208,7 +208,7 @@ licenses:
|
|
208
208
|
metadata:
|
209
209
|
homepage_uri: https://github.com/umbrellio/ci_helper
|
210
210
|
source_code_uri: https://github.com/umbrellio/ci_helper
|
211
|
-
post_install_message:
|
211
|
+
post_install_message:
|
212
212
|
rdoc_options: []
|
213
213
|
require_paths:
|
214
214
|
- lib
|
@@ -223,8 +223,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
223
|
- !ruby/object:Gem::Version
|
224
224
|
version: '0'
|
225
225
|
requirements: []
|
226
|
-
rubygems_version: 3.
|
227
|
-
signing_key:
|
226
|
+
rubygems_version: 3.2.15
|
227
|
+
signing_key:
|
228
228
|
specification_version: 4
|
229
229
|
summary: Continuous Integration helpers for Ruby
|
230
230
|
test_files: []
|
data/.github/workflows/ruby.yml
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
# This workflow uses actions that are not certified by GitHub.
|
2
|
-
# They are provided by a third-party and are governed by
|
3
|
-
# separate terms of service, privacy policy, and support
|
4
|
-
# documentation.
|
5
|
-
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
-
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
-
|
8
|
-
name: Ruby
|
9
|
-
|
10
|
-
on:
|
11
|
-
push:
|
12
|
-
branches: [ master ]
|
13
|
-
pull_request:
|
14
|
-
branches: [ master ]
|
15
|
-
|
16
|
-
env:
|
17
|
-
FULL_COVERAGE_CHECK: true
|
18
|
-
|
19
|
-
jobs:
|
20
|
-
test-latest:
|
21
|
-
|
22
|
-
runs-on: ubuntu-latest
|
23
|
-
|
24
|
-
steps:
|
25
|
-
- uses: actions/checkout@v2
|
26
|
-
- name: Set up Ruby
|
27
|
-
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
28
|
-
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
29
|
-
# uses: ruby/setup-ruby@v1
|
30
|
-
uses: ruby/setup-ruby@v1
|
31
|
-
with:
|
32
|
-
ruby-version: 2.7
|
33
|
-
- name: Install dependencies
|
34
|
-
run: bundle install && gem install bundler-audit
|
35
|
-
- name: Build and install gem to systems gems
|
36
|
-
run: bundle exec rake install
|
37
|
-
- name: Run Linter
|
38
|
-
run: ci-helper RubocopLint
|
39
|
-
- name: Check missed spec suffixes
|
40
|
-
run: ci-helper CheckSpecSuffixes --extra-paths spec/*.rb --ignored-paths spec/*_helper.rb
|
41
|
-
- name: Run specs
|
42
|
-
run: ci-helper RunSpecs
|
43
|
-
- name: Audit
|
44
|
-
run: ci-helper BundlerAudit
|
45
|
-
- name: Coveralls
|
46
|
-
uses: coverallsapp/github-action@v1.1.1
|
47
|
-
with:
|
48
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
49
|
-
specs-for-26:
|
50
|
-
runs-on: ubuntu-latest
|
51
|
-
|
52
|
-
steps:
|
53
|
-
- uses: actions/checkout@v2
|
54
|
-
- name: Set up Ruby
|
55
|
-
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
56
|
-
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
57
|
-
# uses: ruby/setup-ruby@v1
|
58
|
-
uses: ruby/setup-ruby@v1
|
59
|
-
with:
|
60
|
-
ruby-version: 2.6
|
61
|
-
- name: Install dependencies
|
62
|
-
run: bundle install && gem install bundler-audit
|
63
|
-
- name: Build and install gem to systems gems
|
64
|
-
run: bundle exec rake install
|
65
|
-
- name: Run specs
|
66
|
-
run: ci-helper RunSpecs
|
67
|
-
specs-for-25:
|
68
|
-
runs-on: ubuntu-latest
|
69
|
-
|
70
|
-
steps:
|
71
|
-
- uses: actions/checkout@v2
|
72
|
-
- name: Set up Ruby
|
73
|
-
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
74
|
-
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
75
|
-
# uses: ruby/setup-ruby@v1
|
76
|
-
uses: ruby/setup-ruby@v1
|
77
|
-
with:
|
78
|
-
ruby-version: 2.5
|
79
|
-
- name: Install dependencies
|
80
|
-
run: bundle install && gem install bundler-audit
|
81
|
-
- name: Build and install gem to systems gems
|
82
|
-
run: bundle exec rake install
|
83
|
-
- name: Run specs
|
84
|
-
run: ci-helper RunSpecs
|