database_rewinder 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +2 -0
- data/database_rewinder.gemspec +1 -1
- data/lib/database_rewinder/cleaner.rb +2 -2
- data/lib/database_rewinder.rb +1 -1
- data/spec/database_rewinder_spec.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc6022f8f8fe45025891e8b927f7513ca025e3f4
|
4
|
+
data.tar.gz: 6013e2ef376647375b90bce55483d515aeea3306
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba2b53e403d1de032782818983c4be4876eb7ba02123cadedf959dda6e744674cd871774c3ff5873034a99aa219e4664a7df3863b811bea656c7257734316525
|
7
|
+
data.tar.gz: fdc347ce019c3b57afbf93c65563789d5a81336f19dbad54bfe2b0dc2d7038187781cac96bb6b25e31bf3871e025c84867ed105202f5845d4871b5fac61649ad
|
data/.rspec
ADDED
data/database_rewinder.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "database_rewinder"
|
7
|
-
spec.version = '0.5.
|
7
|
+
spec.version = '0.5.3'
|
8
8
|
spec.authors = ["Akira Matsuda"]
|
9
9
|
spec.email = ["ronnie@dio.jp"]
|
10
10
|
spec.description = "A minimalist's tiny and ultra-fast database cleaner"
|
@@ -30,8 +30,8 @@ module DatabaseRewinder
|
|
30
30
|
delete_all ar_conn, DatabaseRewinder.all_table_names(ar_conn)
|
31
31
|
else
|
32
32
|
require 'database_rewinder/dummy_model'
|
33
|
-
DummyModel.with_temporary_connection(config) do |
|
34
|
-
delete_all
|
33
|
+
DummyModel.with_temporary_connection(config) do |temporary_connection|
|
34
|
+
delete_all temporary_connection, DatabaseRewinder.all_table_names(temporary_connection)
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
data/lib/database_rewinder.rb
CHANGED
@@ -63,7 +63,7 @@ module DatabaseRewinder
|
|
63
63
|
end
|
64
64
|
end or return
|
65
65
|
|
66
|
-
match = sql.match(/\AINSERT(
|
66
|
+
match = sql.match(/\AINSERT(?:\s+IGNORE)?\s+INTO\s+(?:\.*[`"]?([^.\s`"]+)[`"]?)*/i)
|
67
67
|
return unless match
|
68
68
|
|
69
69
|
table = match[1]
|
@@ -78,7 +78,7 @@ describe DatabaseRewinder do
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
-
context 'Database accepts more than one dots in an object notation(
|
81
|
+
context 'Database accepts more than one dots in an object notation (e.g. SQLServer)' do
|
82
82
|
context 'full joined' do
|
83
83
|
let(:sql) { 'INSERT INTO server.database.schema.foos ("name") VALUES (?)' }
|
84
84
|
its(:inserted_tables) { should == ['foos'] }
|
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.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akira Matsuda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -88,6 +88,7 @@ extensions: []
|
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
90
|
- ".gitignore"
|
91
|
+
- ".rspec"
|
91
92
|
- ".travis.yml"
|
92
93
|
- Gemfile
|
93
94
|
- MIT_LICENSE
|