Skip to content

Commit

Permalink
Merge pull request #7 from Kaligo/feature/TE-7348
Browse files Browse the repository at this point in the history
[TE-7348] Upgrade rails admin to latest version 3.2.0
  • Loading branch information
jperdiguerra authored Nov 28, 2024
2 parents c4856d8 + 41f9f93 commit e79e3c3
Show file tree
Hide file tree
Showing 903 changed files with 65,272 additions and 45,826 deletions.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**Reproduction steps**
Steps to reproduce the issue seen.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**

- `rails` version:
- `rails_admin` version:
- `rails_admin` npm package version:
- full stack trace (if there's an exception)

Add any other context about the problem here.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: enhancement
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe proposed solution(s)**
A clear and concise description of what you want to happen.

**Additional context**
Add any other context or screenshots about the feature request here.
37 changes: 37 additions & 0 deletions .github/workflows/code-ql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "CodeQL"

on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: "12 00 * * 5"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["ruby"]

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@
*.swp
.bundle
.idea/
.vscode/
.rvmrc
.sass-cache
.yardoc
/.emacs.desktop
/gemfiles/*.lock
/node_modules/*
/rails_admin.gems
/spec/generators/tmp
/spec/lib/tmp
/yarn.lock
Gemfile.lock
Gemfile31.lock
coverage/*
db/*.sqlite3
db/*.sqlite3-journal
Expand All @@ -24,9 +27,6 @@ spec/dummy_app/db/*.sqlite3-journal
spec/dummy_app/db/schema.rb
spec/dummy_app/log/*.log
spec/dummy_app/public/uploads
spec/dummy_app/Gemfile.lock
spec/dummy_app/Gemfile*.lock
tmp/**/*
/.emacs.desktop
.idea/*.xml
.sass-cache
nbproject
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
coverage
lib/generators/rails_admin/templates
spec/dummy_app/app/assets/builds
spec/dummy_app/public
spec/dummy_app/tmp
spec/support/jquery.simulate.drag-sortable.js
vendor
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--color
--order=random
--profile
--exclude-pattern 'dummy_app/node_modules/rails_admin/**/*_spec.rb'
181 changes: 156 additions & 25 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,106 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-performance

AllCops:
Exclude:
- 'gemfiles/*'
- 'spec/dummy_app/bin/**/*'
- 'spec/dummy_app/db/schema.rb'
- 'spec/dummy_app/tmp/**/*'
- 'vendor/bundle/**/*'
- "gemfiles/*"
- "node_modules/**/*"
- "spec/dummy_app/bin/**/*"
- "spec/dummy_app/db/schema.rb"
- "spec/dummy_app/node_modules/**/*"
- "spec/dummy_app/tmp/**/*"
- "vendor/bundle/**/*"
NewCops: disable
SuggestExtensions: false
TargetRubyVersion: 2.6

Gemspec/DeprecatedAttributeAssignment:
Enabled: true

Layout/AccessModifierIndentation:
EnforcedStyle: outdent

Layout/DotPosition:
EnforcedStyle: trailing

Layout/LineEndStringConcatenationIndentation:
Enabled: true

Layout/LineLength:
AllowURI: true
Enabled: false

Layout/MultilineAssignmentLayout:
Enabled: true
SupportedTypes: [case, if]

Layout/SpaceBeforeBrackets:
Enabled: true

Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space

Lint/AmbiguousAssignment:
Enabled: true

Lint/AmbiguousRange:
Enabled: true

Lint/DeprecatedConstants:
Enabled: true

Lint/DuplicateBranch:
Enabled: true
IgnoreLiteralBranches: true

Lint/DuplicateRegexpCharacterClassElement:
Enabled: true

Lint/EmptyBlock:
Enabled: true
Exclude:
- "spec/**/*"

Lint/EmptyClass:
Enabled: true
Exclude:
- "spec/**/*"

Lint/EmptyInPattern:
Enabled: true

Lint/LambdaWithoutLiteralBlock:
Enabled: true

Lint/NoReturnInBeginEndBlocks:
Enabled: true

Lint/NumberedParameterAssignment:
Enabled: true

Lint/OrAssignmentToConstant:
Enabled: true

Lint/RedundantDirGlobSort:
Enabled: true

Lint/SymbolConversion:
Enabled: true

Lint/ToEnumArguments:
Enabled: true

Lint/TripleQuotes:
Enabled: true

Lint/UnexpectedBlockArity:
Enabled: true

Lint/UnmodifiedReduceAccumulator:
Enabled: true

Metrics/AbcSize:
Max: 69.98 # TODO: Lower to 15

Expand All @@ -25,69 +109,116 @@ Metrics/BlockNesting:

Metrics/ClassLength:
CountComments: false
Max: 120 # TODO: Lower to 100
Max: 201 # TODO: Lower to 100

Metrics/CyclomaticComplexity:
Max: 12 # TODO: Lower to 6

Metrics/LineLength:
AllowURI: true
Enabled: false
Max: 15 # TODO: Lower to 6

Metrics/MethodLength:
CountComments: false
Max: 29 # TODO: Lower to 15

Metrics/ModuleLength:
Max: 200 # TODO: Lower to 100
Max: 219 # TODO: Lower to 100

Metrics/ParameterLists:
Max: 8 # TODO: Lower to 4
CountKeywordArgs: true

Metrics/PerceivedComplexity:
Max: 14 # TODO: Lower to 7
Max: 17 # TODO: Lower to 7

Naming/FileName:
Exclude:
- 'lib/rails_admin/bootstrap-sass.rb'
- "lib/rails_admin/bootstrap-sass.rb"

Naming/InclusiveLanguage:
Enabled: true

Style/Alias:
Enabled: false

Style/ArgumentsForwarding:
Enabled: true

Style/CollectionCompact:
Enabled: true

Style/CollectionMethods:
PreferredMethods:
map: 'collect'
reduce: 'inject'
find: 'detect'
find_all: 'select'
map: "collect"
reduce: "inject"
find: "detect"
find_all: "select"

Style/Documentation:
Enabled: false

Style/DocumentDynamicEvalDefinition:
Enabled: false

Style/DoubleNegation:
Enabled: false

Style/EachWithObject:
Enabled: false

Style/Encoding:
Enabled: false
Style/EndlessMethod:
Enabled: true

Style/FrozenStringLiteralComment:
Enabled: false
Style/HashConversion:
Enabled: true

Style/HashExcept:
Enabled: true

Style/IfWithBooleanLiteralBranches:
Enabled: true

Style/InPatternThen:
Enabled: true

Style/Lambda:
Enabled: false

Style/MultilineInPatternThen:
Enabled: true

Style/NegatedIfElseCondition:
Enabled: true

Style/NumericPredicate:
Enabled: false

Style/NilLambda:
Enabled: true

Style/QuotedSymbols:
Enabled: true

Style/RaiseArgs:
EnforcedStyle: compact

Style/RedundantArgument:
Enabled: true

Style/RedundantParentheses:
Enabled: false

Style/RedundantSelfAssignmentBranch:
Enabled: true

Style/StringChars:
Enabled: true

Style/SwapValues:
Enabled: true

Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: 'comma'
EnforcedStyleForMultiline: "comma"

Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: 'comma'
EnforcedStyleForMultiline: "comma"

Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: 'comma'
EnforcedStyleForMultiline: "comma"
Loading

0 comments on commit e79e3c3

Please sign in to comment.