combustion 1.3.0 → 1.3.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54c7aefc5588e22af4d8d45e43d53b1237cd9dfe1e2b0e957b8ba57c7247f8b0
4
- data.tar.gz: e363d219c62d8c039eba2485ad3cfd5622e9eea2ffe3e2ba0fe96a12fd0271aa
3
+ metadata.gz: 7b3fd4577536b234e2a725161ea56238351c54784104bd7a69e484a5b1f33706
4
+ data.tar.gz: e390892995d4c40a4fbf786021f7512f93c4e12a0fc1e34fdc51223aa18a0d85
5
5
  SHA512:
6
- metadata.gz: 92db9e787d20abe7b10034368b49313911a9eb0e028319033e771a8048c5c901dd6618ee2973782ba9f1d748a41709990d94542358d1ab1dd1d6917ecd4ae2d8
7
- data.tar.gz: 7a55c366dd3773ea8775628297afc9a0fa870e8fbff31079820a72e253edb7bfd2e16f6648167dfcc6f19f199d4a4ddc2309454ed4ece88486241fafc53e3805
6
+ metadata.gz: d8b096fde78139237376b4495b992ea4f1ec63b07bc3974e94481f781e06e724b5a9b15bba014ed98abcf8a436a45b0f908fefb26cb62f284befe6ef7f45138c
7
+ data.tar.gz: 0cb0f385fe230abc83b7b90bbe2eb4f19725885203d0061ad36b99a35f250f4683e12412b270fe75d1fbeff2fdf9f3535f6b92fadf7308ea181caac7fe5e849a
data/Appraisals CHANGED
@@ -37,21 +37,23 @@ if RUBY_VERSION.to_f <= 2.3
37
37
  end
38
38
  end
39
39
 
40
- appraise "rails-5.0" do
41
- gem "rails", "~> 5.0.2"
42
- gem "mysql2", "~> 0.4.4"
43
- gem "pg", "< 1.0"
44
- end
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
- gem "rails", "~> 5.1.0"
48
- gem "mysql2", "~> 0.4.4"
49
- gem "pg", "< 1.0"
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
- gem "rails", "~> 5.2.0"
54
- gem "mysql2", "~> 0.5.0"
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
@@ -4,10 +4,19 @@ source "http://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
- gem "sqlite3", "~> 1.3.13"
7
+ if RUBY_VERSION.to_f < 3.0
8
+ gem "sqlite3", "~> 1.3.13"
9
+ else
10
+ gem "sqlite3", "~> 1.4"
11
+ end
8
12
 
9
13
  if RUBY_VERSION.to_f < 2.3
10
14
  gem "i18n", "< 1.6"
11
15
  gem "nio4r", "< 2.4"
12
16
  gem "nokogiri", "< 1.10.3"
13
17
  end
18
+
19
+ if RUBY_VERSION.to_f > 2.4
20
+ gem "rubocop", "~> 0.92"
21
+ gem "rubocop-packaging", "~> 0.5"
22
+ end
data/README.md CHANGED
@@ -13,7 +13,7 @@ Get the gem into either your gemspec or your Gemfile, depending on how you manag
13
13
  gem.add_development_dependency 'combustion', '~> 1.3'
14
14
 
15
15
  # Gemfile
