na 1.2.50 → 1.2.51

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: ea683e8d5187cd53c25900fd1ec4bb269644cd83c7f95c591cd5abee20d6f7e4
4
- data.tar.gz: 850ef4f8edf690a993c73088bef2fea5b4c47085d21f43e4f3097dbf202d3d9f
3
+ metadata.gz: 5edc215f757a568603dff43b55a7e727d756cf4112771a898c7132ac5c335d34
4
+ data.tar.gz: 395a80b95e1e303d62000b036235a40199d6fb70eb56d854509681dcc78030a6
5
5
  SHA512:
6
- metadata.gz: 3bb8a0ec11195980fffcc7b429e5157e4c60501840280c14d7228f5585067e6cbcea51492a7e844d59e633ba0d7908704619404e6bfcae0d09b6f5d75a56e112
7
- data.tar.gz: 8b9c155dfbbe6ac51682db63f471b2393640aaebc73f2e97801c54a872ec89b87bcc8e9574892c6030ae8d1cfd7c5136f0da57680f4aa4bc2eb96edc9c74c09d
6
+ metadata.gz: 589d810297ff33afaa36d93b1ab006a9332ea908437008642b3d9810a90759f47cbeea1e4928e32381372b24f4e107786a7d53cae821fd1e49536683e6414584
7
+ data.tar.gz: 2f8418d040cdc7bda601220d35906b8f8d48e7be5ed4e6fbb07b8dc6674c52bcdfe07c43dda553c4a0161e9370411b75e9c4bd0dc7cc357a0cb2f73710efd447
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ### 1.2.51
2
+
3
+ 2023-09-09 13:20
4
+
5
+ #### FIXED
6
+
7
+ - Ensure new actions are added within newly created projects
8
+ - When creating a subproject, ensure new project gets inserted
9
+
1
10
  ### 1.2.50
2
11
 
3
12
  2023-09-09 08:04
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.2.50)
4
+ na (1.2.51)
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.50
12
+ The current version of `na` is 1.2.51
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.50
80
+ 1.2.51
81
81
 
82
82
  GLOBAL OPTIONS
83
83
  -a, --add - Add a next action (deprecated, for backwards compatibility)
@@ -203,15 +203,15 @@ module NA
203
203
  content = content.split(/\n/).insert(line, input.join("\n")).join("\n")
204
204
  else
205
205
  split = content.split(/\n/)
206
- line = todo.projects.first&.line || 0
206
+ line = todo.projects.first&.last_line || 0
207
207
  before = split.slice(0, line).join("\n")
208
208
  after = split.slice(line, split.count - 0).join("\n")
209
209
  content = "#{before}\n#{input.join("\n")}\n#{after}"
210
210
  end
211
211
 
212
- new_project = NA::Project.new(path.map(&:cap_first).join(':'), indent - 1, line, line + 1)
212
+ new_project = NA::Project.new(path.map(&:cap_first).join(':'), indent - 1, line, line)
213
213
  else
214
- line = final_match.line + 1
214
+ line = final_match.last_line + 1
215
215
  indent = final_match.indent + 1
216
216
  input = []
217
217
  new_path.each do |part|
@@ -292,9 +292,12 @@ module NA
292
292
 
293
293
  NA.notify("#{NA.theme[:error]}Error parsing project #{NA.theme[:filename]}#{target}", exit_code: 1) if target_proj.nil?
294
294
 
295
+ projects = find_projects(target)
295
296
  contents = target.read_file.split("\n")
296
297
  end
297
298
 
299
+ pp projects.map(&:inspect)
300
+
298
301
  indent = "\t" * target_proj.indent
299
302
  note = note.split("\n") unless note.is_a?(Array)
300
303
  note = if note.empty?
data/lib/na/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Na
2
- VERSION = '1.2.50'
2
+ VERSION = '1.2.51'
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.49<!--END VER-->.
12
+ The current version of `na` is <!--VER-->1.2.50<!--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.50
4
+ version: 1.2.51
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra