database_cleaner-active_record 2.0.0 → 2.0.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: e2c9c7514dc1bea223af68a8a3822b1fb07e227911897166432f6018ab5b23a9
4
- data.tar.gz: b3217f7ad1128617b17be1872207df59317204aa7912bca0a00e0aab77490d15
3
+ metadata.gz: 0f4e22827466f77ef287a8cfa7cf75078940f69f4e3b222676d7cb30d74edb74
4
+ data.tar.gz: 942936724f8ef0e4a0107044aef35b203e6e8d23c1a6d241d452342eb1d8ae17
5
5
  SHA512:
6
- metadata.gz: 74e5baa1c2eb6de6b39213d9d192dcb649ff069d8ac5a9ad3d9347beb40b68a15c29a16149e2338098d246db3fdb6a7a22baef9911f4be5fb1954560d87e2b81
7
- data.tar.gz: 991af4358084057df8efd4a05d7fa0eb75756ee8f940a7f2bd2e2da2a65a64a1bd96f668c355948e16b04c33b407276d2076f5bec5b47631e6682dd0a5221408
6
+ metadata.gz: 8116e18c0f97636ab92457c6025ef7978547aba2553c747e8120b7ac528fe583f6f1cc76cbc78385c2a26fa6a6a348d37c95c5440186404259a4d50b39200b9d
7
+ data.tar.gz: e847363c1be911931358c9b1cb3f09717e302b2e89aa609ce366baa1ec6664fbf3935b4c52b6785cfac25f36794992a118edc9846774a485e26fa7aeaa27896e
data/.travis.yml CHANGED
@@ -6,11 +6,19 @@ rvm:
6
6
  - 2.5
7
7
  - 2.6
8
8
  - 2.7
9
+ - 3.0
9
10
  gemfile:
10
11
  - gemfiles/rails_5.1.gemfile
11
12
  - gemfiles/rails_5.2.gemfile
12
13
  - gemfiles/rails_6.0.gemfile
13
14
  - gemfiles/rails_6.1.gemfile
15
+ jobs:
16
+ exclude: # Unsupported combos: https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
17
+ - rvm: 3.0
18
+ gemfiles/rails_5.1.gemfile
19
+ - rvm: 3.0
20
+ gemfiles/rails_5.2.gemfile
21
+
14
22
  before_install:
15
23
  - bin/setup
16
24
  cache:
data/README.md CHANGED
@@ -51,10 +51,10 @@ The truncation and deletion strategies may accept the following options:
51
51
 
52
52
  ```ruby
53
53
  # Only truncate the "users" table.
54
- DatabaseCleaner[:active_record].strategy = :truncation, { only: ["users"] }
54
+ DatabaseCleaner[:active_record].strategy = :truncation, only: ["users"]
55
55
 
56
56
  # Delete all tables except the "users" table.
57
- DatabaseCleaner[:active_record].strategy = :deletion, { except: ["users"] }
57
+ DatabaseCleaner[:active_record].strategy = :deletion, except: ["users"]
58
58
  ```
59
59
 
60
60
  * `:pre_count` - When set to `true` this will check each table for existing rows before truncating or deleting it. This can speed up test suites when many of the tables are never populated. Defaults to `false`. (Also, see the section on [What strategy is fastest?](#what-strategy-is-fastest))
@@ -67,7 +67,7 @@ module DatabaseCleaner
67
67
  when "SQLite"
68
68
  extend AbstractMysqlAdapter
69
69
  extend SQLiteAdapter
70
- when "PostgreSQL"
70
+ when "PostgreSQL", "PostGIS"
71
71
  extend AbstractMysqlAdapter
72
72
  extend PostgreSQLAdapter
73
73
  end
@@ -189,7 +189,7 @@ module DatabaseCleaner
189
189
 
190
190
  def truncate_tables(table_names)
191
191
  return if table_names.nil? || table_names.empty?
192
- execute("TRUNCATE TABLE #{table_names.map{|name| quote_table_name(name)}.join(', ')} RESTART IDENTITY CASCADE;")
192
+ execute("TRUNCATE TABLE #{table_names.map{|name| quote_table_name(name)}.join(', ')} RESTART IDENTITY RESTRICT;")
193
193
  end
194
194
 
195
195
  def pre_count_truncate_tables(tables)
@@ -1,5 +1,5 @@
1
1
  module DatabaseCleaner
2
2
  module ActiveRecord
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: database_cleaner-active_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernesto Tagwerker
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-01-31 00:00:00.000000000 Z
12
+ date: 2021-05-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: database_cleaner-core
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  requirements: []
191
- rubygems_version: 3.0.3
191
+ rubygems_version: 3.1.4
192
192
  signing_key:
193
193
  specification_version: 4
194
194
  summary: Strategies for cleaning databases using ActiveRecord. Can be used to ensure