warp_drive 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/bin/warpify CHANGED
@@ -15,9 +15,11 @@ require 'warp_drive/tasks'
15
15
  WarpDrive.configure do |config|
16
16
  # Define your gem spec settings here:
17
17
  config.gem.version = "0.0.1"
18
+ config.gem.name = '#{FileUtils.pwd}'
18
19
 
19
20
  # Add your gem dependencies here:
20
- config.dependencies = {'warp_drive' => '>=0.1.4'}
21
+ config.dependencies = {'warp_drive' => '>=0.1.8'}
22
+
21
23
  end
22
24
  }
23
25
  end
data/lib/warp_drive.rb CHANGED
@@ -14,6 +14,18 @@ class Hash # :nodoc:
14
14
 
15
15
  end # Hash
16
16
 
17
+ module Kernel # :nodoc:
18
+
19
+ def run_once
20
+ path = File.expand_path(caller.first)
21
+ unless ($__already_run_block ||= []).include?(path)
22
+ yield
23
+ $__already_run_block << path
24
+ end
25
+ end
26
+
27
+ end
28
+
17
29
 
18
30
  require 'configatron'
19
31
  require 'genosaurus'
@@ -1,14 +1,16 @@
1
1
  module ActiveRecord # :nodoc:
2
2
  class Migrator # :nodoc:
3
-
4
- def migrations_with_warp_drive
5
- migs = []
6
- migs << ActiveRecord::Migrator.new(:up, WarpDrive::Path.db.migrate).migrations
7
- migs << ActiveRecord::Migrator.new(:up, File.join(RAILS_ROOT, 'db', 'migrate')).migrations
8
- migs.flatten
3
+
4
+ run_once do
5
+ def migrations_with_warp_drive
6
+ migs = []
7
+ migs << ActiveRecord::Migrator.new(:up, WarpDrive::Path.db.migrate).migrations_without_warp_drive
8
+ migs << ActiveRecord::Migrator.new(:up, File.join(RAILS_ROOT, 'db', 'migrate')).migrations_without_warp_drive
9
+ migs.flatten
10
+ end
11
+
12
+ alias_method_chain :migrations, :warp_drive
9
13
  end
10
14
 
11
- alias_method_chain :migrations, :warp_drive
12
-
13
15
  end
14
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warp_drive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - markbates