taskish 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. data/HISTORY +12 -0
  2. data/coverage/assets/0.4.5/app.js +66 -0
  3. data/coverage/assets/0.4.5/fancybox/blank.gif +0 -0
  4. data/coverage/assets/0.4.5/fancybox/fancy_close.png +0 -0
  5. data/coverage/assets/0.4.5/fancybox/fancy_loading.png +0 -0
  6. data/coverage/assets/0.4.5/fancybox/fancy_nav_left.png +0 -0
  7. data/coverage/assets/0.4.5/fancybox/fancy_nav_right.png +0 -0
  8. data/coverage/assets/0.4.5/fancybox/fancy_shadow_e.png +0 -0
  9. data/coverage/assets/0.4.5/fancybox/fancy_shadow_n.png +0 -0
  10. data/coverage/assets/0.4.5/fancybox/fancy_shadow_ne.png +0 -0
  11. data/coverage/assets/0.4.5/fancybox/fancy_shadow_nw.png +0 -0
  12. data/coverage/assets/0.4.5/fancybox/fancy_shadow_s.png +0 -0
  13. data/coverage/assets/0.4.5/fancybox/fancy_shadow_se.png +0 -0
  14. data/coverage/assets/0.4.5/fancybox/fancy_shadow_sw.png +0 -0
  15. data/coverage/assets/0.4.5/fancybox/fancy_shadow_w.png +0 -0
  16. data/coverage/assets/0.4.5/fancybox/fancy_title_left.png +0 -0
  17. data/coverage/assets/0.4.5/fancybox/fancy_title_main.png +0 -0
  18. data/coverage/assets/0.4.5/fancybox/fancy_title_over.png +0 -0
  19. data/coverage/assets/0.4.5/fancybox/fancy_title_right.png +0 -0
  20. data/coverage/assets/0.4.5/fancybox/fancybox-x.png +0 -0
  21. data/coverage/assets/0.4.5/fancybox/fancybox-y.png +0 -0
  22. data/coverage/assets/0.4.5/fancybox/fancybox.png +0 -0
  23. data/coverage/assets/0.4.5/fancybox/jquery.fancybox-1.3.1.css +363 -0
  24. data/coverage/assets/0.4.5/fancybox/jquery.fancybox-1.3.1.pack.js +44 -0
  25. data/coverage/assets/0.4.5/favicon.png +0 -0
  26. data/coverage/assets/0.4.5/jquery-1.4.2.min.js +155 -0
  27. data/coverage/assets/0.4.5/jquery.dataTables.min.js +152 -0
  28. data/coverage/assets/0.4.5/jquery.timeago.js +141 -0
  29. data/coverage/assets/0.4.5/jquery.url.js +174 -0
  30. data/coverage/assets/0.4.5/loading.gif +0 -0
  31. data/coverage/assets/0.4.5/magnify.png +0 -0
  32. data/coverage/assets/0.4.5/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  33. data/coverage/assets/0.4.5/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  34. data/coverage/assets/0.4.5/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  35. data/coverage/assets/0.4.5/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  36. data/coverage/assets/0.4.5/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  37. data/coverage/assets/0.4.5/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  38. data/coverage/assets/0.4.5/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  39. data/coverage/assets/0.4.5/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  40. data/coverage/assets/0.4.5/smoothness/images/ui-icons_222222_256x240.png +0 -0
  41. data/coverage/assets/0.4.5/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  42. data/coverage/assets/0.4.5/smoothness/images/ui-icons_454545_256x240.png +0 -0
  43. data/coverage/assets/0.4.5/smoothness/images/ui-icons_888888_256x240.png +0 -0
  44. data/coverage/assets/0.4.5/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  45. data/coverage/assets/0.4.5/smoothness/jquery-ui-1.8.4.custom.css +295 -0
  46. data/coverage/assets/0.4.5/stylesheet.css +341 -0
  47. data/coverage/index.html +5499 -0
  48. data/coverage/resultset.yml +415 -0
  49. data/lib/taskish.rb +61 -23
  50. data/lib/taskish/app.rb +5 -6
  51. data/lib/taskish/project.rb +80 -0
  52. data/lib/taskish/task.rb +16 -8
  53. data/lib/taskish/version.rb +1 -1
  54. data/taskish.gemspec +1 -0
  55. data/test/app_test.rb +1 -1
  56. data/test/project_test.rb +125 -0
  57. data/test/task_test.rb +50 -31
  58. data/test/taskish.txt +9 -0
  59. data/test/taskish_test.rb +53 -2
  60. data/test/test_helper.rb +5 -0
  61. data/test/version_test.rb +2 -2
  62. metadata +68 -3
@@ -8,4 +8,13 @@ Project 2:
8
8
 
9
9
  Project 3:
