combustion 1.2.0 → 1.3.3

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: d75fdd951c2753bc78da33f55e44da984f70f8ef688c09f350d672d4dd5cd6bc
4
- data.tar.gz: 94a09faad89e5c0f14b2e696862cf9a13d72c06cf645287303bdcd3758c7a42e
3
+ metadata.gz: 97053abef57625a082cfc03848c5822384541e7badc99ad7eda77729eca45e11
4
+ data.tar.gz: 69afc4e110cc230359c021ee0ed7820241af3bfeaeff0229c441594225c4d732
5
5
  SHA512:
6
- metadata.gz: 27ab0c66fbf63e48f67acf75af81b29dda40bd8307633675097fc344521d52dbcbcc6e93695315272a5b9023c948743cff78f6f134084a2fc49e4565e2307a8c
7
- data.tar.gz: 435840a9905a72fd0883499400a7b4abecb288c3d1d4c5f66da9a4280a4a440159e2634089a76de7c47dab2edd4a16152a1f4adb4c2716789d1b6b2385456157
6
+ metadata.gz: b4e662dede67e6e44ba8fc570277190e330948f2b73dd1b71067a5caee84d6171a63a54967a56246d06544c6458dbb57c0c2b28ef15401a173fe0f917b47debb
7
+ data.tar.gz: 1035a1e6b7c2b8b6a4b4d4d1e7bf95838b76a9720db2f240d42abd5c8a55e0318cd54360ccf689118138155254f60fc7ded4cde6cb5437f7f132b233b24753c1
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
@@ -10,10 +10,10 @@ Get the gem into either your gemspec or your Gemfile, depending on how you manag
10
10
 
