sculd 0.1.0 → 0.1.1

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.
data/CHANGES CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  == Master
4
4
 
5
+ == Version 0.1.1 [2013-05-21] released
6
+ * Bugfix of show_task.
7
+
5
8
  == Version 0.1.0 [2013-05-17] released
6
9
  * Use test-unit alternatively to rspec.
7
10
  * Enable to use directory, ~/.sculd alternatively to ~/.sculd.dat
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -13,14 +13,17 @@ class Sculd::Plan::Deadline < Sculd::Plan
13
13
  DEFAULT_OPTION = 7
14
14
 
15
15
  def priority(today)
16
+ #pp @option
16
17
  #@option = 1 if @option < 1
17
- beginning = @datetime - (@option || DEFAULT_OPTION)
18
+ option = (@option || DEFAULT_OPTION)
19
+ beginning = @datetime - option
20
+ #pp beginning
18
21
  if today < beginning
19
22
  return 0
20
23
  elsif today <= @datetime
21
24
  rp = Sculd::Plan::REMINDER_PRIORITY
22
25
  dp = Sculd::Plan::DEADLINE_PRIORITY
23
- return (rp + (dp - rp) * (today - beginning)/(@option.to_f)).to_i
26
+ return (rp + (dp - rp) * (today - beginning)/(option.to_f)).to_i
24
27
  else
25
28
  return Sculd::Plan::DEADLINE_PRIORITY
26
29
  end
@@ -0,0 +1,81 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "sculd"
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["ippei94da"]
12
+ s.date = "2013-05-21"
13
+ s.description = "Schedule management system using 'howm' like format. Plans, i.e., schedule(@), reminder(-), deadline(!), and tood(+), make events and tasks. Command 'sculd' can output events on each date and tasks with high priority. "
14
+ s.email = "ippei94da@gmail.com"
15
+ s.executables = ["dates", "sculd"]
16
+ s.extra_rdoc_files = [
17
+ "LICENSE.txt",
18
+ "README.rdoc"
19
+ ]
20
+ s.files = [
21
+ ".document",
22
+ ".rspec",
23
+ "CHANGES",
24
+ "Gemfile",
25
+ "LICENSE.txt",
26
+ "README.rdoc",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "bin/dates",
30
+ "bin/sculd",
31
+ "lib/sculd.rb",
32
+ "lib/sculd/manager.rb",
33
+ "lib/sculd/plan.rb",
34
+ "lib/sculd/plan/deadline.rb",
35
+ "lib/sculd/plan/reminder.rb",
36
+ "lib/sculd/plan/schedule.rb",
37
+ "lib/sculd/plan/todo.rb",
38
+ "sculd.gemspec",
39
+ "test/helper.rb",
40
+ "test/schedule/empty/empty.dat",
41
+ "test/schedule/error/error.dat",
42
+ "test/schedule/normal/a.dat",
43
+ "test/schedule/normal/b.dat",
44
+ "test/test_deadline.rb",
45
+ "test/test_manager.rb",
46
+ "test/test_plan.rb",
47
+ "test/test_reminder.rb",
48
+ "test/test_schedule.rb",
49
+ "test/test_todo.rb"
50
+ ]
51
+ s.homepage = "http://github.com/ippei94da/sculd"
52
+ s.licenses = ["MIT"]
53
+ s.require_paths = ["lib"]
54
+ s.rubygems_version = "1.8.23"
55
+ s.summary = "Sculd, SChedULe Dealer."
56
+
57
+ if s.respond_to? :specification_version then
58
+ s.specification_version = 3
59
+
60
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
61
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
62
+ s.add_development_dependency(%q<bundler>, ["~> 1.3.5"])
63
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
64
+ s.add_development_dependency(%q<simplecov>, [">= 0"])
65
+ s.add_development_dependency(%q<highline>, [">= 1.6.15"])
66
+ else
67
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
68
+ s.add_dependency(%q<bundler>, ["~> 1.3.5"])
69
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
70
+ s.add_dependency(%q<simplecov>, [">= 0"])
71
+ s.add_dependency(%q<highline>, [">= 1.6.15"])
72
+ end
73
+ else
74
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
75
+ s.add_dependency(%q<bundler>, ["~> 1.3.5"])
76
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
77
+ s.add_dependency(%q<simplecov>, [">= 0"])
78
+ s.add_dependency(%q<highline>, [">= 1.6.15"])
79
+ end
80
+ end
81
+
@@ -10,6 +10,9 @@ class TC_Deadline < Test::Unit::TestCase
10
10
 
