combustion 1.3.7 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f1711b9227a3380ca45ec3ef61bad5c51d4c4b1a9cec64ac3ae625053e7d0b2
4
- data.tar.gz: 4f32ad94b89241916ce2b1d7beeacbb90989f91c51c05f9ba60fb4baaf0ace11
3
+ metadata.gz: 022c30e0d3b5dd020d5765951897e91fd4d33725c87b54ce0370e2fdcaea67c8
4
+ data.tar.gz: 5f53fd6cef1a7c7c92f9618d37b852d446d565edc3019a2cd0a96f244c08c2e2
5
5
  SHA512:
6
- metadata.gz: 37fadb5aff4c5c40321bed3dc1f86a62b5fa1aed07e0355c6ace3bc5e86b153ae447622b6f2edf20ac91849a67add27b49ae9d7a13783f9d383499f193efed59
7
- data.tar.gz: 0ad2471f15f830383ef469c093701818c08d151958ee5e51b92ec4615c1d775d9ee198baf92c8e92ec772ff8cc019dca603378311c3cc081c08d790c279325da
6
+ metadata.gz: 3bacc58fd39c3708d26623631bb021f0a8c912e64ea9733cc6426dddeba9861e0a1af8fa75f7de18ebd6b3d567a873460d633976e263ce7f500c2224831546eb
7
+ data.tar.gz: de2cfdd55a3169eb14c89f3db2090f12b6df84dbeed539b13627c20eb7b696ff1ebef2be6b76c7bdbe2b4e609d2c6a727eabec142e9e9020859e34a91dd979d6
data/Appraisals CHANGED
@@ -1,42 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- if RUBY_VERSION.to_f <= 2.3
4
- appraise "rails-3.1" do
5
- gem "rails", "~> 3.1.12"
6
- gem "mysql2", "~> 0.3.10"
7
- gem "pg", "< 1.0"
8
- gem "bundler", "~> 1.17"
9
- end
10
-
11
- appraise "rails-3.2" do
12
- gem "rails", "~> 3.2.22.5"
13
- gem "mysql2", "~> 0.3.10"
14
- gem "pg", "< 1.0"
15
- gem "bundler", "~> 1.17"
16
- end
17
-
18
- appraise "rails-4.0" do
19
- gem "rails", "~> 4.0.13"
20
- gem "mysql2", "~> 0.3.10"
21
- gem "pg", "< 1.0"
22
- gem "bundler", "~> 1.17"
23
- end
24
-
25
- appraise "rails-4.1" do
26
- gem "rails", "~> 4.1.16"
27
- gem "mysql2", "~> 0.3.13"
28
- gem "pg", "< 1.0"
29
- gem "bundler", "~> 1.17"
30
- end
31
-
32
- appraise "rails-4.2" do
33
- gem "rails", "~> 4.2.8"
34
- gem "mysql2", "~> 0.4.4"
35
- gem "pg", "< 1.0"
36
- gem "bundler", "~> 1.17"
37
- end
38
- end
39
-
40
3
  if RUBY_VERSION.to_f < 3.0
41
4
  appraise "rails-5.0" do
42
5
  gem "rails", "~> 5.0.2"
@@ -60,7 +23,8 @@ if RUBY_VERSION.to_f >= 2.5 && RUBY_VERSION.to_f < 3.1
60
23
  appraise "rails-6.0" do
61
24
  gem "rails", "~> 6.0.0"
62
25
  gem "mysql2", "~> 0.5.0"
63
- gem "sqlite3", "~> 1.4"
26
+ gem "sqlite3", "~> 1.4", "< 1.5.0"
27
+ gem "activerecord-trilogy-adapter", "~> 3.1"
64
28
  end
65
29
  end
66
30
 
@@ -68,7 +32,8 @@ if RUBY_VERSION.to_f >= 2.5
68
32
  appraise "rails-6.1" do
69
33
  gem "rails", "~> 6.1.0"
70
34
  gem "mysql2", "~> 0.5.0"
71
- gem "sqlite3", "~> 1.4"
35
+ gem "sqlite3", "~> 1.4", "< 1.6.0"
36
+ gem "activerecord-trilogy-adapter", "~> 3.1"
72
37
  end
73
38
  end
74
39
 
@@ -77,11 +42,22 @@ if RUBY_VERSION.to_f >= 2.7
77
42
  gem "rails", "~> 7.0.1"
78
43
  gem "mysql2", "~> 0.5.0"
79
44
  gem "sqlite3", "~> 1.4"
