ninny 0.1.22.1 → 0.1.24

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9be2af9c2deea5ba48bd481e6794ed11a8cef1cb536f48bcd54f1b99ecd6dac5
4
- data.tar.gz: bd22be9b4a66726fb53ed6b574a866cb4d33607bd731df6c49c080aac256f590
3
+ metadata.gz: 01f0f59fc7d103c7284a6866f82ff1463f3f53f36524fcdc16a3d638ab6e3174
4
+ data.tar.gz: 867dfb562f0b3844e99dcbe1150784734928f2d7e04aac9d5b4c94f4c06aeadf
5
5
  SHA512:
6
- metadata.gz: 514db127a0cd2c2ab06302367b9707a6b29423b22734bbfc2652671f2438dfe4b2bdf10c2f7e8f6b2c24920c12dbfdda8895ccf1557621e1928f2806c5f44a49
7
- data.tar.gz: ac716fccea27a63fbe1d1a53c7de6856cadfd09284dbe2093d6aafe1020cb72817ddada610c4ac9cddc1c29cb8235ebdf58bd42466805ccf6401e59310cd4703
6
+ metadata.gz: f363956d9e73153283638d43521fa3978673035dc439e0137dee72e026f1a6862e30f9466df1fdc7d3c38b90f1f0adcf8ff9c1ee65efd7ab260fc3d0019dbd19
7
+ data.tar.gz: c5f44356f15ca4bc02651788213629016d5e94ff5a2f7a9ea82ef01c8320c7f6df90f3aa9c4f5988ee645078176dcb4e2a24190e71bfeb1c8b42df02faab5c16
@@ -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@v1.40.0
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
@@ -1,7 +1,7 @@
1
1
  AllCops:
2
2
  NewCops: enable
3
3
  SuggestExtensions: false
4
- TargetRubyVersion: 3.1
4
+ TargetRubyVersion: 3.2
5
5
  Exclude:
6
6
  - vendor/**/*
7
7
 
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.3
1
+ 3.2.0
data/Dockerfile CHANGED
@@ -1,3 +1,3 @@
1
- FROM ruby:3.1.3-alpine
1
+ FROM ruby:3.2.0-alpine
2
2
  RUN apk add git
3
3
  RUN gem install ninny
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
- # Specify your gem's dependencies in ninny.gemspec
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.yes?(
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 "No #{branch_type} branch available. Creating one now."
50
- CreateDatedBranch.new(branch: branch_type).execute
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 'merge', ['--no-ff', "origin/#{branch_name}"]
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', ['-u', "origin/#{current_branch_name}"])
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', ['--remote'])
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
- branches_for(prefix).last || raise(NoBranchOfType, "No #{prefix} branch")
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', ['--no-track', new_branch_name, "origin/#{source_branch_name}"])
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', ['-u', 'origin', new_branch_name])
197
+ command('push', '-u', 'origin', new_branch_name)
197
198
  end
198
199
 
199
200
  # Exceptions
data/lib/ninny/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ninny
4
- VERSION = '0.1.22.1'
4
+ VERSION = '0.1.24'
5
5
  end
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.22.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: 2022-12-15 00:00:00.000000000 Z
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.3.26
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'