markdo 0.1.12.alpha → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +15 -9
- data/Dockerfile +21 -7
- data/Guardfile +11 -0
- data/README.md +12 -7
- data/Rakefile +11 -7
- data/bin/markdo +1 -1
- data/docker-compose.yml +9 -0
- data/lib/markdo/cli.rb +23 -55
- data/lib/markdo/command_support.rb +14 -0
- data/lib/markdo/commands.rb +16 -0
- data/lib/markdo/{add_command.rb → commands/add_command.rb} +2 -6
- data/lib/markdo/commands/command.rb +33 -0
- data/lib/markdo/{edit_command.rb → commands/edit_command.rb} +2 -2
- data/lib/markdo/commands/forecast_command.rb +41 -0
- data/lib/markdo/{help_command.rb → commands/help_command.rb} +7 -8
- data/lib/markdo/commands/ics_command.rb +15 -0
- data/lib/markdo/commands/inbox_command.rb +11 -0
- data/lib/markdo/commands/overdue_command.rb +11 -0
- data/lib/markdo/commands/overview_command.rb +16 -0
- data/lib/markdo/commands/process_command.rb +91 -0
- data/lib/markdo/commands/query_command.rb +14 -0
- data/lib/markdo/commands/star_command.rb +11 -0
- data/lib/markdo/commands/summary_command.rb +25 -0
- data/lib/markdo/commands/tag_command.rb +11 -0
- data/lib/markdo/commands/today_command.rb +12 -0
- data/lib/markdo/commands/tomorrow_command.rb +12 -0
- data/lib/markdo/{version_command.rb → commands/version_command.rb} +1 -1
- data/lib/markdo/commands/week_command.rb +16 -0
- data/lib/markdo/data_source.rb +27 -0
- data/lib/markdo/ics_exporter.rb +65 -0
- data/lib/markdo/models/task.rb +46 -0
- data/lib/markdo/models/task_attribute.rb +22 -0
- data/lib/markdo/models/task_collection.rb +75 -0
- data/lib/markdo/version.rb +1 -1
- data/markdo.gemspec +6 -0
- data/script/build +9 -0
- data/spec/fixtures/add_command/Inbox.md +0 -0
- data/spec/fixtures/date_commands/Inbox.md +6 -0
- data/spec/fixtures/date_commands/Sprint.md +6 -0
- data/spec/fixtures/ics_command/Inbox.md +0 -0
- data/{test/fixtures/ics_command.md → spec/fixtures/ics_command/Sprint.md} +0 -0
- data/spec/fixtures/inbox_command/Inbox.md +2 -0
- data/spec/fixtures/inbox_command/Sprint.md +2 -0
- data/spec/fixtures/process_command/Backlog.md +0 -0
- data/spec/fixtures/process_command/Inbox.md +0 -0
- data/spec/fixtures/process_command/Maybe.md +0 -0
- data/spec/fixtures/process_command/Sprint.md +0 -0
- data/spec/fixtures/query_command/Inbox.md +4 -0
- data/spec/fixtures/query_command/Sprint.md +4 -0
- data/spec/fixtures/tag_command/Inbox.md +2 -0
- data/spec/fixtures/tag_command/Sprint.md +2 -0
- data/spec/lib/cli_spec.rb +79 -0
- data/spec/lib/commands/add_command_spec.rb +70 -0
- data/spec/lib/commands/edit_command_spec.rb +32 -0
- data/spec/lib/commands/forecast_command_spec.rb +24 -0
- data/spec/lib/commands/ics_command_spec.rb +30 -0
- data/spec/lib/commands/inbox_command_spec.rb +22 -0
- data/spec/lib/commands/overdue_command_spec.rb +19 -0
- data/spec/lib/commands/overview_command_spec.rb +25 -0
- data/spec/lib/commands/process_command_spec.rb +178 -0
- data/spec/lib/commands/query_command_spec.rb +23 -0
- data/spec/lib/commands/star_command_spec.rb +19 -0
- data/spec/lib/commands/summary_command_spec.rb +23 -0
- data/spec/lib/commands/tag_command_spec.rb +21 -0
- data/spec/lib/commands/today_command_spec.rb +19 -0
- data/spec/lib/commands/tomorrow_command_spec.rb +19 -0
- data/spec/lib/commands/week_command_spec.rb +23 -0
- data/spec/lib/ics_exporter_spec.rb +59 -0
- data/spec/lib/models/task_attribute_spec.rb +85 -0
- data/spec/lib/models/task_collection_spec.rb +168 -0
- data/spec/lib/models/task_spec.rb +79 -0
- data/spec/spec_helper.rb +40 -0
- metadata +189 -42
- data/.ruby-version +0 -1
- data/lib/markdo/command.rb +0 -12
- data/lib/markdo/date_command.rb +0 -9
- data/lib/markdo/forecast_command.rb +0 -61
- data/lib/markdo/ics_command.rb +0 -73
- data/lib/markdo/inbox_command.rb +0 -15
- data/lib/markdo/overdue_command.rb +0 -47
- data/lib/markdo/overview_command.rb +0 -17
- data/lib/markdo/process_command.rb +0 -68
- data/lib/markdo/query_command.rb +0 -24
- data/lib/markdo/rss_command.rb +0 -67
- data/lib/markdo/star_command.rb +0 -9
- data/lib/markdo/summary_command.rb +0 -30
- data/lib/markdo/tag_command.rb +0 -9
- data/lib/markdo/today_command.rb +0 -10
- data/lib/markdo/tomorrow_command.rb +0 -10
- data/lib/markdo/week_command.rb +0 -36
- data/test/fixtures/inbox.md +0 -2
- data/test/fixtures/rss_command.md +0 -4
- data/test/ics_command_test.rb +0 -38
- data/test/inbox_command_test.rb +0 -19
- data/test/rss_command_test.rb +0 -39
- data/test/summary_command_test.rb +0 -19
- data/test/test_helper.rb +0 -3
data/test/inbox_command_test.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
require 'markdo/inbox_command'
|
3
|
-
|
4
|
-
module Markdo
|
5
|
-
describe InboxCommand do
|
6
|
-
it 'outputs inbox' do
|
7
|
-
out = StringIO.new
|
8
|
-
err = StringIO.new
|
9
|
-
env = { 'MARKDO_ROOT' => 'test/fixtures', 'MARKDO_INBOX' => 'inbox.md' }
|
10
|
-
|
11
|
-
InboxCommand.new(out, err, env).run
|
12
|
-
|
13
|
-
out.string.must_equal <<-XML
|
14
|
-
- [ ] Test 1
|
15
|
-
- [ ] Test 2
|
16
|
-
XML
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
data/test/rss_command_test.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
require 'markdo/rss_command'
|
3
|
-
|
4
|
-
module Markdo
|
5
|
-
describe RssCommand do
|
6
|
-
it 'outputs RSS from the input Markdown' do
|
7
|
-
out = StringIO.new
|
8
|
-
err = StringIO.new
|
9
|
-
env = { 'MARKDO_ROOT' => 'test/fixtures' }
|
10
|
-
|
11
|
-
RssCommand.new(out, err, env).run
|
12
|
-
|
13
|
-
xml_must_equal out.string, <<-XML
|
14
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
15
|
-
<rss version="2.0">
|
16
|
-
<channel>
|
17
|
-
<title>Links in Markdo</title>
|
18
|
-
<item>
|
19
|
-
<title>Task with HTTP URL http://www.example.com/</title>
|
20
|
-
<link>http://www.example.com/</link>
|
21
|
-
</item>
|
22
|
-
<item>
|
23
|
-
<title>Task with HTTPS URL https://www.example.com/</title>
|
24
|
-
<link>https://www.example.com/</link>
|
25
|
-
</item>
|
26
|
-
<item>
|
27
|
-
<title>Task with HTTP URL http://www.example.com/ and trailing text</title>
|
28
|
-
<link>http://www.example.com/</link>
|
29
|
-
</item>
|
30
|
-
</channel>
|
31
|
-
</rss>
|
32
|
-
XML
|
33
|
-
end
|
34
|
-
|
35
|
-
def xml_must_equal(actual, expected)
|
36
|
-
actual.must_equal(expected.gsub(/^\s*/, ''))
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
require 'markdo/summary_command'
|
3
|
-
|
4
|
-
module Markdo
|
5
|
-
describe SummaryCommand do
|
6
|
-
it 'outputs summary counts' do
|
7
|
-
out = StringIO.new
|
8
|
-
err = StringIO.new
|
9
|
-
env = { 'MARKDO_ROOT' => 'test/fixtures', 'MARKDO_INBOX' => 'inbox.md' }
|
10
|
-
|
11
|
-
SummaryCommand.new(out, err, env).run
|
12
|
-
|
13
|
-
out.string.must_equal <<-XML
|
14
|
-
Overdue: 3
|
15
|
-
Inbox: 2
|
16
|
-
XML
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
data/test/test_helper.rb
DELETED