git-up 0.3.2 → 0.4.1

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/README.md CHANGED
@@ -12,3 +12,11 @@ although
12
12
 
13
13
  `git-up` might mess up your branches, or set your chest hair on fire, or be racist to your cat, I don't know. It works for me.
14
14
 
15
+ configuration
16
+ -------------
17
+
18
+ `git-up` now has some configuration. Yay.
19
+
20
+ As of `v0.4.1`, `git-up` can check your app for any new bundled gems and suggest a `bundle install` if necessary.
21
+
22
+ It slows the process down slightly, and is therefore enabled by setting `GIT_UP_BUNDLER_CHECK='true'` in your `.bashrc`, `.profile`, or whatever.
@@ -43,6 +43,8 @@ class GitUp
43
43
  end
44
44
  end
45
45
  end
46
+
47
+ check_bundler
46
48
  rescue GitError => e
47
49
  puts e.message
48
50
  exit 1
@@ -117,6 +119,18 @@ class GitUp
117
119
  end
118
120
  end
119
121
 
122
+ def check_bundler
123
+ return unless use_bundler?
124
+
125
+ begin
126
+ require 'bundler'
127
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('Gemfile')
128
+ Bundler.setup
129
+ rescue Bundler::GemNotFound
130
+ puts 'Gems are missing. You should `bundle install`.'.yellow
131
+ end
132
+ end
133
+
120
134
  def is_fast_forward?(a, b)
121
135
  merge_base(a.name, b.name) == b.commit.sha
122
136
  end
@@ -145,5 +159,11 @@ class GitUp
145
159
  @msg
146
160
  end
147
161
  end
162
+
163
+ private
164
+
165
+ def use_bundler?
166
+ ENV['GIT_UP_BUNDLER_CHECK'] == 'true' and File.exists? 'Gemfile'
167
+ end
148
168
  end
149
169
 
@@ -0,0 +1,3 @@
1
+ class GitUp
2
+ VERSION = "0.4.1"
3
+ end
metadata CHANGED
@@ -1,22 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-up
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
- - 3
9
- - 2
10
- version: 0.3.2
7
+ - 4
8
+ - 1
9
+ version: 0.4.1
11
10
  platform: ruby
12
11
  authors:
13
12
  - Aanand Prasad
13
+ - Elliot Crosby-McCullough
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-16 00:00:00 -04:00
19
- default_executable: git-up
18
+ date: 2010-10-21 00:00:00 +01:00
19
+ default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: thoughtbot-shoulda
@@ -26,7 +26,6 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- hash: 3
30
29
  segments:
31
30
  - 0
32
31
  version: "0"
@@ -40,7 +39,6 @@ dependencies:
40
39
  requirements:
41
40
  - - ">="
42
41
  - !ruby/object:Gem::Version
43
- hash: 11
44
42
  segments:
45
43
  - 1
46
44
  - 2
@@ -55,40 +53,34 @@ dependencies:
55
53
  requirements:
56
54
  - - ">="
57
55
  - !ruby/object:Gem::Version
58
- hash: 3
59
56
  segments:
60
57
  - 0
61
58
  version: "0"
62
59
  type: :runtime
63
60
  version_requirements: *id003
64
61
  description:
65
- email: aanand.prasad@gmail.com
62
+ email:
63
+ - aanand.prasad@gmail.com
64
+ - elliot.cm@gmail.com
66
65
  executables:
67
66
  - git-up
68
67
  extensions: []
69
68
 
70
- extra_rdoc_files:
71
- - LICENSE
72
- - README.md
69
+ extra_rdoc_files: []
70
+
73
71
  files:
74
- - .document
75
- - .gitignore
76
- - LICENSE
77
- - README.md
78
- - Rakefile
79
- - VERSION
80
72
  - bin/git-up
81
- - git-up.gemspec
73
+ - lib/git-up/version.rb
82
74
  - lib/git-up.rb
83
- - test/helper.rb
84
- - test/test_git-up.rb
75
+ - LICENSE
76
+ - README.md
85
77
  has_rdoc: true
86
78
  homepage: http://github.com/aanand/git-up
87
79
  licenses: []
88
80
 
89
81
  post_install_message:
90
- rdoc_options:
91
- - --charset=UTF-8
82
+ rdoc_options: []
83
+
92
84
  require_paths:
93
85
  - lib
94
86
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -96,7 +88,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
88
  requirements:
97
89
  - - ">="
98
90
  - !ruby/object:Gem::Version
99
- hash: 3
100
91
  segments:
101
92
  - 0
102
93
  version: "0"
