combustion 1.3.1 → 1.3.5
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/Appraisals +30 -15
- data/Gemfile +5 -1
- data/README.md +3 -1
- data/lib/combustion/configurations/active_record.rb +5 -0
- data/lib/combustion.rb +27 -18
- data/spec/dummy/spec/internal/config/database.yml +4 -0
- metadata +12 -19
- data/spec/dummy/spec/internal/log/development.log +0 -52
- data/spec/dummy/spec/internal/log/test.log +0 -4840
- data/spec/dummy/spec/internal/test +0 -0
- data/spec/dummy/spec/internal/test_another +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08458ed30f386ac27b19a50f31ebfa268b27cd2851f5e784ab9c9684e5e8591e'
|
4
|
+
data.tar.gz: 53410691043777b5fcb81b06ddf0d415e17bdcd81f1e0382db354fb3a8002b4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fb571edaf37a71657c218d57600c56faf2e5bfaabb0b90155cfb10716073ee11f9044eda12b2808819ba8c0a7ed85a5a5446f209a99c6d1fc347607fc145e13
|
7
|
+
data.tar.gz: 9d5667930b7bde63172f2a2accb24ca2e09ddb7ae88c33548d8eec0b9cfb6fc16870ddf9c3558de0c9e9a815929ebfe6d3099467cb19458459259b5915ba5877
|
data/Appraisals
CHANGED
@@ -37,21 +37,23 @@ if RUBY_VERSION.to_f <= 2.3
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
40
|
+
if RUBY_VERSION.to_f < 3.0
|
41
|
+
appraise "rails-5.0" do
|
42
|
+
gem "rails", "~> 5.0.2"
|
43
|
+
gem "mysql2", "~> 0.4.4"
|
44
|
+
gem "pg", "< 1.0"
|
45
|
+
end
|
45
46
|
|
46
|
-
appraise "rails-5.1" do
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
end
|
47
|
+
appraise "rails-5.1" do
|
48
|
+
gem "rails", "~> 5.1.0"
|
49
|
+
gem "mysql2", "~> 0.4.4"
|
50
|
+
gem "pg", "< 1.0"
|
51
|
+
end
|
51
52
|
|
52
|
-
appraise "rails-5.2" do
|
53
|
-
|
54
|
-
|
53
|
+
appraise "rails-5.2" do
|
54
|
+
gem "rails", "~> 5.2.0"
|
55
|
+
gem "mysql2", "~> 0.5.0"
|
56
|
+
end
|
55
57
|
end
|
56
58
|
|
57
59
|
if RUBY_VERSION.to_f >= 2.5
|
@@ -61,9 +63,22 @@ if RUBY_VERSION.to_f >= 2.5
|
|
61
63
|
gem "sqlite3", "~> 1.4"
|
62
64
|
end
|
63
65
|
|
66
|
+
appraise "rails-6.1" do
|
67
|
+
gem "rails", "~> 6.1.0"
|
68
|
+
gem "mysql2", "~> 0.5.0"
|
69
|
+
gem "sqlite3", "~> 1.4"
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
if RUBY_VERSION.to_f >= 2.7
|
74
|
+
appraise "rails-7.0" do
|
75
|
+
gem "rails", "~> 7.0.0.alpha2"
|
76
|
+
gem "mysql2", "~> 0.5.0"
|
77
|
+
gem "sqlite3", "~> 1.4"
|
78
|
+
end
|
79
|
+
|
64
80
|
appraise "rails-edge" do
|
65
|
-
gem "rails", :git => "https://github.com/rails/rails.git"
|
66
|
-
gem "arel", :git => "https://github.com/rails/arel.git"
|
81
|
+
gem "rails", :git => "https://github.com/rails/rails.git", :branch => "main"
|
67
82
|
gem "mysql2", "~> 0.5.0"
|
68
83
|
gem "sqlite3", "~> 1.4"
|
69
84
|
end
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -37,6 +37,8 @@ RSpec.configure do |config|
|
|
37
37
|
end
|
38
38
|
```
|
39
39
|
|
40
|
+
Please note that using `:all` as an argument for `Combustion.initialize!` will load all key parts of Rails that are considered essential for that version. For example: ActiveJob is only loaded for Rails 4.2 onwards, and Sprockets is only loaded for Rails 3.1-6.1 (as it is no longer part of the default set in 7.0).
|
41
|
+
|
40
42
|
You'll also want to run the generator that creates a minimal set of files expected by Rails - run this in the directory of your engine:
|
41
43
|
|
42
44
|
```shell
|
@@ -208,4 +210,4 @@ The tests are extremely minimal, and patches to extend the suite are especially
|
|
208
210
|
|
209
211
|
## Credits
|
210
212
|
|
211
|
-
Copyright (c) 2011-
|
213
|
+
Copyright (c) 2011-2021, Combustion is developed and maintained by Pat Allan, and is released under the open MIT Licence. Many thanks to HyperTiny for encouraging its development, and [all who have contributed patches](https://github.com/pat/combustion/contributors).
|
@@ -3,6 +3,11 @@
|
|
3
3
|
class Combustion::Configurations::ActiveRecord
|
4
4
|
def self.call(config)
|
5
5
|
return unless defined?(ActiveRecord::Railtie)
|
6
|
+
|
7
|
+
if ActiveRecord::VERSION::MAJOR >= 7
|
8
|
+
config.active_record.legacy_connection_handling = false
|
9
|
+
end
|
10
|
+
|
6
11
|
return unless ::ActiveRecord.constants.include?(:MassAssignmentSecurity)
|
7
12
|
|
8
13
|
# Turn on ActiveRecord attribute whitelisting
|
data/lib/combustion.rb
CHANGED
@@ -12,30 +12,39 @@ module Combustion
|
|
12
12
|
self.path = "/spec/internal"
|
13
13
|
self.schema_format = :ruby
|
14
14
|
|
15
|
-
MODULES =
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
15
|
+
MODULES = {
|
16
|
+
:active_model => "active_model/railtie",
|
17
|
+
:active_record => "active_record/railtie",
|
18
|
+
:action_controller => "action_controller/railtie",
|
19
|
+
:action_mailer => "action_mailer/railtie",
|
20
|
+
:action_view => "action_view/railtie",
|
21
|
+
:sprockets => "sprockets/railtie",
|
22
|
+
:active_job => "active_job/railtie",
|
23
|
+
:action_cable => "action_cable/engine",
|
24
|
+
:active_storage => "active_storage/engine",
|
25
|
+
:action_text => "action_text/engine",
|
26
|
+
:action_mailbox => "action_mailbox/engine"
|
27
|
+
}.freeze
|
28
|
+
|
29
|
+
AVAILABLE_MODULES = begin
|
30
|
+
keys = MODULES.keys
|
31
|
+
version = Rails.version.to_f
|
32
|
+
|
33
|
+
keys.delete(:sprockets) unless (3.1..6.1).include?(version)
|
34
|
+
keys.delete(:active_job) unless version >= 4.2
|
35
|
+
keys.delete(:action_cable) unless version >= 5.0
|
36
|
+
keys.delete(:active_storage) unless version >= 5.2
|
37
|
+
keys.delete(:action_text) unless version >= 6.0
|
38
|
+
keys.delete(:action_mailbox) unless version >= 6.0
|
39
|
+
|
40
|
+
keys
|
32
41
|
end.freeze
|
33
42
|
|
34
43
|
def self.initialize!(*modules, &block)
|
35
44
|
self.setup_environment = block if block_given?
|
36
45
|
|
37
46
|
options = modules.extract_options!
|
38
|
-
modules =
|
47
|
+
modules = AVAILABLE_MODULES if modules == [:all]
|
39
48
|
modules.each { |mod| require MODULES.fetch(mod, "#{mod}/railtie") }
|
40
49
|
|
41
50
|
Bundler.require :default, Rails.env
|
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.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pat Allan
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.
|
61
|
+
version: '2.3'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 2.
|
68
|
+
version: '2.3'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: mysql2
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 0.81.0
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: 0.81.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: sqlite3
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -193,10 +193,6 @@ files:
|
|
193
193
|
- spec/dummy/spec/internal/config/database.yml
|
194
194
|
- spec/dummy/spec/internal/config/routes.rb
|
195
195
|
- spec/dummy/spec/internal/db/schema.rb
|
196
|
-
- spec/dummy/spec/internal/log/development.log
|
197
|
-
- spec/dummy/spec/internal/log/test.log
|
198
|
-
- spec/dummy/spec/internal/test
|
199
|
-
- spec/dummy/spec/internal/test_another
|
200
196
|
- spec/spec_helper.rb
|
201
197
|
- templates/config.ru
|
202
198
|
- templates/database.yml
|
@@ -206,8 +202,9 @@ files:
|
|
206
202
|
homepage: https://github.com/pat/combustion
|
207
203
|
licenses:
|
208
204
|
- MIT
|
209
|
-
metadata:
|
210
|
-
|
205
|
+
metadata:
|
206
|
+
rubygems_mfa_required: 'true'
|
207
|
+
post_install_message:
|
211
208
|
rdoc_options: []
|
212
209
|
require_paths:
|
213
210
|
- lib
|
@@ -222,8 +219,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
219
|
- !ruby/object:Gem::Version
|
223
220
|
version: '0'
|
224
221
|
requirements: []
|
225
|
-
rubygems_version: 3.
|
226
|
-
signing_key:
|
222
|
+
rubygems_version: 3.1.6
|
223
|
+
signing_key:
|
227
224
|
specification_version: 4
|
228
225
|
summary: Elegant Rails Engine Testing
|
229
226
|
test_files:
|
@@ -231,13 +228,9 @@ test_files:
|
|
231
228
|
- spec/dummy/spec/internal/app/models/model.rb
|
232
229
|
- spec/dummy/spec/internal/app/models/model_in_another_db.rb
|
233
230
|
- spec/dummy/spec/internal/app/assets/config/manifest.js
|
234
|
-
- spec/dummy/spec/internal/test
|
235
231
|
- spec/dummy/spec/internal/config/routes.rb
|
236
232
|
- spec/dummy/spec/internal/config/database.yml
|
237
233
|
- spec/dummy/spec/internal/db/schema.rb
|
238
|
-
- spec/dummy/spec/internal/log/test.log
|
239
|
-
- spec/dummy/spec/internal/log/development.log
|
240
|
-
- spec/dummy/spec/internal/test_another
|
241
234
|
- spec/dummy/lib/engine.rb
|
242
235
|
- spec/dummy/db/migrate/20150717075542_create_dummy_test_table.rb
|
243
236
|
- spec/dummy/db/migrate/20150717075543_create_dummy_test_table_in_another_db.rb
|
@@ -1,52 +0,0 @@
|
|
1
|
-
[1m[35m (215.8ms)[0m [1m[35mDROP DATABASE IF EXISTS "test"[0m
|
2
|
-
[1m[35m (481.0ms)[0m [1m[35mCREATE DATABASE "test" ENCODING = 'utf8'[0m
|
3
|
-
[1m[35m (214.9ms)[0m [1m[35mDROP DATABASE IF EXISTS "test_another"[0m
|
4
|
-
[1m[35m (487.9ms)[0m [1m[35mCREATE DATABASE "test_another" ENCODING = 'utf8'[0m
|
5
|
-
[1m[35m (6.6ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
6
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.8ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
7
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
8
|
-
[1m[35mSQL (0.9ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2018-02-10 01:18:56.230481"], ["updated_at", "2018-02-10 01:18:56.230481"]]
|
9
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
10
|
-
[1m[35m (4.1ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
11
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(7458657555131878620);[0m
|
12
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
13
|
-
Migrating to CreateDummyTestTable (20150717075542)
|
14
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
15
|
-
[1m[35m (3.3ms)[0m [1m[35mCREATE TABLE "dummy_table" ("id" serial NOT NULL PRIMARY KEY)[0m
|
16
|
-
[1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20150717075542"]]
|
17
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
18
|
-
Migrating to CreateDummyTestTableInAnotherDb (20150717075543)
|
19
|
-
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
20
|
-
[1m[35m (8.3ms)[0m [1m[35mCREATE TABLE "dummy_in_another_db" ("id" serial NOT NULL PRIMARY KEY)[0m
|
21
|
-
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20150717075543"]]
|
22
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
23
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
24
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
25
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
26
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(7458657555131878620)[0m
|
27
|
-
[1m[35m (212.2ms)[0m [1m[35mDROP DATABASE IF EXISTS "test"[0m
|
28
|
-
[1m[35m (456.5ms)[0m [1m[35mCREATE DATABASE "test" ENCODING = 'utf8'[0m
|
29
|
-
[1m[35m (195.0ms)[0m [1m[35mDROP DATABASE IF EXISTS "test_another"[0m
|
30
|
-
[1m[35m (476.9ms)[0m [1m[35mCREATE DATABASE "test_another" ENCODING = 'utf8'[0m
|
31
|
-
[1m[35m (6.7ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
32
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
33
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
34
|
-
[1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2018-02-10 01:20:13.372972"], ["updated_at", "2018-02-10 01:20:13.372972"]]
|
35
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
36
|
-
[1m[35m (4.7ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
37
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(7458657555131878620);[0m
|
38
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
39
|
-
Migrating to CreateDummyTestTable (20150717075542)
|
40
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
41
|
-
[1m[35m (3.2ms)[0m [1m[35mCREATE TABLE "dummy_table" ("id" serial NOT NULL PRIMARY KEY)[0m
|
42
|
-
[1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20150717075542"]]
|
43
|
-
[1m[35m (0.7ms)[0m [1m[35mCOMMIT[0m
|
44
|
-
Migrating to CreateDummyTestTableInAnotherDb (20150717075543)
|
45
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
46
|
-
[1m[35m (8.1ms)[0m [1m[35mCREATE TABLE "dummy_in_another_db" ("id" serial NOT NULL PRIMARY KEY)[0m
|
47
|
-
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20150717075543"]]
|
48
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
49
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
50
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
51
|
-
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
52
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(7458657555131878620)[0m
|