combustion 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +11 -3
- data/.travis.yml +4 -4
- data/Appraisals +5 -1
- data/HISTORY +3 -0
- data/README.md +2 -2
- data/combustion.gemspec +2 -2
- data/gemfiles/rails_3.1.gemfile +1 -0
- data/gemfiles/rails_3.2.gemfile +1 -0
- data/gemfiles/rails_4.0.gemfile +1 -0
- data/gemfiles/rails_4.1.gemfile +1 -0
- data/gemfiles/rails_4.2.gemfile +2 -0
- data/gemfiles/rails_5.0.gemfile +1 -0
- data/gemfiles/rails_5.1.gemfile +1 -0
- data/gemfiles/rails_5.2.gemfile +2 -1
- data/lib/combustion.rb +0 -1
- data/lib/combustion/application.rb +5 -6
- data/lib/combustion/database.rb +0 -1
- data/lib/combustion/databases/mysql.rb +1 -1
- data/lib/combustion/databases/postgresql.rb +2 -2
- data/lib/combustion/databases/sqlite.rb +3 -3
- data/spec/database_spec.rb +1 -1
- data/spec/dummy/spec/internal/config/routes.rb +1 -1
- data/spec/dummy/spec/internal/db/schema.rb +2 -1
- data/spec/spec_helper.rb +1 -1
- data/templates/routes.rb +1 -1
- data/templates/schema.rb +2 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c1a369737ff21b225eee681a7ca0258f87a6141870885bc7cf4ce29ef6fd10c
|
4
|
+
data.tar.gz: 88f61f3c7f3d7f57b71f5be4a351c1bd93c374a81c5fcf76d8f2e6eae299de77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5133bd2a0a3359d5562e0a62cd0561d63f7ce067bcf52773a48e09c1d54e1a7bdf2186683e87f82b98524f129a3e5c29aae792ccb0d1efd2f49abdfe556773f
|
7
|
+
data.tar.gz: 59f5f629ab28a8c6578e03617cedaec720a289917d4a1a37b1b713f63e0caf826aafe6f4addd8d0f78fb213abd173a6657b57cb4a9f87c764bcfd1f8a69571be
|
data/.rubocop.yml
CHANGED
@@ -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'
|
data/.travis.yml
CHANGED
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
|
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.
|
13
|
+
gem.add_development_dependency 'combustion', '~> 0.9.1'
|
14
14
|
|
15
15
|
# Gemfile
|
16
|
-
gem 'combustion', '~> 0.9.
|
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:
|
data/combustion.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "combustion"
|
5
|
-
s.version = "0.9.
|
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.
|
32
|
+
s.add_development_dependency "rubocop", "~> 0.54.0"
|
33
33
|
s.add_development_dependency "sqlite3"
|
34
34
|
end
|
data/gemfiles/rails_3.1.gemfile
CHANGED
data/gemfiles/rails_3.2.gemfile
CHANGED
data/gemfiles/rails_4.0.gemfile
CHANGED
data/gemfiles/rails_4.1.gemfile
CHANGED
data/gemfiles/rails_4.2.gemfile
CHANGED
data/gemfiles/rails_5.0.gemfile
CHANGED
data/gemfiles/rails_5.1.gemfile
CHANGED
data/gemfiles/rails_5.2.gemfile
CHANGED
data/lib/combustion.rb
CHANGED
@@ -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
|
16
|
-
|
17
|
-
|
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
|
data/lib/combustion/database.rb
CHANGED
@@ -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
|
-
|
20
|
-
|
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
|
-
|
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
|
-
|
19
|
-
|
18
|
+
warn error, *error.backtrace
|
19
|
+
warn "Couldn't create database for #{configuration.inspect}"
|
20
20
|
end
|
21
21
|
|
22
22
|
def drop
|
data/spec/database_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/templates/routes.rb
CHANGED
data/templates/schema.rb
CHANGED
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.
|
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-
|
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.
|
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.
|
138
|
+
version: 0.54.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: sqlite3
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|