git-process 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +18 -2
- data/Gemfile +0 -1
- data/Gemfile.lock +0 -2
- data/README.md +15 -0
- data/bin/git-sync +5 -0
- data/bin/git-to-master +5 -0
- data/git-process.gemspec +0 -1
- data/lib/git-process/git_lib.rb +7 -4
- data/lib/git-process/version.rb +1 -1
- data/spec/git_lib_spec.rb +14 -3
- metadata +30 -32
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,20 @@
|
|
1
|
-
# CHANGELOG - 1.0.
|
1
|
+
# CHANGELOG - 1.0.3 #
|
2
|
+
|
3
|
+
### Since 1.0.2 ###
|
4
|
+
|
5
|
+
* Removes the last of the gem dependencies that require native code. This makes it fully compatible
|
6
|
+
with systems like Windows.
|
7
|
+
* Adds an option to explicitly set the remote server name.
|
8
|
+
|
9
|
+
### Since 1.0.1 ###
|
10
|
+
|
11
|
+
* Changes to dependencies to allow this to work on both Ruby 1.8 and 1.9
|
12
|
+
|
13
|
+
### Since 0.9.7 ###
|
14
|
+
|
15
|
+
* Adds --keep option to git-to-master
|
16
|
+
* Fixes problem trying to add/remove an empty list of files
|
17
|
+
* Documentation updates
|
2
18
|
|
3
19
|
### Since 0.9.7 ###
|
4
20
|
|
@@ -17,4 +33,4 @@
|
|
17
33
|
* Adds support for spaces and renames in Status
|
18
34
|
* No longer complains if it can't find _parking_
|
19
35
|
* Prompts to remove the local version of the integration branch
|
20
|
-
* Adds help for handling changed files
|
36
|
+
* Adds help for handling changed files
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -29,7 +29,6 @@ GEM
|
|
29
29
|
rspec-expectations (2.10.0)
|
30
30
|
diff-lcs (~> 1.1.3)
|
31
31
|
rspec-mocks (2.10.1)
|
32
|
-
ruby-termios (0.9.6)
|
33
32
|
trollop (1.16.2)
|
34
33
|
webmock (1.8.7)
|
35
34
|
addressable (>= 2.2.7)
|
@@ -46,7 +45,6 @@ DEPENDENCIES
|
|
46
45
|
rake (~> 0.9.2)
|
47
46
|
redcarpet (~> 2.1.1)
|
48
47
|
rspec (~> 2.10.0)
|
49
|
-
ruby-termios (~> 0.9.4)
|
50
48
|
trollop (~> 1.16.2)
|
51
49
|
webmock (~> 1.8.7)
|
52
50
|
yard (~> 0.8.2.1)
|
data/README.md
CHANGED
@@ -9,10 +9,23 @@ See the F.A.Q. for a much more complete explanation for the thoughts and assumpt
|
|
9
9
|
|
10
10
|
# Installation #
|
11
11
|
|
12
|
+
## Unix-based OS (OSX, Linux, etc.) Installation ##
|
13
|
+
|
12
14
|
$ sudo gem install git-process
|
13
15
|
|
14
16
|
Some older operating systems (such as OSX 10.6) are using an old version of RubyGems, which can cause installation problems. Do "`sudo gem update --system`" to fix.
|
15
17
|
|
18
|
+
## Windows Installation ##
|
19
|
+
|
20
|
+
1. Run http://cygwin.com/setup.exe
|
21
|
+
2. Go through the various prompts and then select to install "git", "curl", "ruby" and "openssh" (along with their dependencies)
|
22
|
+
3. Open a Cygwin terminal
|
23
|
+
4. `curl -L -O http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz`
|
24
|
+
5. `tar xfz rubygems-1.8.24.tgz`
|
25
|
+
6. `cd rubygems-1.8.24`
|
26
|
+
7. `ruby setup.rb`
|
27
|
+
8. `gem install git-process`
|
28
|
+
|
16
29
|
|
17
30
|
# Overview #
|
18
31
|
|
@@ -90,6 +103,7 @@ $ git to-master # 6
|
|
90
103
|
|
91
104
|
* `gitProcess.integrationBranch` : The name of the integration branch. Defaults to `master`, but can be set to `develop` or other.
|
92
105
|
* `gitProcess.keepLocalIntegrationBranch` : Controls asking about removing the local integration branch. Defaults to 'false' (i.e., do not assume the branch should be there).
|
106
|
+
* `gitProcess.remoteName` : Explicitly sets the remote server name to use.
|
93
107
|
|
94
108
|
|
95
109
|
# Assumptions #
|
@@ -109,6 +123,7 @@ $ git to-master # 6
|
|
109
123
|
* The first time you use a GitHub feature (e.g., "`git pull-request`"), this will ask for your username and password. It does not store them, but instead uses them to get an OAuth2 token, which is stored in "`git config gitProcess.github.authToken`".
|
110
124
|
* If you want to use a different integration branch other than "`master`", set the "`gitProcess.integrationBranch`" configuration value. (e.g., "`git config gitProcess.integrationBranch my-integ-branch`")
|
111
125
|
* This tries to respond "intelligently" to the use of 'rerere'.
|
126
|
+
* By default the first server name reported by `git remote` is used as the server/remote name. Since most projects only have a single remote (i.e., "origin") this works most of the time. But if you have multiple remotes and want to explicitly set it, use the `gitProcess.remoteName` configuration option.
|
112
127
|
|
113
128
|
|
114
129
|
# F.A.Q. #
|
data/bin/git-sync
CHANGED
@@ -28,6 +28,11 @@ If there is a problem, such as a merge conflict, this tries to \
|
|
28
28
|
resolve it automatically. If it can not do so in an automated way, \
|
29
29
|
if tells you the steps involved for doing so manually.
|
30
30
|
|
31
|
+
By default the first server name reported by 'git remote' is used as the server/remote name. \
|
32
|
+
Since most projects only have a single remote (i.e., "origin") this works most of the time. \
|
33
|
+
But if you have multiple remotes and want to explicitly set it, use the \
|
34
|
+
'gitProcess.remoteName' configuration option.
|
35
|
+
|
31
36
|
EXAMPLE
|
32
37
|
|
33
38
|
Assuming that the current branch is called "interesting_changes" and the integration \
|
data/bin/git-to-master
CHANGED
@@ -38,6 +38,11 @@ everything is done on a feature branch. In addition to being a much \
|
|
38
38
|
safer and more flexible way of working in general, it is also a \
|
39
39
|
requirement to take advantage of Pull Request functionality.
|
40
40
|
|
41
|
+
By default the first server name reported by 'git remote' is used as the server/remote name. \
|
42
|
+
Since most projects only have a single remote (i.e., "origin") this works most of the time. \
|
43
|
+
But if you have multiple remotes and want to explicitly set it, use the \
|
44
|
+
'gitProcess.remoteName' configuration option.
|
45
|
+
|
41
46
|
EXAMPLE
|
42
47
|
|
43
48
|
Assuming that the current branch is called "interesting_changes" and the integration \
|
data/git-process.gemspec
CHANGED
@@ -12,7 +12,6 @@ gemspec = Gem::Specification.new do |gem|
|
|
12
12
|
gem.add_dependency "json", "~> 1.7.3"
|
13
13
|
gem.add_dependency "trollop", "~> 1.16.2" # CLI options parser
|
14
14
|
gem.add_dependency "highline", "~> 1.6.12" # user CLI interaction
|
15
|
-
gem.add_dependency "ruby-termios", "~> 0.9.4" # used by highline to make things a little nicer
|
16
15
|
|
17
16
|
gem.files = `git ls-files`.split($\).delete_if{|f| f =~ /^\./}
|
18
17
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
data/lib/git-process/git_lib.rb
CHANGED
@@ -321,10 +321,13 @@ module GitProc
|
|
321
321
|
|
322
322
|
def remote_name
|
323
323
|
unless @remote_name
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
324
|
+
@remote_name = config('gitProcess.remoteName')
|
325
|
+
if @remote_name.nil? or @remote_name.empty?
|
326
|
+
remote_str = command(:remote)
|
327
|
+
unless remote_str == nil or remote_str.empty?
|
328
|
+
@remote_name = remote_str.split(/\n/)[0]
|
329
|
+
raise "!@remote_name.is_a? String" unless @remote_name.is_a? String
|
330
|
+
end
|
328
331
|
end
|
329
332
|
logger.debug {"Using remote name of '#{@remote_name}'"}
|
330
333
|
end
|
data/lib/git-process/version.rb
CHANGED
data/spec/git_lib_spec.rb
CHANGED
@@ -17,11 +17,11 @@ describe GitProc::GitLib do
|
|
17
17
|
|
18
18
|
@workdir = workdir
|
19
19
|
if workdir
|
20
|
-
|
20
|
+
if File.directory?(File.join(workdir, '.git'))
|
21
|
+
logger.debug { "Opening existing repository at #{workdir}" }
|
22
|
+
else
|
21
23
|
logger.info { "Initializing new repository at #{workdir}" }
|
22
24
|
command(:init)
|
23
|
-
else
|
24
|
-
logger.debug { "Opening existing repository at #{workdir}" }
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
@@ -176,6 +176,17 @@ describe GitProc::GitLib do
|
|
176
176
|
end
|
177
177
|
end
|
178
178
|
|
179
|
+
|
180
|
+
it "should work with an overridden remote name" do
|
181
|
+
change_file_and_commit('a', '')
|
182
|
+
|
183
|
+
clone('master', 'a_remote') do |gl|
|
184
|
+
gl.config('gitProcess.remoteName', 'something_else')
|
185
|
+
|
186
|
+
gl.remote_name.should == 'something_else'
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
179
190
|
end
|
180
191
|
|
181
192
|
end
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-process
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 17
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 1
|
7
8
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
9
|
+
- 3
|
10
|
+
version: 1.0.3
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Jim Moore
|
@@ -14,79 +15,72 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2012-
|
18
|
-
default_executable:
|
18
|
+
date: 2012-09-07 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
type: :runtime
|
22
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
22
|
+
none: false
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
+
hash: 7
|
26
27
|
segments:
|
27
28
|
- 1
|
28
29
|
- 4
|
29
30
|
- 0
|
30
31
|
version: 1.4.0
|
31
|
-
name: octokit
|
32
|
-
requirement: *id001
|
33
32
|
prerelease: false
|
34
|
-
|
33
|
+
requirement: *id001
|
35
34
|
type: :runtime
|
35
|
+
name: octokit
|
36
|
+
- !ruby/object:Gem::Dependency
|
36
37
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
37
39
|
requirements:
|
38
40
|
- - ~>
|
39
41
|
- !ruby/object:Gem::Version
|
42
|
+
hash: 13
|
40
43
|
segments:
|
41
44
|
- 1
|
42
45
|
- 7
|
43
46
|
- 3
|
44
47
|
version: 1.7.3
|
45
|
-
name: json
|
46
|
-
requirement: *id002
|
47
48
|
prerelease: false
|
48
|
-
|
49
|
+
requirement: *id002
|
49
50
|
type: :runtime
|
51
|
+
name: json
|
52
|
+
- !ruby/object:Gem::Dependency
|
50
53
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
51
55
|
requirements:
|
52
56
|
- - ~>
|
53
57
|
- !ruby/object:Gem::Version
|
58
|
+
hash: 83
|
54
59
|
segments:
|
55
60
|
- 1
|
56
61
|
- 16
|
57
62
|
- 2
|
58
63
|
version: 1.16.2
|
59
|
-
name: trollop
|
60
|
-
requirement: *id003
|
61
64
|
prerelease: false
|
62
|
-
|
65
|
+
requirement: *id003
|
63
66
|
type: :runtime
|
67
|
+
name: trollop
|
68
|
+
- !ruby/object:Gem::Dependency
|
64
69
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
65
71
|
requirements:
|
66
72
|
- - ~>
|
67
73
|
- !ruby/object:Gem::Version
|
74
|
+
hash: 23
|
68
75
|
segments:
|
69
76
|
- 1
|
70
77
|
- 6
|
71
78
|
- 12
|
72
79
|
version: 1.6.12
|
73
|
-
name: highline
|
74
|
-
requirement: *id004
|
75
80
|
prerelease: false
|
76
|
-
|
81
|
+
requirement: *id004
|
77
82
|
type: :runtime
|
78
|
-
|
79
|
-
requirements:
|
80
|
-
- - ~>
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
segments:
|
83
|
-
- 0
|
84
|
-
- 9
|
85
|
-
- 4
|
86
|
-
version: 0.9.4
|
87
|
-
name: ruby-termios
|
88
|
-
requirement: *id005
|
89
|
-
prerelease: false
|
83
|
+
name: highline
|
90
84
|
description: A set of scripts to make working with git easier and more consistent
|
91
85
|
email:
|
92
86
|
- moore.jim@gmail.com
|
@@ -146,7 +140,6 @@ files:
|
|
146
140
|
- spec/rebase_to_master_spec.rb
|
147
141
|
- spec/spec_helper.rb
|
148
142
|
- spec/sync_spec.rb
|
149
|
-
has_rdoc: true
|
150
143
|
homepage: http://jdigger.github.com/git-process/
|
151
144
|
licenses:
|
152
145
|
- ASL2
|
@@ -156,25 +149,29 @@ rdoc_options: []
|
|
156
149
|
require_paths:
|
157
150
|
- lib
|
158
151
|
required_ruby_version: !ruby/object:Gem::Requirement
|
152
|
+
none: false
|
159
153
|
requirements:
|
160
154
|
- - ">="
|
161
155
|
- !ruby/object:Gem::Version
|
156
|
+
hash: 57
|
162
157
|
segments:
|
163
158
|
- 1
|
164
159
|
- 8
|
165
160
|
- 7
|
166
161
|
version: 1.8.7
|
167
162
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
|
+
none: false
|
168
164
|
requirements:
|
169
165
|
- - ">="
|
170
166
|
- !ruby/object:Gem::Version
|
167
|
+
hash: 3
|
171
168
|
segments:
|
172
169
|
- 0
|
173
170
|
version: "0"
|
174
171
|
requirements: []
|
175
172
|
|
176
173
|
rubyforge_project:
|
177
|
-
rubygems_version: 1.
|
174
|
+
rubygems_version: 1.8.15
|
178
175
|
signing_key:
|
179
176
|
specification_version: 3
|
180
177
|
summary: A set of scripts for a good git process
|
@@ -192,3 +189,4 @@ test_files:
|
|
192
189
|
- spec/rebase_to_master_spec.rb
|
193
190
|
- spec/spec_helper.rb
|
194
191
|
- spec/sync_spec.rb
|
192
|
+
has_rdoc:
|