intent 0.2.2 → 0.2.3

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
  SHA1:
3
- metadata.gz: 3798ac4056f227df4fcae33bfe219eba0f85a3b0
4
- data.tar.gz: 159718e32cc7dd63917d871c3561ef08af37b061
3
+ metadata.gz: 13ef0d7262c77e858902d4ef79b753749e33d5af
4
+ data.tar.gz: 8e7b0df4c76944a908d9edaf4371b4c0bedc5501
5
5
  SHA512:
6
- metadata.gz: 825ad27ce91a639ca12c3b22f3546171ca988c9de575d7607e5aaa4f5f941b73d9e62a0f49ef9f40830163f34d781a429a7806fdfda2d776bd3a6d5bab788250
7
- data.tar.gz: 7bf4b9a0093704c3f05f4fee17a9e31f5f8c02499de7ddb3425ce8bc33089c6e313084061dcc24c8ca0424ff4118ebc642e526598541d4cea7b535ac791aaf97
6
+ metadata.gz: e17783d5723484df10b29e95f046dfd0ce2359cf42a70e373ca4d0a14871776d753bb05aef10b87fa390010d3c885d7155e2dfd2985ba3ed2192f2d58505713a
7
+ data.tar.gz: db9180207726fa224bc83a1d16f12d1f4f782c0d460a44cef0418681e89708e78e3d2461738bffd073f7a5bfd6fe747750deb95611937f934b2954bfdfadb6ba
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ NOTES.md
data/bin/review ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ path = __FILE__
4
+ while File.symlink?(path)
5
+ path = File.expand_path(File.readlink(path), File.dirname(path))
6
+ end
7
+ $:.unshift(File.join(File.dirname(File.expand_path(path)), '..', 'lib'))
8
+
9
+ require 'intent'
10
+
11
+ Intent::Review::Manager.run(ARGV.dup)
@@ -0,0 +1,17 @@
1
+ module Intent
2
+ module Review
3
+ class Manager
4
+ def self.run(args, output=STDOUT)
5
+ if args.empty?
6
+ print_help(output)
7
+ else
8
+ puts args
9
+ end
10
+ end
11
+
12
+ def self.print_help(output)
13
+ output.puts "usage: review"
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1 @@
1
+ require 'intent/review/manager'
@@ -63,12 +63,15 @@ module Intent
63
63
  output.puts list.by_not_done.inject([]) { |c, t| c.concat t.contexts }.uniq
64
64
  when :archive
65
65
  archive_path = File.dirname(ENV['TODO_TXT'])
66
- done_file = "#{archive_path}/__done__.txt"
67
- todo_file = "#{archive_path}/__todo__.txt"
66
+ todo_file = ENV['TODO_TXT']
67
+ done_file = "#{archive_path}/done.txt"
68
+ backup_file = "#{archive_path}/.todo.#{Date.today.iso8601}.txt"
69
+
70
+ FileUtils.copy(todo_file, backup_file)
68
71
 
69
72
  unless File.exists?(done_file)
70
73
  output.puts "Creating new `done.txt` in #{archive_path}."
71
- File.write(done_file, "")
74
+ File.write(done_file, '')
72
75
  end
73
76
 
74
77
  done_list = ::Todo::List.new(done_file)
data/lib/intent/todo.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'todo-txt'
2
2
  require 'pastel'
3
+ require 'fileutils'
3
4
  require 'intent/todo/manager'
4
5
 
5
6
  Todo.customize do |options|
@@ -1,3 +1,3 @@
1
1
  module Intent
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
data/lib/intent.rb CHANGED
@@ -1,2 +1,3 @@
1
1
  require 'intent/todo'
2
+ require 'intent/review'
2
3
  require 'intent/version'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rickerby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-20 00:00:00.000000000 Z
11
+ date: 2016-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: todo-txt
@@ -84,6 +84,7 @@ description:
84
84
  email:
85
85
  - me@maetl.net
86
86
  executables:
87
+ - review
87
88
  - todo
88
89
  extensions: []
89
90
  extra_rdoc_files: []
@@ -95,9 +96,12 @@ files:
95
96
  - LICENSE.txt
96
97
  - README.md
97
98
  - Rakefile
99
+ - bin/review
98
100
  - bin/todo
99
101
  - intent.gemspec
100
102
  - lib/intent.rb
103
+ - lib/intent/review.rb
104
+ - lib/intent/review/manager.rb
101
105
  - lib/intent/todo.rb
102
106
  - lib/intent/todo/manager.rb
103
107
  - lib/intent/version.rb