combustion 0.9.0 → 0.9.1

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: f28e971887ec1b8cccd6708b6a5959fd16dc5afb5e3a1983f002385c3ecbf7a8
4
- data.tar.gz: b7b4126b5923c1aa847fac7a4b8a2d43d0f8e06aed9fe21cfe62a11c9c5991ba
3
+ metadata.gz: 0c1a369737ff21b225eee681a7ca0258f87a6141870885bc7cf4ce29ef6fd10c
4
+ data.tar.gz: 88f61f3c7f3d7f57b71f5be4a351c1bd93c374a81c5fcf76d8f2e6eae299de77
5
5
  SHA512:
6
- metadata.gz: ff71dda123358ad658f97c536a7a9e1b8d16d2fc8d00518d126677bb408fb3947ec13e428fd335d3be77bad71a0d6f706dc9b0cc3f681e8b0375c29ff447027c
7
- data.tar.gz: 66eaf6b8b3959dc114326a5b7fc73ead3b47a96a11a9bb21c528efcba59349a07eae6ed09430af2fa2f744e74100f99557cc8bf5f71b970fa144e504268c22bb
6
+ metadata.gz: c5133bd2a0a3359d5562e0a62cd0561d63f7ce067bcf52773a48e09c1d54e1a7bdf2186683e87f82b98524f129a3e5c29aae792ccb0d1efd2f49abdfe556773f
7
+ data.tar.gz: 59f5f629ab28a8c6578e03617cedaec720a289917d4a1a37b1b713f63e0caf826aafe6f4addd8d0f78fb213abd173a6657b57cb4a9f87c764bcfd1f8a69571be
@@ -4,18 +4,22 @@ inherit_from:
4
4
  AllCops:
5
5
  TargetRubyVersion: 2.2
6
6
 
7
+ Bundler/OrderedGems:
8
+ Exclude:
9
+ - 'gemfiles/*'
10
+
7
11
  Layout/DotPosition:
8
12
  EnforcedStyle: trailing
9
13
 
10
14
  Layout/CaseIndentation:
11
15
  EnforcedStyle: end
12
16
 
17
+ Layout/EndAlignment:
18
+ EnforcedStyleAlignWith: variable
19
+
13
20
  Layout/IndentHeredoc:
14
21
  Enabled: false
15
22
 
16
- Lint/EndAlignment:
17
- EnforcedStyleAlignWith: variable
18
-
19
23
  Metrics/BlockLength:
20
24
  Exclude:
21
25
  - 'combustion.gemspec'
@@ -26,6 +30,10 @@ Style/ClassAndModuleChildren:
26
30
  Style/Documentation:
27
31
  Enabled: false
28
32
 
33
+ Style/FrozenStringLiteralComment:
34
+ Exclude:
35
+ - 'gemfiles/*'
36
+
29
37
  Style/MultilineTernaryOperator:
30
38
  Exclude:
31
39
  - 'spec/dummy/db/migrate/*.rb'
@@ -5,10 +5,10 @@ env:
5
5
  - "DB_ADAPTER=postgresql"
6
6
  - "DB_ADAPTER=mysql2"
7
7
  rvm:
8
- - 2.2.9
9
- - 2.3.6
10
- - 2.4.3
11
- - 2.5.0
8
+ - 2.2.10
9
+ - 2.3.7
10
+ - 2.4.4
11
+ - 2.5.1
12
12
  before_install:
13
13
  - gem update --system
14
14
  - gem install bundler
data/Appraisals CHANGED
@@ -27,20 +27,24 @@ if RUBY_VERSION.to_f <= 2.3
27
27
 
28
28
  appraise "rails-4.2" do
29
29
  gem "rails", "~> 4.2.8"
30
+ gem "mysql2", "~> 0.4.4"
30
31
  gem "pg", "< 1.0"
31
32
  end
32
33
  end
33
34
 
34
35
  appraise "rails-5.0" do
35
36
  gem "rails", "~> 5.0.2"
37
+ gem "mysql2", "~> 0.4.4"
36
38
  gem "pg", "< 1.0"
37
39
  end
38
40
 
