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

Original Repo -> Visit Widget #3

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0f60d55
Simplify generated migration (#112)
dorianmariecom Jul 27, 2021
1f88d1a
README with syntax highlighting (#113)
dorianmariecom Jul 28, 2021
c6929b1
Handle namespaced classes correctly (#116)
timfjord Aug 24, 2021
2a7b16a
Bump version
timfjord Aug 24, 2021
ab8344b
Fix the gemspec file
timfjord Aug 24, 2021
772506c
Add caching logic (#122)
westonganger Oct 25, 2021
af70a78
Activate GitHub Actions and clean up the code (#124)
timfjord Oct 26, 2021
35af928
Add Rubocop 🤖 (#125)
timfjord Oct 28, 2021
65b0d09
Fix README
timfjord Oct 29, 2021
bc05084
Bum version to 1.0.0 :tada:
timfjord Oct 29, 2021
426f757
Bring back the gem tasks
timfjord Oct 29, 2021
a309602
Do not reinitialize when the DB is empty (#127)
timfjord Nov 15, 2021
9e776c3
Bump version
timfjord Nov 15, 2021
590a2ca
Fix memoization, bring back Implementation Module (#129)
abime Dec 1, 2021
4571a14
Simplify ActiveRecord#initialize
timfjord Dec 1, 2021
2c8bea7
Bump version
timfjord Dec 1, 2021
f3c13bc
Add bin/console
timfjord Jun 9, 2022
28d6df2
Make the linter happy
timfjord Jun 21, 2022
cfc7afc
Rename I18n::Backend::ActiveRecord::Translation#to_hash to #to_h to a…
cbeer Jun 21, 2022
c82f002
Add Ruby 3.1 and Rails 7 to the CI matrix (#134)
petergoldstein Jun 21, 2022
3e3f03a
Update the CI matrix (#136)
timfjord Jun 21, 2022
1fe4b91
Mention before_action in the README
timfjord Sep 26, 2022
bae3b40
Add support for rails-7.1.0.alpha+ (#142)
timfjord Aug 17, 2023
3504e5f
Add stuff to .gitignore
timfjord Aug 17, 2023
00b36bc
Bump version
timfjord Aug 17, 2023
c710743
Make translation model configurable (#144)
23tux Sep 15, 2023
395b6fd
Mention translation model in README
timfjord Sep 18, 2023
fce95f2
Bump version
timfjord Sep 18, 2023
b22bd9f
Scope config option to isolate translations (#140)
vipera Dec 16, 2024
906bf9c
Change using of class object for custom translation model (#149)
matko9 Dec 16, 2024
166e2e2
Bump version
timfjord Dec 16, 2024
cb642d2
Update README
timfjord Dec 16, 2024
0605ccf
Update README
timfjord Dec 16, 2024
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
22 changes: 22 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint

on:
push:
branches: [master]
pull_request:
branches: ['**']

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Lint Code Base
uses: github/super-linter@v4
env:
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

LINTER_RULES_PATH: /
VALIDATE_MARKDOWN: false
RUBY_CONFIG_FILE: .rubocop.yml
94 changes: 94 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Test

on:
push:
branches: [master]
pull_request:
branches: ['**']

jobs:
test:
services:
postgres:
image: postgres
env:
POSTGRES_DB: i18n_unittest
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mysql:
image: mysql:5.7
env:
MYSQL_DATABASE: i18n_unittest
MYSQL_ALLOW_EMPTY_PASSWORD: true
ports:
- '3306:3306'
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
fail-fast: true
matrix:
ruby: [2.5, 2.6, 2.7, '3.0', 3.1, 3.2, 3.3, 'head']
rails: [4, 5, 6, 7, 8, 'head']
exclude:
- { 'ruby': '2.5', 'rails': '7' }
- { 'ruby': '2.5', 'rails': '8' }
- { 'ruby': '2.5', 'rails': 'head' }

- { 'ruby': '2.6', 'rails': '7' }
- { 'ruby': '2.6', 'rails': '8' }
- { 'ruby': '2.6', 'rails': 'head' }

- { 'ruby': '2.7', 'rails': '4' }
- { 'ruby': '2.7', 'rails': '8' }
- { 'ruby': '2.7', 'rails': 'head' }

- { 'ruby': '3.0', 'rails': '4' }
- { 'ruby': '3.0', 'rails': '5' }
- { 'ruby': '3.0', 'rails': '8' }
- { 'ruby': '3.0', 'rails': 'head' }

- { 'ruby': '3.1', 'rails': '4' }
- { 'ruby': '3.1', 'rails': '5' }
- { 'ruby': '3.1', 'rails': '8' }
- { 'ruby': '3.1', 'rails': 'head' }

- { 'ruby': '3.2', 'rails': '4' }
- { 'ruby': '3.2', 'rails': '5' }

- { 'ruby': '3.3', 'rails': '4' }
- { 'ruby': '3.3', 'rails': '5' }

- { 'ruby': 'head', 'rails': '4' }
- { 'ruby': 'head', 'rails': '5' }
- { 'ruby': 'head', 'rails': '6' }
- { 'ruby': 'head', 'rails': '7' }
name: 'Ruby: ${{ matrix.ruby }}, Rails: ${{ matrix.rails }}'
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}.gemfile
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
cache-version: 2
- name: Run tests for SQLite
run: bundle exec rake
- name: Run tests for PostgreSQL
env:
DB: postgres
run: bundle exec rake
- name: Run tests for MySQL
env:
DB: mysql
run: bundle exec rake
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/pkg/
.ruby-version
gemfiles/*.lock
Gemfile.lock
.rake_tasks
31 changes: 31 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
inherit_from: .rubocop_todo.yml

AllCops:
Exclude:
- 'gemfiles/*'
NewCops: enable
SuggestExtensions: false
TargetRubyVersion: 2.5

Gemspec/RequiredRubyVersion:
Enabled: false

Layout/CaseIndentation:
EnforcedStyle: end

Layout/EndAlignment:
EnforcedStyleAlignWith: variable

Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented

Metrics/ClassLength:
Exclude:
- 'test/*'

Style/Documentation:
Enabled: false

Style/StringLiterals:
EnforcedStyle: single_quotes

19 changes: 19 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Offense count: 3
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 35

# Offense count: 1
# Configuration parameters: IgnoredMethods.
Metrics/CyclomaticComplexity:
Max: 11

# Offense count: 3
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
Metrics/MethodLength:
Max: 23

# Offense count: 1
# Configuration parameters: IgnoredMethods.
Metrics/PerceivedComplexity:
Max: 13
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

32 changes: 32 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# frozen_string_literal: true

appraise 'rails-4' do
gem 'activerecord', '~> 4.2.0'
gem 'mysql2', '~> 0.4.10'
gem 'pg', '~> 0.18.0'
gem 'sqlite3', '~> 1.3.13'
end

appraise 'rails-5' do
gem 'activerecord', '~> 5.2.0'
gem 'sqlite3', '~> 1.3.13'
gem 'psych', '~> 3.1'
end

appraise 'rails-6' do
gem 'activerecord', '~> 6.1.0'
gem 'sqlite3', '~> 1.4.4'
end

appraise 'rails-7' do
gem 'activerecord', '~> 7.0.0'
gem 'sqlite3', '~> 1.4.4'
end

appraise 'rails-8' do
gem 'activerecord', '~> 8.0.0'
end

appraise 'rails-head' do
gem 'activerecord', github: 'rails/rails', branch: 'main'
end
9 changes: 3 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gemspec

gem 'activerecord'
gem 'sqlite3'
gem 'mysql2'
gem 'pg'

gem 'minitest'
gem 'test_declarative'
gem 'mocha'
gem 'rake'
gem 'sqlite3'
53 changes: 0 additions & 53 deletions Gemfile.lock

This file was deleted.

Loading