Skip to content

Commit 8525678

Browse files
committed
chore: inherit rubocop config, update deps
1 parent e07c944 commit 8525678

File tree

6 files changed

+51
-60
lines changed

6 files changed

+51
-60
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
name: Ruby
1+
name: Matrix Test
22

33
on:
44
workflow_dispatch:
5+
pull_request:
56
push:
67
branches:
78
- master
89
- dev
910

10-
11-
pull_request:
12-
13-
concurrency:
11+
concurrency:
1412
group: ${{ github.sha }}
1513
cancel-in-progress: true
1614

@@ -21,15 +19,15 @@ jobs:
2119
strategy:
2220
matrix:
2321
ruby:
24-
- '2.7.0'
25-
- '3.0.0'
22+
- "2.7.0"
23+
- "3.0.0"
2624

2725
steps:
28-
- uses: actions/checkout@v3
29-
- name: Set up Ruby
30-
uses: ruby/setup-ruby@v1
31-
with:
32-
ruby-version: ${{ matrix.ruby }}
33-
bundler-cache: true
34-
- name: Run the default task
35-
run: bundle exec rake
26+
- uses: actions/checkout@v3
27+
- name: Set up Ruby
28+
uses: ruby/setup-ruby@v1
29+
with:
30+
ruby-version: ${{ matrix.ruby }}
31+
bundler-cache: true
32+
- name: Run the default task
33+
run: bundle exec rake

.rubocop.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
AllCops:
2-
TargetRubyVersion: 2.7
3-
DefaultFormatter: simple
1+
inherit_gem:
2+
rubocop-config-crystal: .rubocop.yml
43

5-
Style/StringLiterals:
6-
Enabled: true
7-
EnforcedStyle: double_quotes
8-
9-
Style/StringLiteralsInInterpolation:
10-
Enabled: true
11-
EnforcedStyle: double_quotes
12-
13-
Layout/LineLength:
14-
Max: 120
4+
Metrics/BlockLength:
5+
Enabled: false

Gemfile.lock

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,49 +6,51 @@ PATH
66
GEM
77
remote: https://rubygems.org/
88
specs:
9-
ast (2.4.2)
10-
diff-lcs (1.5.1)
11-
json (2.7.2)
12-
language_server-protocol (3.17.0.3)
13-
parallel (1.25.1)
14-
parser (3.3.3.0)
9+
ast (2.4.3)
10+
diff-lcs (1.6.2)
11+
json (2.15.2)
12+
language_server-protocol (3.17.0.5)
13+
lint_roller (1.1.0)
14+
parallel (1.27.0)
15+
parser (3.3.10.0)
1516
ast (~> 2.4.1)
1617
racc
17-
racc (1.8.0)
18+
prism (1.6.0)
19+
racc (1.8.1)
1820
rainbow (3.1.1)
19-
rake (13.2.1)
20-
regexp_parser (2.9.2)
21-
rexml (3.3.1)
22-
strscan
23-
rspec (3.13.0)
21+
rake (13.3.1)
22+
regexp_parser (2.11.3)
23+
rspec (3.13.2)
2424
rspec-core (~> 3.13.0)
2525
rspec-expectations (~> 3.13.0)
2626
rspec-mocks (~> 3.13.0)
27-
rspec-core (3.13.0)
27+
rspec-core (3.13.6)
2828
rspec-support (~> 3.13.0)
29-
rspec-expectations (3.13.1)
29+
rspec-expectations (3.13.5)
3030
diff-lcs (>= 1.2.0, < 2.0)
3131
rspec-support (~> 3.13.0)
32-
rspec-mocks (3.13.1)
32+
rspec-mocks (3.13.6)
3333
diff-lcs (>= 1.2.0, < 2.0)
3434
rspec-support (~> 3.13.0)
35-
rspec-support (3.13.1)
36-
rubocop (1.64.1)
35+
rspec-support (3.13.6)
36+
rubocop (1.81.6)
3737
json (~> 2.3)
38-
language_server-protocol (>= 3.17.0)
38+
language_server-protocol (~> 3.17.0.2)
39+
lint_roller (~> 1.1.0)
3940
parallel (~> 1.10)
4041
parser (>= 3.3.0.2)
4142
rainbow (>= 2.2.2, < 4.0)
42-
regexp_parser (>= 1.8, < 3.0)
43-
rexml (>= 3.2.5, < 4.0)
44-
rubocop-ast (>= 1.31.1, < 2.0)
43+
regexp_parser (>= 2.9.3, < 3.0)
44+
rubocop-ast (>= 1.47.1, < 2.0)
4545
ruby-progressbar (~> 1.7)
46-
unicode-display_width (>= 2.4.0, < 3.0)
47-
rubocop-ast (1.31.3)
48-
parser (>= 3.3.1.0)
46+
unicode-display_width (>= 2.4.0, < 4.0)
47+
rubocop-ast (1.47.1)
48+
parser (>= 3.3.7.2)
49+
prism (~> 1.4)
4950
ruby-progressbar (1.13.0)
50-
strscan (3.1.0)
51-
unicode-display_width (2.5.0)
51+
unicode-display_width (3.2.0)
52+
unicode-emoji (~> 4.1)
53+
unicode-emoji (4.1.0)
5254

5355
PLATFORMS
5456
x86_64-linux
@@ -60,4 +62,4 @@ DEPENDENCIES
6062
rubocop (~> 1.21)
6163

6264
BUNDLED WITH
63-
2.3.5
65+
2.3.27

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ require "rubocop/rake_task"
99

1010
RuboCop::RakeTask.new
1111

12-
task default: %i[spec]
12+
task default: [:spec, :rubocop]

cr-exec.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ Gem::Specification.new do |spec|
1717

1818
spec.metadata["homepage_uri"] = spec.homepage
1919
spec.metadata["source_code_uri"] = "https://github.com/initdc/cr-exec.git"
20-
spec.metadata["changelog_uri"] = "https://github.com/initdc/cr-exec/blob/wip/CHANGELOG.md"
20+
spec.metadata["changelog_uri"] = "https://github.com/initdc/cr-exec/blob/master/CHANGELOG.md"
2121

2222
# Specify which files should be added to the gem when it is released.
2323
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
2424
spec.files = Dir.chdir(__dir__) do
25-
`git ls-files -z`.split("\x0").reject do |f|
25+
%x(git ls-files -z).split("\x0").reject do |f|
2626
(File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
2727
end
2828
end
2929
spec.bindir = "exe"
30-
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30+
spec.executables = spec.files.grep(/\Aexe\//) { |f| File.basename(f) }
3131
spec.require_paths = ["lib"]
3232

3333
# Uncomment to register a new dependency of your gem

lib/cr/exec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def answer(*args, input: nil, **options)
4343
if input.is_a? Array
4444
input.each { |cmd| pipe.puts(cmd) }
4545
else
46-
pipe.puts(input)
46+
pipe.puts(input)
4747
end
4848
pipe.close_write
4949
pipe.read

0 commit comments

Comments
 (0)