git-it 0.0.5 → 0.0.6
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.rdoc +1 -1
- data/bin/git-it +1 -1
- data/lib/git-it/{controller.rb → commander.rb} +5 -3
- data/lib/git-it/version.rb +1 -1
- data/lib/git-it.rb +1 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -17,6 +17,6 @@ Open current branch in the web. Use it as an easy way to issue pull request in g
|
|
17
17
|
|
18
18
|
== Documentation
|
19
19
|
|
20
|
-
API Documentation is available {here}[http://more-ron.github.com/git-it/index.html]. Recommend starting with GitIt::
|
20
|
+
API Documentation is available {here}[http://more-ron.github.com/git-it/index.html]. Recommend starting with GitIt::Commander.
|
21
21
|
|
22
22
|
:include:git-it.rdoc
|
data/bin/git-it
CHANGED
@@ -2,7 +2,7 @@ require 'rugged'
|
|
2
2
|
# require 'debugger'
|
3
3
|
|
4
4
|
# Grand central station for git it commands
|
5
|
-
class GitIt::
|
5
|
+
class GitIt::Commander
|
6
6
|
|
7
7
|
attr_reader :repository
|
8
8
|
attr_reader :git_object
|
@@ -11,7 +11,7 @@ class GitIt::Controller
|
|
11
11
|
# * --help - Show this message
|
12
12
|
# * -p, --path=path - repository path (default: {{present_working_directory}})
|
13
13
|
# * -s, --sha=sha - SHA1 (default: {{current_head}})
|
14
|
-
# * --version -
|
14
|
+
# * --version - Show gem's version
|
15
15
|
def initialize(options)
|
16
16
|
@global_options = options
|
17
17
|
@repository = Rugged::Repository.new( get_path(options[:path]) )
|
@@ -31,7 +31,9 @@ class GitIt::Controller
|
|
31
31
|
github_link = remote_origin_url.gsub("git@github.com:", "https://github.com/")
|
32
32
|
# => https://github.com/more-ron/git-it.git
|
33
33
|
|
34
|
-
branch_name = closest_remote_branch.
|
34
|
+
branch_name = closest_remote_branch.name.gsub("origin/", "")
|
35
|
+
# origin/gh-pages => gh-pages
|
36
|
+
branch_name = closest_remote_branch.target.gsub("refs/remotes/origin/", "") if branch_name == "HEAD"
|
35
37
|
# refs/remotes/origin/master => master
|
36
38
|
|
37
39
|
github_link = github_link.gsub(".git", "/tree/#{ branch_name }")
|
data/lib/git-it/version.rb
CHANGED
data/lib/git-it.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-it
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -117,7 +117,7 @@ extra_rdoc_files:
|
|
117
117
|
- git-it.rdoc
|
118
118
|
files:
|
119
119
|
- bin/git-it
|
120
|
-
- lib/git-it/
|
120
|
+
- lib/git-it/commander.rb
|
121
121
|
- lib/git-it/global_helper.rb
|
122
122
|
- lib/git-it/version.rb
|
123
123
|
- lib/git-it.rb
|