flipp 0.0.2.2 → 0.0.2.3

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.
@@ -5,7 +5,7 @@ require 'bundler'
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "flipp"
8
- s.version = '0.0.2.2'
8
+ s.version = '0.0.2.3'
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.authors = ["Mike Pack"]
11
11
  s.email = ["mikepackdev@gmail.com"]
@@ -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 'lib/flipp/git_hooks/post-checkout', File.expand_path('.git/hooks/post-checkout')
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
@@ -26,7 +26,7 @@ module Flipp
26
26
 
27
27
  def self.uninstall_hook
28
28
  puts 'Removing git hook...'
29
- FileUtils.rm File.expand_path('.git/hooks/post-checkout')
29
+ FileUtils.rm File.join(Rails.root, '.git/hooks/post-checkout')
30
30
  end
31
31
 
32
32
  def self.current_branch
@@ -1,6 +1,11 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Flipp::Helpers::GitHelper do
4
+ before do
5
+ module Rails; end
6
+ Rails.stub(:root).and_return(File.join(File.dirname(__FILE__), '..', '..', '..', '..'))
7
+ end
8
+
4
9
  describe '#hook_installed?' do
5
10
  it 'returns true when the hook exists' do
6
11
  FileUtils.touch '.git/hooks/post-checkout'
@@ -1,3 +1,3 @@
1
1
  $:.unshift File.expand_path('../..', __FILE__)
2
2
  require 'lib/flipp/helpers/git_helper'
3
- require 'lib/flipp/flipp'
3
+ require 'lib/flipp/flipp'
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.2
4
+ version: 0.0.2.3
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: &70272934317820 !ruby/object:Gem::Requirement
16
+ requirement: &70175643163200 !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: *70272934317820
24
+ version_requirements: *70175643163200
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: database_exporter
27
- requirement: &70272934317240 !ruby/object:Gem::Requirement
27
+ requirement: &70175643162240 !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: *70272934317240
35
+ version_requirements: *70175643162240
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: