trx_ext 3.0.2 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/trx_ext/version.rb +1 -1
- metadata +3 -63
- data/.rspec +0 -3
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
- data/CODE_OF_CONDUCT.md +0 -84
- data/Gemfile +0 -33
- data/Rakefile +0 -4
- data/bin/console +0 -17
- data/bin/rails +0 -9
- data/bin/test_all_ar_versions +0 -9
- data/docker/my.cnf +0 -13
- data/docker/mysqld.sh +0 -22
- data/docker-compose.yml +0 -22
- data/dummy_app/.gitattributes +0 -7
- data/dummy_app/.gitignore +0 -34
- data/dummy_app/README.md +0 -24
- data/dummy_app/Rakefile +0 -6
- data/dummy_app/app/controllers/application_controller.rb +0 -2
- data/dummy_app/app/models/application_mysql_record.rb +0 -7
- data/dummy_app/app/models/application_pg_record.rb +0 -7
- data/dummy_app/app/models/application_sqlite_record.rb +0 -7
- data/dummy_app/app/models/application_trilogy_record.rb +0 -7
- data/dummy_app/app/models/dummy_mysql_record.rb +0 -11
- data/dummy_app/app/models/dummy_pg_record.rb +0 -11
- data/dummy_app/app/models/dummy_sqlite_record.rb +0 -11
- data/dummy_app/app/models/dummy_trilogy_record.rb +0 -11
- data/dummy_app/bin/bundle +0 -109
- data/dummy_app/bin/rails +0 -4
- data/dummy_app/bin/rake +0 -4
- data/dummy_app/bin/setup +0 -33
- data/dummy_app/config/application.rb +0 -51
- data/dummy_app/config/boot.rb +0 -4
- data/dummy_app/config/credentials.yml +0 -0
- data/dummy_app/config/database.yml +0 -70
- data/dummy_app/config/environment.rb +0 -5
- data/dummy_app/config/environments/development.rb +0 -66
- data/dummy_app/config/environments/test.rb +0 -61
- data/dummy_app/config/initializers/.keep +0 -0
- data/dummy_app/config/locales/en.yml +0 -2
- data/dummy_app/config/locales/fr-CH.yml +0 -2
- data/dummy_app/config/puma.rb +0 -43
- data/dummy_app/config/routes.rb +0 -5
- data/dummy_app/config.ru +0 -6
- data/dummy_app/db/migrate/.keep +0 -0
- data/dummy_app/db/migrate/20240128111549_create_dummy_record.rb +0 -10
- data/dummy_app/db/primary_mysql/20240128111549_create_dummy_mysql_record.rb +0 -10
- data/dummy_app/db/primary_mysql_schema.rb +0 -20
- data/dummy_app/db/primary_sqlite/20240128111549_create_dummy_sqlite_record.rb +0 -10
- data/dummy_app/db/primary_sqlite_schema.rb +0 -20
- data/dummy_app/db/primary_trilogy/20240128111549_create_dummy_trilogy_record.rb +0 -10
- data/dummy_app/db/primary_trilogy_schema.rb +0 -20
- data/dummy_app/db/schema.rb +0 -23
- data/dummy_app/db/seeds.rb +0 -7
- data/dummy_app/lib/tasks/.keep +0 -0
- data/dummy_app/log/.keep +0 -0
- data/dummy_app/public/robots.txt +0 -1
- data/dummy_app/storage/.keep +0 -0
- data/dummy_app/tmp/.keep +0 -0
- data/dummy_app/vendor/.keep +0 -0
- data/log/.gitkeep +0 -0
- data/trx_ext.gemspec +0 -35
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad0fc06a140e8953d099d02f402ce28a8fc726fcbac347396cce3b0e67a3d5d6
|
|
4
|
+
data.tar.gz: 983258e6e6ca4e8aa12eeedfabb4e151f4bf48b00c102ae4a689fc2aa87eeb8a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3561f1e613ebf0c66e001d5e56950c15c46bd41ec67333c385863e2040d509f32c57b2932900a4f91e3b3b56aa8a7899e7998d6be5e992ae1ca92ca8b0fe3de6
|
|
7
|
+
data.tar.gz: 294c8ac991f076cbbf87bfb4b9615004ec058903bc317d45aa9acfd3d78f0aadd380ce245cae321f8d02d6d428b2c27c0bf9b32a4f18fbe75a3c2ebcbd6e8603
|
data/CHANGELOG.md
CHANGED
data/lib/trx_ext/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: trx_ext
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Dzyzenko
|
|
@@ -36,82 +36,22 @@ executables: []
|
|
|
36
36
|
extensions: []
|
|
37
37
|
extra_rdoc_files: []
|
|
38
38
|
files:
|
|
39
|
-
- ".rspec"
|
|
40
|
-
- ".ruby-gemset"
|
|
41
|
-
- ".ruby-version"
|
|
42
39
|
- CHANGELOG.md
|
|
43
|
-
- CODE_OF_CONDUCT.md
|
|
44
|
-
- Gemfile
|
|
45
40
|
- LICENSE.txt
|
|
46
41
|
- README.md
|
|
47
|
-
- Rakefile
|
|
48
|
-
- bin/console
|
|
49
|
-
- bin/rails
|
|
50
|
-
- bin/test_all_ar_versions
|
|
51
|
-
- docker-compose.yml
|
|
52
|
-
- docker/my.cnf
|
|
53
|
-
- docker/mysqld.sh
|
|
54
|
-
- dummy_app/.gitattributes
|
|
55
|
-
- dummy_app/.gitignore
|
|
56
|
-
- dummy_app/README.md
|
|
57
|
-
- dummy_app/Rakefile
|
|
58
|
-
- dummy_app/app/controllers/application_controller.rb
|
|
59
|
-
- dummy_app/app/models/application_mysql_record.rb
|
|
60
|
-
- dummy_app/app/models/application_pg_record.rb
|
|
61
|
-
- dummy_app/app/models/application_sqlite_record.rb
|
|
62
|
-
- dummy_app/app/models/application_trilogy_record.rb
|
|
63
|
-
- dummy_app/app/models/dummy_mysql_record.rb
|
|
64
|
-
- dummy_app/app/models/dummy_pg_record.rb
|
|
65
|
-
- dummy_app/app/models/dummy_sqlite_record.rb
|
|
66
|
-
- dummy_app/app/models/dummy_trilogy_record.rb
|
|
67
|
-
- dummy_app/bin/bundle
|
|
68
|
-
- dummy_app/bin/rails
|
|
69
|
-
- dummy_app/bin/rake
|
|
70
|
-
- dummy_app/bin/setup
|
|
71
|
-
- dummy_app/config.ru
|
|
72
|
-
- dummy_app/config/application.rb
|
|
73
|
-
- dummy_app/config/boot.rb
|
|
74
|
-
- dummy_app/config/credentials.yml
|
|
75
|
-
- dummy_app/config/database.yml
|
|
76
|
-
- dummy_app/config/environment.rb
|
|
77
|
-
- dummy_app/config/environments/development.rb
|
|
78
|
-
- dummy_app/config/environments/test.rb
|
|
79
|
-
- dummy_app/config/initializers/.keep
|
|
80
|
-
- dummy_app/config/locales/en.yml
|
|
81
|
-
- dummy_app/config/locales/fr-CH.yml
|
|
82
|
-
- dummy_app/config/puma.rb
|
|
83
|
-
- dummy_app/config/routes.rb
|
|
84
|
-
- dummy_app/db/migrate/.keep
|
|
85
|
-
- dummy_app/db/migrate/20240128111549_create_dummy_record.rb
|
|
86
|
-
- dummy_app/db/primary_mysql/20240128111549_create_dummy_mysql_record.rb
|
|
87
|
-
- dummy_app/db/primary_mysql_schema.rb
|
|
88
|
-
- dummy_app/db/primary_sqlite/20240128111549_create_dummy_sqlite_record.rb
|
|
89
|
-
- dummy_app/db/primary_sqlite_schema.rb
|
|
90
|
-
- dummy_app/db/primary_trilogy/20240128111549_create_dummy_trilogy_record.rb
|
|
91
|
-
- dummy_app/db/primary_trilogy_schema.rb
|
|
92
|
-
- dummy_app/db/schema.rb
|
|
93
|
-
- dummy_app/db/seeds.rb
|
|
94
|
-
- dummy_app/lib/tasks/.keep
|
|
95
|
-
- dummy_app/log/.keep
|
|
96
|
-
- dummy_app/public/robots.txt
|
|
97
|
-
- dummy_app/storage/.keep
|
|
98
|
-
- dummy_app/tmp/.keep
|
|
99
|
-
- dummy_app/vendor/.keep
|
|
100
42
|
- lib/trx_ext.rb
|
|
101
43
|
- lib/trx_ext/config.rb
|
|
102
44
|
- lib/trx_ext/object_ext.rb
|
|
103
45
|
- lib/trx_ext/retry.rb
|
|
104
46
|
- lib/trx_ext/version.rb
|
|
105
|
-
- log/.gitkeep
|
|
106
|
-
- trx_ext.gemspec
|
|
107
47
|
homepage: https://github.com/intale/trx_ext
|
|
108
48
|
licenses:
|
|
109
49
|
- MIT
|
|
110
50
|
metadata:
|
|
111
51
|
allowed_push_host: https://rubygems.org
|
|
112
52
|
homepage_uri: https://github.com/intale/trx_ext
|
|
113
|
-
source_code_uri: https://github.com/intale/trx_ext/tree/v3.0.
|
|
114
|
-
changelog_uri: https://github.com/intale/trx_ext/blob/v3.0.
|
|
53
|
+
source_code_uri: https://github.com/intale/trx_ext/tree/v3.0.3
|
|
54
|
+
changelog_uri: https://github.com/intale/trx_ext/blob/v3.0.3/CHANGELOG.md
|
|
115
55
|
rdoc_options: []
|
|
116
56
|
require_paths:
|
|
117
57
|
- lib
|
data/.rspec
DELETED
data/.ruby-gemset
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
trx_ext
|
data/.ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.4.7
|
data/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
6
|
-
|
|
7
|
-
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
|
8
|
-
|
|
9
|
-
## Our Standards
|
|
10
|
-
|
|
11
|
-
Examples of behavior that contributes to a positive environment for our community include:
|
|
12
|
-
|
|
13
|
-
* Demonstrating empathy and kindness toward other people
|
|
14
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
15
|
-
* Giving and gracefully accepting constructive feedback
|
|
16
|
-
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
|
17
|
-
* Focusing on what is best not just for us as individuals, but for the overall community
|
|
18
|
-
|
|
19
|
-
Examples of unacceptable behavior include:
|
|
20
|
-
|
|
21
|
-
* The use of sexualized language or imagery, and sexual attention or
|
|
22
|
-
advances of any kind
|
|
23
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
24
|
-
* Public or private harassment
|
|
25
|
-
* Publishing others' private information, such as a physical or email
|
|
26
|
-
address, without their explicit permission
|
|
27
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
28
|
-
professional setting
|
|
29
|
-
|
|
30
|
-
## Enforcement Responsibilities
|
|
31
|
-
|
|
32
|
-
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
|
33
|
-
|
|
34
|
-
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
|
35
|
-
|
|
36
|
-
## Scope
|
|
37
|
-
|
|
38
|
-
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
39
|
-
|
|
40
|
-
## Enforcement
|
|
41
|
-
|
|
42
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at intale.a@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
|
|
43
|
-
|
|
44
|
-
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
|
45
|
-
|
|
46
|
-
## Enforcement Guidelines
|
|
47
|
-
|
|
48
|
-
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
|
49
|
-
|
|
50
|
-
### 1. Correction
|
|
51
|
-
|
|
52
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
|
53
|
-
|
|
54
|
-
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
|
55
|
-
|
|
56
|
-
### 2. Warning
|
|
57
|
-
|
|
58
|
-
**Community Impact**: A violation through a single incident or series of actions.
|
|
59
|
-
|
|
60
|
-
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
|
61
|
-
|
|
62
|
-
### 3. Temporary Ban
|
|
63
|
-
|
|
64
|
-
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
|
65
|
-
|
|
66
|
-
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
|
67
|
-
|
|
68
|
-
### 4. Permanent Ban
|
|
69
|
-
|
|
70
|
-
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
|
71
|
-
|
|
72
|
-
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
73
|
-
|
|
74
|
-
## Attribution
|
|
75
|
-
|
|
76
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
|
77
|
-
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
78
|
-
|
|
79
|
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
|
80
|
-
|
|
81
|
-
[homepage]: https://www.contributor-covenant.org
|
|
82
|
-
|
|
83
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
|
84
|
-
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/Gemfile
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
source "https://rubygems.org"
|
|
4
|
-
|
|
5
|
-
# Specify your gem's dependencies in trx_ext.gemspec
|
|
6
|
-
gemspec
|
|
7
|
-
|
|
8
|
-
if ENV['AR_VERSION']
|
|
9
|
-
# Given ENV['AR_VERSION'] to equal "6.0" will produce
|
|
10
|
-
# ```ruby
|
|
11
|
-
# gem 'activerecord', "~> 6.0", "< 6.1"
|
|
12
|
-
# ```
|
|
13
|
-
gem 'rails', "~> #{ENV['AR_VERSION']}", "< #{ENV['AR_VERSION'].next}"
|
|
14
|
-
else
|
|
15
|
-
gem 'rails'
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
gem "rake", "~> 13.0"
|
|
19
|
-
gem 'rspec', '~> 3.12'
|
|
20
|
-
gem 'timecop', '~> 0.9.8'
|
|
21
|
-
# To support postgresql adapter
|
|
22
|
-
gem 'pg', '~> 1.5', '>= 1.5.4'
|
|
23
|
-
# To support sqlite3 adapter
|
|
24
|
-
gem 'sqlite3'
|
|
25
|
-
# To support mysql2 adapter
|
|
26
|
-
gem 'mysql2', '~> 0.5.5'
|
|
27
|
-
# To support trilogy adapter
|
|
28
|
-
gem 'trilogy', '~> 2.8'
|
|
29
|
-
gem 'factory_bot_rails', '~> 6.4', '>= 6.4.3'
|
|
30
|
-
gem 'fivemat', '~> 1.3', '>= 1.3.7'
|
|
31
|
-
gem 'rspec-its', '~> 1.3'
|
|
32
|
-
gem "bootsnap", require: false
|
|
33
|
-
gem 'rspec-rails', '~> 6.0'
|
data/Rakefile
DELETED
data/bin/console
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
# frozen_string_literal: true
|
|
4
|
-
|
|
5
|
-
require "bundler/setup"
|
|
6
|
-
require "trx_ext"
|
|
7
|
-
|
|
8
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
9
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
10
|
-
|
|
11
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
12
|
-
# require "pry"
|
|
13
|
-
# Pry.start
|
|
14
|
-
|
|
15
|
-
require "irb"
|
|
16
|
-
|
|
17
|
-
IRB.start(__FILE__)
|
data/bin/rails
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
Dir.chdir(File.expand_path("../dummy_app", __dir__))
|
|
4
|
-
ENV['BUNDLE_GEMFILE'] = "#{__dir__}/Gemfile"
|
|
5
|
-
|
|
6
|
-
APP_PATH = File.expand_path("../dummy_app/config/application", __dir__)
|
|
7
|
-
require_relative "../dummy_app/config/boot"
|
|
8
|
-
|
|
9
|
-
require "rails/commands"
|
data/bin/test_all_ar_versions
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
# frozen_string_literal: true
|
|
4
|
-
|
|
5
|
-
%w[7.2 8.0 8.1].each do |ar_version|
|
|
6
|
-
`rm Gemfile.lock`
|
|
7
|
-
Process.waitpid(Kernel.spawn({ 'AR_VERSION' => ar_version }, "bundle install --quiet", close_others: true))
|
|
8
|
-
Process.waitpid(Kernel.spawn({ 'AR_VERSION' => ar_version }, "rspec", close_others: true))
|
|
9
|
-
end
|
data/docker/my.cnf
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
[mysqld]
|
|
2
|
-
# Log General
|
|
3
|
-
general_log = 1
|
|
4
|
-
general_log_file = /var/log/mysql_general.log
|
|
5
|
-
|
|
6
|
-
# Log Error
|
|
7
|
-
log_error = /var/log/mysql_error.log
|
|
8
|
-
|
|
9
|
-
# Log Slow
|
|
10
|
-
slow_query_log = 1
|
|
11
|
-
slow_query_log_file = /var/log/mysql_slow_query.log
|
|
12
|
-
long_query_time = 0 # 0 has the effect of logging all queries
|
|
13
|
-
log_queries_not_using_indexes = 1
|
data/docker/mysqld.sh
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
##
|
|
5
|
-
# This script exists to work-around the fact that
|
|
6
|
-
# mysql does not support logging to stdout
|
|
7
|
-
#
|
|
8
|
-
# This will tail the file logs configured in ./my.cnf
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
LOG_PATHS=(
|
|
12
|
-
'/var/log/mysql_general.log'
|
|
13
|
-
'/var/log/mysql_error.log'
|
|
14
|
-
'/var/log/mysql_slow_query.log'
|
|
15
|
-
)
|
|
16
|
-
for LOG_PATH in "${LOG_PATHS[@]}"; do
|
|
17
|
-
# https://serverfault.com/a/599209
|
|
18
|
-
( umask 0 && truncate -s0 "$LOG_PATH" )
|
|
19
|
-
tail --pid $$ -n0 -F "$LOG_PATH" &
|
|
20
|
-
done
|
|
21
|
-
|
|
22
|
-
docker-entrypoint.sh mysqld
|
data/docker-compose.yml
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
version: "3.5"
|
|
2
|
-
|
|
3
|
-
services:
|
|
4
|
-
postgres:
|
|
5
|
-
image: postgres:18
|
|
6
|
-
command: ["postgres", "-c", "log_statement=all", "-c", "default_transaction_isolation=serializable"]
|
|
7
|
-
ports:
|
|
8
|
-
- 5532:5432
|
|
9
|
-
environment:
|
|
10
|
-
- POSTGRES_PASSWORD=postgres
|
|
11
|
-
mysql:
|
|
12
|
-
image: mysql:9.4
|
|
13
|
-
command:
|
|
14
|
-
- /usr/local/bin/mysqld.sh
|
|
15
|
-
volumes:
|
|
16
|
-
- ./docker/my.cnf:/etc/mysql/conf.d/my.cnf
|
|
17
|
-
- ./docker/mysqld.sh:/usr/local/bin/mysqld.sh
|
|
18
|
-
ports:
|
|
19
|
-
- 3406:3306
|
|
20
|
-
- 34060:33060
|
|
21
|
-
environment:
|
|
22
|
-
- MYSQL_ALLOW_EMPTY_PASSWORD=true
|
data/dummy_app/.gitattributes
DELETED
data/dummy_app/.gitignore
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
|
2
|
-
#
|
|
3
|
-
# If you find yourself ignoring temporary files generated by your text editor
|
|
4
|
-
# or operating system, you probably want to add a global ignore instead:
|
|
5
|
-
# git config --global core.excludesfile '~/.gitignore_global'
|
|
6
|
-
|
|
7
|
-
# Ignore bundler config.
|
|
8
|
-
/.bundle
|
|
9
|
-
|
|
10
|
-
# Ignore the default SQLite database.
|
|
11
|
-
/db/*.sqlite3
|
|
12
|
-
/db/*.sqlite3-*
|
|
13
|
-
|
|
14
|
-
# Ignore all logfiles and tempfiles.
|
|
15
|
-
/log/*
|
|
16
|
-
/tmp/*
|
|
17
|
-
!/log/.keep
|
|
18
|
-
!/tmp/.keep
|
|
19
|
-
|
|
20
|
-
# Ignore pidfiles, but keep the directory.
|
|
21
|
-
/tmp/pids/*
|
|
22
|
-
!/tmp/pids/
|
|
23
|
-
!/tmp/pids/.keep
|
|
24
|
-
|
|
25
|
-
# Ignore uploaded files in development.
|
|
26
|
-
/storage/*
|
|
27
|
-
!/storage/.keep
|
|
28
|
-
/tmp/storage/*
|
|
29
|
-
!/tmp/storage/
|
|
30
|
-
!/tmp/storage/.keep
|
|
31
|
-
|
|
32
|
-
# Ignore master key for decrypting credentials and more.
|
|
33
|
-
/config/master.key
|
|
34
|
-
Gemfile.lock
|
data/dummy_app/README.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# README
|
|
2
|
-
|
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
|
4
|
-
application up and running.
|
|
5
|
-
|
|
6
|
-
Things you may want to cover:
|
|
7
|
-
|
|
8
|
-
* Ruby version
|
|
9
|
-
|
|
10
|
-
* System dependencies
|
|
11
|
-
|
|
12
|
-
* Configuration
|
|
13
|
-
|
|
14
|
-
* Database creation
|
|
15
|
-
|
|
16
|
-
* Database initialization
|
|
17
|
-
|
|
18
|
-
* How to run the test suite
|
|
19
|
-
|
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
|
21
|
-
|
|
22
|
-
* Deployment instructions
|
|
23
|
-
|
|
24
|
-
* ...
|
data/dummy_app/Rakefile
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# Dummy record. It is used to test transaction integration.
|
|
4
|
-
class DummyMysqlRecord < ApplicationMysqlRecord
|
|
5
|
-
class << self
|
|
6
|
-
def find_or_create_by(attributes, &block)
|
|
7
|
-
find_by(attributes) || create(attributes, &block)
|
|
8
|
-
end
|
|
9
|
-
wrap_in_trx :find_or_create_by
|
|
10
|
-
end
|
|
11
|
-
end
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# Dummy record. It is used to test transaction integration.
|
|
4
|
-
class DummyPgRecord < ApplicationPgRecord
|
|
5
|
-
class << self
|
|
6
|
-
def find_or_create_by(attributes, &block)
|
|
7
|
-
find_by(attributes) || create(attributes, &block)
|
|
8
|
-
end
|
|
9
|
-
wrap_in_trx :find_or_create_by
|
|
10
|
-
end
|
|
11
|
-
end
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# Dummy record. It is used to test transaction integration.
|
|
4
|
-
class DummySqliteRecord < ApplicationSqliteRecord
|
|
5
|
-
class << self
|
|
6
|
-
def find_or_create_by(attributes, &block)
|
|
7
|
-
find_by(attributes) || create(attributes, &block)
|
|
8
|
-
end
|
|
9
|
-
wrap_in_trx :find_or_create_by
|
|
10
|
-
end
|
|
11
|
-
end
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# Dummy record. It is used to test transaction integration.
|
|
4
|
-
class DummyTrilogyRecord < ApplicationTrilogyRecord
|
|
5
|
-
class << self
|
|
6
|
-
def find_or_create_by(attributes, &block)
|
|
7
|
-
find_by(attributes) || create(attributes, &block)
|
|
8
|
-
end
|
|
9
|
-
wrap_in_trx :find_or_create_by
|
|
10
|
-
end
|
|
11
|
-
end
|
data/dummy_app/bin/bundle
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
# This file was generated by Bundler.
|
|
6
|
-
#
|
|
7
|
-
# The application 'bundle' is installed as part of a gem, and
|
|
8
|
-
# this file is here to facilitate running it.
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
require "rubygems"
|
|
12
|
-
|
|
13
|
-
m = Module.new do
|
|
14
|
-
module_function
|
|
15
|
-
|
|
16
|
-
def invoked_as_script?
|
|
17
|
-
File.expand_path($0) == File.expand_path(__FILE__)
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def env_var_version
|
|
21
|
-
ENV["BUNDLER_VERSION"]
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def cli_arg_version
|
|
25
|
-
return unless invoked_as_script? # don't want to hijack other binstubs
|
|
26
|
-
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
|
27
|
-
bundler_version = nil
|
|
28
|
-
update_index = nil
|
|
29
|
-
ARGV.each_with_index do |a, i|
|
|
30
|
-
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
|
31
|
-
bundler_version = a
|
|
32
|
-
end
|
|
33
|
-
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
|
|
34
|
-
bundler_version = $1
|
|
35
|
-
update_index = i
|
|
36
|
-
end
|
|
37
|
-
bundler_version
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
def gemfile
|
|
41
|
-
gemfile = ENV["BUNDLE_GEMFILE"]
|
|
42
|
-
return gemfile if gemfile && !gemfile.empty?
|
|
43
|
-
|
|
44
|
-
File.expand_path("../Gemfile", __dir__)
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def lockfile
|
|
48
|
-
lockfile =
|
|
49
|
-
case File.basename(gemfile)
|
|
50
|
-
when "gems.rb" then gemfile.sub(/\.rb$/, ".locked")
|
|
51
|
-
else "#{gemfile}.lock"
|
|
52
|
-
end
|
|
53
|
-
File.expand_path(lockfile)
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
def lockfile_version
|
|
57
|
-
return unless File.file?(lockfile)
|
|
58
|
-
lockfile_contents = File.read(lockfile)
|
|
59
|
-
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
|
60
|
-
Regexp.last_match(1)
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
def bundler_requirement
|
|
64
|
-
@bundler_requirement ||=
|
|
65
|
-
env_var_version ||
|
|
66
|
-
cli_arg_version ||
|
|
67
|
-
bundler_requirement_for(lockfile_version)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
def bundler_requirement_for(version)
|
|
71
|
-
return "#{Gem::Requirement.default}.a" unless version
|
|
72
|
-
|
|
73
|
-
bundler_gem_version = Gem::Version.new(version)
|
|
74
|
-
|
|
75
|
-
bundler_gem_version.approximate_recommendation
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
def load_bundler!
|
|
79
|
-
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
|
80
|
-
|
|
81
|
-
activate_bundler
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
def activate_bundler
|
|
85
|
-
gem_error = activation_error_handling do
|
|
86
|
-
gem "bundler", bundler_requirement
|
|
87
|
-
end
|
|
88
|
-
return if gem_error.nil?
|
|
89
|
-
require_error = activation_error_handling do
|
|
90
|
-
require "bundler/version"
|
|
91
|
-
end
|
|
92
|
-
return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
|
|
93
|
-
warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
|
|
94
|
-
exit 42
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
def activation_error_handling
|
|
98
|
-
yield
|
|
99
|
-
nil
|
|
100
|
-
rescue StandardError, LoadError => e
|
|
101
|
-
e
|
|
102
|
-
end
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
m.load_bundler!
|
|
106
|
-
|
|
107
|
-
if m.invoked_as_script?
|
|
108
|
-
load Gem.bin_path("bundler", "bundle")
|
|
109
|
-
end
|
data/dummy_app/bin/rails
DELETED
data/dummy_app/bin/rake
DELETED
data/dummy_app/bin/setup
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
require "fileutils"
|
|
3
|
-
|
|
4
|
-
# path to your application root.
|
|
5
|
-
APP_ROOT = File.expand_path("..", __dir__)
|
|
6
|
-
|
|
7
|
-
def system!(*args)
|
|
8
|
-
system(*args) || abort("\n== Command #{args} failed ==")
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
FileUtils.chdir APP_ROOT do
|
|
12
|
-
# This script is a way to set up or update your development environment automatically.
|
|
13
|
-
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
|
|
14
|
-
# Add necessary setup steps to this file.
|
|
15
|
-
|
|
16
|
-
puts "== Installing dependencies =="
|
|
17
|
-
system! "gem install bundler --conservative"
|
|
18
|
-
system("bundle check") || system!("bundle install")
|
|
19
|
-
|
|
20
|
-
# puts "\n== Copying sample files =="
|
|
21
|
-
# unless File.exist?("config/database.yml")
|
|
22
|
-
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
|
|
23
|
-
# end
|
|
24
|
-
|
|
25
|
-
puts "\n== Preparing database =="
|
|
26
|
-
system! "bin/rails db:prepare"
|
|
27
|
-
|
|
28
|
-
puts "\n== Removing old logs and tempfiles =="
|
|
29
|
-
system! "bin/rails log:clear tmp:clear"
|
|
30
|
-
|
|
31
|
-
puts "\n== Restarting application server =="
|
|
32
|
-
system! "bin/rails restart"
|
|
33
|
-
end
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "boot"
|
|
4
|
-
|
|
5
|
-
require "rails"
|
|
6
|
-
|
|
7
|
-
%w(
|
|
8
|
-
active_record/railtie
|
|
9
|
-
action_controller/railtie
|
|
10
|
-
action_view/railtie
|
|
11
|
-
).each do |railtie|
|
|
12
|
-
begin
|
|
13
|
-
require railtie
|
|
14
|
-
rescue LoadError
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
# Require the gems listed in Gemfile, including any gems
|
|
20
|
-
# you've limited to :test, :development, or :production.
|
|
21
|
-
Bundler.require(*Rails.groups)
|
|
22
|
-
|
|
23
|
-
module DummyApp
|
|
24
|
-
class Application < Rails::Application
|
|
25
|
-
rails_version = Gem::Specification.find_by_name('rails').version
|
|
26
|
-
# Initialize configuration defaults for originally generated Rails version.
|
|
27
|
-
config.load_defaults rails_version.segments[0..1].join('.')
|
|
28
|
-
|
|
29
|
-
# Configuration for the application, engines, and railties goes here.
|
|
30
|
-
#
|
|
31
|
-
# These settings can be overridden in specific environments using the files
|
|
32
|
-
# in config/environments, which are processed later.
|
|
33
|
-
#
|
|
34
|
-
# config.time_zone = "Central Time (US & Canada)"
|
|
35
|
-
# config.eager_load_paths << Rails.root.join("extras")
|
|
36
|
-
|
|
37
|
-
# Only loads a smaller set of middleware suitable for API only apps.
|
|
38
|
-
# Middleware like session, flash, cookies can be added back manually.
|
|
39
|
-
# Skip views, helpers and assets when generating a new resource.
|
|
40
|
-
config.api_only = true
|
|
41
|
-
if rails_version < Gem::Version.new('7.0.0')
|
|
42
|
-
config.active_record.legacy_connection_handling = false
|
|
43
|
-
end
|
|
44
|
-
# config.active_job.queue_adapter = :async
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if defined?(FactoryBotRails)
|
|
48
|
-
config.factory_bot.definition_file_paths += [File.expand_path('../../spec/factories', __dir__)]
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|
data/dummy_app/config/boot.rb
DELETED
|
File without changes
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# SQLite. Versions 3.8.0 and up are supported.
|
|
2
|
-
# gem install sqlite3
|
|
3
|
-
#
|
|
4
|
-
# Ensure the SQLite 3 gem is defined in your Gemfile
|
|
5
|
-
# gem "sqlite3"
|
|
6
|
-
#
|
|
7
|
-
default_pg: &default_pg
|
|
8
|
-
adapter: 'postgresql'
|
|
9
|
-
username: postgres
|
|
10
|
-
password: postgres
|
|
11
|
-
host: localhost
|
|
12
|
-
port: 5532
|
|
13
|
-
pool: <%= Etc.nprocessors + 1 %>
|
|
14
|
-
timeout: 5000
|
|
15
|
-
prepared_statements: false
|
|
16
|
-
|
|
17
|
-
default_sqlite: &default_sqlite
|
|
18
|
-
adapter: 'sqlite3'
|
|
19
|
-
pool: <%= Etc.nprocessors + 1 %>
|
|
20
|
-
timeout: 1000
|
|
21
|
-
prepared_statements: false
|
|
22
|
-
migrations_paths: db/primary_sqlite
|
|
23
|
-
|
|
24
|
-
default_mysql: &default_mysql
|
|
25
|
-
adapter: 'mysql2'
|
|
26
|
-
username: root
|
|
27
|
-
host: 127.0.0.1
|
|
28
|
-
port: 3406
|
|
29
|
-
pool: <%= Etc.nprocessors + 1 %>
|
|
30
|
-
timeout: 5000
|
|
31
|
-
prepared_statements: false
|
|
32
|
-
migrations_paths: db/primary_mysql
|
|
33
|
-
|
|
34
|
-
default_trilogy: &default_trilogy
|
|
35
|
-
adapter: 'trilogy'
|
|
36
|
-
username: root
|
|
37
|
-
host: 127.0.0.1
|
|
38
|
-
port: 3406
|
|
39
|
-
pool: <%= Etc.nprocessors + 1 %>
|
|
40
|
-
timeout: 5000
|
|
41
|
-
prepared_statements: false
|
|
42
|
-
migrations_paths: db/primary_trilogy
|
|
43
|
-
|
|
44
|
-
development:
|
|
45
|
-
primary_pg:
|
|
46
|
-
<<: *default_pg
|
|
47
|
-
database: trx_ext
|
|
48
|
-
primary_sqlite:
|
|
49
|
-
<<: *default_sqlite
|
|
50
|
-
database: db/trx_ext.sqlite3
|
|
51
|
-
primary_mysql:
|
|
52
|
-
<<: *default_mysql
|
|
53
|
-
database: trx_ext
|
|
54
|
-
primary_trilogy:
|
|
55
|
-
<<: *default_trilogy
|
|
56
|
-
database: trx_ext_trilogy
|
|
57
|
-
|
|
58
|
-
test:
|
|
59
|
-
primary_pg:
|
|
60
|
-
<<: *default_pg
|
|
61
|
-
database: trx_ext_test
|
|
62
|
-
primary_sqlite:
|
|
63
|
-
<<: *default_sqlite
|
|
64
|
-
database: db/trx_ext_test.sqlite3
|
|
65
|
-
primary_mysql:
|
|
66
|
-
<<: *default_mysql
|
|
67
|
-
database: trx_ext_test
|
|
68
|
-
primary_trilogy:
|
|
69
|
-
<<: *default_trilogy
|
|
70
|
-
database: trx_ext_trilogy_test
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
require "active_support/core_ext/integer/time"
|
|
2
|
-
|
|
3
|
-
Rails.application.configure do
|
|
4
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
|
5
|
-
|
|
6
|
-
# In the development environment your application's code is reloaded any time
|
|
7
|
-
# it changes. This slows down response time but is perfect for development
|
|
8
|
-
# since you don't have to restart the web server when you make code changes.
|
|
9
|
-
config.cache_classes = false
|
|
10
|
-
|
|
11
|
-
# Do not eager load code on boot.
|
|
12
|
-
config.eager_load = false
|
|
13
|
-
|
|
14
|
-
# Show full error reports.
|
|
15
|
-
config.consider_all_requests_local = true
|
|
16
|
-
|
|
17
|
-
# Enable server timing
|
|
18
|
-
config.server_timing = true
|
|
19
|
-
|
|
20
|
-
# Enable/disable caching. By default caching is disabled.
|
|
21
|
-
# Run rails dev:cache to toggle caching.
|
|
22
|
-
if Rails.root.join("tmp/caching-dev.txt").exist?
|
|
23
|
-
config.cache_store = :memory_store
|
|
24
|
-
config.public_file_server.headers = {
|
|
25
|
-
"Cache-Control" => "public, max-age=#{2.days.to_i}"
|
|
26
|
-
}
|
|
27
|
-
else
|
|
28
|
-
config.action_controller.perform_caching = false
|
|
29
|
-
|
|
30
|
-
config.cache_store = :null_store
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# Store uploaded files on the local file system (see config/storage.yml for options).
|
|
34
|
-
# config.active_storage.service = :local
|
|
35
|
-
|
|
36
|
-
# Don't care if the mailer can't send.
|
|
37
|
-
# config.action_mailer.raise_delivery_errors = false
|
|
38
|
-
|
|
39
|
-
# config.action_mailer.perform_caching = false
|
|
40
|
-
|
|
41
|
-
# Print deprecation notices to the Rails logger.
|
|
42
|
-
config.active_support.deprecation = :log
|
|
43
|
-
|
|
44
|
-
# Raise exceptions for disallowed deprecations.
|
|
45
|
-
config.active_support.disallowed_deprecation = :raise
|
|
46
|
-
|
|
47
|
-
# Tell Active Support which deprecation messages to disallow.
|
|
48
|
-
config.active_support.disallowed_deprecation_warnings = []
|
|
49
|
-
|
|
50
|
-
# Raise an error on page load if there are pending migrations.
|
|
51
|
-
config.active_record.migration_error = :page_load
|
|
52
|
-
|
|
53
|
-
# Highlight code that triggered database queries in logs.
|
|
54
|
-
config.active_record.verbose_query_logs = true
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
# Raises error for missing translations.
|
|
58
|
-
# config.i18n.raise_on_missing_translations = true
|
|
59
|
-
|
|
60
|
-
# Annotate rendered view with file names.
|
|
61
|
-
# config.action_view.annotate_rendered_view_with_filenames = true
|
|
62
|
-
|
|
63
|
-
# Uncomment if you wish to allow Action Cable access from any origin.
|
|
64
|
-
# config.action_cable.disable_request_forgery_protection = true
|
|
65
|
-
config.logger = ActiveSupport::Logger.new(File.expand_path('../../../log/development.log', __dir__))
|
|
66
|
-
end
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
require "active_support/core_ext/integer/time"
|
|
2
|
-
|
|
3
|
-
# The test environment is used exclusively to run your application's
|
|
4
|
-
# test suite. You never need to work with it otherwise. Remember that
|
|
5
|
-
# your test database is "scratch space" for the test suite and is wiped
|
|
6
|
-
# and recreated between test runs. Don't rely on the data there!
|
|
7
|
-
|
|
8
|
-
Rails.application.configure do
|
|
9
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
|
10
|
-
|
|
11
|
-
# Turn false under Spring and add config.action_view.cache_template_loading = true.
|
|
12
|
-
config.cache_classes = true
|
|
13
|
-
|
|
14
|
-
# Eager loading loads your whole application. When running a single test locally,
|
|
15
|
-
# this probably isn't necessary. It's a good idea to do in a continuous integration
|
|
16
|
-
# system, or in some way before deploying your code.
|
|
17
|
-
config.eager_load = ENV["CI"].present?
|
|
18
|
-
|
|
19
|
-
# Configure public file server for tests with Cache-Control for performance.
|
|
20
|
-
config.public_file_server.enabled = true
|
|
21
|
-
config.public_file_server.headers = {
|
|
22
|
-
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
# Show full error reports and disable caching.
|
|
26
|
-
config.consider_all_requests_local = true
|
|
27
|
-
config.action_controller.perform_caching = false
|
|
28
|
-
config.cache_store = :null_store
|
|
29
|
-
|
|
30
|
-
# Raise exceptions instead of rendering exception templates.
|
|
31
|
-
config.action_dispatch.show_exceptions = false
|
|
32
|
-
|
|
33
|
-
# Disable request forgery protection in test environment.
|
|
34
|
-
config.action_controller.allow_forgery_protection = false
|
|
35
|
-
|
|
36
|
-
# Store uploaded files on the local file system in a temporary directory.
|
|
37
|
-
# config.active_storage.service = :test
|
|
38
|
-
|
|
39
|
-
# config.action_mailer.perform_caching = false
|
|
40
|
-
|
|
41
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
|
42
|
-
# The :test delivery method accumulates sent emails in the
|
|
43
|
-
# ActionMailer::Base.deliveries array.
|
|
44
|
-
# config.action_mailer.delivery_method = :test
|
|
45
|
-
|
|
46
|
-
# Print deprecation notices to the stderr.
|
|
47
|
-
config.active_support.deprecation = :stderr
|
|
48
|
-
|
|
49
|
-
# Raise exceptions for disallowed deprecations.
|
|
50
|
-
config.active_support.disallowed_deprecation = :raise
|
|
51
|
-
|
|
52
|
-
# Tell Active Support which deprecation messages to disallow.
|
|
53
|
-
config.active_support.disallowed_deprecation_warnings = []
|
|
54
|
-
|
|
55
|
-
# Raises error for missing translations.
|
|
56
|
-
# config.i18n.raise_on_missing_translations = true
|
|
57
|
-
|
|
58
|
-
# Annotate rendered view with file names.
|
|
59
|
-
# config.action_view.annotate_rendered_view_with_filenames = true
|
|
60
|
-
config.logger = ActiveSupport::Logger.new(File.expand_path('../../../log/test.log', __dir__))
|
|
61
|
-
end
|
|
File without changes
|
data/dummy_app/config/puma.rb
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# Puma can serve each request in a thread from an internal thread pool.
|
|
2
|
-
# The `threads` method setting takes two numbers: a minimum and maximum.
|
|
3
|
-
# Any libraries that use thread pools should be configured to match
|
|
4
|
-
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
|
5
|
-
# and maximum; this matches the default thread size of Active Record.
|
|
6
|
-
#
|
|
7
|
-
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
|
8
|
-
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
|
|
9
|
-
threads min_threads_count, max_threads_count
|
|
10
|
-
|
|
11
|
-
# Specifies the `worker_timeout` threshold that Puma will use to wait before
|
|
12
|
-
# terminating a worker in development environments.
|
|
13
|
-
#
|
|
14
|
-
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
|
|
15
|
-
|
|
16
|
-
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
|
17
|
-
#
|
|
18
|
-
port ENV.fetch("PORT") { 3000 }
|
|
19
|
-
|
|
20
|
-
# Specifies the `environment` that Puma will run in.
|
|
21
|
-
#
|
|
22
|
-
environment ENV.fetch("RAILS_ENV") { "development" }
|
|
23
|
-
|
|
24
|
-
# Specifies the `pidfile` that Puma will use.
|
|
25
|
-
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
|
|
26
|
-
|
|
27
|
-
# Specifies the number of `workers` to boot in clustered mode.
|
|
28
|
-
# Workers are forked web server processes. If using threads and workers together
|
|
29
|
-
# the concurrency of the application would be max `threads` * `workers`.
|
|
30
|
-
# Workers do not work on JRuby or Windows (both of which do not support
|
|
31
|
-
# processes).
|
|
32
|
-
#
|
|
33
|
-
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
|
|
34
|
-
|
|
35
|
-
# Use the `preload_app!` method when specifying a `workers` number.
|
|
36
|
-
# This directive tells Puma to first boot the application and load code
|
|
37
|
-
# before forking the application. This takes advantage of Copy On Write
|
|
38
|
-
# process behavior so workers use less memory.
|
|
39
|
-
#
|
|
40
|
-
# preload_app!
|
|
41
|
-
|
|
42
|
-
# Allow puma to be restarted by `bin/rails restart` command.
|
|
43
|
-
plugin :tmp_restart
|
data/dummy_app/config/routes.rb
DELETED
data/dummy_app/config.ru
DELETED
data/dummy_app/db/migrate/.keep
DELETED
|
File without changes
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
class CreateDummyRecord < ActiveRecord::Migration[6.1]
|
|
2
|
-
def change
|
|
3
|
-
create_table :dummy_pg_records do |t|
|
|
4
|
-
t.string :name
|
|
5
|
-
t.string :unique_name
|
|
6
|
-
t.datetime :created_at, precision: 6, null: false
|
|
7
|
-
end
|
|
8
|
-
add_index :dummy_pg_records, :unique_name, unique: true
|
|
9
|
-
end
|
|
10
|
-
end
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
class CreateDummyMysqlRecord < ActiveRecord::Migration[6.1]
|
|
2
|
-
def change
|
|
3
|
-
create_table :dummy_mysql_records do |t|
|
|
4
|
-
t.string :name
|
|
5
|
-
t.string :unique_name
|
|
6
|
-
t.datetime :created_at, precision: 6, null: false
|
|
7
|
-
end
|
|
8
|
-
add_index :dummy_mysql_records, :unique_name, unique: true
|
|
9
|
-
end
|
|
10
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# This file is auto-generated from the current state of the database. Instead
|
|
2
|
-
# of editing this file, please use the migrations feature of Active Record to
|
|
3
|
-
# incrementally modify your database, and then regenerate this schema definition.
|
|
4
|
-
#
|
|
5
|
-
# This file is the source Rails uses to define your schema when running `bin/rails
|
|
6
|
-
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
|
7
|
-
# be faster and is potentially less error prone than running all of your
|
|
8
|
-
# migrations from scratch. Old migrations may fail to apply correctly if those
|
|
9
|
-
# migrations use external dependencies or application code.
|
|
10
|
-
#
|
|
11
|
-
# It's strongly recommended that you check this file into your version control system.
|
|
12
|
-
|
|
13
|
-
ActiveRecord::Schema[7.2].define(version: 2024_01_28_111549) do
|
|
14
|
-
create_table "dummy_mysql_records", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
|
15
|
-
t.datetime "created_at", null: false
|
|
16
|
-
t.string "name"
|
|
17
|
-
t.string "unique_name"
|
|
18
|
-
t.index ["unique_name"], name: "index_dummy_mysql_records_on_unique_name", unique: true
|
|
19
|
-
end
|
|
20
|
-
end
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
class CreateDummySqliteRecord < ActiveRecord::Migration[6.1]
|
|
2
|
-
def change
|
|
3
|
-
create_table :dummy_sqlite_records do |t|
|
|
4
|
-
t.string :name
|
|
5
|
-
t.string :unique_name
|
|
6
|
-
t.datetime :created_at, precision: 6, null: false
|
|
7
|
-
end
|
|
8
|
-
add_index :dummy_sqlite_records, :unique_name, unique: true
|
|
9
|
-
end
|
|
10
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# This file is auto-generated from the current state of the database. Instead
|
|
2
|
-
# of editing this file, please use the migrations feature of Active Record to
|
|
3
|
-
# incrementally modify your database, and then regenerate this schema definition.
|
|
4
|
-
#
|
|
5
|
-
# This file is the source Rails uses to define your schema when running `bin/rails
|
|
6
|
-
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
|
7
|
-
# be faster and is potentially less error prone than running all of your
|
|
8
|
-
# migrations from scratch. Old migrations may fail to apply correctly if those
|
|
9
|
-
# migrations use external dependencies or application code.
|
|
10
|
-
#
|
|
11
|
-
# It's strongly recommended that you check this file into your version control system.
|
|
12
|
-
|
|
13
|
-
ActiveRecord::Schema[7.2].define(version: 2024_01_28_111549) do
|
|
14
|
-
create_table "dummy_sqlite_records", force: :cascade do |t|
|
|
15
|
-
t.datetime "created_at", null: false
|
|
16
|
-
t.string "name"
|
|
17
|
-
t.string "unique_name"
|
|
18
|
-
t.index ["unique_name"], name: "index_dummy_sqlite_records_on_unique_name", unique: true
|
|
19
|
-
end
|
|
20
|
-
end
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
class CreateDummyTrilogyRecord < ActiveRecord::Migration[6.1]
|
|
2
|
-
def change
|
|
3
|
-
create_table :dummy_trilogy_records do |t|
|
|
4
|
-
t.string :name
|
|
5
|
-
t.string :unique_name
|
|
6
|
-
t.datetime :created_at, precision: 6, null: false
|
|
7
|
-
end
|
|
8
|
-
add_index :dummy_trilogy_records, :unique_name, unique: true
|
|
9
|
-
end
|
|
10
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# This file is auto-generated from the current state of the database. Instead
|
|
2
|
-
# of editing this file, please use the migrations feature of Active Record to
|
|
3
|
-
# incrementally modify your database, and then regenerate this schema definition.
|
|
4
|
-
#
|
|
5
|
-
# This file is the source Rails uses to define your schema when running `bin/rails
|
|
6
|
-
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
|
7
|
-
# be faster and is potentially less error prone than running all of your
|
|
8
|
-
# migrations from scratch. Old migrations may fail to apply correctly if those
|
|
9
|
-
# migrations use external dependencies or application code.
|
|
10
|
-
#
|
|
11
|
-
# It's strongly recommended that you check this file into your version control system.
|
|
12
|
-
|
|
13
|
-
ActiveRecord::Schema[7.2].define(version: 2024_01_28_111549) do
|
|
14
|
-
create_table "dummy_trilogy_records", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
|
15
|
-
t.datetime "created_at", null: false
|
|
16
|
-
t.string "name"
|
|
17
|
-
t.string "unique_name"
|
|
18
|
-
t.index ["unique_name"], name: "index_dummy_trilogy_records_on_unique_name", unique: true
|
|
19
|
-
end
|
|
20
|
-
end
|
data/dummy_app/db/schema.rb
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# This file is auto-generated from the current state of the database. Instead
|
|
2
|
-
# of editing this file, please use the migrations feature of Active Record to
|
|
3
|
-
# incrementally modify your database, and then regenerate this schema definition.
|
|
4
|
-
#
|
|
5
|
-
# This file is the source Rails uses to define your schema when running `bin/rails
|
|
6
|
-
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
|
7
|
-
# be faster and is potentially less error prone than running all of your
|
|
8
|
-
# migrations from scratch. Old migrations may fail to apply correctly if those
|
|
9
|
-
# migrations use external dependencies or application code.
|
|
10
|
-
#
|
|
11
|
-
# It's strongly recommended that you check this file into your version control system.
|
|
12
|
-
|
|
13
|
-
ActiveRecord::Schema[7.2].define(version: 2024_01_28_111549) do
|
|
14
|
-
# These are extensions that must be enabled in order to support this database
|
|
15
|
-
enable_extension "pg_catalog.plpgsql"
|
|
16
|
-
|
|
17
|
-
create_table "dummy_pg_records", force: :cascade do |t|
|
|
18
|
-
t.datetime "created_at", null: false
|
|
19
|
-
t.string "name"
|
|
20
|
-
t.string "unique_name"
|
|
21
|
-
t.index ["unique_name"], name: "index_dummy_pg_records_on_unique_name", unique: true
|
|
22
|
-
end
|
|
23
|
-
end
|
data/dummy_app/db/seeds.rb
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# This file should contain all the record creation needed to seed the database with its default values.
|
|
2
|
-
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
|
|
3
|
-
#
|
|
4
|
-
# Examples:
|
|
5
|
-
#
|
|
6
|
-
# movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }])
|
|
7
|
-
# Character.create(name: "Luke", movie: movies.first)
|
data/dummy_app/lib/tasks/.keep
DELETED
|
File without changes
|
data/dummy_app/log/.keep
DELETED
|
File without changes
|
data/dummy_app/public/robots.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
|
data/dummy_app/storage/.keep
DELETED
|
File without changes
|
data/dummy_app/tmp/.keep
DELETED
|
File without changes
|
data/dummy_app/vendor/.keep
DELETED
|
File without changes
|
data/log/.gitkeep
DELETED
|
File without changes
|
data/trx_ext.gemspec
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "lib/trx_ext/version"
|
|
4
|
-
|
|
5
|
-
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name = "trx_ext"
|
|
7
|
-
spec.version = TrxExt::VERSION
|
|
8
|
-
spec.authors = ["Ivan Dzyzenko"]
|
|
9
|
-
spec.email = ["ivan.dzyzenko@gmail.com"]
|
|
10
|
-
|
|
11
|
-
spec.summary = "ActiveRecord's transaction extension"
|
|
12
|
-
spec.description = "Allow you to retry deadlocks, serialization errors, non-unique errors."
|
|
13
|
-
spec.homepage = "https://github.com/intale/trx_ext"
|
|
14
|
-
spec.license = "MIT"
|
|
15
|
-
spec.required_ruby_version = ">= 3.1.0"
|
|
16
|
-
|
|
17
|
-
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
|
18
|
-
|
|
19
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
|
20
|
-
spec.metadata["source_code_uri"] = "https://github.com/intale/trx_ext/tree/v#{spec.version}"
|
|
21
|
-
spec.metadata["changelog_uri"] = "https://github.com/intale/trx_ext/blob/v#{spec.version}/CHANGELOG.md"
|
|
22
|
-
|
|
23
|
-
# Specify which files should be added to the gem when it is released.
|
|
24
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
25
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
26
|
-
`git ls-files -z`.split("\x0").reject do |f|
|
|
27
|
-
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
spec.bindir = "exe"
|
|
31
|
-
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
32
|
-
spec.require_paths = ["lib"]
|
|
33
|
-
|
|
34
|
-
spec.add_dependency 'activerecord', '>= 7.2', '< 8.2'
|
|
35
|
-
end
|