border-patrol 0.0.7 → 0.0.8

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- border-patrol (0.0.7)
4
+ border-patrol (0.0.8)
5
5
  rails (>= 3)
6
6
  timers
7
7
 
data/lib/border-patrol.rb CHANGED
@@ -14,8 +14,8 @@ module BorderPatrol
14
14
  # Don't perform the tests in console mode, unless requested.
15
15
  return if console? && configuration.ignore_console
16
16
 
17
- # Don't perform the tests during `rake db:migrate`.
18
- return if during_db_migrate?
17
+ # Don't perform the tests during DB operations.
18
+ return if during_db?
19
19
 
20
20
  # Perform initial test.
21
21
  abort_if_pending
@@ -51,8 +51,12 @@ module BorderPatrol
51
51
  defined?(Rails::Console)
52
52
  end
53
53
 
54
- def during_db_migrate?
55
- File.basename($0) == 'rake' && ARGV.include?('db:migrate')
54
+ def during_db?
55
+ rake_command?('db:migrate') || rake_command?('db:rollback')
56
+ end
57
+
58
+ def rake_command?(command)
59
+ File.basename($0) == 'rake' && ARGV.include?(command)
56
60
  end
57
61
 
58
62
  def start
@@ -1,3 +1,3 @@
1
1
  module BorderPatrol
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: border-patrol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-31 00:00:00.000000000 Z
12
+ date: 2013-11-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails