capita_git 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +2 -0
- data/bin/gitc +3 -0
- data/lib/capita_git/man/gitc +1 -1
- data/lib/capita_git/man/gitc-check +1 -1
- data/lib/capita_git/man/gitc-check.txt +1 -1
- data/lib/capita_git/man/gitc.txt +1 -1
- data/lib/capita_git/repository.rb +9 -1
- data/lib/capita_git/version.rb +1 -1
- data/lib/capita_git.rb +3 -0
- metadata +7 -7
data/Gemfile.lock
CHANGED
data/bin/gitc
CHANGED
data/lib/capita_git/man/gitc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "GITC" "5" "January 2011" "GITC 0.1.
|
4
|
+
.TH "GITC" "5" "January 2011" "GITC 0.1.1" "GITC Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBgitc\fR \- git helper for CAPITA Unternehmensberatung GmbH
|
data/lib/capita_git/man/gitc.txt
CHANGED
@@ -12,6 +12,7 @@ module CapitaGit
|
|
12
12
|
|
13
13
|
def initialize(path)
|
14
14
|
@repository = Git.open path
|
15
|
+
check_for_changes
|
15
16
|
end
|
16
17
|
|
17
18
|
def update_from_remote
|
@@ -22,6 +23,13 @@ module CapitaGit
|
|
22
23
|
@repository.branches.local.select { |b| b.full == @repository.lib.branch_current }[0]
|
23
24
|
end
|
24
25
|
|
26
|
+
def check_for_changes
|
27
|
+
unless @repository.status.untracked.empty? and @repository.status.changed.empty? and @repository.status.deleted.empty? and
|
28
|
+
@repository.status.added.empty?
|
29
|
+
raise CapitaGit::UncleanError.new "Repository is not clean!"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
25
33
|
def create_feature_branch(name)
|
26
34
|
raise "Can't create feature branch from branch #{current_branch} since you already seem to be on one" if current_branch =~ /#{user_shortcut}/
|
27
35
|
system "git checkout -b #{user_shortcut}/#{current_branch}/#{name}"
|
@@ -69,7 +77,7 @@ module CapitaGit
|
|
69
77
|
end
|
70
78
|
|
71
79
|
def is_local_feature_branch?(name)
|
72
|
-
!
|
80
|
+
!name.match(/^#{user_shortcut}/).nil?
|
73
81
|
end
|
74
82
|
|
75
83
|
def create_remote_fixbranch_for_version(version)
|
data/lib/capita_git/version.rb
CHANGED
data/lib/capita_git.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capita_git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 25
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sebastian Georgi
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-01
|
19
|
+
date: 2011-02-01 00:00:00 +01:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -126,9 +126,9 @@ files:
|
|
126
126
|
- test/shoulda_macros.rb
|
127
127
|
- test/test_helper.rb
|
128
128
|
- lib/capita_git/man/gitc
|
129
|
-
- lib/capita_git/man/gitc.txt
|
130
129
|
- lib/capita_git/man/gitc-check.txt
|
131
130
|
- lib/capita_git/man/gitc-check
|
131
|
+
- lib/capita_git/man/gitc.txt
|
132
132
|
has_rdoc: true
|
133
133
|
homepage: https://github.com/capita/capita_git
|
134
134
|
licenses: []
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
requirements: []
|
160
160
|
|
161
161
|
rubyforge_project: capita_git
|
162
|
-
rubygems_version: 1.
|
162
|
+
rubygems_version: 1.3.7
|
163
163
|
signing_key:
|
164
164
|
specification_version: 3
|
165
165
|
summary: Git-automation tool for quick handling of common patterns for feature and fix branches
|