theforeman-rubocop 0.1.0.pre.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/gem-push.yml +3 -2
- data/README.md +2 -0
- data/docs/github_action.md +51 -0
- data/lib/theforeman/rubocop/version.rb +1 -1
- data/theforeman-rubocop.gemspec +4 -3
- metadata +30 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f933f45fd6966bc09f46ba494268c9e93a26b1817ee530cf9967098f5ebaed4a
|
4
|
+
data.tar.gz: e6743de32b593b8c307908395e5b86dd6367f0265a4249f1f435a79d29b94663
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fefc5ca7d7899ec5882cc2d204c2b37892614746781e3762ecaecd370e5348c2d4320157ac19d3b15d0c759f8662ce8489226b77468566d0f6045f516673836
|
7
|
+
data.tar.gz: d402190a05d300b66a913af3bc7bb263442e90643dae4c45dbc961f95f99e925a6da0f67e12b755f7fbdb7d5d310cfef12ae1cab4b03132f23003f3feaaaf451
|
data/README.md
CHANGED
@@ -0,0 +1,51 @@
|
|
1
|
+
# How to run RuboCop in GH action
|
2
|
+
|
3
|
+
## Foreman plugin
|
4
|
+
|
5
|
+
We will cover how to do use this in Foreman plugin. It should work for any rubygem the same tho.
|
6
|
+
|
7
|
+
Rubocop doesn't benefit from running in the full Foreman environment so it is actually better to have own dependency in Gemfile on it.
|
8
|
+
We are then able to run the rubocop directly in the plugin folder, which is much faster as we install only the plugin dependencies, not the full foreman dependencies.
|
9
|
+
|
10
|
+
In theory, you can just `gem install theforeman-foreman` in the action, but it is discouraged as it is then hard to synchronize what version you use in the CI.
|
11
|
+
|
12
|
+
### Plugin `Gemfile`
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
source 'https://rubygems.org'
|
16
|
+
gemspec
|
17
|
+
|
18
|
+
# We use special group rubocop so we can opt out from all dependencies but rubocop.
|
19
|
+
gem 'theforeman-rubocop', '~> 0.1.0', groups: %i[development rubocop]
|
20
|
+
```
|
21
|
+
|
22
|
+
### GH action
|
23
|
+
|
24
|
+
Following GH action will run
|
25
|
+
|
26
|
+
```yaml
|
27
|
+
name: Ruby Testing
|
28
|
+
on:
|
29
|
+
pull_request:
|
30
|
+
push:
|
31
|
+
branches:
|
32
|
+
- master
|
33
|
+
jobs:
|
34
|
+
rubocop:
|
35
|
+
runs-on: ubuntu-latest
|
36
|
+
env:
|
37
|
+
BUNDLE_WITHOUT: development:test
|
38
|
+
steps:
|
39
|
+
- uses: actions/checkout@v2
|
40
|
+
- name: Setup Ruby
|
41
|
+
uses: ruby/setup-ruby@v1
|
42
|
+
with:
|
43
|
+
ruby-version: 2.7 # Currently supported ruby verion
|
44
|
+
bundler-cache: true
|
45
|
+
- name: Run rubocop
|
46
|
+
run: bundle exec rubocop -P --format github
|
47
|
+
view_specs:
|
48
|
+
runs-on: ubuntu-latest
|
49
|
+
needs: rubocop
|
50
|
+
# .... Whatever you run as tests if you run them in GH actions
|
51
|
+
```
|
data/theforeman-rubocop.gemspec
CHANGED
@@ -20,12 +20,13 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ['lib']
|
22
22
|
|
23
|
-
spec.add_dependency 'rubocop', '~> 1.
|
23
|
+
spec.add_dependency 'rubocop', '~> 1.23.0'
|
24
24
|
spec.add_dependency 'rubocop-checkstyle_formatter', '~> 0.4.0'
|
25
25
|
spec.add_dependency 'rubocop-rspec', '~> 2.0'
|
26
|
-
spec.add_dependency 'rubocop-minitest', '~> 0.
|
26
|
+
spec.add_dependency 'rubocop-minitest', '~> 0.17.0'
|
27
27
|
spec.add_dependency 'rubocop-performance', '~> 1.8.1'
|
28
|
-
spec.add_dependency 'rubocop-rails', '~> 2.
|
28
|
+
spec.add_dependency 'rubocop-rails', '~> 2.12.4'
|
29
|
+
spec.add_dependency 'rubocop-graphql', '~> 0.11.2'
|
29
30
|
spec.add_development_dependency 'bundler', '~> 2.1'
|
30
31
|
spec.add_development_dependency 'rake', '~> 13.0'
|
31
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: theforeman-rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Ezr
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.23.0
|
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:
|
26
|
+
version: 1.23.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubocop-checkstyle_formatter
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.17.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.17.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rubocop-performance
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,28 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 2.
|
89
|
+
version: 2.12.4
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 2.
|
96
|
+
version: 2.12.4
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-graphql
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.11.2
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.11.2
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: bundler
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,7 +136,7 @@ dependencies:
|
|
122
136
|
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '13.0'
|
125
|
-
description:
|
139
|
+
description:
|
126
140
|
email:
|
127
141
|
- foreman-dev@googlegroups.com
|
128
142
|
executables: []
|
@@ -133,6 +147,7 @@ files:
|
|
133
147
|
- AUTHORS
|
134
148
|
- README.md
|
135
149
|
- default.yml
|
150
|
+
- docs/github_action.md
|
136
151
|
- lenient.yml
|
137
152
|
- lib/theforeman/rubocop/version.rb
|
138
153
|
- minitest.yml
|
@@ -150,7 +165,7 @@ files:
|
|
150
165
|
homepage: https://github.com/theforeman/theforeman-rubocop
|
151
166
|
licenses: []
|
152
167
|
metadata: {}
|
153
|
-
post_install_message:
|
168
|
+
post_install_message:
|
154
169
|
rdoc_options: []
|
155
170
|
require_paths:
|
156
171
|
- lib
|
@@ -161,12 +176,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
161
176
|
version: '0'
|
162
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
178
|
requirements:
|
164
|
-
- - "
|
179
|
+
- - ">="
|
165
180
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
181
|
+
version: '0'
|
167
182
|
requirements: []
|
168
|
-
rubygems_version: 3.1.
|
169
|
-
signing_key:
|
183
|
+
rubygems_version: 3.1.6
|
184
|
+
signing_key:
|
170
185
|
specification_version: 4
|
171
186
|
summary: Shared Rubocop configuration for theforeman.org family of projects.
|
172
187
|
test_files: []
|