git-utils 0.6.2 → 0.6.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.
- checksums.yaml +4 -4
- data/lib/git-utils/delete_remote_branch.rb +1 -1
- data/lib/git-utils/merge_branch.rb +1 -1
- data/lib/git-utils/open.rb +1 -1
- data/lib/git-utils/pull_request.rb +1 -1
- data/lib/git-utils/push_branch.rb +1 -1
- data/lib/git-utils/switch.rb +1 -1
- data/lib/git-utils/sync.rb +6 -2
- data/lib/git-utils/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0edf67d43b4a31f657051e8a36faea3284b6ea1b
|
4
|
+
data.tar.gz: b547a2b6c27f3768d2e138c486e564f1662e441c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cc1a1dbcdd2b1853cd596f27893ef9afb0ac27c577cafca19fa4b43a2a7805d1d0b51a68db6e3af6a5d8b8467f85bb2510d127748f4bacf4af3ede334c55790
|
7
|
+
data.tar.gz: e32dc6b3dacfa73f120ecab9585d3e7e4b830d01c072b1e2cca06b05abf8584e569599b74897fa80c48a35357aca41949d06f72a62b12259df8a8f3c1940a01e
|
@@ -19,7 +19,7 @@ class DeleteRemoteBranch < Command
|
|
19
19
|
system(command) && `#{command}`.strip.empty?
|
20
20
|
end
|
21
21
|
|
22
|
-
# Returns a command appropriate for executing at the command line
|
22
|
+
# Returns a command appropriate for executing at the command line.
|
23
23
|
def cmd
|
24
24
|
if delete_safely? || options.override
|
25
25
|
c = ["git push origin :#{target_branch}"]
|
@@ -11,7 +11,7 @@ class MergeBranch < Command
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
-
# Returns a command appropriate for executing at the command line
|
14
|
+
# Returns a command appropriate for executing at the command line.
|
15
15
|
# For example:
|
16
16
|
# git checkout master
|
17
17
|
# git merge --no-ff --log <branch>
|
data/lib/git-utils/open.rb
CHANGED
@@ -34,7 +34,7 @@ class Open < Command
|
|
34
34
|
origin_url.sub(pattern, replacement)
|
35
35
|
end
|
36
36
|
|
37
|
-
# Returns a command appropriate for executing at the command line
|
37
|
+
# Returns a command appropriate for executing at the command line..
|
38
38
|
def cmd
|
39
39
|
if options[:print]
|
40
40
|
puts page_url
|
@@ -37,7 +37,7 @@ class PullRequest < Command
|
|
37
37
|
origin_url.sub(pattern, replacement)
|
38
38
|
end
|
39
39
|
|
40
|
-
# Returns a command appropriate for executing at the command line
|
40
|
+
# Returns a command appropriate for executing at the command line.
|
41
41
|
def cmd
|
42
42
|
push = ["git push-branch"]
|
43
43
|
push += argument_string(unknown_options) unless unknown_options.empty?
|
@@ -11,7 +11,7 @@ class PushBranch < Command
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
-
# Returns a command appropriate for executing at the command line
|
14
|
+
# Returns a command appropriate for executing at the command line.
|
15
15
|
def cmd
|
16
16
|
c = ["git push --set-upstream origin #{current_branch}"]
|
17
17
|
c << argument_string(unknown_options) unless unknown_options.empty?
|
data/lib/git-utils/switch.rb
CHANGED
@@ -17,7 +17,7 @@ class Switch < Command
|
|
17
17
|
@other_branch ||= `git branch | grep #{pattern}`.split.first
|
18
18
|
end
|
19
19
|
|
20
|
-
# Returns a command appropriate for executing at the command line
|
20
|
+
# Returns a command appropriate for executing at the command line.
|
21
21
|
def cmd
|
22
22
|
"git checkout #{other_branch}"
|
23
23
|
end
|
data/lib/git-utils/sync.rb
CHANGED
@@ -5,15 +5,19 @@ class Sync < Command
|
|
5
5
|
def parser
|
6
6
|
OptionParser.new do |opts|
|
7
7
|
opts.banner = "Usage: git sync"
|
8
|
+
opts.on("-b", "--branch", "sync with given branch") do |opt|
|
9
|
+
self.options.branch = opt
|
10
|
+
end
|
8
11
|
opts.on_tail("-h", "--help", "this usage guide") do
|
9
12
|
puts opts.to_s; exit 0
|
10
13
|
end
|
11
14
|
end
|
12
15
|
end
|
13
16
|
|
14
|
-
# Returns a command appropriate for executing at the command line
|
17
|
+
# Returns a command appropriate for executing at the command line.
|
15
18
|
def cmd
|
16
|
-
|
19
|
+
branch = options[:branch] || 'master'
|
20
|
+
c = ["git checkout #{branch}"]
|
17
21
|
c << "git pull"
|
18
22
|
c << "git checkout #{current_branch}"
|
19
23
|
c.join("\n")
|
data/lib/git-utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Hartl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Add some Git utilities
|
14
14
|
email:
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.
|
97
|
+
rubygems_version: 2.4.1
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: See the README for full documentation
|