16
- gem 'combustion', '~> 1.2'
16
+ gem 'combustion', '~> 1.3'
17
17
  ```
18
18
 
19
19
  In your `spec_helper.rb`, get Combustion to set itself up - which has to happen before you introduce `rspec/rails` and - if being used - `capybara/rails`. Here's an example within context:
@@ -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-2017, 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).
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
@@ -1,6 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Combustion::Database::Reset
4
+ # https://github.com/ruby/psych/pull/358/files#diff-fcdbfb11714f576f58ba9f866052bc79R322
5
+ RUBY_VERSION_WITH_NEW_SAFE_LOAD_METHOD_SIGNATURE = "2.6.0"
6
+
4
7
  UnsupportedDatabase = Class.new StandardError
5
8
 
6
9
  OPERATOR_PATTERNS = {
@@ -19,15 +22,22 @@ class Combustion::Database::Reset
19
22
  end
20
23
 
21
24
  def initialize
22
- ActiveRecord::Base.configurations = YAML.safe_load(
23
- ERB.new(database_yaml).result, [], [], true
24
- )
25
+ # TODO: remove when no longer support 2.5.8
26
+ if RUBY_VERSION >= RUBY_VERSION_WITH_NEW_SAFE_LOAD_METHOD_SIGNATURE
27
+ ActiveRecord::Base.configurations = YAML.safe_load(
28
+ ERB.new(database_yaml).result, :aliases => true
29
+ )
30
+ else
31
+ ActiveRecord::Base.configurations = YAML.safe_load(
32
+ ERB.new(database_yaml).result, [], [], true
33
+ )
34
+ end
25
35
  end
26
36
 
27
37
  def call
28
- resettable_db_configs.each_value do |configuration|
29
- adapter = configuration["adapter"] ||
30
- configuration["url"].split("://").first
38
+ resettable_db_configs.each do |configuration|
39
+ adapter = configuration[:adapter] ||
40
+ configuration[:url].split("://").first
31
41
 
32
42
  operator_class(adapter).new(configuration).reset
33
43
  end
@@ -52,10 +62,28 @@ class Combustion::Database::Reset
52
62
  # All database configs except Rails default environments
53
63
  # that are not currently in use
54
64
  def resettable_db_configs
65
+ if ActiveRecord::VERSION::STRING.to_f > 6.0
66
+ return resettable_db_configs_for_6_1
67
+ end
68
+
55
69
  all_configurations = ActiveRecord::Base.configurations.to_h
56
70
  unused_environments = RAILS_DEFAULT_ENVIRONMENTS - [Rails.env.to_s]
57
71
  resettable_environments = all_configurations.keys - unused_environments
58
72
 
59
- all_configurations.select { |name| resettable_environments.include?(name) }
73
+ all_configurations.
74
+ select { |name| resettable_environments.include?(name) }.
75
+ values.
76
+ collect(&:with_indifferent_access)
77
+ end
78
+
79
+ def resettable_db_configs_for_6_1
80
+ all_configurations = ActiveRecord::Base.configurations.configurations
81
+ unused_environments = RAILS_DEFAULT_ENVIRONMENTS - [Rails.env.to_s]
82
+ resettable_environments = all_configurations.collect(&:env_name).uniq -
83
+ unused_environments
84
+
85
+ all_configurations.
86
+ select { |config| resettable_environments.include?(config.env_name) }.
87
+ collect(&:configuration_hash)
60
88
  end
61
89
  end
@@ -4,7 +4,7 @@ class Combustion::Databases::MySQL < Combustion::Databases::Base
4
4
  ACCESS_DENIED_ERROR = 10_145
5
5
 
6
6
  def reset
7
- establish_connection(configuration.merge("database" => nil))
7
+ establish_connection(configuration.merge(:database => nil))
8
8
 
9
9
  super
10
10
  end
@@ -12,21 +12,21 @@ class Combustion::Databases::MySQL < Combustion::Databases::Base
12
12
  private
13
13
 
14
14
  def charset
15
- configuration["charset"] || ENV["CHARSET"] || "utf8"
15
+ configuration[:charset] || ENV["CHARSET"] || "utf8"
16
16
  end
17
17
 
18
18
  def charset_error
19
- return "" unless config["charset"]
19
+ return "" unless configuration[:charset]
20
20
 
21
21
  "(if you set the charset manually, make sure you have a matching collation)"
22
22
  end
23
23
 
24
24
  def collation
25
- configuration["collation"] || ENV["COLLATION"] || "utf8_unicode_ci"
25
+ configuration[:collation] || ENV["COLLATION"] || "utf8_unicode_ci"
26
26
  end
27
27
 
28
28
  def create
29
- connection.create_database configuration["database"], creation_options
29
+ connection.create_database configuration[:database], creation_options
30
30
  establish_connection configuration
31
31
  rescue error_class => error
32
32
  rescue_create_from error
@@ -34,12 +34,12 @@ class Combustion::Databases::MySQL < Combustion::Databases::Base
34
34
 
35
35
  def create_as_root(error)
36
36
  establish_connection configuration.merge(
37
- "database" => nil,
38
- "username" => "root",
39
- "password" => request_password(error)
37
+ :database => nil,
38
+ :username => "root",
39
+ :password => request_password(error)
40
40
  )
41
41
 
42
- connection.create_database config["database"], creation_options
42
+ connection.create_database configuration[:database], creation_options
43
43
  connection.execute grant_statement
44
44
 
45
45
  establish_connection configuration
@@ -50,15 +50,15 @@ class Combustion::Databases::MySQL < Combustion::Databases::Base
50
50
  end
51
51
 
52
52
  def drop
53
- connection.drop_database configuration["database"]
53
+ connection.drop_database configuration[:database]
54
54
  end
55
55
 
56
56
  def error_class
57
- if configuration["adapter"][/jdbc/]
57
+ if configuration[:adapter][/jdbc/]
58
58
  # FIXME: After Jdbcmysql gives this class
59
59
  require "active_record/railties/jdbcmysql_error"
60
60
  ArJdbcMySQL::Error
61
- elsif config["adapter"][/mysql2/] && defined?(Mysql2)
61
+ elsif configuration[:adapter][/mysql2/] && defined?(Mysql2)
62
62
  Mysql2::Error
63
63
  else
64
64
  Mysql::Error
@@ -68,8 +68,8 @@ class Combustion::Databases::MySQL < Combustion::Databases::Base
68
68
  def grant_statement
69
69
  <<-SQL
70
70
  GRANT ALL PRIVILEGES ON #{configuration["database"]}.*
71
- TO '#{configuration["username"]}'@'localhost'
72
- IDENTIFIED BY '#{configuration["password"]}' WITH GRANT OPTION;
71
+ TO '#{configuration[:username]}'@'localhost'
72
+ IDENTIFIED BY '#{configuration[:password]}' WITH GRANT OPTION;
73
73
  SQL
74
74
  end
75
75
 
@@ -91,7 +91,7 @@ Please provide the root password for your mysql installation
91
91
 
92
92
  warn <<-TXT
93
93
  #{error.error}
94
- Couldn't create database for #{config.inspect}, charset: #{charset}, collation: #{collation}
94
+ Couldn't create database for #{configuration.inspect}, charset: #{charset}, collation: #{collation}
95
95
  #{charset_error}
96
96
  TXT
97
97
  end
@@ -12,8 +12,8 @@ class Combustion::Databases::PostgreSQL < Combustion::Databases::Base
12
12
 
13
13
  def create
14
14
  connection.create_database(
15
- configuration["database"],
16
- configuration.merge("encoding" => encoding)
15
+ configuration[:database],
16
+ configuration.merge(:encoding => encoding)
17
17
  )
18
18
  rescue StandardError => error
19
19
  warn error, *error.backtrace
@@ -21,21 +21,21 @@ class Combustion::Databases::PostgreSQL < Combustion::Databases::Base
21
21
  end
22
22
 
23
23
  def drop
24
- connection.drop_database(configuration["database"])
24
+ connection.drop_database(configuration[:database])
25
25
  end
26
26
 
27
27
  def encoding
28
- configuration["encoding"] || ENV["CHARSET"] || "utf8"
28
+ configuration[:encoding] || ENV["CHARSET"] || "utf8"
29
29
  end
30
30
 
31
31
  def postgres_configuration
32
32
  configuration.merge(
33
- "database" => "postgres",
34
- "schema_search_path" => schema_search_path
33
+ :database => "postgres",
34
+ :schema_search_path => schema_search_path
35
35
  )
36
36
  end
37
37
 
38
38
  def schema_search_path
39
- configuration["adapter"][/postgis/] ? "public, postgis" : "public"
39
+ configuration[:adapter][/postgis/] ? "public, postgis" : "public"
40
40
  end
41
41
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  class Combustion::Databases::SQLServer < Combustion::Databases::Base
4
4
  def reset
5
- establish_connection configuration.merge("database" => "master")
6
- connection.recreate_database! configuration["database"]
5
+ establish_connection configuration.merge(:database => "master")
6
+ connection.recreate_database! configuration[:database]
7
7
  end
8
8
  end
@@ -8,7 +8,7 @@ class Combustion::Databases::SQLite < Combustion::Databases::Base
8
8
 
9
9
  def create
10
10
  if exists?
11
- warn "#{config["database"]} already exists"
11
+ warn "#{config[:database]} already exists"
12
12
  return
13
13
  end
14
14
 
@@ -32,6 +32,6 @@ class Combustion::Databases::SQLite < Combustion::Databases::Base
32
32
  end
33
33
 
34
34
  def path
35
- @path ||= Pathname.new configuration["database"]
35
+ @path ||= Pathname.new configuration[:database]
36
36
  end
37
37
  end
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 = begin
16
- hash = {
17
- :active_model => "active_model/railtie",
18
- :active_record => "active_record/railtie",
19
- :action_controller => "action_controller/railtie",
20
- :action_mailer => "action_mailer/railtie",
21
- :action_view => "action_view/railtie"
22
- }
23
-
24
- hash[:sprockets] = "sprockets/railtie" if Rails.version.to_f >= 3.1
25
- hash[:active_job] = "active_job/railtie" if Rails.version.to_f >= 4.2
26
- hash[:action_cable] = "action_cable/engine" if Rails.version.to_f >= 5.0
27
- hash[:active_storage] = "active_storage/engine" if Rails.version.to_f >= 5.2
28
- hash[:action_text] = "action_text/engine" if Rails.version.to_f >= 6.0
29
- hash[:action_mailbox] = "action_mailbox/engine" if Rails.version.to_f >= 6.0
30
-
31
- hash
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(:active_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 = MODULES.keys if modules == [:all]
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
@@ -14,11 +14,20 @@ RSpec.describe Combustion::Database do
14
14
  end
15
15
 
16
16
  it "returns test database for model with default connection" do
17
- expect(Model.connection_config[:database]).to match(/test/)
17
+ if ActiveRecord::VERSION::STRING.to_f > 6.0
18
+ expect(Model.connection_db_config.database).to match(/test/)
19
+ else
20
+ expect(Model.connection_config[:database]).to match(/test/)
21
+ end
18
22
  end
19
23
 
20
24
  it "returns test_another for model with connection to second database" do
21
- expect(ModelInAnotherDb.connection_config[:database]).
22
- to match(/test_another/)
25
+ if ActiveRecord::VERSION::STRING.to_f > 6.0
26
+ expect(ModelInAnotherDb.connection_db_config.database).
27
+ to match(/test_another/)
28
+ else
29
+ expect(ModelInAnotherDb.connection_config[:database]).
30
+ to match(/test_another/)
31
+ end
23
32
  end
24
33
  end
@@ -9,6 +9,10 @@ test: &defaults
9
9
  username: <%= ENV["DB_USERNAME"] %>
10
10
  <% end %>
11
11
 
12
+ <% if ENV["DB_PASSWORD"] %>
13
+ password: <%= ENV["DB_PASSWORD"] %>
14
+ <% end %>
15
+
12
16
 
13
17
  test_another:
14
18
  <<: *defaults
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "bundler/setup"
4
3
  require "combustion"
5
4
 
6
5
  if Rails::VERSION::STRING.to_f < 4.1
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.0
4
+ version: 1.3.4
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: 2020-04-20 00:00:00.000000000 Z
11
+ date: 2021-11-21 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.1.0
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.1.0
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: '0.81'
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: '0.81'
138
+ version: 0.81.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: sqlite3
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -158,17 +158,12 @@ executables:
158
158
  extensions: []
159
159
  extra_rdoc_files: []
160
160
  files:
161
- - ".gitignore"
162
161
  - ".rspec"
163
- - ".rubocop.yml"
164
- - ".travis.yml"
165
162
  - Appraisals
166
163
  - Gemfile
167
- - HISTORY
168
164
  - LICENCE
169
165
  - README.md
170
166
  - Rakefile
171
- - combustion.gemspec
172
167
  - exe/combust
173
168
  - lib/combustion.rb
174
169
  - lib/combustion/application.rb
@@ -198,7 +193,6 @@ files:
198
193
  - spec/dummy/spec/internal/config/database.yml
199
194
  - spec/dummy/spec/internal/config/routes.rb
200
195
  - spec/dummy/spec/internal/db/schema.rb
201
- - spec/dummy/spec/internal/log/.gitignore
202
196
  - spec/spec_helper.rb
203
197
  - templates/config.ru
204
198
  - templates/database.yml
@@ -208,8 +202,9 @@ files:
208
202
  homepage: https://github.com/pat/combustion
209
203
  licenses:
210
204
  - MIT
211
- metadata: {}
212
- post_install_message:
205
+ metadata:
206
+ rubygems_mfa_required: 'true'
207
+ post_install_message:
213
208
  rdoc_options: []
214
209
  require_paths:
215
210
  - lib
@@ -224,20 +219,23 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
219
  - !ruby/object:Gem::Version
225
220
  version: '0'
226
221
  requirements: []
227
- rubygems_version: 3.0.3
228
- signing_key:
222
+ rubygems_version: 3.1.6
223
+ signing_key:
229
224
  specification_version: 4
230
225
  summary: Elegant Rails Engine Testing
231
226
  test_files:
232
- - spec/database_spec.rb
233
- - spec/dummy/db/migrate/20150717075542_create_dummy_test_table.rb
234
- - spec/dummy/db/migrate/20150717075543_create_dummy_test_table_in_another_db.rb
235
- - spec/dummy/lib/engine.rb
236
- - spec/dummy/spec/internal/app/assets/config/manifest.js
227
+ - spec/spec_helper.rb
237
228
  - spec/dummy/spec/internal/app/models/model.rb
238
229
  - spec/dummy/spec/internal/app/models/model_in_another_db.rb
239
- - spec/dummy/spec/internal/config/database.yml
230
+ - spec/dummy/spec/internal/app/assets/config/manifest.js
240
231
  - spec/dummy/spec/internal/config/routes.rb
232
+ - spec/dummy/spec/internal/config/database.yml
241
233
  - spec/dummy/spec/internal/db/schema.rb
242
- - spec/dummy/spec/internal/log/.gitignore
243
- - spec/spec_helper.rb
234
+ - spec/dummy/lib/engine.rb
235
+ - spec/dummy/db/migrate/20150717075542_create_dummy_test_table.rb
236
+ - spec/dummy/db/migrate/20150717075543_create_dummy_test_table_in_another_db.rb
237
+ - spec/database_spec.rb
238
+ - ".rspec"
239
+ - Appraisals
240
+ - Gemfile
241
+ - Rakefile
data/.gitignore DELETED
@@ -1,12 +0,0 @@
1
- *.gem
2
- .bundle
3
- Gemfile.lock
4
- gemfiles/*.lock
5
- gemfiles/*.gemfile
6
- pkg/*
7
- .rubocop-*-yml
8
- .ruby-version
9
- .rvmrc
10
- spec/dummy/spec/internal/db/*.sqlite
11
- spec/dummy/spec/internal/test
12
- spec/dummy/spec/internal/test_another
data/.rubocop.yml DELETED
@@ -1,36 +0,0 @@
1
- inherit_from:
2
- - https://gist.githubusercontent.com/pat/ba3b8ffb1901bfe5439b460943b6b019/raw/.rubocop.yml
3
-
4
- Bundler/OrderedGems:
5
- Exclude:
6
- - 'gemfiles/*'
7
-
8
- Layout/DotPosition:
9
- EnforcedStyle: trailing
10
-
11
- Layout/CaseIndentation:
12
- EnforcedStyle: end
13
-
14
- Layout/EndAlignment:
15
- EnforcedStyleAlignWith: variable
16
-
17
- Layout/HeredocIndentation:
18
- Enabled: false
19
-
20
- Metrics/BlockLength:
21
- Exclude:
22
- - 'combustion.gemspec'
23
-
24
- Style/ClassAndModuleChildren:
25
- Enabled: false
26
-
27
- Style/Documentation:
28
- Enabled: false
29
-
30
- Style/FrozenStringLiteralComment:
31
- Exclude:
32
- - 'gemfiles/*'
33
-
34
- Style/MultilineTernaryOperator:
35
- Exclude:
36
- - 'spec/dummy/db/migrate/*.rb'
data/.travis.yml DELETED
@@ -1,23 +0,0 @@
1
- language: ruby
2
- dist: xenial
3
- env:
4
- matrix:
5
- - "DB_ADAPTER=sqlite3"
6
- - "DB_ADAPTER=postgresql"
7
- - "DB_ADAPTER=mysql2"
8
- rvm:
9
- - 2.3.8
10
- - 2.4.10
11
- - 2.5.8
12
- - 2.6.6
13
- - 2.7.1
14
- before_install:
15
- - gem install bundler --version "~> 1.17"
16
- install:
17
- - bundle _1.17.3_ install --jobs=3 --retry=3
18
- before_script:
19
- - bundle exec appraisal install
20
- script: bundle exec appraisal rake
21
- services:
22
- - mysql
23
- - postgresql
data/HISTORY DELETED
@@ -1,112 +0,0 @@
1
- 1.3.0 - April 20th 2020
2
- * Support ActiveJob, ActionCable, ActionText, ActionMailbox.
3
-
4
- 1.2.0 - April 18th 2020
5
- * Support ActiveStorage (Mikko Kokkonen).
6
-
7
- 1.1.2 - November 4th 2019
8
- * Generate an empty asset manifest file for Rails 6.
9
-
10
- 1.1.1 - August 3rd 2019
11
- * Fix for latest Rails 6.0 release candidate.
12
- * Test suite updates (Rails edge, sqlite3, Rubocop)
13
-
14
- 1.1.0 - February 13th 2019
15
- * Rails 6.0 support.
16
-
17
- 1.0.0 - October 3rd 2018
18
- * No functional changes.
19
- * Added documentation about database preparation options.
20
-
21
- 0.9.1 - April 25th 2018
22
- * Fix Rails 5.2 compatibility by not setting the deprecated secret_token configuration option.
23
-
24
- 0.9.0 - March 26th 2018
25
- * Only reset databases that are either custom or the current one (Moritz Winter).
26
- * More consistency around environment handling (rather than presuming it's always the test environment).
27
-
28
- 0.8.0 - February 1st 2018
29
- * Rails 5.2.0 support.
30
- * Requiring digest from std-lib directly.
31
- * Refactoring for cleaner code.
32
-
33
- 0.7.0 - June 20th 2017
34
- * Confirm support for MRI frozen string literals.
35
- * Hide migration output (Michael Grosser).
36
-
37
- 0.6.0 - March 28th 2017
38
- * Optionally disable database reset, schema loading, migrations (Sergey Kucher).
39
- * Allow for multiple test databases (Semyon Pupkov).
40
-
41
- 0.5.5 - July 23rd 2016
42
- * Add PostGIS support (Roland Koch).
43
- * MySQL parameter fix (Mathieu Leduc-Hamel).
44
-
45
- 0.5.4 - January 12th 2016
46
- * Remove silent_stream call for Rails 5.0 compatability (Bryan Ricker).
47
- * Fix duplicate migrations error (Semyon Pupkov).
48
-
49
- 0.5.3 - March 1st 2015
50
- * Use migrations from dependent gems (Korotaev Danil, Меркушин Михаил).
51
-
52
- 0.5.2 - July 18th 2014
53
- * Note MIT licence in gemspec (@ktdreyer).
54
- * Use local create/drop methods when resetting database (Bryan Ricker).
55
- * ERB is now supported in config/database.yml, matching Rails (@patorash).
56
- * The database now is configured before the application is loaded (@patorash).
57
- * Documentation and generated config.ru now specify explicly loading all Rails libraries by default (Pat Allan).
58
-
59
- 0.5.1 - July 25th 2013
60
- * Mass assignment errors raise exceptions instead of just being logged (Pat Allan).
61
- * whilelist_attributes is only set for Rails 3.2 apps (Philip Arndt).
62
- * Support ActiveRecord 3.0.x (Philip Arndt).
63
- * Allow custom application configuration (Pablo Herrero).
64
-
65
- 0.5.0 - May 1st 2013
66
- * whitelist_attributes is now set within configure_for_combustion, as it depends on which Railties are loaded.
67
- * Make sure Rails gems are loaded before the engine's gem (Pablo Herrero).
68
- * Fixed Rails version comparison (Josh Adam).
69
-
70
- 0.4.0 - March 16th 2013
71
- * Don't delete the SQLite test database if it doesn't exist (Michael Gee, Alexander Rozumiy).
72
- * Support for secret_key_base for Rails 4 apps (Philip Arndt).
73
- * eager_load is set to true when using the production environment (Philip Arndt).
74
- * whiny_nils is not set if using Rails 4 (Philip Arndt).
75
- * Mysql2 can raise Mysql::Error with JRuby (Philip Arndt).
76
- * Whitelist attributes typo is fixed (Geoff Hodgson).
77
- * Mass assignment checks are now turned on, so errors are raised. This matches Rails' defaults for test environments (Josh Adams).
78
- * Combustion no longer loads all of the Rails stack by default, just Railties and ActiveSupport. A combustion-rails gem will be created that uses all of Rails by default (Philip Arndt).
79
- * Combustion classes now all define the outer module, so each can be required by themselves, should you desire (Philip Arndt).
80
-
81
- 0.3.3 - December 23rd 2012
82
- * Removing version file - version number can just live in the gemspec.
83
- * Load ActionController and ActionMailer via their Railties, not non-existent Engines (Chris Beer).
84
- * SQL Schema support (Geoff Hodgson).
85
- * Documentation fixes (Philip Arndt, Inge Jørgensen, Erkan Yilmaz).
86
- * Include migrations from the internal app when migrating the database (Warren Seen).
87
- * Correctly drop the test database when using SQLite (Warren Seen).
88
- * Don't attempt to load sprockets for Rails 3.0.x (Alex Rozumey).
89
-
90
- 0.3.2 - March 3rd 2012
91
- * Tentative Rails 3.0 and migrations support.
92
- * Allow for different internal app directory.
93
-
94
- 0.3.1 - September 12th 2011
95
- * Allow for different versions of Capybara (Leo Liang).
96
- * Including Capybara::DSL instead of Capybara.
97
- * Require 3.1.0 or better.
98
- * Allow for JRuby in the database.yml template (Philip Arndt).
99
-
100
- 0.3.0 - September 2nd 2011
101
- * Simple generator to create a pretty minimal internal Rails app.
102
-
103
- 0.2.0 - August 30th 2011
104
- * Documentation.
105
- * Allow developers to choose which Rails modules they wish to be loaded.
106
- * Load Rails routes and Capybara helpers into RSpec examples when appropriate.
107
-
108
- 0.1.1 - August 24th 2011
109
- * Support assets properly by loading ActionView and Sprockets railties.
110
-
111
- 0.1.0 - August 19th 2011
112
- * First release, extracted from Dobro for HyperTiny.
data/combustion.gemspec DELETED
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Gem::Specification.new do |s|
4
- s.name = "combustion"
5
- s.version = "1.3.0"
6
- s.authors = ["Pat Allan"]
7
- s.email = ["pat@freelancing-gods.com"]
8
- s.homepage = "https://github.com/pat/combustion"
9
- s.summary = "Elegant Rails Engine Testing"
10
- s.description = "Test your Rails Engines without needing a full Rails app"
11
- s.license = "MIT"
12
-
13
- s.files = `git ls-files`.split("\n")
14
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
- s.executables = `git ls-files -- exe/*`.split("\n").map do |file|
16
- File.basename(file)
17
- end
18
- s.bindir = "exe"
19
- s.require_paths = ["lib"]
20
-
21
- s.add_runtime_dependency "activesupport", ">= 3.0.0"
22
- s.add_runtime_dependency "railties", ">= 3.0.0"
23
- s.add_runtime_dependency "thor", ">= 0.14.6"
24
-
25
- s.add_development_dependency "appraisal", "~> 2.1.0"
26
- s.add_development_dependency "mysql2"
27
- s.add_development_dependency "pg"
28
- s.add_development_dependency "rails"
29
- s.add_development_dependency "rspec"
30
- s.add_development_dependency "rubocop", "~> 0.81"
31
- s.add_development_dependency "sqlite3"
32
- end
@@ -1 +0,0 @@
1
- *.log