10
10
  - Task 3-A @weekly
11
+ Child Project A:
12
+ - Child Task 1 @done
13
+ - Child Task 2 @due
14
+ - Task 3-B
15
+ Child Project B:
16
+ - Task 3-C
17
+
18
+ Project 3:
19
+ - Task 3-D
11
20
 
@@ -12,6 +12,43 @@ class TaskishTest < Test::Unit::TestCase
12
12
  end
13
13
  end
14
14
 
15
+ context '[](name)' do
16
+ setup do
17
+ @fn = File.join( File.dirname(__FILE__), 'taskish.txt' )
18
+ @taskish = Taskish.new.readlines(@fn)
19
+ end
20
+ should 'return nil if project does not exist' do
21
+ assert_nil @taskish['no such project']
22
+ end
23
+ should 'return project if it exists' do
24
+ p = @taskish['Project 3']
25
+ assert_not_nil p
26
+ assert_kind_of Taskish::Project, p
27
+ assert_equal 'Project 3', p.name
28
+ assert_equal 2, p.projects.size
29
+ assert_equal 6, p.tasks.size
30
+ end
31
+ end
32
+
33
+ context '#<<()' do
34
+ setup do
35
+ @taskish = Taskish.new
36
+ end
37
+ should 'raise ArgumentError if not a project' do
38
+ assert_raise(ArgumentError, 'invalid project') { @taskish.<<(nil) }
39
+ assert_raise(ArgumentError, 'invalid project') { @taskish.<<('') }
40
+ assert_raise(ArgumentError, 'invalid project') { @taskish.<<(1) }
41
+ assert_raise(ArgumentError, 'invalid project') { @taskish.<<('project') }
42
+ end
43
+ should 'be able to add projects' do
44
+ [ 1..5 ].to_a.each do |n|
45
+ assert_equal false, @taskish.project?( n.to_s )
46
+ @taskish.<<( Taskish::Project.new( n.to_s ) )
47
+ assert_equal true, @taskish.project?( n.to_s )
48
+ end
49
+ end
50
+ end
51
+
15
52
  context '#done' do
16
53
  setup do
17
54
  @taskish = Taskish.new
@@ -19,7 +56,7 @@ class TaskishTest < Test::Unit::TestCase
19
56
  @taskish.readlines(@fn)
20
57
  end
21
58
  should 'return correct # of entries' do
22
- assert_equal 2, @taskish.done.size
59
+ assert_equal 3, @taskish.done.size
23
60
  end
24
61
  end
25
62
 
@@ -30,7 +67,21 @@ class TaskishTest < Test::Unit::TestCase
30
67
  @taskish.readlines(@fn)
31
68
  end
32
69
  should 'return correct # of entries for :today' do
33
- assert_equal 1, @taskish.due(:today).size
70
+ assert_equal 2, @taskish.due(:today).size
71
+ end
72
+ end
73
+
74
+ context '#project?()' do
75
+ setup do
76
+ @taskish = Taskish.new
77
+ end
78
+ should 'return false for non-existent projects' do
79
+ assert_equal false, @taskish.project?('no such project')
80
+ end
81
+ should 'return true for projects that exist' do
82
+ n = 'my project'
83
+ @taskish << Taskish::Project.new(n)
84
+ assert_equal true, @taskish.project?(n)
34
85
  end
35
86
  end
36
87
 
@@ -1,3 +1,8 @@
1
+ require 'simplecov'
2
+ SimpleCov.start do
3
+ add_filter '/test/'
4
+ end
5
+
1
6
  $: << File.expand_path( File.join( File.dirname(__FILE__), '..', 'lib' ) )
2
7
 
3
8
  require 'rubygems'
@@ -3,8 +3,8 @@ require 'test_helper'
3
3
  class VersionTest < Test::Unit::TestCase
4
4
 
5
5
  should 'have expected version' do
6
- assert_equal '0.3', Taskish::VERSION
6
+ assert_equal '0.4', Taskish::VERSION
7
7
  end
8
8
 
9
9
  end # class VersionTest
10
-
10
+
metadata CHANGED
@@ -4,8 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 3
8
- version: "0.3"
7
+ - 4
8
+ version: "0.4"
9
9
  platform: ruby
10
10
  authors:
11
11
  - blair christensen.
@@ -13,7 +13,7 @@ autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
15
 
16
- date: 2011-06-29 00:00:00 -05:00
16
+ date: 2011-07-09 00:00:00 -05:00
17
17
  default_executable:
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
@@ -46,6 +46,21 @@ dependencies:
46
46
  version: 2.11.3
47
47
  type: :development
48
48
  version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ name: simplecov
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ segments:
58
+ - 0
59
+ - 4
60
+ - 2
61
+ version: 0.4.2
62
+ type: :development
63
+ version_requirements: *id003
49
64
  description: A text-based to-do list manager inspired by TaskPaper
