na 1.2.83 → 1.2.84

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 345970813fdbd36c16fc2dbe64d170039644939543828e9447d16703ed81eb1d
4
- data.tar.gz: d5a1f454a83ba7b5ab3072ba69a9b8ebb3f8cfc38165ae6c8433cef9c6183b9d
3
+ metadata.gz: 1bdcec170985481e8d49edf6e599f0d1fba33bd250fcae7d0e900e24d3f8d8e4
4
+ data.tar.gz: 7e9d815b0dee8abed829216771c8d4177a49629f37b54f76ff2000fede7172d9
5
5
  SHA512:
6
- metadata.gz: 86f9e53d24bbcae8ae97b890adb2e59a92cfba2887ac3a6851fa6fd41de677bd33ee410c52958b3d1ee26457b722f74fc3dbaef7ba001162d08a4fd9cfe5e8df
7
- data.tar.gz: a45b00b9b87e6244e6b9cc9c732f47706457763e083d89f2fe54596ac4e6fb18e3305a3670514b030e723d882059eff8b150a7bf86697c70ca6ef501426a787d
6
+ metadata.gz: c45055a0a92ad0cbcfcf670a9717b585a5fa0c2ddad5ffe84644a4a64fe3df564f7d0683fd9be47942c3d829f3148be1836039a57b82d108518a63b3d1de1e28
7
+ data.tar.gz: 97d7a6616eae0ea5b967068a28154717aafd4c5f37aca62064bf86d2a82f719fe941aaacf98dd1158250e83d5d332f296eb99cb5d39d751852fc071e461d7ac7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 1.2.84
2
+
3
+ 2025-10-25 15:50
4
+
5
+ #### FIXED
6
+
7
+ - Nil input when traversing depth
8
+
1
9
  ### 1.2.83
2
10
 
3
11
  2025-10-25 10:06
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.2.83)
4
+ na (1.2.84)
5
5
  chronic (~> 0.10, >= 0.10.2)
6
6
  git (~> 3.0.0)
7
7
  gli (~> 2.21.0)
data/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  _If you're one of the rare people like me who find this useful, feel free to
10
10
  [buy me some coffee][donate]._
11
11
 
12
- The current version of `na` is 1.2.83.
12
+ The current version of `na` is 1.2.84.
13
13
 
14
14
  `na` ("next action") is a command line tool designed to make it easy to see what your next actions are for any project, right from the command line. It works with TaskPaper-formatted files (but any plain text format will do), looking for `@na` tags (or whatever you specify) in todo files in your current folder.
15
15
 
@@ -76,7 +76,7 @@ SYNOPSIS
76
76
  na [global options] command [command options] [arguments...]
77
77
 
78
78
  VERSION
79
- 1.2.83
79
+ 1.2.84
80
80
 
81
81
  GLOBAL OPTIONS
82
82
  -a, --add - Add a next action (deprecated, for backwards compatibility)
data/lib/na/string.rb CHANGED
@@ -135,13 +135,14 @@ class ::String
135
135
  # @param max [Integer] Maximum allowed length of the string
136
136
  # @return [String] Truncated string with middle replaced if necessary
137
137
  def trunc_middle(max)
138
- return self unless length > max
139
-
140
- half = (max / 2).floor - 3
141
- chars = chars
142
- pre = chars.slice(0, half)
143
- post = chars.reverse.slice(0, half).reverse
144
- "#{pre.join}[...]#{post.join}"
138
+ return '' if self.nil?
139
+ return self unless length > max
140
+
141
+ half = (max / 2).floor - 3
142
+ chars = chars
143
+ pre = chars.slice(0, half)
144
+ post = chars.reverse.slice(0, half).reverse
145
+ "#{pre.join}[...]#{post.join}"
145
146
  end
146
147
 
147
148
  # Wrap the string to a given width, indenting each line and preserving tag formatting.
data/lib/na/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Na
4
- VERSION = '1.2.83'
4
+ VERSION = '1.2.84'
5
5
  end
data/src/_README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  _If you're one of the rare people like me who find this useful, feel free to
10
10
  [buy me some coffee][donate]._
11
11
 
12
- The current version of `na` is <!--VER-->1.2.82<!--END VER-->.
12
+ The current version of `na` is <!--VER-->1.2.83<!--END VER-->.
13
13
 
14
14
  `na` ("next action") is a command line tool designed to make it easy to see what your next actions are for any project, right from the command line. It works with TaskPaper-formatted files (but any plain text format will do), looking for `@na` tags (or whatever you specify) in todo files in your current folder.
15
15
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: na
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.83
4
+ version: 1.2.84
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra