git_reflow 0.8.10 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/multi-ruby-tests.yml +33 -0
- data/.rubocop.yml +2 -0
- data/.ruby-version +1 -1
- data/Appraisals +1 -6
- data/CHANGELOG.md +466 -348
- data/Gemfile.lock +100 -70
- data/LICENSE +20 -20
- data/README.md +36 -12
- data/Rakefile +15 -8
- data/Workflow +3 -0
- data/bin/console +7 -7
- data/bin/setup +6 -6
- data/exe/git-reflow +14 -30
- data/git_reflow.gemspec +25 -24
- data/lib/git_reflow.rb +3 -14
- data/lib/git_reflow/config.rb +52 -17
- data/lib/git_reflow/git_helpers.rb +69 -22
- data/lib/git_reflow/git_server/base.rb +68 -68
- data/lib/git_reflow/git_server/git_hub.rb +53 -40
- data/lib/git_reflow/git_server/git_hub/pull_request.rb +25 -17
- data/lib/git_reflow/git_server/pull_request.rb +19 -3
- data/lib/git_reflow/merge_error.rb +9 -9
- data/lib/git_reflow/rspec.rb +1 -0
- data/lib/git_reflow/rspec/command_line_helpers.rb +23 -6
- data/lib/git_reflow/rspec/stub_helpers.rb +13 -13
- data/lib/git_reflow/rspec/workflow_helpers.rb +18 -0
- data/lib/git_reflow/sandbox.rb +16 -6
- data/lib/git_reflow/version.rb +1 -1
- data/lib/git_reflow/workflow.rb +305 -10
- data/lib/git_reflow/workflows/FlatMergeWorkflow +38 -0
- data/lib/git_reflow/workflows/core.rb +208 -79
- data/spec/fixtures/authentication_failure.json +3 -0
- data/spec/fixtures/awesome_workflow.rb +2 -6
- data/spec/fixtures/git/git_config +7 -7
- data/spec/fixtures/issues/comment.json.erb +27 -27
- data/spec/fixtures/issues/comments.json +29 -29
- data/spec/fixtures/issues/comments.json.erb +15 -15
- data/spec/fixtures/pull_requests/comment.json.erb +45 -45
- data/spec/fixtures/pull_requests/comments.json +47 -47
- data/spec/fixtures/pull_requests/comments.json.erb +15 -15
- data/spec/fixtures/pull_requests/commits.json +29 -29
- data/spec/fixtures/pull_requests/external_pull_request.json +145 -145
- data/spec/fixtures/pull_requests/pull_request.json +142 -142
- data/spec/fixtures/pull_requests/pull_request.json.erb +142 -142
- data/spec/fixtures/pull_requests/pull_request_branch_nonexistent_error.json +32 -0
- data/spec/fixtures/pull_requests/pull_request_exists_error.json +32 -32
- data/spec/fixtures/pull_requests/pull_requests.json +136 -136
- data/spec/fixtures/repositories/commit.json +53 -53
- data/spec/fixtures/repositories/commit.json.erb +53 -53
- data/spec/fixtures/repositories/commits.json.erb +13 -13
- data/spec/fixtures/repositories/statuses.json +31 -31
- data/spec/fixtures/users/user.json +32 -0
- data/spec/lib/git_reflow/git_helpers_spec.rb +115 -12
- data/spec/lib/git_reflow/git_server/git_hub/pull_request_spec.rb +6 -6
- data/spec/lib/git_reflow/git_server/git_hub_spec.rb +77 -3
- data/spec/lib/git_reflow/git_server/pull_request_spec.rb +41 -7
- data/spec/lib/git_reflow/workflow_spec.rb +259 -14
- data/spec/lib/git_reflow/workflows/core_spec.rb +224 -65
- data/spec/lib/git_reflow/workflows/flat_merge_spec.rb +17 -6
- data/spec/lib/git_reflow_spec.rb +2 -25
- data/spec/spec_helper.rb +3 -0
- data/spec/support/github_helpers.rb +1 -1
- data/spec/support/mock_pull_request.rb +17 -17
- data/spec/support/web_mocks.rb +39 -39
- metadata +52 -53
- data/circle.yml +0 -26
- data/lib/git_reflow/commands/deliver.rb +0 -10
- data/lib/git_reflow/commands/refresh.rb +0 -20
- data/lib/git_reflow/commands/review.rb +0 -13
- data/lib/git_reflow/commands/setup.rb +0 -11
- data/lib/git_reflow/commands/stage.rb +0 -9
- data/lib/git_reflow/commands/start.rb +0 -18
- data/lib/git_reflow/commands/status.rb +0 -7
- data/lib/git_reflow/workflows/flat_merge.rb +0 -10
- data/spec/fixtures/workflow_with_super.rb +0 -8
data/Gemfile.lock
CHANGED
@@ -1,115 +1,145 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
git_reflow (0.
|
4
|
+
git_reflow (0.9.4)
|
5
|
+
bundler (>= 1.10.0)
|
6
|
+
codenamev_bitbucket_api (= 0.4.1)
|
5
7
|
colorize (>= 0.7.0)
|
6
|
-
github_api (= 0.
|
7
|
-
gli (= 2.17.0)
|
8
|
+
github_api (= 0.19)
|
8
9
|
highline
|
9
10
|
httpclient
|
10
|
-
reenhanced_bitbucket_api (= 0.3.2)
|
11
11
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
|
15
|
+
activesupport (6.0.3.4)
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
|
+
i18n (>= 0.7, < 2)
|
18
|
+
minitest (~> 5.1)
|
19
|
+
tzinfo (~> 1.1)
|
20
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
21
|
+
addressable (2.7.0)
|
22
|
+
public_suffix (>= 2.0.2, < 5.0)
|
16
23
|
appraisal (2.2.0)
|
17
24
|
bundler
|
18
25
|
rake
|
19
26
|
thor (>= 0.14.0)
|
20
|
-
byebug (
|
27
|
+
byebug (11.1.3)
|
21
28
|
chronic (0.10.2)
|
22
|
-
|
29
|
+
codenamev_bitbucket_api (0.4.1)
|
30
|
+
faraday (< 2.0)
|
31
|
+
faraday_middleware (< 2.0)
|
32
|
+
hashie
|
33
|
+
multi_json (< 2.0)
|
34
|
+
nokogiri (>= 1.5.2)
|
35
|
+
simple_oauth (>= 0.3.0)
|
36
|
+
coderay (1.1.3)
|
23
37
|
colorize (0.8.1)
|
24
|
-
|
25
|
-
|
38
|
+
concurrent-ruby (1.1.7)
|
39
|
+
crack (0.4.4)
|
26
40
|
descendants_tracker (0.0.4)
|
27
41
|
thread_safe (~> 0.3, >= 0.3.1)
|
28
|
-
diff-lcs (1.
|
29
|
-
faraday (
|
42
|
+
diff-lcs (1.4.4)
|
43
|
+
faraday (1.1.0)
|
30
44
|
multipart-post (>= 1.2, < 3)
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
45
|
+
ruby2_keywords
|
46
|
+
faraday-http-cache (2.2.0)
|
47
|
+
faraday (>= 0.8)
|
48
|
+
faraday_middleware (1.0.0)
|
49
|
+
faraday (~> 1.0)
|
50
|
+
github_api (0.19.0)
|
51
|
+
addressable (~> 2.4)
|
35
52
|
descendants_tracker (~> 0.0.4)
|
36
|
-
faraday (
|
37
|
-
hashie (>= 3.
|
38
|
-
mime-types (>= 1.16, < 3.0)
|
53
|
+
faraday (>= 0.8, < 2)
|
54
|
+
hashie (~> 3.5, >= 3.5.2)
|
39
55
|
oauth2 (~> 1.0)
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
56
|
+
github_changelog_generator (1.15.2)
|
57
|
+
activesupport
|
58
|
+
faraday-http-cache
|
59
|
+
multi_json
|
60
|
+
octokit (~> 4.6)
|
61
|
+
rainbow (>= 2.2.1)
|
62
|
+
rake (>= 10.0)
|
63
|
+
retriable (~> 3.0)
|
64
|
+
hashdiff (1.0.1)
|
65
|
+
hashie (3.6.0)
|
66
|
+
highline (2.0.3)
|
44
67
|
httpclient (2.8.3)
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
68
|
+
i18n (1.8.5)
|
69
|
+
concurrent-ruby (~> 1.0)
|
70
|
+
jwt (2.2.2)
|
71
|
+
method_source (1.0.0)
|
72
|
+
mini_portile2 (2.4.0)
|
73
|
+
minitest (5.14.2)
|
74
|
+
multi_json (1.15.0)
|
50
75
|
multi_xml (0.6.0)
|
51
|
-
multipart-post (2.
|
52
|
-
nokogiri (1.
|
53
|
-
mini_portile2 (~> 2.
|
54
|
-
oauth2 (1.4.
|
55
|
-
faraday (>= 0.8, < 0
|
56
|
-
jwt (
|
76
|
+
multipart-post (2.1.1)
|
77
|
+
nokogiri (1.10.10)
|
78
|
+
mini_portile2 (~> 2.4.0)
|
79
|
+
oauth2 (1.4.4)
|
80
|
+
faraday (>= 0.8, < 2.0)
|
81
|
+
jwt (>= 1.0, < 3.0)
|
57
82
|
multi_json (~> 1.3)
|
58
83
|
multi_xml (~> 0.5)
|
59
84
|
rack (>= 1.2, < 3)
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
pry
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
rspec-
|
78
|
-
rspec-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
rspec-expectations (3.7.0)
|
85
|
+
octokit (4.19.0)
|
86
|
+
faraday (>= 0.9)
|
87
|
+
sawyer (~> 0.8.0, >= 0.5.3)
|
88
|
+
pry (0.13.1)
|
89
|
+
coderay (~> 1.1)
|
90
|
+
method_source (~> 1.0)
|
91
|
+
pry-byebug (3.9.0)
|
92
|
+
byebug (~> 11.0)
|
93
|
+
pry (~> 0.13.0)
|
94
|
+
public_suffix (4.0.6)
|
95
|
+
rack (2.2.3)
|
96
|
+
rainbow (3.0.0)
|
97
|
+
rake (13.0.1)
|
98
|
+
rdoc (6.2.1)
|
99
|
+
retriable (3.1.2)
|
100
|
+
rspec (3.10.0)
|
101
|
+
rspec-core (~> 3.10.0)
|
102
|
+
rspec-expectations (~> 3.10.0)
|
103
|
+
rspec-mocks (~> 3.10.0)
|
104
|
+
rspec-core (3.10.0)
|
105
|
+
rspec-support (~> 3.10.0)
|
106
|
+
rspec-expectations (3.10.0)
|
83
107
|
diff-lcs (>= 1.2.0, < 2.0)
|
84
|
-
rspec-support (~> 3.
|
85
|
-
rspec-mocks (3.
|
108
|
+
rspec-support (~> 3.10.0)
|
109
|
+
rspec-mocks (3.10.0)
|
86
110
|
diff-lcs (>= 1.2.0, < 2.0)
|
87
|
-
rspec-support (~> 3.
|
88
|
-
rspec-support (3.
|
89
|
-
|
111
|
+
rspec-support (~> 3.10.0)
|
112
|
+
rspec-support (3.10.0)
|
113
|
+
ruby2_keywords (0.0.2)
|
114
|
+
sawyer (0.8.2)
|
115
|
+
addressable (>= 2.3.5)
|
116
|
+
faraday (> 0.8, < 2.0)
|
90
117
|
simple_oauth (0.3.1)
|
91
|
-
thor (0.
|
118
|
+
thor (1.0.1)
|
92
119
|
thread_safe (0.3.6)
|
93
|
-
|
120
|
+
tzinfo (1.2.7)
|
121
|
+
thread_safe (~> 0.1)
|
122
|
+
webmock (3.9.3)
|
94
123
|
addressable (>= 2.3.6)
|
95
124
|
crack (>= 0.3.2)
|
96
|
-
hashdiff
|
97
|
-
wwtd (1.
|
125
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
126
|
+
wwtd (1.4.0)
|
127
|
+
zeitwerk (2.4.1)
|
98
128
|
|
99
129
|
PLATFORMS
|
100
130
|
ruby
|
101
131
|
|
102
132
|
DEPENDENCIES
|
103
133
|
appraisal (= 2.2.0)
|
104
|
-
bundler (~> 1.16)
|
105
134
|
chronic
|
106
135
|
git_reflow!
|
136
|
+
github_changelog_generator
|
107
137
|
pry-byebug
|
108
|
-
rake (~>
|
138
|
+
rake (~> 13.0.1)
|
109
139
|
rdoc
|
110
|
-
rspec (~> 3.
|
140
|
+
rspec (~> 3.9)
|
111
141
|
webmock
|
112
|
-
wwtd (= 1.
|
142
|
+
wwtd (= 1.4)
|
113
143
|
|
114
144
|
BUNDLED WITH
|
115
|
-
1.
|
145
|
+
2.1.4
|
data/LICENSE
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2014 Reenhanced L.L.C.
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
-
this software and associated documentation files (the "Software"), to deal in
|
7
|
-
the Software without restriction, including without limitation the rights to
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
-
subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Reenhanced L.L.C.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -4,11 +4,11 @@
|
|
4
4
|
</h1>
|
5
5
|
|
6
6
|
<p>
|
7
|
-
<a href="https://
|
8
|
-
<img alt="
|
7
|
+
<a href="https://actions-badge.atrox.dev/reenhanced/gitreflow/goto?ref=master" title="git workflow">
|
8
|
+
<img alt="Git workflow powered by git-reflow" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Freenhanced%2Fgitreflow%2Fbadge%3Fref%3Dmaster&style=flat">
|
9
9
|
</a>
|
10
10
|
<a href="https://github.com/reenhanced/gitreflow" title="git workflow">
|
11
|
-
<img alt="Git workflow powered by git-reflow" src="https://img.shields.io/badge/git--reflow-v0.
|
11
|
+
<img alt="Git workflow powered by git-reflow" src="https://img.shields.io/badge/git--reflow-v0.9.0-blue.svg?style=flat">
|
12
12
|
</a>
|
13
13
|
<a href="http://inch-ci.org/github/reenhanced/gitreflow" title="documentation coverage">
|
14
14
|
<img src="http://inch-ci.org/github/reenhanced/gitreflow.svg?branch=master&style=shields" alt="Git-Reflow Documentation" />
|
@@ -117,7 +117,7 @@ This sets up a feature branch remotely and brings a local copy to your machine.
|
|
117
117
|
|
118
118
|
`git reflow start` takes in the name of the new branch name that you want to create your feature on.
|
119
119
|
In addition, it takes in an optional flag of a _base-branch_ name (`--base`). If you don't pass in this parameter,
|
120
|
-
then it
|
120
|
+
then it will look up the `reflow.base-branch` git configuration or default to "master". The base branch name is the base branch that you want to base your feature off of.
|
121
121
|
This ensures that every time you start a new base branch, it will be based off of your latest remote base.
|
122
122
|
|
123
123
|
git reflow start nh-branch-name --base base-branch-name
|
@@ -137,6 +137,9 @@ git reflow refresh -r <remote-location> -b <base-branch>
|
|
137
137
|
|
138
138
|
You pass in the name of the remote to fetch from and the name of the **base-branch** that you would like to merge into your **feature-branch**. The **remote-location** defaults to `origin` and the base-branch defaults to `master`. This command also takes in remote and branch name as flag options.
|
139
139
|
|
140
|
+
> **Note:** If no `base-branch` argument is provided, then we'll look for a `reflow.base-branch` git
|
141
|
+
> configuration and fallback to `master` as the default.
|
142
|
+
|
140
143
|
### Reviewing your work
|
141
144
|
![git reflow review](http://reenhanced.com/reflow/git-reflow-review.gif)
|
142
145
|
```
|
@@ -150,9 +153,11 @@ We assume you know what you're doing, so if you need something different, do it
|
|
150
153
|
|
151
154
|
After making commits to your branch, run `review`. Didn't push it up? No problem, we'll do it for you.
|
152
155
|
```
|
153
|
-
git reflow review -t <title> -m <message>
|
156
|
+
git reflow review -t <title> -m <message> <base-branch>
|
154
157
|
```
|
155
|
-
> **Note:** `-t` and `-m` are optional.
|
158
|
+
> **Note:** `-t` and `-m` are optional, as is the `base-branch` argument. If no
|
159
|
+
> base-branch is provided, then we'll look for a `reflow.base-branch` git
|
160
|
+
> configuration and fallback to `master` as the default.
|
156
161
|
|
157
162
|
If you do not pass the title or message options to the review command, you will be given an editor to write your PR request commit message, similar to `git commit`. The first line is the title, the rest is the body.
|
158
163
|
|
@@ -202,9 +207,12 @@ If not, create it and print "Pull request created at http://pull-url/". If so, p
|
|
202
207
|
### Checking your branch status
|
203
208
|
![git reflow status](http://reenhanced.com/reflow/git-reflow-status.gif)
|
204
209
|
```
|
205
|
-
git reflow status
|
210
|
+
git reflow status <base-branch>
|
206
211
|
```
|
207
212
|
|
213
|
+
> **Note:** If no `base-branch` is provided, then we'll look for a `reflow.base-branch` git
|
214
|
+
> configuration and fallback to `master` as the default.
|
215
|
+
|
208
216
|
Sometimes you start working on a branch and can't get back to it for a while. It happens. Use +status+ to check on the status of your work.
|
209
217
|
|
210
218
|
```
|
@@ -226,10 +234,13 @@ to find out where your pull request is at. But in case you want to take a look,
|
|
226
234
|
### Delivering approved code
|
227
235
|
![git-reflow deliver](http://reenhanced.com/reflow/git-reflow-deliver.gif)
|
228
236
|
```
|
229
|
-
git reflow deliver
|
237
|
+
git reflow deliver <base-branch>
|
230
238
|
```
|
231
239
|
|
232
|
-
> **Note:**
|
240
|
+
> **Note:** If no `base-branch` argument is provided, then we'll look for a `reflow.base-branch` git
|
241
|
+
> configuration and fallback to `master` as the default.
|
242
|
+
|
243
|
+
> **Also:** This documentation is for the process for the github "remote" merge process via the github_api.
|
233
244
|
For the bitbucket standard or github manual process (used when the user applies -f force flag to the "remote" merge via the github_api), please go to section B.
|
234
245
|
|
235
246
|
|
@@ -432,17 +443,30 @@ If the review is done, it's time to merge. Here's what happens:
|
|
432
443
|
|
433
444
|
In order to streamline delivery you can set the following git config to:
|
434
445
|
|
435
|
-
1. always clean up the feature branch after the PR is merged
|
446
|
+
1. always clean up the remote feature branch after the PR is merged
|
447
|
+
```
|
448
|
+
git config --global --add "reflow.always-cleanup-remote" "true"
|
436
449
|
```
|
437
|
-
|
450
|
+
2. always clean up the local feature branch after the PR is merged
|
438
451
|
```
|
439
|
-
|
452
|
+
git config --global --add "reflow.always-cleanup-local" "true"
|
453
|
+
```
|
454
|
+
3. always deliver without further prompt
|
440
455
|
```
|
441
456
|
git config --global --add "reflow.always-deliver" "true"
|
442
457
|
```
|
443
458
|
|
444
459
|
See our [Advanced Usage](https://github.com/reenhanced/gitreflow/wiki/Full-List-of-Configuration-Options) for more ways you can customize your workflow.
|
445
460
|
|
461
|
+
## Customization
|
462
|
+
|
463
|
+
Git-reflow's default process isn't meant to fit every team, which is why we've introduced [Custom Workflows](https://github.com/reenhanced/gitreflow/wiki/Custom-Workflows). With a custom workflow, you can:
|
464
|
+
|
465
|
+
* Add hooks to be run before, or after any command
|
466
|
+
* Use one of our pre-configured workflows as a basis for your own
|
467
|
+
* Override any of the default commands
|
468
|
+
* Create new commands
|
469
|
+
|
446
470
|
---
|
447
471
|
|
448
472
|
## Contributing
|
data/Rakefile
CHANGED
@@ -1,8 +1,15 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
|
-
require "bundler/gem_tasks"
|
3
|
-
require "rspec/core/rake_task"
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require "bundler/gem_tasks"
|
3
|
+
require "rspec/core/rake_task"
|
4
|
+
require "github_changelog_generator/task"
|
5
|
+
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
7
|
+
|
8
|
+
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
9
|
+
config.user = 'reenhanced'
|
10
|
+
config.project = 'gitreflow'
|
11
|
+
config.since_tag = 'v0.9.2'
|
12
|
+
config.future_release = 'master'
|
13
|
+
end
|
14
|
+
|
15
|
+
task :default => :spec
|
data/Workflow
ADDED
data/bin/console
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "git_reflow"
|
5
|
-
|
6
|
-
require "irb"
|
7
|
-
IRB.start
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "git_reflow"
|
5
|
+
|
6
|
+
require "irb"
|
7
|
+
IRB.start
|
data/bin/setup
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
set -euo pipefail
|
3
|
-
IFS=$'\n\t'
|
4
|
-
set -vx
|
5
|
-
|
6
|
-
bundle install
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
set -euo pipefail
|
3
|
+
IFS=$'\n\t'
|
4
|
+
set -vx
|
5
|
+
|
6
|
+
bundle install
|
data/exe/git-reflow
CHANGED
@@ -1,36 +1,20 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
$: << File.expand_path(File.dirname(File.realpath(__FILE__)) + '/../lib')
|
3
3
|
require 'rubygems'
|
4
|
-
require 'gli'
|
5
4
|
require 'git_reflow'
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
true
|
6
|
+
reflow_command = ARGV.shift
|
7
|
+
if reflow_command.nil? || GitReflow.workflow.commands[reflow_command.to_sym].nil?
|
8
|
+
GitReflow.help
|
9
|
+
elsif ARGV.include? "--help"
|
10
|
+
GitReflow.documentation_for_command(reflow_command)
|
11
|
+
else
|
12
|
+
trap 'INT' do
|
13
|
+
GitReflow.say "Aborted.", :error
|
14
|
+
exit
|
15
|
+
end
|
16
|
+
|
17
|
+
command_options = GitReflow.parse_command_options!(reflow_command)
|
18
|
+
GitReflow.logger.debug "Running command `#{reflow_command}` with options: #{command_options.inspect}"
|
19
|
+
GitReflow.public_send(reflow_command.to_sym, command_options)
|
22
20
|
end
|
23
|
-
|
24
|
-
post do |global,command,options,args|
|
25
|
-
# Post logic here
|
26
|
-
# Use skips_post before a command to skip this
|
27
|
-
# block on that command only
|
28
|
-
end
|
29
|
-
|
30
|
-
on_error do |exception|
|
31
|
-
# Error logic here
|
32
|
-
# return false to skip default error handling
|
33
|
-
true
|
34
|
-
end
|
35
|
-
|
36
|
-
exit run(ARGV)
|