i18n-sequel_bitemporal 1.0.3 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +125 -0
- data/.gitignore +1 -1
- data/Gemfile +2 -0
- data/README.md +47 -11
- data/ci/Gemfile.rails-5.0 +2 -0
- data/ci/Gemfile.rails-5.1 +2 -0
- data/ci/Gemfile.rails-5.2 +2 -0
- data/ci/Gemfile.rails-6.0 +23 -0
- data/ci/Gemfile.rails-6.1 +23 -0
- data/ci/Gemfile.rails-7.0 +23 -0
- data/ci/Gemfile.rails-7.1 +23 -0
- data/lib/i18n/backend/sequel_bitemporal/translation.rb +7 -1
- data/lib/i18n/backend/sequel_bitemporal.rb +11 -5
- data/lib/i18n/sequel_bitemporal/version.rb +1 -1
- data/test/database.sqlite3 +0 -0
- data/test/sequel_test.rb +7 -3
- data/test/test_setup.rb +46 -37
- metadata +10 -5
- data/.ruby-version +0 -1
- data/.travis.yml +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51c7ecf260b7f3a053b84865028e583ec85555735d4b1198f643ac32628f4db8
|
4
|
+
data.tar.gz: 72ebf745d1c757327e594bf7963881ea9a77e1ccee8146a7ff1681debc8ed399
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdeb0f48ba7610088e730c37e7366e5824e2244f8df1e7bef809c8ae2d7b6ed3adb1cd5b12c8b2d4f4b4f0cc9aefd7dbe1ffb44f13e92a4f35250727a31a4619
|
7
|
+
data.tar.gz: 8bd09dc1e24f6e0a97d1856dd56f1532e914a9b6ef221747f6467d8442acb082e56421723ac4c324a8563f5746bfcd2e9cbcb0c4ac770e1af0414a1b13d2a67b
|
@@ -0,0 +1,125 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: ['**']
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
tests:
|
11
|
+
services:
|
12
|
+
postgres:
|
13
|
+
image: postgres:13
|
14
|
+
env:
|
15
|
+
POSTGRES_USER: postgres
|
16
|
+
POSTGRES_PASSWORD: postgres
|
17
|
+
ports:
|
18
|
+
- 5432
|
19
|
+
options: >-
|
20
|
+
--health-cmd pg_isready
|
21
|
+
--health-interval 10s
|
22
|
+
--health-timeout 5s
|
23
|
+
--health-retries 5
|
24
|
+
|
25
|
+
mysql:
|
26
|
+
image: mysql:8.0
|
27
|
+
env:
|
28
|
+
MYSQL_ROOT_PASSWORD: root
|
29
|
+
ports:
|
30
|
+
- 3306
|
31
|
+
options: >-
|
32
|
+
--health-cmd="mysqladmin ping"
|
33
|
+
--health-interval=10s
|
34
|
+
--health-timeout=5s
|
35
|
+
--health-retries=3
|
36
|
+
|
37
|
+
runs-on: ubuntu-latest
|
38
|
+
strategy:
|
39
|
+
fail-fast: false
|
40
|
+
matrix:
|
41
|
+
rails:
|
42
|
+
- "5.0"
|
43
|
+
- "5.1"
|
44
|
+
- "5.2"
|
45
|
+
- "6.0"
|
46
|
+
- "6.1"
|
47
|
+
- "7.0"
|
48
|
+
- "7.1"
|
49
|
+
ruby:
|
50
|
+
- "2.6"
|
51
|
+
- "2.7"
|
52
|
+
- "3.0"
|
53
|
+
- "3.1"
|
54
|
+
- "3.2"
|
55
|
+
- "3.3"
|
56
|
+
# - "jruby"
|
57
|
+
include:
|
58
|
+
- ruby: "2.6"
|
59
|
+
rails: "5.2"
|
60
|
+
- ruby: "2.6"
|
61
|
+
rails: "6.0"
|
62
|
+
- ruby: "2.7"
|
63
|
+
rails: "6.0"
|
64
|
+
exclude:
|
65
|
+
- ruby: "3.1"
|
66
|
+
rails: "6.1"
|
67
|
+
- ruby: "3.2"
|
68
|
+
rails: "6.1"
|
69
|
+
- ruby: "3.3"
|
70
|
+
rails: "6.1"
|
71
|
+
- ruby: "2.6"
|
72
|
+
rails: "7.0"
|
73
|
+
- ruby: "jruby"
|
74
|
+
rails: "7.0"
|
75
|
+
- ruby: "2.6"
|
76
|
+
rails: "7.1"
|
77
|
+
- ruby: "jruby"
|
78
|
+
rails: "7.1"
|
79
|
+
name: Rails ${{ matrix.rails }}, Ruby ${{ matrix.ruby }}
|
80
|
+
|
81
|
+
env:
|
82
|
+
BUNDLE_GEMFILE: "ci/Gemfile.rails-${{ matrix.rails }}"
|
83
|
+
steps:
|
84
|
+
- uses: actions/checkout@v3
|
85
|
+
- name: Install db dependencies and check connections
|
86
|
+
run: |
|
87
|
+
DEBIAN_FRONTEND="noninteractive" sudo apt-get install -yqq mysql-client libmysqlclient-dev postgresql-client libpq-dev
|
88
|
+
mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports[3306] }} -uroot -proot -e "SHOW GRANTS FOR 'root'@'localhost'"
|
89
|
+
env PGPASSWORD=postgres psql -h localhost -p ${{ job.services.postgres.ports[5432] }} -U postgres -l
|
90
|
+
- uses: ruby/setup-ruby@v1
|
91
|
+
with:
|
92
|
+
ruby-version: ${{ matrix.ruby }}
|
93
|
+
bundler-cache: true
|
94
|
+
- name: Create databases
|
95
|
+
run: |
|
96
|
+
mysql -e 'create database i18n_sequel_bitemporal;' --host 127.0.0.1 --port ${{ job.services.mysql.ports[3306] }} -uroot -proot
|
97
|
+
env PGPASSWORD=postgres psql -c 'create database i18n_sequel_bitemporal;' -U postgres -h localhost -p ${{ job.services.postgres.ports[5432] }}
|
98
|
+
- name: Run PostgreSQL tests
|
99
|
+
run: bundle exec rake test
|
100
|
+
env:
|
101
|
+
TEST_ADAPTER: postgresql
|
102
|
+
TEST_DATABASE: i18n_sequel_bitemporal
|
103
|
+
TEST_DATABASE_HOST: localhost
|
104
|
+
TEST_DATABASE_PORT: ${{ job.services.postgres.ports[5432] }}
|
105
|
+
TEST_OWNER: postgres
|
106
|
+
TEST_USERNAME: postgres
|
107
|
+
TEST_PASSWORD: postgres
|
108
|
+
- name: Run MySQL2 tests
|
109
|
+
run: bundle exec rake test
|
110
|
+
if: matrix.ruby != 'jruby'
|
111
|
+
env:
|
112
|
+
TEST_ADAPTER: mysql2
|
113
|
+
TEST_DATABASE: i18n_sequel_bitemporal
|
114
|
+
TEST_DATABASE_HOST: 127.0.0.1
|
115
|
+
TEST_DATABASE_PORT: ${{ job.services.mysql.ports[3306] }}
|
116
|
+
TEST_USERNAME: root
|
117
|
+
TEST_PASSWORD: root
|
118
|
+
TEST_ENCODING: "utf8"
|
119
|
+
- name: Run SQLite tests
|
120
|
+
run: bundle exec rake test
|
121
|
+
env:
|
122
|
+
TEST_ADAPTER: "sqlite"
|
123
|
+
TEST_DATABASE: "test/database.sqlite3"
|
124
|
+
# - name: Lint
|
125
|
+
# run: bundle exec rubocop
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![Build Status](https://
|
1
|
+
[![Build Status](https://github.com/TalentBox/i18n-sequel_bitemporal/workflows/CI/badge.svg)](https://github.com/TalentBox/i18n-sequel_bitemporal/actions)
|
2
2
|
|
3
3
|
# I18n::Backend::SequelBitemporal
|
4
4
|
|
@@ -122,16 +122,52 @@ database.
|
|
122
122
|
|
123
123
|
## Runnning tests
|
124
124
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
125
|
+
```shell
|
126
|
+
# Create db for mysql tests
|
127
|
+
mysql -e 'create database i18n_sequel_bitemporal;' --host 127.0.0.1
|
128
|
+
# Create db for postgresql tests
|
129
|
+
createdb i18n_sequel_bitemporal
|
130
|
+
|
131
|
+
##
|
132
|
+
# Run tests for a specific Rails version
|
133
|
+
##
|
134
|
+
BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" bundle install
|
135
|
+
# MySQL
|
136
|
+
BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" TEST_ADAPTER=mysql2 TEST_DATABASE=i18n_sequel_bitemporal TEST_ENCODING="utf8" bundle exec rake test
|
137
|
+
# PG
|
138
|
+
BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" TEST_ADAPTER=postgresql TEST_DATABASE=i18n_sequel_bitemporal bundle exec rake test
|
139
|
+
# Sqlite
|
140
|
+
BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" TEST_ADAPTER=sqlite3 TEST_DATABASE=test/database.sqlite3 bundle exec rake test
|
141
|
+
|
142
|
+
##
|
143
|
+
# Run tests for a specific Rails version, logging all queries to stdout
|
144
|
+
##
|
145
|
+
BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" bundle install
|
146
|
+
# MySQL
|
147
|
+
DEBUG=1 BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" TEST_ADAPTER=mysql2 TEST_DATABASE=i18n_sequel_bitemporal TEST_ENCODING="utf8" bundle exec rake test
|
148
|
+
# PG
|
149
|
+
DEBUG=1 BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" TEST_ADAPTER=postgresql TEST_DATABASE=i18n_sequel_bitemporal bundle exec rake test
|
150
|
+
# Sqlite
|
151
|
+
DEBUG=1 BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" TEST_ADAPTER=sqlite3 TEST_DATABASE=test/database.sqlite3 bundle exec rake test
|
152
|
+
|
153
|
+
##
|
154
|
+
# Example to run tests for every supported Rails version.
|
155
|
+
# !! Some Rails versions are not compatible with all Ruby versions !!
|
156
|
+
##
|
157
|
+
for gemfile in (ls ci/Gemfile.rails-* | grep -v lock);
|
158
|
+
echo $gemfile
|
159
|
+
BUNDLE_GEMFILE=$gemfile bundle install
|
160
|
+
|
161
|
+
# MySQL
|
162
|
+
BUNDLE_GEMFILE=$gemfile TEST_ADAPTER=mysql2 TEST_DATABASE=i18n_sequel_bitemporal TEST_ENCODING="utf8" bundle exec rake test
|
163
|
+
|
164
|
+
# PG
|
165
|
+
BUNDLE_GEMFILE=$gemfile TEST_ADAPTER=postgresql TEST_DATABASE=i18n_sequel_bitemporal bundle exec rake test
|
166
|
+
|
167
|
+
# Sqlite
|
168
|
+
BUNDLE_GEMFILE=$gemfile TEST_ADAPTER=sqlite3 TEST_DATABASE=test/database.sqlite3 bundle exec rake test
|
169
|
+
end
|
170
|
+
```
|
135
171
|
|
136
172
|
## Maintainers
|
137
173
|
|
data/ci/Gemfile.rails-5.0
CHANGED
data/ci/Gemfile.rails-5.1
CHANGED
data/ci/Gemfile.rails-5.2
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
gemspec :path => "../"
|
4
|
+
|
5
|
+
gem 'railties', '~> 6.0.0'
|
6
|
+
|
7
|
+
gem "test-unit"
|
8
|
+
gem "test_declarative"
|
9
|
+
gem "mocha"
|
10
|
+
gem "rake"
|
11
|
+
gem "timecop"
|
12
|
+
|
13
|
+
platforms :ruby do
|
14
|
+
gem "pg"
|
15
|
+
gem "mysql2"
|
16
|
+
gem "sqlite3"
|
17
|
+
end
|
18
|
+
|
19
|
+
platforms :jruby do
|
20
|
+
gem "jdbc-postgres"
|
21
|
+
gem "jdbc-mysql"
|
22
|
+
gem "jdbc-sqlite3"
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
gemspec :path => "../"
|
4
|
+
|
5
|
+
gem 'railties', '~> 6.1.0'
|
6
|
+
|
7
|
+
gem "test-unit"
|
8
|
+
gem "test_declarative"
|
9
|
+
gem "mocha"
|
10
|
+
gem "rake"
|
11
|
+
gem "timecop"
|
12
|
+
|
13
|
+
platforms :ruby do
|
14
|
+
gem "pg"
|
15
|
+
gem "mysql2"
|
16
|
+
gem "sqlite3"
|
17
|
+
end
|
18
|
+
|
19
|
+
platforms :jruby do
|
20
|
+
gem "jdbc-postgres"
|
21
|
+
gem "jdbc-mysql"
|
22
|
+
gem "jdbc-sqlite3"
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
gemspec :path => "../"
|
4
|
+
|
5
|
+
gem 'railties', '~> 7.0.0'
|
6
|
+
|
7
|
+
gem "test-unit"
|
8
|
+
gem "test_declarative"
|
9
|
+
gem "mocha"
|
10
|
+
gem "rake"
|
11
|
+
gem "timecop"
|
12
|
+
|
13
|
+
platforms :ruby do
|
14
|
+
gem "pg"
|
15
|
+
gem "mysql2"
|
16
|
+
gem "sqlite3"
|
17
|
+
end
|
18
|
+
|
19
|
+
platforms :jruby do
|
20
|
+
gem "jdbc-postgres"
|
21
|
+
gem "jdbc-mysql"
|
22
|
+
gem "jdbc-sqlite3"
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
gemspec :path => "../"
|
4
|
+
|
5
|
+
gem 'railties', '~> 7.1.0'
|
6
|
+
|
7
|
+
gem "test-unit"
|
8
|
+
gem "test_declarative"
|
9
|
+
gem "mocha"
|
10
|
+
gem "rake"
|
11
|
+
gem "timecop"
|
12
|
+
|
13
|
+
platforms :ruby do
|
14
|
+
gem "pg"
|
15
|
+
gem "mysql2"
|
16
|
+
gem "sqlite3"
|
17
|
+
end
|
18
|
+
|
19
|
+
platforms :jruby do
|
20
|
+
gem "jdbc-postgres"
|
21
|
+
gem "jdbc-mysql"
|
22
|
+
gem "jdbc-sqlite3"
|
23
|
+
end
|
@@ -102,6 +102,7 @@ module I18n
|
|
102
102
|
|
103
103
|
class Translation < ::Sequel::Model(::I18n::Backend::SequelBitemporal.master_table_name)
|
104
104
|
extend Forwardable
|
105
|
+
plugin :def_dataset_method
|
105
106
|
plugin :bitemporal, version_class: TranslationVersion
|
106
107
|
|
107
108
|
delegate [:value, :interpolations, :interpolates?] => :pending_or_current_version
|
@@ -143,7 +144,12 @@ module I18n
|
|
143
144
|
end
|
144
145
|
|
145
146
|
def all_for_locale(locale)
|
146
|
-
self.locale(locale).with_current_version.
|
147
|
+
self.locale(locale).with_current_version.select(
|
148
|
+
:locale,
|
149
|
+
:key,
|
150
|
+
:value,
|
151
|
+
:is_proc
|
152
|
+
).all
|
147
153
|
end
|
148
154
|
end
|
149
155
|
end
|
@@ -73,9 +73,10 @@ module I18n
|
|
73
73
|
@translations.keys.each{|loc| clear loc, options }
|
74
74
|
else
|
75
75
|
last_update = options[:last_update]
|
76
|
-
|
76
|
+
cache_key = cache_key_of locale
|
77
|
+
cache_time = @cache_times[cache_key]
|
77
78
|
return if last_update && cache_time && last_update < cache_time
|
78
|
-
@translations[
|
79
|
+
@translations[cache_key] = nil
|
79
80
|
end
|
80
81
|
end
|
81
82
|
|
@@ -83,11 +84,12 @@ module I18n
|
|
83
84
|
|
84
85
|
def fetch_all_translations(locale)
|
85
86
|
@translations ||= {}
|
86
|
-
|
87
|
-
|
87
|
+
cache_key = cache_key_of locale
|
88
|
+
@translations[cache_key] ||= begin
|
89
|
+
@cache_times[cache_key] = Time.now
|
88
90
|
Translation.all_for_locale(locale).group_by(&:key)
|
89
91
|
end
|
90
|
-
@translations[
|
92
|
+
@translations[cache_key]
|
91
93
|
end
|
92
94
|
|
93
95
|
def lookup(locale, key, scope = [], options = {})
|
@@ -118,6 +120,10 @@ module I18n
|
|
118
120
|
keys << [keys.last, key].compact.join(FLATTEN_SEPARATOR)
|
119
121
|
end
|
120
122
|
end
|
123
|
+
|
124
|
+
def cache_key_of(locale)
|
125
|
+
locale
|
126
|
+
end
|
121
127
|
end
|
122
128
|
|
123
129
|
include Implementation
|
Binary file
|
data/test/sequel_test.rb
CHANGED
@@ -97,7 +97,7 @@ class I18nBackendSequelBitemporalTest < I18nBitemporalTest
|
|
97
97
|
end
|
98
98
|
|
99
99
|
test "allows to override the table names" do
|
100
|
-
::Sequel::Model.db.transaction :rollback => :always do
|
100
|
+
::Sequel::Model.db.transaction :rollback => :always, savepoint: :only do
|
101
101
|
begin
|
102
102
|
::Sequel.migration do
|
103
103
|
change do
|
@@ -143,8 +143,12 @@ class I18nBackendSequelBitemporalTest < I18nBitemporalTest
|
|
143
143
|
def change_table_names(master_name, version_name)
|
144
144
|
::I18n::Backend::SequelBitemporal.master_table_name = master_name
|
145
145
|
::I18n::Backend::SequelBitemporal.version_table_name = version_name
|
146
|
-
::I18n::Backend::SequelBitemporal.
|
147
|
-
|
146
|
+
if ::I18n::Backend::SequelBitemporal.const_defined?(:Translation)
|
147
|
+
::I18n::Backend::SequelBitemporal.send :remove_const, :Translation
|
148
|
+
end
|
149
|
+
if ::I18n::Backend::SequelBitemporal.const_defined?(:TranslationVersion)
|
150
|
+
::I18n::Backend::SequelBitemporal.send :remove_const, :TranslationVersion
|
151
|
+
end
|
148
152
|
load File.expand_path(
|
149
153
|
"../../lib/i18n/backend/sequel_bitemporal/translation.rb",
|
150
154
|
__FILE__
|
data/test/test_setup.rb
CHANGED
@@ -5,18 +5,14 @@ require "optparse"
|
|
5
5
|
module I18n
|
6
6
|
module Tests
|
7
7
|
class << self
|
8
|
-
def options
|
9
|
-
@options ||= { :with => [], :adapter => "sqlite3" }
|
10
|
-
end
|
11
|
-
|
12
8
|
def parse_options!
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
options[:
|
9
|
+
options[:adapter] = ENV.fetch "TEST_ADAPTER", "sqlite"
|
10
|
+
options[:database] = ENV.fetch "TEST_DATABASE", ":memory:"
|
11
|
+
options[:host] = ENV.fetch "TEST_DATABASE_HOST", nil
|
12
|
+
options[:port] = ENV.fetch "TEST_DATABASE_PORT", nil
|
13
|
+
options[:user] = ENV.fetch "TEST_USERNAME", nil
|
14
|
+
options[:password] = ENV.fetch "TEST_PASSWORD", nil
|
15
|
+
options[:encoding] = ENV.fetch "TEST_ENCODING", nil
|
20
16
|
end
|
21
17
|
|
22
18
|
def setup_sequel
|
@@ -38,9 +34,11 @@ module I18n
|
|
38
34
|
connect_adapter
|
39
35
|
::Sequel.extension :migration
|
40
36
|
opts = {}
|
41
|
-
opts[:cascade] = true if
|
42
|
-
::Sequel::Model.db.drop_table? :
|
37
|
+
opts[:cascade] = true if postgresql?
|
38
|
+
::Sequel::Model.db.drop_table? :another_i18n_translation_versions, opts
|
39
|
+
::Sequel::Model.db.drop_table? :another_i18n_translations, opts
|
43
40
|
::Sequel::Model.db.drop_table? :i18n_translation_versions, opts
|
41
|
+
::Sequel::Model.db.drop_table? :i18n_translations, opts
|
44
42
|
::Sequel.migration do
|
45
43
|
change do
|
46
44
|
create_table :i18n_translations do
|
@@ -66,33 +64,44 @@ module I18n
|
|
66
64
|
end
|
67
65
|
|
68
66
|
def connect_adapter
|
69
|
-
|
67
|
+
connect_options = options.dup
|
70
68
|
if ENV["DEBUG"]
|
71
69
|
require "logger"
|
72
|
-
logger
|
70
|
+
connect_options = options.merge! :logger => Logger.new(STDOUT)
|
73
71
|
end
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
72
|
+
::Sequel.connect(connect_options.merge(:adapter => adapter))
|
73
|
+
end
|
74
|
+
|
75
|
+
private
|
76
|
+
|
77
|
+
def options
|
78
|
+
@options ||= {}
|
79
|
+
end
|
80
|
+
|
81
|
+
def jruby?
|
82
|
+
(defined?(RUBY_ENGINE) && RUBY_ENGINE=="jruby") || defined?(JRUBY_VERSION)
|
83
|
+
end
|
84
|
+
|
85
|
+
def postgresql?
|
86
|
+
options[:adapter] == "postgresql"
|
87
|
+
end
|
88
|
+
|
89
|
+
def sqlite?
|
90
|
+
options[:adapter] == "sqlite"
|
91
|
+
end
|
92
|
+
|
93
|
+
def mysql?
|
94
|
+
options[:adapter] == "mysql2"
|
95
|
+
end
|
96
|
+
|
97
|
+
def adapter
|
98
|
+
case options[:adapter]
|
99
|
+
when "sqlite", "sqlite3"
|
100
|
+
jruby? ? "jdbc:sqlite:" : "sqlite"
|
101
|
+
when "postgresql", "postgres"
|
102
|
+
jruby? ? "jdbc:postgresql" : "postgresql"
|
103
|
+
when "mysql", "mysql2"
|
104
|
+
jruby? ? "jdbc:mysql" : "mysql2"
|
96
105
|
end
|
97
106
|
end
|
98
107
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n-sequel_bitemporal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Tron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -61,9 +61,8 @@ executables: []
|
|
61
61
|
extensions: []
|
62
62
|
extra_rdoc_files: []
|
63
63
|
files:
|
64
|
+
- ".github/workflows/ci.yml"
|
64
65
|
- ".gitignore"
|
65
|
-
- ".ruby-version"
|
66
|
-
- ".travis.yml"
|
67
66
|
- Gemfile
|
68
67
|
- MIT-LICENSE
|
69
68
|
- README.md
|
@@ -71,6 +70,10 @@ files:
|
|
71
70
|
- ci/Gemfile.rails-5.0
|
72
71
|
- ci/Gemfile.rails-5.1
|
73
72
|
- ci/Gemfile.rails-5.2
|
73
|
+
- ci/Gemfile.rails-6.0
|
74
|
+
- ci/Gemfile.rails-6.1
|
75
|
+
- ci/Gemfile.rails-7.0
|
76
|
+
- ci/Gemfile.rails-7.1
|
74
77
|
- i18n-sequel_bitemporal.gemspec
|
75
78
|
- lib/i18n/backend/sequel_bitemporal.rb
|
76
79
|
- lib/i18n/backend/sequel_bitemporal/missing.rb
|
@@ -80,6 +83,7 @@ files:
|
|
80
83
|
- lib/i18n/sequel_bitemporal/version.rb
|
81
84
|
- test/all.rb
|
82
85
|
- test/api_test.rb
|
86
|
+
- test/database.sqlite3
|
83
87
|
- test/missing_test.rb
|
84
88
|
- test/sequel_cache_test.rb
|
85
89
|
- test/sequel_test.rb
|
@@ -103,13 +107,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
107
|
- !ruby/object:Gem::Version
|
104
108
|
version: '0'
|
105
109
|
requirements: []
|
106
|
-
rubygems_version: 3.3
|
110
|
+
rubygems_version: 3.5.3
|
107
111
|
signing_key:
|
108
112
|
specification_version: 4
|
109
113
|
summary: I18n Bitemporal Sequel backend
|
110
114
|
test_files:
|
111
115
|
- test/all.rb
|
112
116
|
- test/api_test.rb
|
117
|
+
- test/database.sqlite3
|
113
118
|
- test/missing_test.rb
|
114
119
|
- test/sequel_cache_test.rb
|
115
120
|
- test/sequel_test.rb
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.6.3
|
data/.travis.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
cache: bundler
|
3
|
-
sudo: false
|
4
|
-
before_script:
|
5
|
-
- psql -c 'create database i18n_sequel_bitemporal;' -U postgres
|
6
|
-
rvm:
|
7
|
-
- 2.3.8
|
8
|
-
- 2.4.6
|
9
|
-
- 2.5.5
|
10
|
-
- 2.6.3
|
11
|
-
env:
|
12
|
-
- ADAPTER=sqlite3
|
13
|
-
- ADAPTER=postgres
|
14
|
-
gemfile:
|
15
|
-
- ci/Gemfile.rails-5.0
|
16
|
-
- ci/Gemfile.rails-5.1
|
17
|
-
- ci/Gemfile.rails-5.2
|