na 1.2.9 → 1.2.11

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: a1d1d2b4c66a795f01e07e0df15418b4c3cac378e05d9840ba2e51b58bf48a14
4
- data.tar.gz: 1486f0da182d56b54e15fc5deb39aa4ce6571b276d112cf7af4583ad0f3f4563
3
+ metadata.gz: df6c3659bf25a6c38341206f5b027ba52439eb030abd6dc81fa88664e712df53
4
+ data.tar.gz: 917116b10e650483bce8ea1da88da95383ca463e11c7161cf6df0551380ca4c0
5
5
  SHA512:
6
- metadata.gz: a7eada283ae9fb6af012be91b2c0d9366efb88ac8d6b28057400b4ecbe6c4d66fdb37e11b7ee7c8bb68797ef27f016ab6352e5c249a10c6195b5731c8308f0a9
7
- data.tar.gz: 7cadc34d3445cda5f47cbd57a3d68120031bba9f9e8307ceb1ea8df7419198c8c77782517f47d16beaa0f35eea3cc0df29b6895c9afa612dd2573c0260809728
6
+ metadata.gz: 7f636b24d884b8d1a568ada3b4112d71cb6c39a6204575ab3f44f8fdf38fb108306496dc460ec1f529d868811695f4f5bdc570d8f7789c5ee3b93aaae31211df
7
+ data.tar.gz: e683364f1c9b8eeb14b5492533ee4fa562651e674881efd3267bd692a89e3eda7adceb2afb34b2cd703af2cb1b04375afc1e5d406909a2e73991f5cc525eb56e
data/.travis.yml CHANGED
@@ -4,7 +4,7 @@ sudo: required
4
4
  dist: trusty
5
5
  cache: bundler
6
6
  rvm:
7
- - ruby-3.0.1
7
+ - ruby-3.0.0
8
8
  install:
9
9
  - gem install bundler --version '2.2.29'
10
10
  - bundle install
data/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ### 1.2.11
2
+
3
+ 2022-10-31 13:45
4
+
5
+ #### FIXED
6
+
7
+ - Frozen string error
8
+
9
+ ### 1.2.10
10
+
11
+ 2022-10-29 15:59
12
+
13
+ #### FIXED
14
+
15
+ - Better handling of tokenized search for todo matching with multiple arguments
16
+ - Guard for error parsing project name
17
+
1
18
  ### 1.2.9
2
19
 
3
20
  2022-10-29 10:50
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.2.9)
4
+ na (1.2.11)
5
5
  chronic (~> 0.10, >= 0.10.2)
6
6
  gli (~> 2.21.0)
7
7
  mdless (~> 1.0, >= 1.0.32)
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.9
12
+ The current version of `na` is 1.2.11
13
13
  .
14
14
 
15
15
  `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.
@@ -77,7 +77,7 @@ SYNOPSIS
77
77
  na [global options] command [command options] [arguments...]
78
78
 
79
79
  VERSION
80
- 1.2.9
80
+ 1.2.11
81
81
 
82
82
  GLOBAL OPTIONS
83
83
  -a, --[no-]add - Add a next action (deprecated, for backwards compatibility)
data/bin/na CHANGED
@@ -127,7 +127,7 @@ class App
127
127
  m = a.match(/^(?<req>[+\-!])?(?<tok>.*?)$/)
128
128
  tokens.push({
129
129
  token: m['tok'],
130
- required: all_req || (!m['req'].nil? && m['req'] == '+'),
130
+ required: !m['req'].nil? && m['req'] == '+',
131
131
  negate: !m['req'].nil? && m['req'] =~ /[!\-]/
132
132
  })
133
133
  end
@@ -265,7 +265,7 @@ module NA
265
265
  target_proj = nil
266
266
 
267
267
  if project
268
- project.sub!(/:$/, '')
268
+ project = project.sub(/:$/, '')
269
269
  target_proj = projects.select { |pr| pr.project =~ /#{project.gsub(/:/, '.*?:.*?')}/i }.first
270
270
  if target_proj.nil?
271
271
  res = NA.yn(NA::Color.template("{y}Project {bw}#{project}{xy} doesn't exist, add it"), default: true)
@@ -291,6 +291,7 @@ module NA
291
291
  projects.select { |proj| proj.project =~ /^#{action.parent.join(':')}$/ }.first
292
292
  end
293
293
 
294
+ NA.notify("{r}Error parsing project #{target_proj}", exit_code: 1) if target_proj.nil?
294
295
 
295
296
  indent = "\t" * target_proj.indent
296
297
  note = note.split("\n") unless note.is_a?(Array)
@@ -759,12 +760,12 @@ module NA
759
760
 
760
761
  dirs = file.read_file.split("\n")
761
762
 
762
- optional = search.map { |t| t[:token] }
763
+ optional = search.filter { |s| !s[:negate] }.map { |t| t[:token] }
763
764
  required = search.filter { |s| s[:required] }.map { |t| t[:token] }
764
765
  negated = search.filter { |s| s[:negate] }.map { |t| t[:token] }
765
766
 
766
- optional.push('*') if required.count.zero? && negated.count.positive?
767
- if required == negated
767
+ optional.push('*') if optional.count.zero? && required.count.zero? && negated.count.positive?
768
+ if optional == negated
768
769
  required = ['*']
769
770
  optional = ['*']
770
771
  end
data/lib/na/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Na
2
- VERSION = '1.2.9'
2
+ VERSION = '1.2.11'
3
3
  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.8<!--END VER-->.
12
+ The current version of `na` is <!--VER-->1.2.10<!--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.9
4
+ version: 1.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-29 00:00:00.000000000 Z
11
+ date: 2022-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake