Skip to content

Commit 4697388

Browse files
committed
Merge branch 'develop' into feature/refactor_annotate_routes/processors
2 parents 6326def + 70aba78 commit 4697388

16 files changed

+633
-267
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,22 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
ruby: ['2.4.x', '2.5.x', '2.6.x']
17+
ruby: ['2.4', '2.5', '2.6']
1818

1919
steps:
2020
- name: Checkout
2121
uses: actions/checkout@v1
2222

2323
- name: Setup Ruby
24-
uses: actions/setup-ruby@v1
24+
uses: ruby/setup-ruby@v1
2525
with:
2626
ruby-version: ${{ matrix.ruby }}
27+
bundler-cache: true
2728

2829
- name: Install sqlite
2930
run: |
3031
sudo apt-get install libsqlite3-dev
3132
32-
- name: Update System
33-
run: |
34-
gem update --system --no-document
35-
36-
- name: Bundle install for Annotate models
37-
run: |
38-
bundle install --jobs=4 --retry=3
39-
4033
- name: Run Tests
4134
run: INTEGRATION_TESTS=1 bundle exec rspec
4235

.github/workflows/codeql-analysis.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: "Code scanning - action"
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- pr/*
7+
- scratch/*
8+
pull_request:
9+
schedule:
10+
- cron: '0 20 * * 7'
11+
12+
jobs:
13+
CodeQL-Build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
with:
21+
# We must fetch at least the immediate parents so that if this is
22+
# a pull request then we can checkout the head.
23+
fetch-depth: 2
24+
25+
# If this run was triggered by a pull request event, then checkout
26+
# the head of the pull request instead of the merge commit.
27+
- run: git checkout HEAD^2
28+
if: ${{ github.event_name == 'pull_request' }}
29+
30+
# Initializes the CodeQL tools for scanning.
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v1
33+
# Override language selection by uncommenting this and choosing your languages
34+
# with:
35+
# languages: go, javascript, csharp, python, cpp, java
36+
37+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
38+
# If this step fails, then you should remove it and run the build manually (see below)
39+
- name: Autobuild
40+
uses: github/codeql-action/autobuild@v1
41+
42+
# ℹ️ Command-line programs to run using the OS shell.
43+
# 📚 https://git.io/JvXDl
44+
45+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
46+
# and modify them (or add more) to build your code if your project
47+
# uses a compiled language
48+
49+
#- run: |
50+
# make bootstrap
51+
# make release
52+
53+
- name: Perform CodeQL Analysis
54+
uses: github/codeql-action/analyze@v1

.github/workflows/release-drafter.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
update_release_draft:
10+
runs-on: ubuntu-latest
11+
steps:
12+
# Drafts your next Release notes as Pull Requests are merged into "develop"
13+
- uses: release-drafter/release-drafter@v5
14+
with:
15+
config-name: release-drafter.yml
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.rubocop_todo.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2020-04-06 10:14:15 +0900 using RuboCop version 0.68.1.
3+
# on 2021-03-29 22:57:27 +0900 using RuboCop version 0.68.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -55,7 +55,7 @@ Layout/EmptyLineAfterMagicComment:
5555
- 'annotate.gemspec'
5656
- 'spec/lib/annotate/annotate_models_spec.rb'
5757

58-
# Offense count: 7
58+
# Offense count: 3
5959
# Cop supports --auto-correct.
6060
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
6161
Layout/ExtraSpacing:
@@ -64,6 +64,13 @@ Layout/ExtraSpacing:
6464
- 'lib/annotate/annotate_models.rb'
6565
- 'lib/tasks/annotate_routes.rake'
6666

67+
# Offense count: 14
68+
# Cop supports --auto-correct.
69+
# Configuration parameters: IndentationWidth.
70+
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
71+
Layout/IndentFirstArrayElement:
72+
EnforcedStyle: consistent
73+
6774
# Offense count: 5
6875
# Cop supports --auto-correct.
6976
# Configuration parameters: EnforcedStyle, IndentationWidth.
@@ -72,7 +79,7 @@ Layout/MultilineOperationIndentation:
7279
Exclude:
7380
- 'lib/annotate/annotate_models.rb'
7481

75-
# Offense count: 6
82+
# Offense count: 4
7683
# Cop supports --auto-correct.
7784
# Configuration parameters: AllowForAlignment.
7885
Layout/SpaceAroundOperators:
@@ -190,7 +197,7 @@ Metrics/BlockNesting:
190197
Metrics/CyclomaticComplexity:
191198
Max: 25
192199

193-
# Offense count: 28
200+
# Offense count: 29
194201
# Configuration parameters: CountComments, ExcludedMethods.
195202
Metrics/MethodLength:
196203
Max: 40
@@ -204,7 +211,7 @@ Naming/AccessorMethodName:
204211
Exclude:
205212
- 'lib/annotate.rb'
206213

207-
# Offense count: 103
214+
# Offense count: 105
208215
# Configuration parameters: Blacklist.
209216
# Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
210217
Naming/HeredocDelimiterNaming:
@@ -292,7 +299,7 @@ Style/FormatStringToken:
292299
Exclude:
293300
- 'lib/annotate/annotate_models.rb'
294301

295-
# Offense count: 31
302+
# Offense count: 33
296303
# Cop supports --auto-correct.
297304
# Configuration parameters: EnforcedStyle.
298305
# SupportedStyles: when_needed, always, never
@@ -368,7 +375,7 @@ Style/NumericPredicate:
368375
- 'lib/annotate.rb'
369376
- 'lib/annotate/annotate_models.rb'
370377

371-
# Offense count: 12
378+
# Offense count: 13
372379
# Cop supports --auto-correct.
373380
# Configuration parameters: PreferredDelimiters.
374381
Style/PercentLiteralDelimiters:
@@ -453,7 +460,7 @@ Style/StderrPuts:
453460
- 'lib/annotate.rb'
454461
- 'lib/annotate/annotate_models.rb'
455462

456-
# Offense count: 107
463+
# Offense count: 57
457464
# Cop supports --auto-correct.
458465
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
459466
# SupportedStyles: single_quotes, double_quotes
@@ -502,7 +509,7 @@ Style/UnneededPercentQ:
502509
Exclude:
503510
- 'annotate.gemspec'
504511

505-
# Offense count: 380
512+
# Offense count: 391
506513
# Cop supports --auto-correct.
507514
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
508515
# URISchemes: http, https

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ rvm:
77
env:
88
- RAILS_ENV=development RACK_ENV=development INTEGRATION_TESTS=1
99

10+
cache: bundler
11+
1012
addons:
1113
apt_packages:
1214
- libsqlite3-dev

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ Into environment gems from Github checkout:
104104

105105
git clone https://github.com/ctran/annotate_models.git annotate_models
106106
cd annotate_models
107-
rake build
108-
gem install pkg/annotate-*.gem
107+
rake gem
108+
gem install dist/annotate-*.gem
109109

110110
## Usage
111111

annotate.gemspec

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
1515
s.executables = ['annotate']
1616
s.extra_rdoc_files = ['README.md', 'CHANGELOG.md']
1717
s.files = `git ls-files -z LICENSE.txt *.md *.gemspec bin lib`.split("\x0")
18-
s.homepage = 'http://github.com/ctran/annotate_models'
18+
s.homepage = 'https://github.com/ctran/annotate_models'
1919
s.licenses = ['Ruby']
2020
s.require_paths = ['lib']
2121
s.rubygems_version = '2.1.11'
@@ -25,5 +25,8 @@ Gem::Specification.new do |s|
2525
s.add_runtime_dependency(%q<rake>, '>= 10.4', '< 14.0')
2626
s.add_runtime_dependency(%q<activerecord>, ['>= 3.2', '< 7.0'])
2727

28-
s.metadata = { "github_repo" => "ssh://github.com/ctran/annotate_models" }
28+
s.metadata = {
29+
"bug_tracker_uri" => "https://github.com/ctran/annotate_models/issues/",
30+
"source_code_uri" => "https://github.com/ctran/annotate_models.git"
31+
}
2932
end

0 commit comments

Comments
 (0)