combustion 0.5.1 → 0.5.2

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
  SHA1:
3
- metadata.gz: 487efa718a0c0a0dc7bccb6199ab9aa22330fd54
4
- data.tar.gz: 67f17279b60d5e1ea508b5638ef61b50ba32fcd4
3
+ metadata.gz: d6f95f799f2c9e43729681f667300ba717cd7bc3
4
+ data.tar.gz: fb6937839d622b2598efee6145b84467b1fb92f6
5
5
  SHA512:
6
- metadata.gz: b44177fef4256791333fc3d0674c242f932242f5428dc4cd26a1d309508e5c41466d7c143d80f7e9eb88de1c2cb7aaea147e4621232c06fd2b4641cb947e477d
7
- data.tar.gz: c260e84e10d0082e5c86983a0c0be5e3b1f8e2831467313cd0f343daddacdca1ec49b33cf48f0bd6ebbb110a159e833489af7df8be515a55ce67d46bed633b3c
6
+ metadata.gz: 7c47d2876b0e59fd71ecae9da6f395b82d0e1f723a316942c55d15c2bbce8ec76f202b579c665b29aac2cdff0ba02dd9ddd8190a83262a05147c4a94855b82ee
7
+ data.tar.gz: 9826eeb8a072e75bd175682ac024ceaa819cec191fdaa8b338ecfc9aef95bc7c52791d1a0f379afca7759c31b0de877d0cbdef69c703cf0b020884ce482a7e8c
data/HISTORY CHANGED
@@ -1,3 +1,10 @@
1
+ 0.5.2 - July 18th 2014
2
+ * Note MIT licence in gemspec (@ktdreyer).
3
+ * Use local create/drop methods when resetting database (Bryan Ricker).
4
+ * ERB is now supported in config/database.yml, matching Rails (@patorash).
5
+ * The database now is configured before the application is loaded (@patorash).
6
+ * Documentation and generated config.ru now specify explicly loading all Rails libraries by default (Pat Allan).
7
+
1
8
  0.5.1 - July 25th 2013
2
9
  * Mass assignment errors raise exceptions instead of just being logged (Pat Allan).
3
10
  * whilelist_attributes is only set for Rails 3.2 apps (Philip Arndt).
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.5.1'
13
+ gem.add_development_dependency 'combustion', '~> 0.5.2'
14
14
 
15
15
  # Gemfile
16
- gem 'combustion', '~> 0.5.1', :group => :test
16
+ gem 'combustion', '~> 0.5.2', :group => :test
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:
@@ -25,7 +25,7 @@ require 'bundler/setup'
25
25
  require 'combustion'
26
26
  require 'capybara/rspec'
27
27
 
28
- Combustion.initialize!
28
+ Combustion.initialize! :all
29
29
 
30
30
  require 'rspec/rails'
31
31
  require 'capybara/rails'
@@ -55,7 +55,7 @@ If you want your app to be located somewhere other than `spec/internal`, then ma
55
55
 
56
56
  ```ruby
57
57
  Combustion.path = 'spec/dummy'
58
- Combustion.initialize!
58
+ Combustion.initialize! :all
59
59
  ```
60
60
 
61
61
 
@@ -108,7 +108,7 @@ Name the file structure.sql and configure Combustion to use it before initialisi
108
108
 
109
109
  ```ruby
110
110
  Combustion.schema_format = :sql
111
- Combustion.initialize!
111
+ Combustion.initialize! :all
112
112
  ```
113
113
 
114
114
  Any models that aren't provided by your engine should be located at `spec/internal/app/models`.
data/combustion.gemspec CHANGED
@@ -1,12 +1,13 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |s|
3
3
  s.name = 'combustion'
4
- s.version = '0.5.1'
4
+ s.version = '0.5.2'
5
5
  s.authors = ['Pat Allan']
6
6
  s.email = ['pat@freelancing-gods.com']
7
7
  s.homepage = 'https://github.com/pat/combustion'
8
8
  s.summary = 'Elegant Rails Engine Testing'
9
9
  s.description = 'Test your Rails Engines without needing a full Rails app'
10
+ s.license = 'MIT'
10
11
 
11
12
  s.rubyforge_project = 'combustion'
12
13
 
data/lib/combustion.rb CHANGED
@@ -24,12 +24,13 @@ module Combustion
24
24
  Bundler.require :default, Rails.env
25
25
 
26
26
  Combustion::Application.configure_for_combustion
27
- Combustion::Application.initialize!
28
27
 
29
28
  if modules.map(&:to_s).include? 'active_record'
30
29
  Combustion::Database.setup
31
30
  end
32
31
 
32
+ Combustion::Application.initialize!
33
+
33
34
  RSpec.configure do |config|
34
35
  include_capybara_into config
35
36
 
@@ -9,12 +9,12 @@ module Combustion
9
9
  end
10
10
 
11
11
  def self.reset_database
12
+ ActiveRecord::Base.configurations = YAML.load(ERB.new(File.read("#{Rails.root}/config/database.yml")).result)
12
13
  abcs = ActiveRecord::Base.configurations
13
14
  case abcs['test']['adapter']
14
15
  when /mysql/
15
- ActiveRecord::Base.establish_connection(:test)
16
- ActiveRecord::Base.connection.recreate_database(abcs['test']['database'],
17
- mysql_creation_options(abcs['test']))
16
+ drop_database(abcs['test']['database'])
17
+ create_database(abcs['test'])
18
18
  ActiveRecord::Base.establish_connection(:test)
19
19
  when /postgresql/
20
20
  ActiveRecord::Base.clear_active_connections!
data/templates/config.ru CHANGED
@@ -3,5 +3,5 @@ require 'bundler'
3
3
 
4
4
  Bundler.require :default, :development
5
5
 
6
- Combustion.initialize!
6
+ Combustion.initialize! :all
7
7
  run Combustion::Application
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: combustion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Allan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-25 00:00:00.000000000 Z
11
+ date: 2014-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: railties
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 3.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 3.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: thor
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.14.6
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.14.6
55
55
  description: Test your Rails Engines without needing a full Rails app
@@ -60,7 +60,7 @@ executables:
60
60
  extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
- - .gitignore
63
+ - ".gitignore"
64
64
  - Gemfile
65
65
  - HISTORY
66
66
  - LICENCE
@@ -77,7 +77,8 @@ files:
77
77
  - templates/routes.rb
78
78
  - templates/schema.rb
79
79
  homepage: https://github.com/pat/combustion
80
- licenses: []
80
+ licenses:
81
+ - MIT
81
82
  metadata: {}
82
83
  post_install_message:
83
84
  rdoc_options: []
@@ -85,18 +86,19 @@ require_paths:
85
86
  - lib
86
87
  required_ruby_version: !ruby/object:Gem::Requirement
87
88
  requirements:
88
- - - '>='
89
+ - - ">="
89
90
  - !ruby/object:Gem::Version
90
91
  version: '0'
91
92
  required_rubygems_version: !ruby/object:Gem::Requirement
92
93
  requirements:
93
- - - '>='
94
+ - - ">="
94
95
  - !ruby/object:Gem::Version
95
96
  version: '0'
96
97
  requirements: []
97
98
  rubyforge_project: combustion
98
- rubygems_version: 2.0.2
99
+ rubygems_version: 2.3.0
99
100
  signing_key:
100
101
  specification_version: 4
101
102
  summary: Elegant Rails Engine Testing
102
103
  test_files: []
104
+ has_rdoc: