na 1.2.64 → 1.2.65

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: c2accac212d5f998f830299693f13e3ec27e692b1bc5f460bcd977fb1ce95042
4
- data.tar.gz: ad75051381180b3d4cc99fe3edb841a591e76ca649eaa051a12752f6066a1ed2
3
+ metadata.gz: 34efff84dbba9e86c4cfbd4fc0c36f0c153cb024e42a887a93012f41b18774ce
4
+ data.tar.gz: 4db0cd0d3067c119ccdf34ae8481bc08c75acc3dd79dc30e11661b15530a0864
5
5
  SHA512:
6
- metadata.gz: 96a9f0120855bf9569dd5d35f7701c24196185fa0d82a12e143486687072778cca636369264c45b286e0e4030722cb817258f585f399e50929b3f500bdea47f9
7
- data.tar.gz: bd58a4c3872fb7ad608f15bdc31fd954f8f7581f168c30e7db3c1e11986df884905a964cfcd263d7807a3f583e22d22e33e0f8c9a46842407a5096d5f17b2271
6
+ metadata.gz: 78c9b862f5962fe23fb0a7452044d26f6eac92208634857b21881e1c74a7277ea086fa7d0e663b61b0883adc3f3f731cb12e4af92860aa4534f72373e0c2205c
7
+ data.tar.gz: e8819f6ec109c3903c5c51b53e2009deb86a385f5465816825fad39c5794285a48cd693cb3876f2b43e7d39c6cb6006299896c76b6103884aed206127b422f95
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  ### 1.2.64
2
2
 
3
- 2024-06-20 12:25
3
+ 2024-06-22 12:06
4
+
5
+ #### FIXED
6
+
7
+ - 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
8
 
5
9
  #### NEW
6
10
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.2.64)
4
+ na (1.2.65)
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.1)
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
@@ -76,14 +76,14 @@ SYNOPSIS
76
76
  na [global options] command [command options] [arguments...]
77
77
 
78
78
  VERSION
79
- 1.2.64
79
+ 1.2.65
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: 1)
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`
@@ -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],
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
- NA.notify("#{NA.theme[:error]}#{file} is a directory", exit_code: 2) if File.directory?(file)
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/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Na
2
- VERSION = '1.2.64'
2
+ VERSION = '1.2.65'
3
3
  end
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.64
4
+ version: 1.2.65
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-20 00:00:00.000000000 Z
11
+ date: 2024-06-22 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.2.15
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