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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: afcfa0e6ef3e6fd41d9ab5485ea6ab5b06c24dd0
4
- data.tar.gz: b909ff1cc51a48dd2c1365a2322ca0a76ca2897c
3
+ metadata.gz: 0edf67d43b4a31f657051e8a36faea3284b6ea1b
4
+ data.tar.gz: b547a2b6c27f3768d2e138c486e564f1662e441c
5
5
  SHA512:
6
- metadata.gz: 80a28df650412c734c26e7f396584ed68c6b3699efb5e6852bc6d55cd6c3c1fd3ae88fd2c0536783b720109d4306e0f210070260cd9984ec840140f276db32ae
7
- data.tar.gz: d2b1dca73f3393db8fbae563798d117856d5cea48ec8cb5d5cdb188d7297a5d1b19df1306bc43f2ac5b276a21c9fd19032810ddb907487ba632803f164ec1054
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>
@@ -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?
@@ -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
@@ -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
- c = ["git checkout master"]
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")
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module Utils
3
- VERSION = "0.6.2"
3
+ VERSION = "0.6.3"
4
4
  end
5
5
  end
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.2
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-08-06 00:00:00.000000000 Z
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.3.0
97
+ rubygems_version: 2.4.1
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: See the README for full documentation