hlrubo 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGLOG.md +12 -0
- data/README.md +70 -2
- data/default.yml +2 -0
- data/hlrubo.gemspec +3 -2
- data/lib/hlrubo/version.rb +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24008d15837a42c4ab01aac3c8d2426099be6be4cdf17650d5439706963d3600
|
4
|
+
data.tar.gz: 8587b4cac7bf8b7b58c384b7c720a6314112f9785e1d9f27a7510be7889cd3cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2df35f728559d2fece9b926561ba04f7e860447ddbe405546d3e987f01024a59df9846bff16f5632e4d55b7e8f2eb87b717fe11859945d97d84d2106f08298e1
|
7
|
+
data.tar.gz: 223a27d575cccff1220a49c5bbbd053b42fa9ec392f2afa8c7312eb3475f557d9be2dc2898b003653100600298be9b73a58687cbca04d3e75341783d3906f7d2
|
data/CHANGLOG.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Change Log
|
2
|
+
## [Unreleased]
|
3
|
+
#### Added
|
4
|
+
- Exclusion of Node Modules for All Cops.
|
5
|
+
- Exclusion of BlockLength for Specs.
|
6
|
+
- Update gem dependency versions for `rubocop-rails` & `rubocop-rspec`.
|
7
|
+
|
8
|
+
## [Released]
|
9
|
+
### [0.1.0]
|
10
|
+
#### Added
|
11
|
+
- Initial Rubocop Configs
|
12
|
+
- Gem Dependencies
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ HomeLight shared ruby style configs.
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
Add
|
7
|
+
Add gem to application Gemfile:
|
8
8
|
|
9
9
|
```ruby
|
10
10
|
group :development do
|
@@ -34,4 +34,72 @@ Now, run:
|
|
34
34
|
$ bundle exec rubocop
|
35
35
|
```
|
36
36
|
|
37
|
-
No need to include rubocop
|
37
|
+
No need to include rubocop in application gemfile.
|
38
|
+
|
39
|
+
Hlrubo will install [specific versions](https://github.com/homelight/hlrubo/blob/master/hlrubo.gemspec) of:
|
40
|
+
- `rubocop`
|
41
|
+
- `rubocop-performance`
|
42
|
+
- `rubocop-rails`
|
43
|
+
- `rubocop-rspec`
|
44
|
+
|
45
|
+
### GitHub Actions Integration using [Pronto](https://github.com/prontolabs/pronto)
|
46
|
+
#### Notes for below examples:
|
47
|
+
- Match `ruby-version: '2.6.6'` to repo ruby version.
|
48
|
+
- Keep `"$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")"` as is.
|
49
|
+
- For `secrets.PRONTO_TOKEN`, create token in `https://github.com/project/repo-name/settings/secrets`
|
50
|
+
|
51
|
+
#### Basic Implementation Example:
|
52
|
+
In `.github/workflows/pronto.yml` of project root add:
|
53
|
+
```yaml
|
54
|
+
name: Pronto
|
55
|
+
on: [pull_request]
|
56
|
+
|
57
|
+
jobs:
|
58
|
+
pronto:
|
59
|
+
runs-on: ubuntu-latest
|
60
|
+
steps:
|
61
|
+
- uses: actions/checkout@master
|
62
|
+
- uses: actions/setup-ruby@v1
|
63
|
+
with:
|
64
|
+
ruby-version: "2.6.6"
|
65
|
+
- run: gem install pronto pronto-rubocop hlrubo
|
66
|
+
- run: git fetch
|
67
|
+
- run: PRONTO_PULL_REQUEST_ID="$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")" PRONTO_GITHUB_ACCESS_TOKEN="${{ secrets.PRONTO_TOKEN }}" pronto run -f github_status github_pr -c origin/master
|
68
|
+
```
|
69
|
+
|
70
|
+
#### Caching Implementation Example:
|
71
|
+
Add below gems to application Gemfile:
|
72
|
+
|
73
|
+
```ruby
|
74
|
+
group :development do
|
75
|
+
gem "pronto"
|
76
|
+
gem "pronto-rubocop"
|
77
|
+
end
|
78
|
+
```
|
79
|
+
|
80
|
+
In `.github/workflows/pronto.yml` of project root add:
|
81
|
+
```yaml
|
82
|
+
name: Pronto
|
83
|
+
on: [pull_request]
|
84
|
+
|
85
|
+
jobs:
|
86
|
+
pronto:
|
87
|
+
runs-on: ubuntu-latest
|
88
|
+
steps:
|
89
|
+
- uses: actions/checkout@v2
|
90
|
+
- uses: actions/setup-ruby@v1
|
91
|
+
with:
|
92
|
+
ruby-version: "2.6.6"
|
93
|
+
- uses: actions/cache@v1
|
94
|
+
with:
|
95
|
+
path: vendor/bundle
|
96
|
+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
97
|
+
restore-keys: |
|
98
|
+
${{ runner.os }}-gems-
|
99
|
+
- name: Bundle install
|
100
|
+
run: |
|
101
|
+
bundle config path vendor/bundle
|
102
|
+
bundle install --jobs 4 --retry 3
|
103
|
+
- run: git fetch
|
104
|
+
- run: PRONTO_PULL_REQUEST_ID="$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")" PRONTO_GITHUB_ACCESS_TOKEN="${{ secrets.PRONTO_TOKEN }}" bundle exec pronto run -f github_pr -c origin/master
|
105
|
+
```
|
data/default.yml
CHANGED
@@ -9,6 +9,7 @@ AllCops:
|
|
9
9
|
- "db/**/*"
|
10
10
|
- "Rakefile"
|
11
11
|
- "*.gemspec"
|
12
|
+
- "**/node_modules/**/*"
|
12
13
|
|
13
14
|
Rails:
|
14
15
|
Enabled: true
|
@@ -39,6 +40,7 @@ Metrics/AbcSize:
|
|
39
40
|
Metrics/BlockLength:
|
40
41
|
Exclude:
|
41
42
|
- "config/routes.rb"
|
43
|
+
- "spec/**/*"
|
42
44
|
|
43
45
|
Metrics/CyclomaticComplexity:
|
44
46
|
Max: 10
|
data/hlrubo.gemspec
CHANGED
@@ -12,6 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
13
13
|
spec.metadata["homepage_uri"] = spec.homepage
|
14
14
|
spec.metadata["source_code_uri"] = spec.homepage
|
15
|
+
spec.metadata["changelog_uri"] = "https://github.com/homelight/hlrubo/blob/master/CHANGLOG.md"
|
15
16
|
|
16
17
|
# Specify which files should be added to the gem when it is released.
|
17
18
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -25,6 +26,6 @@ Gem::Specification.new do |spec|
|
|
25
26
|
|
26
27
|
spec.add_dependency "rubocop", "0.80.0"
|
27
28
|
spec.add_dependency "rubocop-performance", "1.5.2"
|
28
|
-
spec.add_dependency "rubocop-rails", "2.
|
29
|
-
spec.add_dependency "rubocop-rspec", "1.
|
29
|
+
spec.add_dependency "rubocop-rails", "2.5.2"
|
30
|
+
spec.add_dependency "rubocop-rspec", "1.39.0"
|
30
31
|
end
|
data/lib/hlrubo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hlrubo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HomeLight Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
47
|
+
version: 2.5.2
|
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: 2.
|
54
|
+
version: 2.5.2
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rubocop-rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.39.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: 1.
|
68
|
+
version: 1.39.0
|
69
69
|
description:
|
70
70
|
email:
|
71
71
|
- engineering@homelight.com
|
@@ -75,6 +75,7 @@ extra_rdoc_files: []
|
|
75
75
|
files:
|
76
76
|
- ".gitignore"
|
77
77
|
- ".rubocop.yml"
|
78
|
+
- CHANGLOG.md
|
78
79
|
- Gemfile
|
79
80
|
- README.md
|
80
81
|
- Rakefile
|
@@ -90,6 +91,7 @@ metadata:
|
|
90
91
|
allowed_push_host: https://rubygems.org
|
91
92
|
homepage_uri: https://github.com/homelight/hlrubo
|
92
93
|
source_code_uri: https://github.com/homelight/hlrubo
|
94
|
+
changelog_uri: https://github.com/homelight/hlrubo/blob/master/CHANGLOG.md
|
93
95
|
post_install_message:
|
94
96
|
rdoc_options: []
|
95
97
|
require_paths:
|