39
41
  appraise "rails-5.1" do
40
42
  gem "rails", "~> 5.1.0"
43
+ gem "mysql2", "~> 0.4.4"
41
44
  gem "pg", "< 1.0"
42
45
  end
43
46
 
44
47
  appraise "rails-5.2" do
45
- gem "rails", "~> 5.2.0.rc1"
48
+ gem "rails", "~> 5.2.0"
49
+ gem "mysql2", "~> 0.5.0"
46
50
  end
data/HISTORY CHANGED
@@ -1,3 +1,6 @@
1
+ 0.9.1 - April 25th 2018
2
+ * Fix Rails 5.2 compatibility by not setting the deprecated secret_token configuration option.
3
+
1
4
  0.9.0 - March 26th 2018
2
5
  * Only reset databases that are either custom or the current one (Moritz Winter).
3
6
  * More consistency around environment handling (rather than presuming it's always the test environment).
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', '~> 0.9.0'
13
+ gem.add_development_dependency 'combustion', '~> 0.9.1'
14
14
 
15
15
  # Gemfile
16
- gem 'combustion', '~> 0.9.0', :group => :test
16
+ gem 'combustion', '~> 0.9.1'
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:
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "combustion"
5
- s.version = "0.9.0"
5
+ s.version = "0.9.1"
6
6
  s.authors = ["Pat Allan"]
7
7
  s.email = ["pat@freelancing-gods.com"]
8
8
  s.homepage = "https://github.com/pat/combustion"
@@ -29,6 +29,6 @@ Gem::Specification.new do |s|
29
29
  s.add_development_dependency "pg"
30
30
  s.add_development_dependency "rails"
31
31
  s.add_development_dependency "rspec"
32
- s.add_development_dependency "rubocop", "~> 0.50.0"
32
+ s.add_development_dependency "rubocop", "~> 0.54.0"
33
33
  s.add_development_dependency "sqlite3"
34
34
  end
@@ -4,5 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.1.12"
6
6
  gem "mysql2", "~> 0.3.10"
7
+ gem "pg", "< 1.0"
7
8
 
8
9
  gemspec :path => "../"
@@ -4,5 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.2.22.5"
6
6
  gem "mysql2", "~> 0.3.10"
7
+ gem "pg", "< 1.0"
7
8
 
8
9
  gemspec :path => "../"
@@ -4,5 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 4.0.13"
6
6
  gem "mysql2", "~> 0.3.10"
7
+ gem "pg", "< 1.0"
7
8
 
8
9
  gemspec :path => "../"
@@ -4,5 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 4.1.16"
6
6
  gem "mysql2", "~> 0.3.13"
7
+ gem "pg", "< 1.0"
7
8
 
8
9
  gemspec :path => "../"
@@ -3,5 +3,7 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 4.2.8"
6
+ gem "mysql2", "~> 0.4.4"
7
+ gem "pg", "< 1.0"
6
8
 
7
9
  gemspec :path => "../"
@@ -3,6 +3,7 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 5.0.2"
6
+ gem "mysql2", "~> 0.4.4"
6
7
  gem "pg", "< 1.0"
7
8
 
8
9
  gemspec :path => "../"
@@ -3,6 +3,7 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 5.1.0"
6
+ gem "mysql2", "~> 0.4.4"
6
7
  gem "pg", "< 1.0"
7
8
 
8
9
  gemspec :path => "../"
@@ -2,6 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "~> 5.2.0.rc1"
5
+ gem "rails", "~> 5.2.0"
6
+ gem "mysql2", "~> 0.5.0"
6
7
 
7
8
  gemspec :path => "../"
@@ -5,7 +5,6 @@ require "active_support/dependencies"
5
5
 
6
6
  module Combustion
7
7
  module Configurations
8
- #
9
8
  end
10
9
 
11
10
  mattr_accessor :path, :schema_format, :setup_environment
@@ -6,17 +6,16 @@ Rails.env = ENV["RAILS_ENV"] || "test"
6
6
 
7
7
  module Combustion
8
8
  class Application < Rails::Application
9
+ version = Rails.version.to_f
10
+
9
11
  # Core Settings
10
12
  config.cache_classes = true
11
13
  config.consider_all_requests_local = true
12
- config.secret_token = Digest::SHA1.hexdigest Time.now.to_s
13
14
  config.eager_load = Rails.env.production?
14
15
 
15
- if Rails.version.to_f >= 4.0
16
- config.secret_key_base = SecureRandom.hex
17
- else
18
- config.whiny_nils = true
19
- end
16
+ config.secret_key_base = SecureRandom.hex if version >= 4.0
17
+ config.whiny_nils = true if version < 4.0
18
+ config.secret_token = Digest::SHA1.hexdigest Time.now.to_s if version < 5.2
20
19
 
21
20
  # ActiveSupport Settings
22
21
  config.active_support.deprecation = :stderr
@@ -2,7 +2,6 @@
2
2
 
3
3
  module Combustion
4
4
  module Databases
5
- #
6
5
  end
7
6
 
8
7
  class Database
@@ -89,7 +89,7 @@ Please provide the root password for your mysql installation
89
89
  return
90
90
  end
91
91
 
92
- $stderr.puts <<-TXT
92
+ warn <<-TXT
93
93
  #{error.error}
94
94
  Couldn't create database for #{config.inspect}, charset: #{charset}, collation: #{collation}
95
95
  #{charset_error}
@@ -16,8 +16,8 @@ class Combustion::Databases::PostgreSQL < Combustion::Databases::Base
16
16
  configuration.merge("encoding" => encoding)
17
17
  )
