-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- update code, config, and tests for Rails 7 - add github actions workflow for CI - Rails 5 no longer supported - rubocop config updated, some linting - add markdown option to admin/snippet - add image, audio, and navigation tags - ensure page reorder functions correctly - Gem build tested locally, successfully ran on a new project.
- Loading branch information
1 parent
8f7e425
commit 46b673f
Showing
245 changed files
with
5,004 additions
and
3,959 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: "Coveralls" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
coveralls: | ||
strategy: | ||
matrix: | ||
ruby-version: | ||
- "3.3" | ||
rails-version: | ||
- "7.1" | ||
continue-on-error: [true] | ||
name: ${{ format('Coverage (Ruby {0}, Rails {1})', matrix.ruby-version, matrix.rails-version) }} | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.continue-on-error }} | ||
env: | ||
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails-version }}.gemfile | ||
RAILS_ENV: test | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Ruby ${{ matrix.ruby-version }} | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
|
||
- name: Run tests, report coverage | ||
run: | | ||
bin/bundle install --retry 3 --quiet | ||
bin/bundle exec rails db:drop | ||
bin/bundle exec rails db:create | ||
bin/bundle exec rails db:migrate | ||
bin/bundle exec rails test:db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: "Rails CI" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build_test_lint_audit: | ||
strategy: | ||
matrix: | ||
ruby-version: | ||
- "3.1" | ||
- "3.2" | ||
- "3.3" | ||
rails-version: | ||
- "6.1" | ||
- "7.1" | ||
- "7.2" | ||
continue-on-error: [true] | ||
name: ${{ format('Tests (Ruby {0}, Rails {1})', matrix.ruby-version, matrix.rails-version) }} | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.continue-on-error }} | ||
env: | ||
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails-version }}.gemfile | ||
RAILS_ENV: test | ||
SKIP_COV: true | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Ruby ${{ matrix.ruby-version }} | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
|
||
- name: Run tests | ||
run: | | ||
bin/bundle install --retry 3 --quiet | ||
bin/bundle exec rails db:drop | ||
bin/bundle exec rails db:create | ||
bin/bundle exec rails db:migrate | ||
bin/bundle exec rails test:db | ||
- name: Lint the code | ||
run: bin/bundle exec rubocop --parallel | ||
|
||
- name: Audit for security | ||
run: | | ||
bin/bundle exec brakeman -q -w3 | ||
bin/bundle exec bundler-audit --update --gemfile-lock gemfiles/${{ matrix.rails-version }}.gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.bundle | ||
db/*.sqlite3 | ||
log/*.log | ||
db/*.sqlite3* | ||
log/* | ||
tmp/**/* | ||
.DS_Store | ||
db/schema.rb | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,75 @@ | ||
require: | ||
# - rubocop-rails | ||
# - rubocop-minitest | ||
|
||
AllCops: | ||
TargetRubyVersion: 2.3 | ||
TargetRubyVersion: 3.0 | ||
NewCops: enable | ||
Exclude: | ||
- bin/* | ||
- db/schema.rb | ||
- db/migrate/**/* | ||
- test/fixtures/**/* | ||
- tmp/**/* | ||
- vendor/bundle/**/* | ||
|
||
# -- Performance --------------------------------------------------------------- | ||
Performance/Casecmp: | ||
Enabled: false | ||
|
||
# -- Metrics ------------------------------------------------------------------- | ||
Metrics/PerceivedComplexity: | ||
Enabled: false | ||
|
||
Metrics/MethodLength: | ||
Enabled: false | ||
|
||
Metrics/MethodLength: | ||
Enabled: false | ||
|
||
Metrics/ParameterLists: | ||
Enabled: false | ||
|
||
Metrics/LineLength: | ||
Max: 120 | ||
# -- Layout -------------------------------------------------------------------- | ||
Layout/FirstArrayElementIndentation: | ||
EnforcedStyle: consistent | ||
|
||
Metrics/CyclomaticComplexity: | ||
Enabled: false | ||
Layout/LineLength: | ||
Max: 148 | ||
|
||
Metrics/ClassLength: | ||
Enabled: false | ||
Layout/MultilineMethodCallIndentation: | ||
EnforcedStyle: indented | ||
|
||
Metrics/BlockLength: | ||
Enabled: false | ||
Layout/AccessModifierIndentation: | ||
EnforcedStyle: outdent | ||
|
||
# -- Metrics ------------------------------------------------------------------- | ||
Metrics/AbcSize: | ||
Enabled: false | ||
|
||
# -- Layout -------------------------------------------------------------------- | ||
Layout/MultilineOperationIndentation: | ||
Enabled: false | ||
|
||
Layout/MultilineMethodCallIndentation: | ||
EnforcedStyle: indented | ||
Metrics/BlockLength: | ||
Max: 45 | ||
|
||
Layout/MultilineHashBraceLayout: | ||
Metrics/ClassLength: | ||
Enabled: false | ||
|
||
Layout/IndentArray: | ||
EnforcedStyle: consistent | ||
|
||
Layout/EmptyLinesAroundModuleBody: | ||
EnforcedStyle: empty_lines_except_namespace | ||
Metrics/CyclomaticComplexity: | ||
Max: 12 | ||
|
||
Layout/EmptyLinesAroundExceptionHandlingKeywords: | ||
Metrics/MethodLength: | ||
Enabled: false | ||
|
||
Layout/EmptyLinesAroundClassBody: | ||
EnforcedStyle: empty_lines_except_namespace | ||
Metrics/PerceivedComplexity: | ||
Max: 15 | ||
|
||
Layout/AlignParameters: | ||
# -- Naming -------------------------------------------------------------------- | ||
Naming/MethodParameterName: | ||
Enabled: false | ||
|
||
Layout/AccessModifierIndentation: | ||
EnforcedStyle: outdent | ||
|
||
# -- Style --------------------------------------------------------------------- | ||
Style/StringLiterals: | ||
EnforcedStyle: double_quotes | ||
|
||
Style/RegexpLiteral: | ||
EnforcedStyle: percent_r | ||
|
||
Style/Lambda: | ||
EnforcedStyle: literal | ||
|
||
Style/IfUnlessModifier: | ||
Enabled: false | ||
|
||
Style/GuardClause: | ||
Style/ClassAndModuleChildren: | ||
Enabled: false | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
|
||
Style/DateTime: | ||
Style/DocumentDynamicEvalDefinition: | ||
Enabled: false | ||
|
||
Style/ClassAndModuleChildren: | ||
Style/IfUnlessModifier: | ||
Enabled: false | ||
|
||
Style/AsciiComments: | ||
Style/Lambda: | ||
EnforcedStyle: literal | ||
|
||
Style/OptionalBooleanParameter: | ||
Enabled: false | ||
|
||
# -- Naming -------------------------------------------------------------------- | ||
Naming/UncommunicativeMethodParamName: | ||
Style/SafeNavigation: | ||
Enabled: false | ||
|
||
Style/RegexpLiteral: | ||
EnforcedStyle: percent_r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,38 @@ | ||
# frozen_string_literal: true | ||
|
||
source "http://rubygems.org" | ||
source 'https://rubygems.org' | ||
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | ||
|
||
gemspec | ||
|
||
gem 'rails', '~> 7.2' | ||
|
||
group :development, :test do | ||
gem "autoprefixer-rails", "~> 8.1.0" | ||
gem "byebug", "~> 10.0.0", platforms: %i[mri mingw x64_mingw] | ||
gem "capybara", "~> 2.17.0" | ||
gem "kaminari", "~> 1.1.1" | ||
gem "puma", "~> 3.12.2" | ||
gem "rubocop", "~> 0.55.0", require: false | ||
gem "selenium-webdriver", "~> 3.9.0" | ||
gem "sqlite3", "~> 1.4.2" | ||
gem 'autoprefixer-rails', '~> 10.4.16.0' | ||
gem 'byebug', '~> 11.1.0', platforms: %i[mri mingw x64_mingw] | ||
gem 'image_processing', '>= 1.12.0' | ||
gem 'sqlite3', '~> 1.6.7' | ||
# gem 'mysql2', '~> 0.5' | ||
# gem 'pg', '~> 1.5.4' | ||
end | ||
|
||
group :development do | ||
gem "listen", "~> 3.1.5" | ||
gem "web-console", "~> 3.5.1" | ||
gem 'listen', '~> 3.9.0' | ||
gem 'web-console', '~> 4.2' | ||
end | ||
|
||
group :test do | ||
gem "coveralls", "~> 0.8.21", require: false | ||
gem "diffy", "~> 3.2.0" | ||
gem "equivalent-xml", "~> 0.6.0" | ||
gem "mocha", "~> 1.3.0", require: false | ||
gem "rails-controller-testing", "~> 1.0.2" | ||
gem 'brakeman', '~> 6.1.2' | ||
gem 'bundler-audit', '~> 0.9.1' | ||
gem 'coveralls_reborn', '~> 0.28.0', require: false | ||
gem 'cuprite', '>= 0.15' | ||
gem 'equivalent-xml', '~> 0.6.0' | ||
gem 'minitest', '>= 5.23.0' | ||
gem 'minitest-reporters', '>= 1.6.1' | ||
gem 'mocha', '>= 2.3.0', require: false | ||
gem 'rails-controller-testing', '~> 1.0.5' | ||
gem 'rubocop', '~> 1.63.0', require: false | ||
gem 'rubocop-minitest' | ||
gem 'rubocop-rails' | ||
gem 'simplecov', '~> 0.22.0', require: false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.