Skip to content

Commit 1352cc4

Browse files
authored
Merge branch 'master' into patch-1
2 parents d0ec660 + 75504d0 commit 1352cc4

540 files changed

Lines changed: 56508 additions & 22553 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**Reproduction steps**
13+
Steps to reproduce the issue seen.
14+
15+
**Expected behavior**
16+
A clear and concise description of what you expected to happen.
17+
18+
**Additional context**
19+
20+
- `rails` version:
21+
- `rails_admin` version:
22+
- full stack trace (if there's an exception)
23+
24+
Add any other context about the problem here.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ""
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe proposed solution(s)**
13+
A clear and concise description of what you want to happen.
14+
15+
**Additional context**
16+
Add any other context or screenshots about the feature request here.

.github/workflows/code-ql.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [master]
9+
schedule:
10+
- cron: "12 00 * * 5"
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: ["ruby"]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v2
29+
30+
# Initializes the CodeQL tools for scanning.
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v1
33+
with:
34+
languages: ${{ matrix.language }}
35+
36+
- name: Perform CodeQL Analysis
37+
uses: github/codeql-action/analyze@v1

.github/workflows/test.yml

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
rspec:
7+
name: RSpec
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
ruby: [2.6, 2.7, 3.0, jruby]
12+
gemfile: [gemfiles/rails_6.1.gemfile]
13+
orm: [active_record]
14+
adapter: [sqlite3]
15+
asset: [sprockets]
16+
include:
17+
- ruby: 2.5
18+
gemfile: gemfiles/rails_6.0.gemfile
19+
orm: active_record
20+
adapter: sqlite3
21+
asset: sprockets
22+
- ruby: 3.0
23+
gemfile: gemfiles/rails_6.1.gemfile
24+
orm: active_record
25+
adapter: mysql2
26+
asset: sprockets
27+
- ruby: 3.0
28+
gemfile: gemfiles/rails_6.1.gemfile
29+
orm: active_record
30+
adapter: postgresql
31+
asset: webpacker
32+
- ruby: 3.0
33+
gemfile: gemfiles/rails_7.0.gemfile
34+
orm: active_record
35+
adapter: sqlite3
36+
asset: webpacker
37+
- ruby: 3.0
38+
gemfile: gemfiles/rails_7.0.gemfile
39+
orm: active_record
40+
adapter: sqlite3
41+
asset: sprockets
42+
- ruby: 2.7
43+
gemfile: gemfiles/rails_6.0.gemfile
44+
orm: mongoid
45+
adapter: sqlite3
46+
asset: sprockets
47+
- ruby: 3.0
48+
gemfile: gemfiles/rails_6.1.gemfile
49+
orm: mongoid
50+
adapter: sqlite3
51+
asset: sprockets
52+
- ruby: jruby
53+
gemfile: gemfiles/rails_6.1.gemfile
54+
orm: mongoid
55+
adapter: sqlite3
56+
asset: sprockets
57+
runs-on: ubuntu-latest
58+
services:
59+
mysql:
60+
image: mysql:8.0
61+
ports:
62+
- 3306:3306
63+
env:
64+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
65+
postgres:
66+
image: postgres:11
67+
ports:
68+
- 5432:5432
69+
env:
70+
POSTGRES_USER: postgres
71+
POSTGRES_PASSWORD: postgres
72+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
73+
mongo:
74+
image: mongo:4.4
75+
ports:
76+
- 27017:27017
77+
env:
78+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
79+
CI_ORM: ${{ matrix.orm }}
80+
CI_ASSET: ${{ matrix.asset }}
81+
JRUBY_OPTS: --debug
82+
steps:
83+
- uses: actions/checkout@v2
84+
- name: Set up Ruby
85+
uses: ruby/setup-ruby@v1
86+
with:
87+
ruby-version: ${{ matrix.ruby }}
88+
bundler-cache: true
89+
cache-version: gems-${{ hashFiles('Gemfile', 'gemfiles/*.gemfile') }}
90+
env:
91+
MAKE: make --jobs 4
92+
BUNDLE_WITHOUT: development
93+
- name: Set up Node
94+
uses: actions/setup-node@v2
95+
with:
96+
node-version: "14"
97+
- name: Setup application
98+
env:
99+
BUNDLE_GEMFILE: ../../${{ matrix.gemfile }}
100+
CI_DB_ADAPTER: ${{ matrix.adapter }}
101+
RAILS_ENV: test
102+
run: |
103+
yarn install
104+
cd spec/dummy_app
105+
bundle exec rake rails_admin:prepare_ci_env db:create db:migrate
106+
yarn install
107+
cd ../../
108+
- name: Run tests
109+
run: bundle exec rspec
110+
- name: Coveralls Parallel
111+
if: ${{ github.repository_owner == 'railsadminteam' }}
112+
uses: coverallsapp/github-action@master
113+
continue-on-error: true
114+
with:
115+
github-token: ${{ secrets.github_token }}
116+
flag-name: run-${{ matrix.ruby }}-${{ matrix.gemfile }}-${{ matrix.orm }}-${{ matrix.adapter }}
117+
parallel: true
118+
119+
coveralls:
120+
name: Coveralls
121+
if: ${{ github.repository_owner == 'railsadminteam' }}
122+
needs: rspec
123+
runs-on: ubuntu-latest
124+
steps:
125+
- name: Coveralls Finished
126+
uses: coverallsapp/github-action@master
127+
with:
128+
github-token: ${{ secrets.github_token }}
129+
parallel-finished: true
130+
131+
prettier:
132+
name: Prettier
133+
runs-on: ubuntu-latest
134+
steps:
135+
- uses: actions/checkout@v2
136+
- name: Set up Node.js
137+
uses: actions/setup-node@v2
138+
- name: Install dependencies
139+
run: yarn install
140+
- name: Run check
141+
run: yarn run prettier --check .
142+
143+
rubocop:
144+
name: RuboCop
145+
runs-on: ubuntu-latest
146+
steps:
147+
- uses: actions/checkout@v2
148+
- name: Set up Ruby
149+
uses: ruby/setup-ruby@v1
150+
with:
151+
ruby-version: 3.0
152+
- name: Cache gems
153+
uses: actions/cache@v2
154+
with:
155+
path: vendor/bundle
156+
key: ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ hashFiles('Gemfile') }}
157+
restore-keys: |
158+
${{ runner.os }}-gems-${{ matrix.ruby }}-
159+
- name: Install dependencies
160+
run: bundle install --without development --jobs=3 --retry=3 --path=vendor/bundle
161+
- name: Run check
162+
run: bundle exec rake rubocop

.gitignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
.bundle
66
.idea/
77
.rvmrc
8+
.sass-cache
89
.yardoc
910
/.emacs.desktop
1011
/gemfiles/*.lock
12+
/node_modules/*
1113
/rails_admin.gems
1214
/spec/generators/tmp
1315
/spec/lib/tmp
16+
/yarn.lock
1417
Gemfile.lock
15-
Gemfile31.lock
1618
coverage/*
1719
db/*.sqlite3
1820
db/*.sqlite3-journal
@@ -26,7 +28,4 @@ spec/dummy_app/log/*.log
2628
spec/dummy_app/public/uploads
2729
spec/dummy_app/Gemfile.lock
2830
tmp/**/*
29-
/.emacs.desktop
30-
.idea/*.xml
31-
.sass-cache
3231
nbproject

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
coverage
2+
lib/generators/rails_admin/templates
3+
spec/dummy_app/public
4+
spec/dummy_app/tmp
5+
spec/support/jquery.simulate.drag-sortable.js
6+
vendor

.rspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
--color
22
--order=random
33
--profile
4+
--exclude-pattern 'dummy_app/node_modules/rails_admin/**/*_spec.rb'

0 commit comments

Comments
 (0)