na 1.2.47 → 1.2.49
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/na/colors.rb +1 -1
- data/lib/na/next_action.rb +18 -4
- data/lib/na/version.rb +1 -1
- data/src/_README.md +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f4d4be5554378f0112d206fba77680a74a4a5d66a272400a27a5c1809aad1bf
|
4
|
+
data.tar.gz: e7e3506d44cce698a7bd951c771e783aa39d264db8dfb5aeb0d2c208e4a17265
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e6e46c762ca2a0e1248c8a34492ea1733a5598aa9b309521ea41edb751f07490e9adf431baddb45000adb8e8a07eec48111fdc56c9b2cdb94f5d0ce243db53c
|
7
|
+
data.tar.gz: e072634d013b304870e4fb9e3aa38e726e2915e45c461ac449e23140483c76bd781e052536280b98a6baa9c1198a42bde10d408adf4f66ed1de308dd1c15eed4
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
### 1.2.49
|
2
|
+
|
3
|
+
2023-09-08 13:34
|
4
|
+
|
5
|
+
#### FIXED
|
6
|
+
|
7
|
+
- New project not being added when requested
|
8
|
+
|
9
|
+
### 1.2.48
|
10
|
+
|
11
|
+
2023-09-08 10:19
|
12
|
+
|
13
|
+
#### FIXED
|
14
|
+
|
15
|
+
- Error when `na add --to PROJECT` was a project that didn't exist
|
16
|
+
|
1
17
|
### 1.2.47
|
2
18
|
|
3
19
|
2023-09-07 10:47
|
data/Gemfile.lock
CHANGED
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.49
|
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.
|
80
|
+
1.2.49
|
81
81
|
|
82
82
|
GLOBAL OPTIONS
|
83
83
|
-a, --add - Add a next action (deprecated, for backwards compatibility)
|
data/lib/na/colors.rb
CHANGED
@@ -84,7 +84,7 @@ module NA
|
|
84
84
|
# Array of attribute keys only
|
85
85
|
ATTRIBUTE_NAMES = ATTRIBUTES.transpose.first
|
86
86
|
|
87
|
-
# Returns true if
|
87
|
+
# Returns true if Color supports the +feature+.
|
88
88
|
#
|
89
89
|
# The feature :clear, that is mixing the clear color attribute into String,
|
90
90
|
# is only supported on ruby implementations, that do *not* already
|
data/lib/na/next_action.rb
CHANGED
@@ -192,6 +192,7 @@ module NA
|
|
192
192
|
if final_match.nil?
|
193
193
|
indent = 0
|
194
194
|
input = []
|
195
|
+
|
195
196
|
new_path.each do |part|
|
196
197
|
input.push("#{"\t" * indent}#{part.cap_first}:")
|
197
198
|
indent += 1
|
@@ -208,7 +209,7 @@ module NA
|
|
208
209
|
content = "#{before}\n#{input.join("\n")}\n#{after}"
|
209
210
|
end
|
210
211
|
|
211
|
-
new_project = NA::Project.new(path.map(&:cap_first).join(':'), indent - 1,
|
212
|
+
new_project = NA::Project.new(path.map(&:cap_first).join(':'), indent - 1, line, line + 1)
|
212
213
|
else
|
213
214
|
line = final_match.line + 1
|
214
215
|
indent = final_match.indent + 1
|
@@ -274,12 +275,25 @@ module NA
|
|
274
275
|
projects = find_projects(target)
|
275
276
|
|
276
277
|
target_proj = if target_proj
|
277
|
-
projects.select { |proj| proj.project =~ /^#{target_proj.project}$/ }.first
|
278
|
+
projects.select { |proj| proj.project =~ /^#{target_proj.project}$/i }.first
|
278
279
|
else
|
279
|
-
projects.select { |proj| proj.project =~ /^#{add.parent.join(':')}$/ }.first
|
280
|
+
projects.select { |proj| proj.project =~ /^#{add.parent.join(':')}$/i }.first
|
280
281
|
end
|
281
282
|
|
282
|
-
|
283
|
+
if target_proj.nil?
|
284
|
+
res = NA.yn(NA::Color.template("#{NA.theme[:warning]}Project #{NA.theme[:file]}#{add.project}#{NA.theme[:warning]} doesn't exist, add it"), default: true)
|
285
|
+
|
286
|
+
if res
|
287
|
+
target_proj = insert_project(target, project, projects)
|
288
|
+
projects << target_proj
|
289
|
+
else
|
290
|
+
NA.notify("#{NA.theme[:error]}Cancelled", exit_code: 1)
|
291
|
+
end
|
292
|
+
|
293
|
+
NA.notify("#{NA.theme[:error]}Error parsing project #{NA.theme[:filename]}#{target}", exit_code: 1) if target_proj.nil?
|
294
|
+
|
295
|
+
contents = target.read_file.split("\n")
|
296
|
+
end
|
283
297
|
|
284
298
|
indent = "\t" * target_proj.indent
|
285
299
|
note = note.split("\n") unless note.is_a?(Array)
|
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.48<!--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.49
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|