Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 7 compatiblity and rebranding #1

Merged
merged 8 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
*Note:* For general questions and feature requests please leave a message
on Gitter: https://gitter.im/comfy/comfortable-mexican-sofa

### Expected behavior
Tell us what should happen

### Actual behavior
Tell us what happens instead
Tell us what does happen

### Steps to reproduce
Things that help:

* Describe issue in detail.
* Describe the issue in detail.
* Add relevant code snippets.
* Create a failing test case.

Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/coveralls.yml
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
51 changes: 51 additions & 0 deletions .github/workflows/rubyonrails.yml
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
4 changes: 2 additions & 2 deletions .gitignore
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
Expand Down
101 changes: 38 additions & 63 deletions .rubocop.yml
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

Contribute your code to ComfortableMexicanSofa in 5 easy steps:
Contribute your code to ComfortableMediaSurfer in 5 easy steps:

### 1. Fork it

Expand Down
41 changes: 25 additions & 16 deletions Gemfile
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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2010-2019 Oleg Khabarov
Copyright (c) 2010-2019 Oleg Khabarov, (c) 2024 Shakacode LLC

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
Loading
Loading