gitup 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/gitup.gemspec +2 -2
- data/lib/gitup.rb +17 -7
- metadata +4 -4
data/gitup.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{gitup}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["David Svensson"]
|
12
|
-
s.date = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-05}
|
13
13
|
s.description = %q{Easily push and pull from remote repositories without running into conflicts.}
|
14
14
|
s.email = %q{david@standout.se}
|
15
15
|
s.executables = ["gitdown", "gitup"]
|
data/lib/gitup.rb
CHANGED
@@ -6,6 +6,7 @@ class Gitup
|
|
6
6
|
puts "You are on the master branch. Gitdown is intended to be used in local branches."
|
7
7
|
puts "git checkout -b yournewbranch to create a new local branch"
|
8
8
|
puts "or git checkout yourexistingbranch to checkout an existing one."
|
9
|
+
system "git pull origin master"
|
9
10
|
exit
|
10
11
|
end
|
11
12
|
|
@@ -34,14 +35,23 @@ class Gitup
|
|
34
35
|
|
35
36
|
unless everything_commited?
|
36
37
|
system "git status"
|
37
|
-
|
38
|
+
puts "Warning: You have uncommitted changes. Continue? (y/n)"
|
39
|
+
input = gets.chomp
|
40
|
+
|
41
|
+
if input.downcase == 'y'
|
42
|
+
# Stash the changes, do the push and then apply our stash
|
43
|
+
system "git stash"
|
44
|
+
self.run_gitup_commands(current_branch)
|
45
|
+
system "git stash apply"
|
46
|
+
else
|
47
|
+
puts 'Good girl.'
|
48
|
+
exit
|
49
|
+
end
|
50
|
+
else
|
51
|
+
# Push it!
|
52
|
+
self.run_gitup_commands(current_branch)
|
53
|
+
exit
|
38
54
|
end
|
39
|
-
|
40
|
-
# Push it!
|
41
|
-
self.run_gitup_commands(current_branch)
|
42
|
-
|
43
|
-
puts "Finished."
|
44
|
-
exit
|
45
55
|
end
|
46
56
|
|
47
57
|
def self.on_master?
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Svensson
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-05 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|