50
65
  email:
51
66
  - blair.christensen@gmail.com
@@ -62,12 +77,61 @@ files:
62
77
  - README.rdoc
63
78
  - Rakefile
64
79
  - bin/taskish
80
+ - coverage/assets/0.4.5/app.js
81
+ - coverage/assets/0.4.5/fancybox/blank.gif
82
+ - coverage/assets/0.4.5/fancybox/fancy_close.png
83
+ - coverage/assets/0.4.5/fancybox/fancy_loading.png
84
+ - coverage/assets/0.4.5/fancybox/fancy_nav_left.png
85
+ - coverage/assets/0.4.5/fancybox/fancy_nav_right.png
86
+ - coverage/assets/0.4.5/fancybox/fancy_shadow_e.png
87
+ - coverage/assets/0.4.5/fancybox/fancy_shadow_n.png
88
+ - coverage/assets/0.4.5/fancybox/fancy_shadow_ne.png
89
+ - coverage/assets/0.4.5/fancybox/fancy_shadow_nw.png
90
+ - coverage/assets/0.4.5/fancybox/fancy_shadow_s.png
91
+ - coverage/assets/0.4.5/fancybox/fancy_shadow_se.png
92
+ - coverage/assets/0.4.5/fancybox/fancy_shadow_sw.png
93
+ - coverage/assets/0.4.5/fancybox/fancy_shadow_w.png
94
+ - coverage/assets/0.4.5/fancybox/fancy_title_left.png
95
+ - coverage/assets/0.4.5/fancybox/fancy_title_main.png
96
+ - coverage/assets/0.4.5/fancybox/fancy_title_over.png
97
+ - coverage/assets/0.4.5/fancybox/fancy_title_right.png
98
+ - coverage/assets/0.4.5/fancybox/fancybox-x.png
99
+ - coverage/assets/0.4.5/fancybox/fancybox-y.png
100
+ - coverage/assets/0.4.5/fancybox/fancybox.png
101
+ - coverage/assets/0.4.5/fancybox/jquery.fancybox-1.3.1.css
102
+ - coverage/assets/0.4.5/fancybox/jquery.fancybox-1.3.1.pack.js
103
+ - coverage/assets/0.4.5/favicon.png
104
+ - coverage/assets/0.4.5/jquery-1.4.2.min.js
105
+ - coverage/assets/0.4.5/jquery.dataTables.min.js
106
+ - coverage/assets/0.4.5/jquery.timeago.js
107
+ - coverage/assets/0.4.5/jquery.url.js
108
+ - coverage/assets/0.4.5/loading.gif
109
+ - coverage/assets/0.4.5/magnify.png
110
+ - coverage/assets/0.4.5/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
111
+ - coverage/assets/0.4.5/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
112
+ - coverage/assets/0.4.5/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
113
+ - coverage/assets/0.4.5/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
114
+ - coverage/assets/0.4.5/smoothness/images/ui-bg_glass_75_dadada_1x400.png
115
+ - coverage/assets/0.4.5/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
116
+ - coverage/assets/0.4.5/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
117
+ - coverage/assets/0.4.5/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
118
+ - coverage/assets/0.4.5/smoothness/images/ui-icons_222222_256x240.png
119
+ - coverage/assets/0.4.5/smoothness/images/ui-icons_2e83ff_256x240.png
120
+ - coverage/assets/0.4.5/smoothness/images/ui-icons_454545_256x240.png
121
+ - coverage/assets/0.4.5/smoothness/images/ui-icons_888888_256x240.png
122
+ - coverage/assets/0.4.5/smoothness/images/ui-icons_cd0a0a_256x240.png
123
+ - coverage/assets/0.4.5/smoothness/jquery-ui-1.8.4.custom.css
124
+ - coverage/assets/0.4.5/stylesheet.css
125
+ - coverage/index.html
126
+ - coverage/resultset.yml
65
127
  - lib/taskish.rb
66
128
  - lib/taskish/app.rb
129
+ - lib/taskish/project.rb
67
130
  - lib/taskish/task.rb
68
131
  - lib/taskish/version.rb
69
132
  - taskish.gemspec
70
133
  - test/app_test.rb
134
+ - test/project_test.rb
71
135
  - test/task_test.rb
72
136
  - test/taskish.txt
73
137
  - test/taskish_test.rb
@@ -107,6 +171,7 @@ specification_version: 3
107
171
  summary: A text-based to-do list manager inspired by TaskPaper
108
172
  test_files:
109
173
  - test/app_test.rb
174
+ - test/project_test.rb
110
175
  - test/task_test.rb
111
176
  - test/taskish.txt
112
177
  - test/taskish_test.rb