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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3bf8192dabd4d1fb1fad33301a15a13ce5ee7488
4
- data.tar.gz: 5ffe5087a213f1491dbe1927ef891e0497006370
3
+ metadata.gz: cc6022f8f8fe45025891e8b927f7513ca025e3f4
4
+ data.tar.gz: 6013e2ef376647375b90bce55483d515aeea3306
5
5
  SHA512:
6
- metadata.gz: e838b4cc0a35731019ff1c4cab84b651ff80bd240cd0958ec2c0893f26c09e3ad90761f8bf3620e7524bbe4491620ac9fe0690c47bf9717494162a706a2013f4
7
- data.tar.gz: faf1091315a8592c5c2b94597d0e12d1629c493c04bddf2eb96c72ce43a7689dbfe7c70ddaaebe1e22393cb9e0b21d3189ff33c4bb1dd3ce0e02d9acf2da0bae
6
+ metadata.gz: ba2b53e403d1de032782818983c4be4876eb7ba02123cadedf959dda6e744674cd871774c3ff5873034a99aa219e4664a7df3863b811bea656c7257734316525
7
+ data.tar.gz: fdc347ce019c3b57afbf93c65563789d5a81336f19dbad54bfe2b0dc2d7038187781cac96bb6b25e31bf3871e025c84867ed105202f5845d4871b5fac61649ad
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --warnings
@@ -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.2'
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 |ar_conn|
34
- delete_all ar_conn, DatabaseRewinder.all_table_names(ar_conn)
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
 
@@ -63,7 +63,7 @@ module DatabaseRewinder
63
63
  end
64
64
  end or return
65
65
 
66
- match = sql.match(/\AINSERT(?: IGNORE)? INTO (?:\.*[`"]?([^.\s`"]+)[`"]?)*/i)
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(exp: SQLServer)' do
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.2
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-05-19 00:00:00.000000000 Z
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