11
11
  date = DateTime.new(2012, 10, 15, 23, 45, 00)
12
12
  @d01 = Sculd::Plan::Deadline.new(date, false, 10, 'deadlineA')
13
+
14
+ date = Date.new(2012, 10, 15)
15
+ @d02 = Sculd::Plan::Deadline.new(date, false, nil, 'deadlineA')
13
16
  end
14
17
 
15
18
  #context 'Date[2012-10-15], 10, [2012-10-15]!10 deadlineA' do
@@ -26,6 +29,22 @@ class TC_Deadline < Test::Unit::TestCase
26
29
 
27
30
  today = Date.new(2012, 10, 1)
28
31
  assert_equal(0, @d00.priority(today))
32
+
33
+
34
+ today = Date.new(2012, 10, 1)
35
+ assert_equal( 0, @d02.priority(today))
36
+
37
+ today = Date.new(2012, 10, 8)
38
+ assert_equal(10000, @d02.priority(today))
39
+
40
+ today = Date.new(2012, 10, 10)
41
+ assert_equal(12857, @d02.priority(today))
42
+
43
+ today = Date.new(2012, 10, 15)
44
+ assert_equal(20000, @d02.priority(today))
45
+
46
+ today = Date.new(2012, 10, 20)
47
+ assert_equal(20000, @d02.priority(today))
29
48
  end
30
49
 
31
50
  def test_event_dates
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sculd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-16 00:00:00.000000000 Z
12
+ date: 2013-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc
16
- requirement: &88535180 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '3.12'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *88535180
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '3.12'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: bundler
27
- requirement: &88534940 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: 1.3.5
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *88534940
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.3.5
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: jeweler
38
- requirement: &88534690 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ~>
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: 1.8.4
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *88534690
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.8.4
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: simplecov
49
- requirement: &88534450 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: '0'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *88534450
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: highline
60
- requirement: &88534140 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
@@ -65,7 +85,12 @@ dependencies:
65
85
  version: 1.6.15
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *88534140
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: 1.6.15
69
94
  description: ! 'Schedule management system using ''howm'' like format. Plans, i.e.,
70
95
  schedule(@), reminder(-), deadline(!), and tood(+), make events and tasks. Command
71
96
  ''sculd'' can output events on each date and tasks with high priority. '
@@ -95,6 +120,7 @@ files:
95
120
  - lib/sculd/plan/reminder.rb
96
121
  - lib/sculd/plan/schedule.rb
97
122
  - lib/sculd/plan/todo.rb
123
+ - sculd.gemspec
98
124
  - test/helper.rb
99
125
  - test/schedule/empty/empty.dat
100
126
  - test/schedule/error/error.dat
@@ -121,7 +147,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
121
147
  version: '0'
122
148
  segments:
123
149
  - 0
124
- hash: 558675731
150
+ hash: -715369519
125
151
  required_rubygems_version: !ruby/object:Gem::Requirement
126
152
  none: false
127
153
  requirements:
@@ -130,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
156
  version: '0'
131
157
  requirements: []
132
158
  rubyforge_project:
133
- rubygems_version: 1.8.11
159
+ rubygems_version: 1.8.23
134
160
  signing_key:
135
161
  specification_version: 3
136
162
  summary: Sculd, SChedULe Dealer.