ztodo 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +2 -1
- data/lib/ztodo/project.rb +13 -2
- data/lib/ztodo/version.rb +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/lib/ztodo/project.rb
CHANGED
@@ -66,8 +66,19 @@ class Ztodo::Project
|
|
66
66
|
|
67
67
|
# Create task (but not add it to data)
|
68
68
|
def create
|
69
|
-
|
70
|
-
|
69
|
+
new_key = 0
|
70
|
+
|
71
|
+
@data.each do |k, elem|
|
72
|
+
begin
|
73
|
+
curr = elem[:key].to_s.to_i
|
74
|
+
new_key = curr if new_key < curr
|
75
|
+
rescue
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
new_key += 1
|
80
|
+
{:key=>new_key.to_s, :description=>'put description here',
|
81
|
+
:done=>false, :priority=> Ztodo::Project::NORMAL}
|
71
82
|
end
|
72
83
|
|
73
84
|
end
|
data/lib/ztodo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ztodo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|