flipp 0.0.2.6 → 0.0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/flipp.gemspec +1 -1
- data/lib/flipp/flipp.rb +0 -4
- data/lib/flipp/helpers/git_helper.rb +1 -1
- data/lib/flipp/railtie.rb +1 -1
- metadata +5 -5
data/flipp.gemspec
CHANGED
data/lib/flipp/flipp.rb
CHANGED
@@ -5,10 +5,6 @@ require File.join(File.dirname(__FILE__), 'helpers/git_helper')
|
|
5
5
|
|
6
6
|
# The Flipp class orchestrates the actual switching of databaseses
|
7
7
|
module Flipp
|
8
|
-
# Allow storage of the gem's root directory (to build paths)
|
9
|
-
class << self; attr_accessor :root end
|
10
|
-
@root = File.dirname(__FILE__)
|
11
|
-
|
12
8
|
class Flipp
|
13
9
|
def initialize(branch = Flipp::GitHelper.current_branch)
|
14
10
|
@branch = branch
|
@@ -16,7 +16,7 @@ module Flipp
|
|
16
16
|
|
17
17
|
# Copy the file to the git hooks
|
18
18
|
puts 'Moving git hook into place...'
|
19
|
-
FileUtils.cp File.join(
|
19
|
+
FileUtils.cp File.join(File.dirname(__FILE__), '..', 'git_hooks', 'post-checkout'), File.join(Rails.root, '.git/hooks/post-checkout')
|
20
20
|
# And give it execute permissions
|
21
21
|
FileUtils.chmod 0755, '.git/hooks/post-checkout'
|
22
22
|
else
|
data/lib/flipp/railtie.rb
CHANGED
@@ -5,7 +5,7 @@ module Flipp
|
|
5
5
|
initializer "restablish_connection.configure_rails_initialization" do
|
6
6
|
if Rails.env.development? and ::Flipp::Helpers::GitHelper.hook_installed?
|
7
7
|
# Use the connection determined by flipp
|
8
|
-
flipp = Flipp::Flipp.new
|
8
|
+
flipp = ::Flipp::Flipp.new
|
9
9
|
flipp.switch_databases
|
10
10
|
end
|
11
11
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.2.
|
4
|
+
version: 0.0.2.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-03-13 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
16
|
-
requirement: &
|
16
|
+
requirement: &70259369879200 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70259369879200
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: database_exporter
|
27
|
-
requirement: &
|
27
|
+
requirement: &70259369878440 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70259369878440
|
36
36
|
description: To alleviate issues around highly divergent development databases on
|
37
37
|
feature/refactor branches, flipp helps switch databases upon new branch checkouts.
|
38
38
|
email:
|