Skip to content
This repository was archived by the owner on Dec 29, 2025. It is now read-only.

Commit fc81ad3

Browse files
authored
Updates (#5)
* Add hadolint config * Add github action for hadolint * Add standard gem * Add standard binstub * Add sshkit gem * Add github action for standard * Cleanup * Add standard config * Add LICENSE * Cleanup * Cleanup * Add rubocop * Add rubocop github action * Add rubocop binstub * Configure rubocop * Fix rubocop warnings * Fix rubocop warnings * Fix rubocop warnings * Add .envrc * Fix rubocop warnings
1 parent 060c53e commit fc81ad3

36 files changed

+458
-32
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PATH_add bin

.github/workflows/hadolint.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Hadolint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch: {}
11+
schedule:
12+
- cron: "0 21 * * 6"
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
run:
19+
runs-on: ubuntu-24.04
20+
21+
steps:
22+
- name: Harden Runner
23+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
24+
with:
25+
egress-policy: audit
26+
27+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
28+
- uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0

.github/workflows/rubocop.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Rubocop
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch: {}
11+
schedule:
12+
- cron: "0 21 * * 6"
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
rubocop:
19+
runs-on: ubuntu-24.04
20+
21+
steps:
22+
- name: Harden Runner
23+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
24+
with:
25+
egress-policy: audit
26+
27+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
28+
- name: Set up Ruby
29+
uses: ruby/setup-ruby@ab177d40ee5483edb974554986f56b33477e21d0 # v1.265.0
30+
with:
31+
rubygems: latest
32+
bundler: latest
33+
bundler-cache: true
34+
- run: bin/rubocop --parallel --format github

.github/workflows/standard.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Standard
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch: {}
11+
schedule:
12+
- cron: "0 21 * * 6"
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
standard:
19+
runs-on: ubuntu-24.04
20+
21+
steps:
22+
- name: Harden Runner
23+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
24+
with:
25+
egress-policy: audit
26+
27+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
28+
- name: Set up Ruby
29+
uses: ruby/setup-ruby@ab177d40ee5483edb974554986f56b33477e21d0 # v1.265.0
30+
with:
31+
rubygems: latest
32+
bundler: latest
33+
bundler-cache: true
34+
- run: bin/standardrb --format github

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
# Ignore all environment files.
1111
/.env*
12+
!/.envrc
1213

1314
# Ignore all logfiles and tempfiles.
1415
/log/*

.hadolint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ignored:
2+
- DL3008
3+
- DL3059

.rubocop.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
plugins:
2+
- rubocop-disable_syntax
3+
- rubocop-performance
4+
- rubocop-rails
5+
- rubocop-rspec
6+
- rubocop-rspec_rails
7+
8+
AllCops:
9+
NewCops: enable
10+
Exclude:
11+
- "bin/*"
12+
- "db/schema.rb"
13+
- "db/rails_pulse_schema.rb"
14+
- "vendor/**/*"
15+
16+
Style/DisableSyntax:
17+
DisableSyntax:
18+
- unless
19+
- ternary
20+
- endless_methods
21+
- numbered_parameters
22+
- shorthand_hash_syntax
23+
- percent_literals
24+
25+
Style/StringLiterals:
26+
EnforcedStyle: double_quotes
27+
28+
Layout/LineLength:
29+
Enabled: false
30+
31+
Style/Documentation:
32+
Enabled: false
33+
34+
Bundler/OrderedGems:
35+
Enabled: false
36+
37+
Metrics/BlockLength:
38+
Enabled: false
39+
40+
Style/WordArray:
41+
Enabled: false
42+
43+
Layout/SpaceInsideHashLiteralBraces:
44+
Enabled: false
45+
46+
Layout/MultilineMethodCallIndentation:
47+
Enabled: false
48+
49+
Style/TrailingCommaInArrayLiteral:
50+
Enabled: false
51+
52+
Layout/FirstHashElementIndentation:
53+
Enabled: false
54+
55+
Naming/FileName:
56+
Enabled: false
57+
58+
Style/SymbolArray:
59+
Enabled: false
60+
61+
Metrics/MethodLength:
62+
Enabled: false
63+
64+
Metrics/AbcSize:
65+
Enabled: false
66+
67+
Style/IfUnlessModifier:
68+
Enabled: false
69+
70+
Layout/SpaceAfterComma:
71+
Enabled: false
72+
73+
Layout/ArgumentAlignment:
74+
Enabled: false
75+
76+
Style/EmptyMethod:
77+
Enabled: false
78+
79+
Metrics/ClassLength:
80+
Enabled: false
81+
82+
Style/Lambda:
83+
Enabled: false
84+
85+
Style/ClassAndModuleChildren:
86+
Enabled: false
87+
88+
Lint/UnusedBlockArgument:
89+
Enabled: false
90+
91+
Layout/IndentationWidth:
92+
Enabled: false
93+
94+
Layout/ElseAlignment:
95+
Enabled: false
96+
97+
Layout/EndAlignment:
98+
Enabled: false
99+
100+
Lint/EmptyBlock:
101+
Enabled: false
102+
103+
RSpec/BeEq:
104+
Enabled: false
105+
106+
RSpec/EmptyExampleGroup:
107+
Enabled: false
108+
109+
RSpec/ExampleWording:
110+
Enabled: false
111+
112+
Style/GuardClause:
113+
Enabled: false

.standard.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ruby_version: 3.4
2+
parallel: true
3+
4+
ignore:
5+
- "bin/*"
6+
- "db/schema.rb"
7+
- "db/rails_pulse_schema.rb"
8+
- "vendor/**/*"

Gemfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
source "https://rubygems.org"
24

35
gem "rails", "8.1.1"
@@ -10,7 +12,7 @@ gem "stimulus-rails"
1012
gem "jbuilder"
1113

1214
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
13-
gem "tzinfo-data", platforms: %i[ windows jruby ]
15+
gem "tzinfo-data", platforms: [:windows, :jruby]
1416

1517
# Reduces boot times through caching; required in config/boot.rb
1618
gem "bootsnap", require: false
@@ -19,15 +21,21 @@ gem "bootsnap", require: false
1921
gem "thruster", require: false
2022

2123
gem "rails_pulse"
24+
gem "sshkit", require: false
2225

2326
group :development, :test do
24-
# Audits gems for known security defects (use config/bundler-audit.yml to ignore issues)
2527
gem "bundler-audit", require: false
26-
27-
# Static analysis for security vulnerabilities [https://brakemanscanner.org/]
2828
gem "brakeman", require: false
2929
end
3030

3131
group :development do
32+
gem "license_finder", require: false
33+
gem "rubocop", require: false
34+
gem "rubocop-disable_syntax", require: false
35+
gem "rubocop-performance", require: false
36+
gem "rubocop-rails", require: false
37+
gem "rubocop-rspec", require: false
38+
gem "rubocop-rspec_rails", require: false
3239
gem "fasterer", require: false
40+
gem "standard", "1.51.1", require: false
3341
end

0 commit comments

Comments
 (0)