11
11
  ```ruby
12
12
  # gemspec
13
- gem.add_development_dependency 'combustion', '~> 1.2'
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:
@@ -208,4 +208,4 @@ The tests are extremely minimal, and patches to extend the suite are especially
208
208
 
209
209
  ## Credits
210
210
 
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).
211
+ 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).
@@ -5,6 +5,10 @@ class Combustion::Configurations::ActiveRecord
5
5
  return unless defined?(ActiveRecord::Railtie)
6
6
  return unless ::ActiveRecord.constants.include?(:MassAssignmentSecurity)
7
7
 
8
+ if ActiveRecord::VERSION::MAJOR >= 7
9
+ config.active_record.legacy_connection_handling = false
10
+ end
11
+
8
12
  # Turn on ActiveRecord attribute whitelisting
9
13
  # This way the dummy app matches new rails apps re: this setting
10
14
  config.active_record.whitelist_attributes = true
@@ -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
@@ -22,7 +22,11 @@ module Combustion
22
22
  }
23
23
 
24
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
25
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
26
30
 
27
31
  hash
28
32
  end.freeze
@@ -32,7 +36,7 @@ module Combustion
32
36
 
33
37
  options = modules.extract_options!
34
38
  modules = MODULES.keys if modules == [:all]
35
- modules.each { |mod| require MODULES[mod] }
39
+ modules.each { |mod| require MODULES.fetch(mod, "#{mod}/railtie") }
36
40
 
37
41
  Bundler.require :default, Rails.env
38
42
 
@@ -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.2.0
4
+ version: 1.3.3
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-18 00:00:00.000000000 Z
11
+ date: 2021-09-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
@@ -209,7 +203,7 @@ homepage: https://github.com/pat/combustion
209
203
  licenses:
210
204
  - MIT
211
205
  metadata: {}
212
- post_install_message:
206
+ post_install_message:
213
207
  rdoc_options: []
214
208
  require_paths:
215
209
  - lib
@@ -224,20 +218,23 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
218
  - !ruby/object:Gem::Version
225
219
  version: '0'
226
220
  requirements: []
227
- rubygems_version: 3.1.2
228
- signing_key:
221
+ rubygems_version: 3.1.4
222
+ signing_key:
229
223
  specification_version: 4
230
224
  summary: Elegant Rails Engine Testing
231
225
  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
226
+ - spec/spec_helper.rb
237
227
  - spec/dummy/spec/internal/app/models/model.rb
238
228
  - spec/dummy/spec/internal/app/models/model_in_another_db.rb
239
- - spec/dummy/spec/internal/config/database.yml
229
+ - spec/dummy/spec/internal/app/assets/config/manifest.js
240
230
  - spec/dummy/spec/internal/config/routes.rb
231
+ - spec/dummy/spec/internal/config/database.yml
241
232
  - spec/dummy/spec/internal/db/schema.rb
242
- - spec/dummy/spec/internal/log/.gitignore
243
- - spec/spec_helper.rb
233
+ - spec/dummy/lib/engine.rb
234
+ - spec/dummy/db/migrate/20150717075542_create_dummy_test_table.rb
235
+ - spec/dummy/db/migrate/20150717075543_create_dummy_test_table_in_another_db.rb
236
+ - spec/database_spec.rb
237
+ - ".rspec"
238
+ - Appraisals
239
+ - Gemfile
240
+ - 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,109 +0,0 @@
1
- 1.2.0 - April 18th 2020
2
- * Support ActiveStorage (Mikko Kokkonen).
3
-
4
- 1.1.2 - November 4th 2019
5
- * Generate an empty asset manifest file for Rails 6.
6
-
7
- 1.1.1 - August 3rd 2019
8
- * Fix for latest Rails 6.0 release candidate.
9
- * Test suite updates (Rails edge, sqlite3, Rubocop)
10
-
11
- 1.1.0 - February 13th 2019
12
- * Rails 6.0 support.
13
-
14
- 1.0.0 - October 3rd 2018
15
- * No functional changes.
16
- * Added documentation about database preparation options.
17
-
18
- 0.9.1 - April 25th 2018
19
- * Fix Rails 5.2 compatibility by not setting the deprecated secret_token configuration option.
20
-
21
- 0.9.0 - March 26th 2018
22
- * Only reset databases that are either custom or the current one (Moritz Winter).
23
- * More consistency around environment handling (rather than presuming it's always the test environment).
24
-
25
- 0.8.0 - February 1st 2018
26
- * Rails 5.2.0 support.
27
- * Requiring digest from std-lib directly.
28
- * Refactoring for cleaner code.
29
-
30
- 0.7.0 - June 20th 2017
31
- * Confirm support for MRI frozen string literals.
32
- * Hide migration output (Michael Grosser).
33
-
34
- 0.6.0 - March 28th 2017
35
- * Optionally disable database reset, schema loading, migrations (Sergey Kucher).
36
- * Allow for multiple test databases (Semyon Pupkov).
37
-
38
- 0.5.5 - July 23rd 2016
39
- * Add PostGIS support (Roland Koch).
40
- * MySQL parameter fix (Mathieu Leduc-Hamel).
41
-
42
- 0.5.4 - January 12th 2016
43
- * Remove silent_stream call for Rails 5.0 compatability (Bryan Ricker).
44
- * Fix duplicate migrations error (Semyon Pupkov).
45
-
46
- 0.5.3 - March 1st 2015
47
- * Use migrations from dependent gems (Korotaev Danil, Меркушин Михаил).
48
-
49
- 0.5.2 - July 18th 2014
50
- * Note MIT licence in gemspec (@ktdreyer).
51
- * Use local create/drop methods when resetting database (Bryan Ricker).
52
- * ERB is now supported in config/database.yml, matching Rails (@patorash).
53
- * The database now is configured before the application is loaded (@patorash).
54
- * Documentation and generated config.ru now specify explicly loading all Rails libraries by default (Pat Allan).
55
-
56
- 0.5.1 - July 25th 2013
57
- * Mass assignment errors raise exceptions instead of just being logged (Pat Allan).
58
- * whilelist_attributes is only set for Rails 3.2 apps (Philip Arndt).
59
- * Support ActiveRecord 3.0.x (Philip Arndt).
60
- * Allow custom application configuration (Pablo Herrero).
61
-
62
- 0.5.0 - May 1st 2013
63
- * whitelist_attributes is now set within configure_for_combustion, as it depends on which Railties are loaded.
64
- * Make sure Rails gems are loaded before the engine's gem (Pablo Herrero).
65
- * Fixed Rails version comparison (Josh Adam).
66
-
67
- 0.4.0 - March 16th 2013
68
- * Don't delete the SQLite test database if it doesn't exist (Michael Gee, Alexander Rozumiy).
69
- * Support for secret_key_base for Rails 4 apps (Philip Arndt).
70
- * eager_load is set to true when using the production environment (Philip Arndt).
71
- * whiny_nils is not set if using Rails 4 (Philip Arndt).
72
- * Mysql2 can raise Mysql::Error with JRuby (Philip Arndt).
73
- * Whitelist attributes typo is fixed (Geoff Hodgson).
74
- * Mass assignment checks are now turned on, so errors are raised. This matches Rails' defaults for test environments (Josh Adams).
75
- * 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).
76
- * Combustion classes now all define the outer module, so each can be required by themselves, should you desire (Philip Arndt).
77
-
78
- 0.3.3 - December 23rd 2012
79
- * Removing version file - version number can just live in the gemspec.
80
- * Load ActionController and ActionMailer via their Railties, not non-existent Engines (Chris Beer).
81
- * SQL Schema support (Geoff Hodgson).
82
- * Documentation fixes (Philip Arndt, Inge Jørgensen, Erkan Yilmaz).
83
- * Include migrations from the internal app when migrating the database (Warren Seen).
84
- * Correctly drop the test database when using SQLite (Warren Seen).
85
- * Don't attempt to load sprockets for Rails 3.0.x (Alex Rozumey).
86
-
87
- 0.3.2 - March 3rd 2012
88
- * Tentative Rails 3.0 and migrations support.
89
- * Allow for different internal app directory.
90
-
91
- 0.3.1 - September 12th 2011
92
- * Allow for different versions of Capybara (Leo Liang).
93
- * Including Capybara::DSL instead of Capybara.
94
- * Require 3.1.0 or better.
95
- * Allow for JRuby in the database.yml template (Philip Arndt).
96
-
97
- 0.3.0 - September 2nd 2011
98
- * Simple generator to create a pretty minimal internal Rails app.
99
-
100
- 0.2.0 - August 30th 2011
101
- * Documentation.
102
- * Allow developers to choose which Rails modules they wish to be loaded.
103
- * Load Rails routes and Capybara helpers into RSpec examples when appropriate.
104
-
105
- 0.1.1 - August 24th 2011
106
- * Support assets properly by loading ActionView and Sprockets railties.
107
-
108
- 0.1.0 - August 19th 2011
109
- * 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.2.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