na 1.2.64 → 1.2.66
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/CHANGELOG.md +13 -1
- data/Gemfile.lock +2 -2
- data/README.md +3 -3
- data/Rakefile +17 -0
- data/lib/na/next_action.rb +16 -0
- data/lib/na/string.rb +9 -1
- data/lib/na/todo.rb +1 -1
- data/lib/na/version.rb +1 -1
- data/src/_README.md +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: e55a544aa2a32d81e208e30dc4e3c43cda1e6f91df7b27ee956a72fda328a575
|
|
4
|
+
data.tar.gz: 54f9bba1d550e62b6e2d509f2a3b69263b10049cea0f69b39cd304b6328ec7f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cfb11dacafe1d09ec339eb10b419c540fb42f45c0d4bf2492ddc23fabd7df4a7174268e4b9d054fa7b9c5c1e08bb22c6834b32b583ac874a8e2b28261bf7437e
|
|
7
|
+
data.tar.gz: 567acf2c48eb5e84ca4af54fe03aab6d6b4a1b6f74f446d0a723ce9e6ce2bf4f04c8ffa9e41ffbeba5f7e2ba23785a742db2c2dca656b783f40113fad9a03c74
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
+
### 1.2.66
|
|
2
|
+
|
|
3
|
+
2024-06-23 10:56
|
|
4
|
+
|
|
5
|
+
#### IMPROVED
|
|
6
|
+
|
|
7
|
+
- When passing a query to `next`, prefer exact matches when available
|
|
8
|
+
|
|
1
9
|
### 1.2.64
|
|
2
10
|
|
|
3
|
-
2024-06-
|
|
11
|
+
2024-06-22 12:06
|
|
12
|
+
|
|
13
|
+
#### FIXED
|
|
14
|
+
|
|
15
|
+
- Handle file searches where the filename matches the dirname and previously returned a "FILE is a directory" error by testing with an extension or a DIRNAME/BASENAME/BASENAME.EXT
|
|
4
16
|
|
|
5
17
|
#### NEW
|
|
6
18
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
na (1.2.
|
|
4
|
+
na (1.2.66)
|
|
5
5
|
chronic (~> 0.10, >= 0.10.2)
|
|
6
6
|
gli (~> 2.21.0)
|
|
7
7
|
mdless (~> 1.0, >= 1.0.32)
|
|
@@ -23,7 +23,7 @@ GEM
|
|
|
23
23
|
tty-cursor (~> 0.7)
|
|
24
24
|
tty-screen (~> 0.8)
|
|
25
25
|
wisper (~> 2.0)
|
|
26
|
-
tty-screen (0.8.
|
|
26
|
+
tty-screen (0.8.2)
|
|
27
27
|
tty-which (0.5.0)
|
|
28
28
|
wisper (2.0.1)
|
|
29
29
|
yard (0.9.34)
|
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.
|
|
12
|
+
The current version of `na` is 1.2.66.
|
|
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,14 +76,14 @@ SYNOPSIS
|
|
|
76
76
|
na [global options] command [command options] [arguments...]
|
|
77
77
|
|
|
78
78
|
VERSION
|
|
79
|
-
1.2.
|
|
79
|
+
1.2.66
|
|
80
80
|
|
|
81
81
|
GLOBAL OPTIONS
|
|
82
82
|
-a, --add - Add a next action (deprecated, for backwards compatibility)
|
|
83
83
|
--add_at=POSITION - Add all new/moved entries at [s]tart or [e]nd of target project (default: start)
|
|
84
84
|
--[no-]color - Colorize output (default: enabled)
|
|
85
85
|
--cwd_as=TYPE - Use current working directory as [p]roject, [t]ag, or [n]one (default: none)
|
|
86
|
-
-d, --depth=DEPTH - Recurse to depth (default:
|
|
86
|
+
-d, --depth=DEPTH - Recurse to depth (default: 3)
|
|
87
87
|
--[no-]debug - Display verbose output
|
|
88
88
|
--ext=EXT - File extension to consider a todo file (default: taskpaper)
|
|
89
89
|
-f, --file=PATH - Use a single file as global todo, use initconfig to make permanent (default: none)
|
data/Rakefile
CHANGED
|
@@ -28,6 +28,23 @@ Rake::TestTask.new do |t|
|
|
|
28
28
|
t.test_files = FileList['test/*_test.rb']
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
desc 'Install current gem in all versions of asdf-controlled ruby'
|
|
32
|
+
task :install do
|
|
33
|
+
Rake::Task['clobber'].invoke
|
|
34
|
+
Rake::Task['package'].invoke
|
|
35
|
+
Dir.chdir 'pkg'
|
|
36
|
+
file = Dir.glob('*.gem').last
|
|
37
|
+
|
|
38
|
+
current_ruby = `asdf current ruby`.match(/(\d.\d+.\d+)/)[1]
|
|
39
|
+
|
|
40
|
+
`asdf list ruby`.split.map { |ruby| ruby.strip.sub(/^*/, '') }.each do |ruby|
|
|
41
|
+
`asdf shell ruby #{ruby}`
|
|
42
|
+
puts `gem install #{file}`
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
`asdf shell ruby #{current_ruby}`
|
|
46
|
+
end
|
|
47
|
+
|
|
31
48
|
desc 'Development version check'
|
|
32
49
|
task :ver do
|
|
33
50
|
gver = `git ver`
|
data/lib/na/next_action.rb
CHANGED
|
@@ -513,6 +513,7 @@ module NA
|
|
|
513
513
|
}
|
|
514
514
|
opts = defaults.merge(options)
|
|
515
515
|
files = find_files(depth: options[:depth])
|
|
516
|
+
|
|
516
517
|
files.delete_if do |file|
|
|
517
518
|
cmd_options = {
|
|
518
519
|
depth: options[:depth],
|
|
@@ -577,6 +578,9 @@ module NA
|
|
|
577
578
|
end
|
|
578
579
|
|
|
579
580
|
dirs = dirs.sort_by { |d| File.basename(d) }.uniq
|
|
581
|
+
|
|
582
|
+
dirs = find_exact_dir(dirs, search)
|
|
583
|
+
|
|
580
584
|
if dirs.empty? && require_last
|
|
581
585
|
NA.notify("#{NA.theme[:warning]}No matches, loosening search", debug: true)
|
|
582
586
|
match_working_dir(search, distance: 2, require_last: false)
|
|
@@ -586,6 +590,18 @@ module NA
|
|
|
586
590
|
end
|
|
587
591
|
end
|
|
588
592
|
|
|
593
|
+
def find_exact_dir(dirs, search)
|
|
594
|
+
terms = search.filter { |s| !s[:negate] }.map { |t| t[:token] }.join(' ')
|
|
595
|
+
out = dirs
|
|
596
|
+
dirs.each do |dir|
|
|
597
|
+
if File.basename(dir).sub(/\.#{NA.extension}$/, '') =~ /^#{terms}$/
|
|
598
|
+
out = [dir]
|
|
599
|
+
break
|
|
600
|
+
end
|
|
601
|
+
end
|
|
602
|
+
out
|
|
603
|
+
end
|
|
604
|
+
|
|
589
605
|
##
|
|
590
606
|
## Save a todo file path to the database
|
|
591
607
|
##
|
data/lib/na/string.rb
CHANGED
|
@@ -39,7 +39,15 @@ class ::String
|
|
|
39
39
|
file = File.expand_path(self)
|
|
40
40
|
raise "Missing file #{file}" unless File.exist?(file)
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
if File.directory?(file)
|
|
43
|
+
if File.exist?("#{file}.#{NA.extension}")
|
|
44
|
+
file = "#{file}.#{NA.extension}"
|
|
45
|
+
elsif File.exist?("#{file}/#{File.basename(file)}.#{NA.extension}")
|
|
46
|
+
file = "#{file}/#{File.basename(file)}.#{NA.extension}"
|
|
47
|
+
else
|
|
48
|
+
NA.notify("#{NA.theme[:error]}#{file} is a directory", exit_code: 2)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
43
51
|
|
|
44
52
|
# IO.read(file).force_encoding('ASCII-8BIT').encode('UTF-8', invalid: :replace, undef: :replace, replace: '?')
|
|
45
53
|
IO.read(file).force_encoding('utf-8')
|
data/lib/na/todo.rb
CHANGED
|
@@ -94,7 +94,7 @@ module NA
|
|
|
94
94
|
else
|
|
95
95
|
NA.match_working_dir(settings[:query])
|
|
96
96
|
end
|
|
97
|
-
NA.notify("Files: #{files.join(', ')}", debug:true)
|
|
97
|
+
NA.notify("Files: #{files.join(', ')}", debug: true)
|
|
98
98
|
files.each do |file|
|
|
99
99
|
NA.save_working_dir(File.expand_path(file))
|
|
100
100
|
content = file.read_file
|
data/lib/na/version.rb
CHANGED
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.
|
|
12
|
+
The current version of `na` is <!--VER-->1.2.65<!--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,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: na
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.66
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brett Terpstra
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-06-
|
|
11
|
+
date: 2024-06-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -276,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
276
276
|
- !ruby/object:Gem::Version
|
|
277
277
|
version: '0'
|
|
278
278
|
requirements: []
|
|
279
|
-
rubygems_version: 3.
|
|
279
|
+
rubygems_version: 3.5.11
|
|
280
280
|
signing_key:
|
|
281
281
|
specification_version: 4
|
|
282
282
|
summary: A command line tool for adding and listing project todos
|