database_rewinder 0.8.1 → 0.8.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: 7c72cae523f6afdb28ee8e3416cb89822ee1abf2
4
- data.tar.gz: 23b6abd160c797cc3c63a93c28f61d09cce4e650
3
+ metadata.gz: ee33c2d9a1ffd6b4fc293c215959ab1af83813f6
4
+ data.tar.gz: eb14adbd9150c594b0da819848968128bd771fb5
5
5
  SHA512:
6
- metadata.gz: 9fd241c1d0ccdfe677e97c611402d19e1cda5e5262759e45219f97a2b467fa0ea94433d582a940ba8bd1b52b06ef480ab2e19fd0aa34d2131d2a6d78162c8ee1
7
- data.tar.gz: 720ee1316305dc464cb5459edbc004e2deafd7c48fa51a577a72a2086d7182482eb238b692cf3082a3c75dbfb37bd116b81320c4b5a65ea668ef074bb38d26fb
6
+ metadata.gz: 3be4968e470fbcff3d1b4cfcfef4f48fd706038d05802136bf0c25b5c8778ed39f27ae5dac42b008919202239cd26ba349d53828d3c28f23f5385330da53446f
7
+ data.tar.gz: 16c0c14ea06967a64dc15c8b2b605d52d20e1bf658356a1a9d27430d5c86e6e5994828cf511388237ad215eadc3e9ea97486866fa79badb3b48c47a80f536fea
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "database_rewinder"
8
- spec.version = '0.8.1'
8
+ spec.version = '0.8.2'
9
9
  spec.authors = ["Akira Matsuda"]
10
10
  spec.email = ["ronnie@dio.jp"]
11
11
  spec.description = "A minimalist's tiny and ultra-fast database cleaner"
@@ -39,7 +39,7 @@ module DatabaseRewinder
39
39
  config = connection.instance_variable_get(:'@config')
40
40
  database = config[:database]
41
41
  #NOTE What's the best way to get the app dir besides Rails.root? I know Dir.pwd here might not be the right solution, but it should work in most cases...
42
- root_dir = defined?(Rails) ? Rails.root : Dir.pwd
42
+ root_dir = defined?(Rails) && Rails.respond_to?(:root) ? Rails.root : Dir.pwd
43
43
  cleaner = cleaners.detect do |c|
44
44
  if (config[:adapter] == 'sqlite3') && (config[:database] != ':memory:')
45
45
  File.expand_path(c.db, root_dir) == File.expand_path(database, root_dir)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: database_rewinder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Matsuda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-28 00:00:00.000000000 Z
11
+ date: 2017-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -162,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
162
  version: '0'
163
163
  requirements: []
164
164
  rubyforge_project:
165
- rubygems_version: 2.6.11
165
+ rubygems_version: 2.6.12
166
166
  signing_key:
167
167
  specification_version: 4
168
168
  summary: A minimalist's tiny and ultra-fast database cleaner