45
+ gem "activerecord-trilogy-adapter", "~> 3.1"
46
+ end
47
+
48
+ appraise "rails-7.1" do
49
+ gem "rails", "~> 7.1.2"
50
+ gem "mysql2", "~> 0.5.0"
51
+ gem "sqlite3", "~> 1.4"
52
+ gem "trilogy", "~> 2.7"
80
53
  end
54
+ end
81
55
 
56
+ if RUBY_VERSION.to_f >= 3.1
82
57
  appraise "rails-edge" do
83
58
  gem "rails", :git => "https://github.com/rails/rails.git", :branch => "main"
84
59
  gem "mysql2", "~> 0.5.0"
85
60
  gem "sqlite3", "~> 1.4"
61
+ gem "trilogy", "~> 2.7"
86
62
  end
87
63
  end
data/Gemfile CHANGED
@@ -10,16 +10,8 @@ else
10
10
  gem "sqlite3", "~> 1.4"
11
11
  end
12
12
 
13
- if RUBY_VERSION.to_f < 2.3
14
- gem "i18n", "< 1.6"
15
- gem "nio4r", "< 2.4"
16
- gem "nokogiri", "< 1.10.3"
17
- end
18
-
19
- if RUBY_VERSION.to_f > 2.4
20
- gem "rubocop", "~> 0.92"
21
- gem "rubocop-packaging", "~> 0.5"
22
- end
13
+ gem "rubocop", "~> 0.92"
14
+ gem "rubocop-packaging", "~> 0.5"
23
15
 
24
16
  # Required for testing Rails 6.1 on MRI 3.1+
25
17
  gem "net-smtp" if RUBY_VERSION.to_f > 3.0
@@ -13,7 +13,11 @@ module Combustion
13
13
  Combustion::Configurations::ActiveStorage
14
14
  ].freeze
15
15
 
16
- rails_gate = VersionGate.new("rails")
16
+ rails_gate = VersionGate.new("railties")
17
+
18
+ if rails_gate.call(">= 7.2.0.alpha")
19
+ config.load_defaults Rails::VERSION::STRING.to_f
20
+ end
17
21
 
18
22
  # Core Settings
19
23
  config.cache_classes = true
@@ -25,6 +29,9 @@ module Combustion
25
29
  if rails_gate.call("< 5.2")
26
30
  config.secret_token = Digest::SHA1.hexdigest Time.now.to_s
27
31
  end
32
+ if rails_gate.call("~> 7.1.0.alpha")
33
+ config.active_support.cache_format_version = 7.1
34
+ end
28
35
 
29
36
  # ActiveSupport Settings
30
37
  config.active_support.deprecation = :stderr
@@ -7,7 +7,7 @@ class Combustion::Database::Reset
7
7
  UnsupportedDatabase = Class.new StandardError
8
8
 
9
9
  OPERATOR_PATTERNS = {
10
- Combustion::Databases::MySQL => [/mysql/],
10
+ Combustion::Databases::MySQL => [/mysql/, /trilogy/],
11
11
  Combustion::Databases::PostgreSQL => [/postgres/, /postgis/],
12
12
  Combustion::Databases::SQLite => [/sqlite/],
13
13
  Combustion::Databases::SQLServer => [/sqlserver/],
@@ -60,6 +60,8 @@ class Combustion::Databases::MySQL < Combustion::Databases::Base
60
60
  ArJdbcMySQL::Error
61
61
  elsif configuration[:adapter][/mysql2/] && defined?(Mysql2)
62
62
  Mysql2::Error
63
+ elsif configuration[:adapter][/trilogy/] && defined?(Trilogy)
64
+ Trilogy::Error
63
65
  else
64
66
  Mysql::Error
65
67
  end
@@ -2,7 +2,12 @@
2
2
 
3
3
  class Combustion::Databases::PostgreSQL < Combustion::Databases::Base
4
4
  def reset
5
- base.clear_active_connections!
5
+ if Combustion::VersionGate.call("activerecord", ">= 7.1.0.alpha")
6
+ base.connection_handler.clear_active_connections!
7
+ else
8
+ base.clear_active_connections!
9
+ end
10
+
6
11
  establish_connection(postgres_configuration)
7
12
 
8
13
  super
data/lib/combustion.rb CHANGED
@@ -30,7 +30,7 @@ module Combustion
30
30
 
31
31
  AVAILABLE_MODULES = begin
32
32
  keys = MODULES.keys
33
- rails_gate = VersionGate.new("rails")
33
+ rails_gate = VersionGate.new("railties")
34
34
 
35
35
  keys.delete(:sprockets) unless rails_gate.call(">= 3.1", "< 7.0")
36
36
  keys.delete(:active_job) unless rails_gate.call(">= 4.2")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: combustion
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.7
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Allan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-01 00:00:00.000000000 Z
11
+ date: 2024-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport