ninny 0.1.22.1 → 0.1.24
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/.github/workflows/test.yml +2 -2
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/Dockerfile +1 -1
- data/Gemfile +3 -1
- data/lib/ninny/commands/create_dated_branch.rb +1 -1
- data/lib/ninny/commands/pull_request_merge.rb +2 -2
- data/lib/ninny/git.rb +7 -6
- 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: 01f0f59fc7d103c7284a6866f82ff1463f3f53f36524fcdc16a3d638ab6e3174
|
4
|
+
data.tar.gz: 867dfb562f0b3844e99dcbe1150784734928f2d7e04aac9d5b4c94f4c06aeadf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f363956d9e73153283638d43521fa3978673035dc439e0137dee72e026f1a6862e30f9466df1fdc7d3c38b90f1f0adcf8ff9c1ee65efd7ab260fc3d0019dbd19
|
7
|
+
data.tar.gz: c5f44356f15ca4bc02651788213629016d5e94ff5a2f7a9ea82ef01c8320c7f6df90f3aa9c4f5988ee645078176dcb4e2a24190e71bfeb1c8b42df02faab5c16
|
data/.github/workflows/test.yml
CHANGED
@@ -14,7 +14,7 @@ jobs:
|
|
14
14
|
strategy:
|
15
15
|
fail-fast: false
|
16
16
|
matrix:
|
17
|
-
ruby: [2.6, 2.7, 3.0, 3.1]
|
17
|
+
ruby: [2.6, 2.7, 3.0, 3.1, 3.2]
|
18
18
|
steps:
|
19
19
|
- uses: actions/checkout@v3
|
20
20
|
with:
|
@@ -31,7 +31,7 @@ jobs:
|
|
31
31
|
- uses: actions/checkout@v3
|
32
32
|
with:
|
33
33
|
fetch-depth: 0
|
34
|
-
- uses: HeRoMo/pronto-action@
|
34
|
+
- uses: HeRoMo/pronto-action@1.43.1
|
35
35
|
with:
|
36
36
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
37
37
|
gitleaks:
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.2.0
|
data/Dockerfile
CHANGED
data/Gemfile
CHANGED
@@ -4,6 +4,8 @@ source 'https://rubygems.org'
|
|
4
4
|
|
5
5
|
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
6
6
|
|
7
|
-
|
7
|
+
gem 'rugged', github: 'libgit2/rugged', submodules: true
|
8
8
|
gem 'tty'
|
9
|
+
|
10
|
+
# Specify your gem's dependencies in ninny.gemspec
|
9
11
|
gemspec
|
@@ -38,7 +38,7 @@ module Ninny
|
|
38
38
|
def delete_old_branches
|
39
39
|
return unless extra_branches.any?
|
40
40
|
|
41
|
-
should_delete = should_delete_old_branches || prompt.
|
41
|
+
should_delete = should_delete_old_branches || prompt.no?(
|
42
42
|
"Do you want to delete the old #{branch_type} branch(es)? (#{extra_branches.join(', ')})"
|
43
43
|
)
|
44
44
|
|
@@ -46,8 +46,8 @@ module Ninny
|
|
46
46
|
Ninny.git.check_out(branch_to_merge_into, false)
|
47
47
|
Ninny.git.track_current_branch
|
48
48
|
rescue Ninny::Git::NoBranchOfType
|
49
|
-
prompt.say "
|
50
|
-
|
49
|
+
prompt.say "Could not find a #{branch_type} branch. Please create one or double check it exists. If it " \
|
50
|
+
'exists, please do a fresh git pull or git fetch to ensure Ninny can find it.'
|
51
51
|
end
|
52
52
|
|
53
53
|
# Public: Merge the pull request's branch into the checked-out branch
|
data/lib/ninny/git.rb
CHANGED
@@ -39,7 +39,7 @@ module Ninny
|
|
39
39
|
def merge(branch_name)
|
40
40
|
if_clean do
|
41
41
|
`git fetch --prune &> /dev/null`
|
42
|
-
command
|
42
|
+
command('merge', '--no-ff', "origin/#{branch_name}")
|
43
43
|
raise MergeFailed unless clean?
|
44
44
|
|
45
45
|
push
|
@@ -75,7 +75,7 @@ module Ninny
|
|
75
75
|
#
|
76
76
|
# do_after_pull - Should a pull be done after tracking?
|
77
77
|
def track_current_branch(do_after_pull = true)
|
78
|
-
command('branch',
|
78
|
+
command('branch', '-u', "origin/#{current_branch_name}")
|
79
79
|
pull if do_after_pull
|
80
80
|
end
|
81
81
|
|
@@ -85,7 +85,7 @@ module Ninny
|
|
85
85
|
# source_branch_name - The name of the branch to branch from
|
86
86
|
def new_branch(new_branch_name, source_branch_name)
|
87
87
|
`git fetch --prune &> /dev/null`
|
88
|
-
remote_branches = command('branch',
|
88
|
+
remote_branches = command('branch', '--remote')
|
89
89
|
|
90
90
|
if remote_branches.include?("origin/#{new_branch_name}")
|
91
91
|
ask_to_recreate_branch(new_branch_name, source_branch_name)
|
@@ -138,7 +138,8 @@ module Ninny
|
|
138
138
|
#
|
139
139
|
# Returns an Array of Branches containing the branch name
|
140
140
|
def latest_branch_for(prefix)
|
141
|
-
|
141
|
+
# I don't really see why the first part would break, and the second would work, but you never know
|
142
|
+
branches_for(prefix).last || Ninny.git.branches_for(prefix).last || raise(NoBranchOfType, "No #{prefix} branch")
|
142
143
|
end
|
143
144
|
|
144
145
|
# Public: Whether the Git index is clean (has no uncommited changes)
|
@@ -190,10 +191,10 @@ module Ninny
|
|
190
191
|
# new_branch_name: the name of the branch in question
|
191
192
|
# source_branch_name: the name of the branch the new branch is supposed to be based off of
|
192
193
|
private def create_branch(new_branch_name, source_branch_name)
|
193
|
-
command('branch',
|
194
|
+
command('branch', '--no-track', new_branch_name, "origin/#{source_branch_name}")
|
194
195
|
new_branch = branch(new_branch_name)
|
195
196
|
new_branch.checkout
|
196
|
-
command('push',
|
197
|
+
command('push', '-u', 'origin', new_branch_name)
|
197
198
|
end
|
198
199
|
|
199
200
|
# Exceptions
|
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.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DispatchIt, Inc. Engineers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|
@@ -332,7 +332,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
332
332
|
- !ruby/object:Gem::Version
|
333
333
|
version: '0'
|
334
334
|
requirements: []
|
335
|
-
rubygems_version: 3.
|
335
|
+
rubygems_version: 3.4.1
|
336
336
|
signing_key:
|
337
337
|
specification_version: 4
|
338
338
|
summary: 'ninny (n): an foolish person, see: git'
|