18
18
  rescue StandardError => error
19
- $stderr.puts error, *error.backtrace
20
- $stderr.puts "Couldn't create database for #{configuration.inspect}"
19
+ warn error, *error.backtrace
20
+ warn "Couldn't create database for #{configuration.inspect}"
21
21
  end
22
22
 
23
23
  def drop
@@ -8,15 +8,15 @@ class Combustion::Databases::SQLite < Combustion::Databases::Base
8
8
 
9
9
  def create
10
10
  if exists?
11
- $stderr.puts "#{config["database"]} already exists"
11
+ warn "#{config["database"]} already exists"
12
12
  return
13
13
  end
14
14
 
15
15
  establish_connection configuration
16
16
  connection
17
17
  rescue StandardError => error
18
- $stderr.puts error, *error.backtrace
19
- $stderr.puts "Couldn't create database for #{configuration.inspect}"
18
+ warn error, *error.backtrace
19
+ warn "Couldn't create database for #{configuration.inspect}"
20
20
  end
21
21
 
22
22
  def drop
@@ -3,7 +3,7 @@
3
3
  module Combustion
4
4
  describe Database do
5
5
  before(:all) do
6
- Dir.chdir(File.expand_path("../dummy", __FILE__)) do
6
+ Dir.chdir(File.expand_path("dummy", __dir__)) do
7
7
  Combustion.initialize! :active_record
8
8
  end
9
9
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Rails.application.routes.draw do
4
- #
4
+ # Add your own routes here, or remove this file if you don't have need for it.
5
5
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  ActiveRecord::Schema.define do
4
- #
4
+ # Set up any tables you need to exist for your test suite that don't belong
5
+ # in migrations.
5
6
  end
@@ -12,4 +12,4 @@ if Rails::VERSION::STRING.to_f < 4.1
12
12
  end
13
13
  end
14
14
 
15
- require File.expand_path("../dummy/lib/engine.rb", __FILE__)
15
+ require File.expand_path("dummy/lib/engine.rb", __dir__)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Rails.application.routes.draw do
4
- #
4
+ # Add your own routes here, or remove this file if you don't have need for it.
5
5
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  ActiveRecord::Schema.define do
4
- #
4
+ # Set up any tables you need to exist for your test suite that don't belong
5
+ # in migrations.
5
6
  end
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: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Allan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-26 00:00:00.000000000 Z
11
+ date: 2018-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 0.50.0
131
+ version: 0.54.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.50.0
138
+ version: 0.54.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: sqlite3
141
141
  requirement: !ruby/object:Gem::Requirement