ninny 0.1.2 → 0.1.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ninny/commands/pull_request_merge.rb +1 -1
- data/lib/ninny/git.rb +15 -1
- data/lib/ninny/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a17662c1c2ef0bb98f982f5c463ffd6801e92c39433f58b744384bed0d34389c
|
|
4
|
+
data.tar.gz: d4966ce3533cf81411be4433b20e3684daf31d2b610ac2073f1f564f488577ba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b0e1e47db683db36036c7a43cc122a13ba280caf2f1bc63474c2950422b2c9ca0c873f096712b23946678e7018e3eafc71dc6218b64e0b3000b99eb841992bf
|
|
7
|
+
data.tar.gz: cb4133dedc6165482306b1a1bf30679d024448f336dfcdac697a8d9060b287b7c3b79b954ac33e5048e8097ecc25bdffbb06fafbebc2728a86c0ee0b1a7ff7f4
|
data/Gemfile.lock
CHANGED
|
@@ -33,7 +33,7 @@ module Ninny
|
|
|
33
33
|
|
|
34
34
|
# Public: Check out the branch
|
|
35
35
|
def check_out_branch
|
|
36
|
-
branch_to_merge_into
|
|
36
|
+
Ninny.git.check_out(branch_to_merge_into)
|
|
37
37
|
rescue Ninny::Git::NoBranchOfType
|
|
38
38
|
prompt.say "No #{branch_type} branch available. Creating one now."
|
|
39
39
|
CreateDatedBranch.new(branch: branch_type).execute
|
data/lib/ninny/git.rb
CHANGED
|
@@ -38,7 +38,7 @@ module Ninny
|
|
|
38
38
|
def merge(branch_name)
|
|
39
39
|
if_clean do
|
|
40
40
|
git.fetch
|
|
41
|
-
|
|
41
|
+
command 'merge', '--no-ff', "origin/#{branch_name}"
|
|
42
42
|
raise MergeFailed unless clean?
|
|
43
43
|
push
|
|
44
44
|
end
|
|
@@ -58,6 +58,19 @@ module Ninny
|
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
+
# Public: Check out the given branch name
|
|
62
|
+
#
|
|
63
|
+
# branch_name - The name of the branch to check out
|
|
64
|
+
# do_after_pull - Should a pull be done after checkout?
|
|
65
|
+
def check_out(branch, do_after_pull=true)
|
|
66
|
+
git.fetch
|
|
67
|
+
branch.checkout
|
|
68
|
+
git.pull if do_after_pull
|
|
69
|
+
unless current_branch.name == branch.name
|
|
70
|
+
raise CheckoutFailed, "Failed to check out '#{branch}'"
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
61
74
|
# Public: Create a new branch from the given source
|
|
62
75
|
#
|
|
63
76
|
# new_branch_name - The name of the branch to create
|
|
@@ -141,6 +154,7 @@ module Ninny
|
|
|
141
154
|
|
|
142
155
|
|
|
143
156
|
# Exceptions
|
|
157
|
+
CheckoutFailed = Class.new(StandardError)
|
|
144
158
|
NotOnBranch = Class.new(StandardError)
|
|
145
159
|
NoBranchOfType = Class.new(StandardError)
|
|
146
160
|
DirtyIndex = Class.new(StandardError)
|
data/lib/ninny/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ninny
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carl Allen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-08-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: tty-box
|
|
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
256
256
|
- !ruby/object:Gem::Version
|
|
257
257
|
version: '0'
|
|
258
258
|
requirements: []
|
|
259
|
-
rubygems_version: 3.0.
|
|
259
|
+
rubygems_version: 3.0.4
|
|
260
260
|
signing_key:
|
|
261
261
|
specification_version: 4
|
|
262
262
|
summary: 'ninny (n): an foolish person, see: git'
|