@@ -105,7 +96,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
96
  requirements:
106
97
  - - ">="
107
98
  - !ruby/object:Gem::Version
108
- hash: 3
109
99
  segments:
110
100
  - 0
111
101
  version: "0"
@@ -116,6 +106,5 @@ rubygems_version: 1.3.7
116
106
  signing_key:
117
107
  specification_version: 3
118
108
  summary: git command to fetch and rebase all branches
119
- test_files:
120
- - test/helper.rb
121
- - test/test_git-up.rb
109
+ test_files: []
110
+
data/.document DELETED
@@ -1,5 +0,0 @@
1
- README.rdoc
2
- lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- LICENSE
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC
data/Rakefile DELETED
@@ -1,55 +0,0 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "git-up"
8
- gem.summary = %Q{git command to fetch and rebase all branches}
9
- gem.email = "aanand.prasad@gmail.com"
10
- gem.homepage = "http://github.com/aanand/git-up"
11
- gem.authors = ["Aanand Prasad"]
12
- gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
13
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
14
-
15
- gem.add_dependency "colored", ">= 1.2"
16
- gem.add_dependency "grit"
17
- end
18
- Jeweler::GemcutterTasks.new
19
- rescue LoadError
20
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
21
- end
22
-
23
- require 'rake/testtask'
24
- Rake::TestTask.new(:test) do |test|
25
- test.libs << 'lib' << 'test'
26
- test.pattern = 'test/**/test_*.rb'
27
- test.verbose = true
28
- end
29
-
30
- begin
31
- require 'rcov/rcovtask'
32
- Rcov::RcovTask.new do |test|
33
- test.libs << 'test'
34
- test.pattern = 'test/**/test_*.rb'
35
- test.verbose = true
36
- end
37
- rescue LoadError
38
- task :rcov do
39
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
40
- end
41
- end
42
-
43
- task :test => :check_dependencies
44
-
45
- task :default => :test
46
-
47
- require 'rake/rdoctask'
48
- Rake::RDocTask.new do |rdoc|
49
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
50
-
51
- rdoc.rdoc_dir = 'rdoc'
52
- rdoc.title = "git-up #{version}"
53
- rdoc.rdoc_files.include('README*')
54
- rdoc.rdoc_files.include('lib/**/*.rb')
55
- end
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.3.2
@@ -1,62 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{git-up}
8
- s.version = "0.3.2"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Aanand Prasad"]
12
- s.date = %q{2010-06-16}
13
- s.default_executable = %q{git-up}
14
- s.email = %q{aanand.prasad@gmail.com}
15
- s.executables = ["git-up"]
16
- s.extra_rdoc_files = [
17
- "LICENSE",
18
- "README.md"
19
- ]
20
- s.files = [
21
- ".document",
22
- ".gitignore",
23
- "LICENSE",
24
- "README.md",
25
- "Rakefile",
26
- "VERSION",
27
- "bin/git-up",
28
- "git-up.gemspec",
29
- "lib/git-up.rb",
30
- "test/helper.rb",
31
- "test/test_git-up.rb"
32
- ]
33
- s.homepage = %q{http://github.com/aanand/git-up}
34
- s.rdoc_options = ["--charset=UTF-8"]
35
- s.require_paths = ["lib"]
36
- s.rubygems_version = %q{1.3.7}
37
- s.summary = %q{git command to fetch and rebase all branches}
38
- s.test_files = [
39
- "test/helper.rb",
40
- "test/test_git-up.rb"
41
- ]
42
-
43
- if s.respond_to? :specification_version then
44
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
45
- s.specification_version = 3
46
-
47
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
48
- s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
49
- s.add_runtime_dependency(%q<colored>, [">= 1.2"])
50
- s.add_runtime_dependency(%q<grit>, [">= 0"])
51
- else
52
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
53
- s.add_dependency(%q<colored>, [">= 1.2"])
54
- s.add_dependency(%q<grit>, [">= 0"])
55
- end
56
- else
57
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
58
- s.add_dependency(%q<colored>, [">= 1.2"])
59
- s.add_dependency(%q<grit>, [">= 0"])
60
- end
61
- end
62
-
@@ -1,10 +0,0 @@
1
- require 'rubygems'
2
- require 'test/unit'
3
- require 'shoulda'
4
-
5
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
- $LOAD_PATH.unshift(File.dirname(__FILE__))
7
- require 'git-up'
8
-
9
- class Test::Unit::TestCase
10
- end
@@ -1,7 +0,0 @@
1
- require 'helper'
2
-
3
- class TestGitUp < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
6
- end
7
- end