kanban 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +52 -0
- data/Gemfile +1 -15
- data/LICENSE.txt +18 -17
- data/README.org +47 -0
- data/Rakefile +1 -14
- data/kanban.gemspec +21 -88
- data/lib/kanban/backlog.rb +120 -0
- data/lib/kanban/version.rb +3 -0
- data/lib/kanban.rb +2 -119
- metadata +92 -81
- data/Gemfile.lock +0 -142
- data/LICENSE +0 -22
- data/README.md +0 -39
- data/README.rdoc +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 387ea8721a962d5ece3f258f055d93e0ddcac442
|
4
|
+
data.tar.gz: eb8ebe716529628aac1cf0e4eab150138b5d9945
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dae93d32f9996439dda7ac2383f0591c92e767138f367d3ad1f09a59918e0256f36ca675cbec5fd5ad197a35c77d1abac1ce383218b377daeadd15a9e402f5b2
|
7
|
+
data.tar.gz: b6704b8cc4294d2308ddab9f26455f6f675c8cd6518510d70d6b0cf4eb7eb7da2e7b0c2bae8c863eff06c86965fd8f7175b3ae74428ee93f68bf4fd5007a377a
|
data/.gitignore
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
Gemfile.lock
|
2
|
+
|
3
|
+
# rcov generated
|
4
|
+
coverage
|
5
|
+
coverage.data
|
6
|
+
|
7
|
+
# rdoc generated
|
8
|
+
rdoc
|
9
|
+
|
10
|
+
# yard generated
|
11
|
+
doc
|
12
|
+
.yardoc
|
13
|
+
|
14
|
+
# bundler
|
15
|
+
.bundle
|
16
|
+
vendor
|
17
|
+
|
18
|
+
# jeweler generated
|
19
|
+
pkg
|
20
|
+
|
21
|
+
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
|
22
|
+
#
|
23
|
+
# * Create a file at ~/.gitignore
|
24
|
+
# * Include files you want ignored
|
25
|
+
# * Run: git config --global core.excludesfile ~/.gitignore
|
26
|
+
#
|
27
|
+
# After doing this, these files will be ignored in all your git projects,
|
28
|
+
# saving you from having to 'pollute' every project you touch with them
|
29
|
+
#
|
30
|
+
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
|
31
|
+
#
|
32
|
+
# For MacOS:
|
33
|
+
#
|
34
|
+
#.DS_Store
|
35
|
+
|
36
|
+
# For TextMate
|
37
|
+
#*.tmproj
|
38
|
+
#tmtags
|
39
|
+
|
40
|
+
# For emacs:
|
41
|
+
#*~
|
42
|
+
#\#*
|
43
|
+
#.\#*
|
44
|
+
|
45
|
+
# For vim:
|
46
|
+
#*.swp
|
47
|
+
|
48
|
+
# For redcar:
|
49
|
+
#.redcar
|
50
|
+
|
51
|
+
# For rubinius:
|
52
|
+
#*.rbc
|
data/Gemfile
CHANGED
@@ -1,17 +1,3 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
|
4
|
-
gem 'contracts', '~> 0.12'
|
5
|
-
|
6
|
-
group :development do
|
7
|
-
gem 'rspec', '~> 3.2'
|
8
|
-
gem 'yard', '~> 0.8'
|
9
|
-
gem 'rdoc', '~> 4.2'
|
10
|
-
gem 'bundler', '~> 1.0'
|
11
|
-
gem 'jeweler', '~> 2.0'
|
12
|
-
gem 'simplecov', '~> 0.11'
|
13
|
-
gem 'reek', '~> 3.7'
|
14
|
-
gem 'roodi', '~> 5.0'
|
15
|
-
gem 'autotest-standalone', '~> 4.5'
|
16
|
-
gem 'rspec-autotest', '~> 1.0'
|
17
|
-
end
|
3
|
+
gemspec
|
data/LICENSE.txt
CHANGED
@@ -1,20 +1,21 @@
|
|
1
|
-
Copyright (c) 2015 Chris Olstrom
|
2
1
|
|
3
|
-
|
4
|
-
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
2
|
+
The MIT License (MIT)
|
3
|
+
Copyright © 2015-2017 Chris Olstrom <chris@olstrom.com>
|
10
4
|
|
11
|
-
|
12
|
-
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the “Software”), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
13
11
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.org
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
#+TITLE: kanban - Agile Workflow for Ruby
|
2
|
+
|
3
|
+
* Description
|
4
|
+
|
5
|
+
Kanban provides tools to model task flow in distributed apps.
|
6
|
+
|
7
|
+
** Create a Backlog
|
8
|
+
|
9
|
+
#+BEGIN_SRC ruby
|
10
|
+
require 'redis'
|
11
|
+
require 'kanban'
|
12
|
+
|
13
|
+
backlog = Kanban::Backlog.new backend: Redis.new
|
14
|
+
#+END_SRC
|
15
|
+
|
16
|
+
** Add some tasks to your shiny new Backlog
|
17
|
+
|
18
|
+
#+BEGIN_SRC ruby
|
19
|
+
task = { 'foo' => 'bar' }
|
20
|
+
5.times { backlog.add task }
|
21
|
+
#+END_SRC
|
22
|
+
|
23
|
+
** (Elsewhere) Stake a claim on a task from the backlog
|
24
|
+
|
25
|
+
#+BEGIN_SRC ruby
|
26
|
+
task_id = backlog.claim # Will block until there is a task, if the backlog is empty or all tasks are being worked.
|
27
|
+
details = backlog.get task_id
|
28
|
+
#+END_SRC
|
29
|
+
|
30
|
+
** Mark a task as complete (or unworkable)
|
31
|
+
|
32
|
+
#+BEGIN_SRC ruby
|
33
|
+
backlog.complete task_id
|
34
|
+
# or backlog.unworkable task_id
|
35
|
+
backlog.done? task_id # => true
|
36
|
+
#+END_SRC
|
37
|
+
|
38
|
+
* Notes
|
39
|
+
- Claims expire after awhile (default 3 seconds), and become eligible to
|
40
|
+
be worked by something else.
|
41
|
+
* License
|
42
|
+
|
43
|
+
~kanban~ is available under the [[https://tldrlegal.com/license/mit-license][MIT License]]. See ~LICENSE.txt~ for the full text.
|
44
|
+
|
45
|
+
* Contributors
|
46
|
+
|
47
|
+
- [[https://colstrom.github.io/][Chris Olstrom]] | [[mailto:chris@olstrom.com][e-mail]] | [[https://twitter.com/ChrisOlstrom][Twitter]]
|
data/Rakefile
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
#! /usr/bin/env rake
|
1
2
|
# encoding: utf-8
|
2
3
|
|
3
4
|
require 'rubygems'
|
@@ -11,20 +12,6 @@ rescue Bundler::BundlerError => e
|
|
11
12
|
end
|
12
13
|
require 'rake'
|
13
14
|
|
14
|
-
require 'jeweler'
|
15
|
-
Jeweler::Tasks.new do |gem|
|
16
|
-
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
17
|
-
gem.name = "kanban"
|
18
|
-
gem.homepage = "http://github.com/colstrom/kanban"
|
19
|
-
gem.license = "MIT"
|
20
|
-
gem.summary = %Q{Agile Workflow for your code}
|
21
|
-
gem.description = %Q{Because your code totally needed an Agile Workflow}
|
22
|
-
gem.email = "chris@olstrom.com"
|
23
|
-
gem.authors = ["Chris Olstrom"]
|
24
|
-
# dependencies defined in Gemfile
|
25
|
-
end
|
26
|
-
Jeweler::RubygemsDotOrgTasks.new
|
27
|
-
|
28
15
|
require 'rspec/core'
|
29
16
|
require 'rspec/core/rake_task'
|
30
17
|
RSpec::Core::RakeTask.new(:spec) do |spec|
|
data/kanban.gemspec
CHANGED
@@ -1,91 +1,24 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
Gem::Specification.new do |gem|
|
2
|
+
gem.name = 'kanban'
|
3
|
+
gem.version = `git describe --tags --abbrev=0`.chomp
|
4
|
+
gem.licenses = 'MIT'
|
5
|
+
gem.authors = ['Chris Olstrom']
|
6
|
+
gem.email = 'chris@olstrom.com'
|
7
|
+
gem.homepage = 'https://github.com/colstrom/kanban'
|
8
|
+
gem.summary = 'Agile Workflow for Ruby Programs'
|
6
9
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
+
gem.files = `git ls-files`.split("\n")
|
11
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
12
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
13
|
+
gem.require_paths = ['lib']
|
10
14
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
"README.md",
|
21
|
-
"README.rdoc"
|
22
|
-
]
|
23
|
-
s.files = [
|
24
|
-
".document",
|
25
|
-
".rspec",
|
26
|
-
"Gemfile",
|
27
|
-
"Gemfile.lock",
|
28
|
-
"LICENSE",
|
29
|
-
"LICENSE.txt",
|
30
|
-
"README.md",
|
31
|
-
"README.rdoc",
|
32
|
-
"Rakefile",
|
33
|
-
"VERSION",
|
34
|
-
"kanban.gemspec",
|
35
|
-
"lib/kanban.rb",
|
36
|
-
"lib/kanban/hash_safety.rb",
|
37
|
-
"spec/kanban/hash_safety_spec.rb",
|
38
|
-
"spec/kanban_spec.rb",
|
39
|
-
"spec/spec_helper.rb"
|
40
|
-
]
|
41
|
-
s.homepage = "http://github.com/colstrom/kanban"
|
42
|
-
s.licenses = ["MIT"]
|
43
|
-
s.rubygems_version = "2.4.5.1"
|
44
|
-
s.summary = "Agile Workflow for your code"
|
45
|
-
|
46
|
-
if s.respond_to? :specification_version then
|
47
|
-
s.specification_version = 4
|
48
|
-
|
49
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
50
|
-
s.add_runtime_dependency(%q<redis>, ["~> 3.2"])
|
51
|
-
s.add_runtime_dependency(%q<contracts>, ["~> 0.12"])
|
52
|
-
s.add_development_dependency(%q<rspec>, ["~> 3.2"])
|
53
|
-
s.add_development_dependency(%q<yard>, ["~> 0.8"])
|
54
|
-
s.add_development_dependency(%q<rdoc>, ["~> 4.2"])
|
55
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
56
|
-
s.add_development_dependency(%q<jeweler>, ["~> 2.0"])
|
57
|
-
s.add_development_dependency(%q<simplecov>, ["~> 0.11"])
|
58
|
-
s.add_development_dependency(%q<reek>, ["~> 3.7"])
|
59
|
-
s.add_development_dependency(%q<roodi>, ["~> 5.0"])
|
60
|
-
s.add_development_dependency(%q<autotest-standalone>, ["~> 4.5"])
|
61
|
-
s.add_development_dependency(%q<rspec-autotest>, ["~> 1.0"])
|
62
|
-
else
|
63
|
-
s.add_dependency(%q<redis>, ["~> 3.2"])
|
64
|
-
s.add_dependency(%q<contracts>, ["~> 0.12"])
|
65
|
-
s.add_dependency(%q<rspec>, ["~> 3.2"])
|
66
|
-
s.add_dependency(%q<yard>, ["~> 0.8"])
|
67
|
-
s.add_dependency(%q<rdoc>, ["~> 4.2"])
|
68
|
-
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
69
|
-
s.add_dependency(%q<jeweler>, ["~> 2.0"])
|
70
|
-
s.add_dependency(%q<simplecov>, ["~> 0.11"])
|
71
|
-
s.add_dependency(%q<reek>, ["~> 3.7"])
|
72
|
-
s.add_dependency(%q<roodi>, ["~> 5.0"])
|
73
|
-
s.add_dependency(%q<autotest-standalone>, ["~> 4.5"])
|
74
|
-
s.add_dependency(%q<rspec-autotest>, ["~> 1.0"])
|
75
|
-
end
|
76
|
-
else
|
77
|
-
s.add_dependency(%q<redis>, ["~> 3.2"])
|
78
|
-
s.add_dependency(%q<contracts>, ["~> 0.12"])
|
79
|
-
s.add_dependency(%q<rspec>, ["~> 3.2"])
|
80
|
-
s.add_dependency(%q<yard>, ["~> 0.8"])
|
81
|
-
s.add_dependency(%q<rdoc>, ["~> 4.2"])
|
82
|
-
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
83
|
-
s.add_dependency(%q<jeweler>, ["~> 2.0"])
|
84
|
-
s.add_dependency(%q<simplecov>, ["~> 0.11"])
|
85
|
-
s.add_dependency(%q<reek>, ["~> 3.7"])
|
86
|
-
s.add_dependency(%q<roodi>, ["~> 5.0"])
|
87
|
-
s.add_dependency(%q<autotest-standalone>, ["~> 4.5"])
|
88
|
-
s.add_dependency(%q<rspec-autotest>, ["~> 1.0"])
|
89
|
-
end
|
15
|
+
gem.add_runtime_dependency 'contracts', '~> 0.16', '>= 0.16.0'
|
16
|
+
gem.add_runtime_dependency 'redis', '~> 4.0', '>= 4.0.0'
|
17
|
+
gem.add_development_dependency 'bundler', '~> 1.15', '>= 1.15.0'
|
18
|
+
gem.add_development_dependency 'rake', '~> 12.1', '>= 12.1.0'
|
19
|
+
gem.add_development_dependency 'reek', '~> 4.7', '>= 4.7.0'
|
20
|
+
gem.add_development_dependency 'roodi', '~> 5.0', '>= 5.0.0'
|
21
|
+
gem.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
22
|
+
gem.add_development_dependency 'simplecov', '~> 0.15', '>= 0.15.0'
|
23
|
+
gem.add_development_dependency 'yard', '~> 0.9', '>= 0.9.0'
|
90
24
|
end
|
91
|
-
|
@@ -0,0 +1,120 @@
|
|
1
|
+
require 'contracts'
|
2
|
+
require 'redis'
|
3
|
+
require_relative 'hash_safety'
|
4
|
+
|
5
|
+
module Kanban
|
6
|
+
class Backlog
|
7
|
+
using HashSafety
|
8
|
+
include ::Contracts::Core
|
9
|
+
include ::Contracts::Builtin
|
10
|
+
|
11
|
+
attr_reader :namespace, :queue, :item
|
12
|
+
|
13
|
+
def initialize(backend:, **options)
|
14
|
+
@namespace = options.fetch :namespace, 'default'
|
15
|
+
@queue = "#{@namespace}:#{options.fetch :queue, 'tasks'}"
|
16
|
+
@item = "#{@namespace}:#{options.fetch :item, 'task'}"
|
17
|
+
@backend = backend
|
18
|
+
end
|
19
|
+
|
20
|
+
Contract Num => Hash
|
21
|
+
def get(id)
|
22
|
+
@backend.hgetall "#{@item}:#{id}"
|
23
|
+
end
|
24
|
+
|
25
|
+
Contract None => Num
|
26
|
+
def next_id
|
27
|
+
@backend.incr "#{@queue}:id"
|
28
|
+
end
|
29
|
+
|
30
|
+
Contract None => ArrayOf[Num]
|
31
|
+
def todo
|
32
|
+
@backend.lrange("#{@queue}:todo", 0, -1).map(&:to_i)
|
33
|
+
end
|
34
|
+
|
35
|
+
Contract HashOf[String, Any] => Num
|
36
|
+
def add(task)
|
37
|
+
id = next_id
|
38
|
+
@backend.hmset "#{@item}:#{id}", *task.to_a
|
39
|
+
@backend.lpush "#{@queue}:todo", id
|
40
|
+
id
|
41
|
+
end
|
42
|
+
|
43
|
+
Contract Hash => Num
|
44
|
+
def add!(task)
|
45
|
+
safe = task.with_string_keys
|
46
|
+
add(safe)
|
47
|
+
end
|
48
|
+
|
49
|
+
Contract Maybe[({ duration: Num })] => Num
|
50
|
+
def claim(duration: 3)
|
51
|
+
id = @backend.brpoplpush("#{@queue}:todo", "#{@queue}:doing")
|
52
|
+
@backend.set "#{@item}:#{id}:claimed", true, ex: duration
|
53
|
+
id.to_i
|
54
|
+
end
|
55
|
+
|
56
|
+
Contract Num => Bool
|
57
|
+
def claimed?(id)
|
58
|
+
@backend.exists "#{@item}:#{id}:claimed"
|
59
|
+
end
|
60
|
+
|
61
|
+
Contract None => ArrayOf[Num]
|
62
|
+
def doing
|
63
|
+
@backend.lrange("#{@queue}:doing", 0, -1).map(&:to_i)
|
64
|
+
end
|
65
|
+
|
66
|
+
Contract Num => Bool
|
67
|
+
def complete(id)
|
68
|
+
@backend.setbit("#{@queue}:completed", id, 1).zero?
|
69
|
+
end
|
70
|
+
|
71
|
+
Contract Num => Bool
|
72
|
+
def completed?(id)
|
73
|
+
@backend.getbit("#{@queue}:completed", id) == 1
|
74
|
+
end
|
75
|
+
|
76
|
+
Contract Num => Bool
|
77
|
+
def unworkable(id)
|
78
|
+
@backend.setbit("#{@queue}:unworkable", id, 1).zero?
|
79
|
+
end
|
80
|
+
|
81
|
+
Contract Num => Bool
|
82
|
+
def unworkable?(id)
|
83
|
+
@backend.getbit("#{@queue}:unworkable", id) == 1
|
84
|
+
end
|
85
|
+
|
86
|
+
Contract Num => Bool
|
87
|
+
def done?(id)
|
88
|
+
completed?(id) || unworkable?(id)
|
89
|
+
end
|
90
|
+
|
91
|
+
Contract Num => Bool
|
92
|
+
def release(id)
|
93
|
+
expire_claim id
|
94
|
+
@backend.lrem("#{@queue}:doing", 0, id) > 0
|
95
|
+
end
|
96
|
+
|
97
|
+
Contract Num => Bool
|
98
|
+
def expire_claim(id)
|
99
|
+
@backend.expire "#{@item}:#{id}:claimed", 0
|
100
|
+
end
|
101
|
+
|
102
|
+
Contract Num => Bool
|
103
|
+
def requeue(id)
|
104
|
+
release id
|
105
|
+
@backend.lpush("#{@queue}:todo", id) > 0
|
106
|
+
end
|
107
|
+
|
108
|
+
Contract None => ArrayOf[Num]
|
109
|
+
def groom
|
110
|
+
doing.map do |id|
|
111
|
+
next if claimed? id
|
112
|
+
if done? id
|
113
|
+
id if release id
|
114
|
+
else
|
115
|
+
id if requeue id
|
116
|
+
end
|
117
|
+
end.compact
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
data/lib/kanban.rb
CHANGED
@@ -1,119 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require_relative 'kanban/hash_safety'
|
4
|
-
|
5
|
-
module Kanban
|
6
|
-
class Backlog
|
7
|
-
using HashSafety
|
8
|
-
include Contracts
|
9
|
-
|
10
|
-
attr_reader :namespace, :queue, :item
|
11
|
-
|
12
|
-
def initialize(backend:, **options)
|
13
|
-
@namespace = options.fetch :namespace, 'default'
|
14
|
-
@queue = "#{@namespace}:#{options.fetch :queue, 'tasks'}"
|
15
|
-
@item = "#{@namespace}:#{options.fetch :item, 'task'}"
|
16
|
-
@backend = backend
|
17
|
-
end
|
18
|
-
|
19
|
-
Contract Num => Hash
|
20
|
-
def get(id)
|
21
|
-
@backend.hgetall "#{@item}:#{id}"
|
22
|
-
end
|
23
|
-
|
24
|
-
Contract None => Num
|
25
|
-
def next_id
|
26
|
-
@backend.incr "#{@queue}:id"
|
27
|
-
end
|
28
|
-
|
29
|
-
Contract None => ArrayOf[Num]
|
30
|
-
def todo
|
31
|
-
@backend.lrange("#{@queue}:todo", 0, -1).map(&:to_i)
|
32
|
-
end
|
33
|
-
|
34
|
-
Contract HashOf[String, Any] => Num
|
35
|
-
def add(task)
|
36
|
-
id = next_id
|
37
|
-
@backend.hmset "#{@item}:#{id}", *task.to_a
|
38
|
-
@backend.lpush "#{@queue}:todo", id
|
39
|
-
id
|
40
|
-
end
|
41
|
-
|
42
|
-
Contract Hash => Num
|
43
|
-
def add!(task)
|
44
|
-
safe = task.with_string_keys
|
45
|
-
add(safe)
|
46
|
-
end
|
47
|
-
|
48
|
-
Contract Maybe[({ duration: Num })] => Num
|
49
|
-
def claim(duration: 3)
|
50
|
-
id = @backend.brpoplpush("#{@queue}:todo", "#{@queue}:doing")
|
51
|
-
@backend.set "#{@item}:#{id}:claimed", true, ex: duration
|
52
|
-
id.to_i
|
53
|
-
end
|
54
|
-
|
55
|
-
Contract Num => Bool
|
56
|
-
def claimed?(id)
|
57
|
-
@backend.exists "#{@item}:#{id}:claimed"
|
58
|
-
end
|
59
|
-
|
60
|
-
Contract None => ArrayOf[Num]
|
61
|
-
def doing
|
62
|
-
@backend.lrange("#{@queue}:doing", 0, -1).map(&:to_i)
|
63
|
-
end
|
64
|
-
|
65
|
-
Contract Num => Bool
|
66
|
-
def complete(id)
|
67
|
-
@backend.setbit("#{@queue}:completed", id, 1).zero?
|
68
|
-
end
|
69
|
-
|
70
|
-
Contract Num => Bool
|
71
|
-
def completed?(id)
|
72
|
-
@backend.getbit("#{@queue}:completed", id) == 1
|
73
|
-
end
|
74
|
-
|
75
|
-
Contract Num => Bool
|
76
|
-
def unworkable(id)
|
77
|
-
@backend.setbit("#{@queue}:unworkable", id, 1).zero?
|
78
|
-
end
|
79
|
-
|
80
|
-
Contract Num => Bool
|
81
|
-
def unworkable?(id)
|
82
|
-
@backend.getbit("#{@queue}:unworkable", id) == 1
|
83
|
-
end
|
84
|
-
|
85
|
-
Contract Num => Bool
|
86
|
-
def done?(id)
|
87
|
-
completed?(id) || unworkable?(id)
|
88
|
-
end
|
89
|
-
|
90
|
-
Contract Num => Bool
|
91
|
-
def release(id)
|
92
|
-
expire_claim id
|
93
|
-
@backend.lrem("#{@queue}:doing", 0, id) > 0
|
94
|
-
end
|
95
|
-
|
96
|
-
Contract Num => Bool
|
97
|
-
def expire_claim(id)
|
98
|
-
@backend.expire "#{@item}:#{id}:claimed", 0
|
99
|
-
end
|
100
|
-
|
101
|
-
Contract Num => Bool
|
102
|
-
def requeue(id)
|
103
|
-
release id
|
104
|
-
@backend.lpush("#{@queue}:todo", id) > 0
|
105
|
-
end
|
106
|
-
|
107
|
-
Contract None => ArrayOf[Num]
|
108
|
-
def groom
|
109
|
-
doing.map do |id|
|
110
|
-
next if claimed? id
|
111
|
-
if done? id
|
112
|
-
id if release id
|
113
|
-
else
|
114
|
-
id if requeue id
|
115
|
-
end
|
116
|
-
end.compact
|
117
|
-
end
|
118
|
-
end
|
119
|
-
end
|
1
|
+
require_relative 'kanban/backlog'
|
2
|
+
require_relative 'kanban/version'
|
metadata
CHANGED
@@ -1,210 +1,218 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kanban
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Olstrom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: contracts
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0.16'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.16.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
29
|
+
version: '0.16'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.16.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
34
|
+
name: redis
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
39
|
+
version: '4.0'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 4.0.0
|
34
43
|
type: :runtime
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
47
|
- - "~>"
|
39
48
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
49
|
+
version: '4.0'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 4.0.0
|
41
53
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
54
|
+
name: bundler
|
43
55
|
requirement: !ruby/object:Gem::Requirement
|
44
56
|
requirements:
|
45
57
|
- - "~>"
|
46
58
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
59
|
+
version: '1.15'
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 1.15.0
|
48
63
|
type: :development
|
49
64
|
prerelease: false
|
50
65
|
version_requirements: !ruby/object:Gem::Requirement
|
51
66
|
requirements:
|
52
67
|
- - "~>"
|
53
68
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
69
|
+
version: '1.15'
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 1.15.0
|
55
73
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
74
|
+
name: rake
|
57
75
|
requirement: !ruby/object:Gem::Requirement
|
58
76
|
requirements:
|
59
77
|
- - "~>"
|
60
78
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
79
|
+
version: '12.1'
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 12.1.0
|
62
83
|
type: :development
|
63
84
|
prerelease: false
|
64
85
|
version_requirements: !ruby/object:Gem::Requirement
|
65
86
|
requirements:
|
66
87
|
- - "~>"
|
67
88
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
89
|
+
version: '12.1'
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 12.1.0
|
69
93
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
94
|
+
name: reek
|
71
95
|
requirement: !ruby/object:Gem::Requirement
|
72
96
|
requirements:
|
73
97
|
- - "~>"
|
74
98
|
- !ruby/object:Gem::Version
|
75
|
-
version: '4.
|
99
|
+
version: '4.7'
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 4.7.0
|
76
103
|
type: :development
|
77
104
|
prerelease: false
|
78
105
|
version_requirements: !ruby/object:Gem::Requirement
|
79
106
|
requirements:
|
80
107
|
- - "~>"
|
81
108
|
- !ruby/object:Gem::Version
|
82
|
-
version: '4.
|
109
|
+
version: '4.7'
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 4.7.0
|
83
113
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
114
|
+
name: roodi
|
85
115
|
requirement: !ruby/object:Gem::Requirement
|
86
116
|
requirements:
|
87
117
|
- - "~>"
|
88
118
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
119
|
+
version: '5.0'
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 5.0.0
|
90
123
|
type: :development
|
91
124
|
prerelease: false
|
92
125
|
version_requirements: !ruby/object:Gem::Requirement
|
93
126
|
requirements:
|
94
127
|
- - "~>"
|
95
128
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
129
|
+
version: '5.0'
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: 5.0.0
|
97
133
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
134
|
+
name: rspec
|
99
135
|
requirement: !ruby/object:Gem::Requirement
|
100
136
|
requirements:
|
101
137
|
- - "~>"
|
102
138
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
139
|
+
version: '3.6'
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: 3.6.0
|
104
143
|
type: :development
|
105
144
|
prerelease: false
|
106
145
|
version_requirements: !ruby/object:Gem::Requirement
|
107
146
|
requirements:
|
108
147
|
- - "~>"
|
109
148
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
149
|
+
version: '3.6'
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 3.6.0
|
111
153
|
- !ruby/object:Gem::Dependency
|
112
154
|
name: simplecov
|
113
155
|
requirement: !ruby/object:Gem::Requirement
|
114
156
|
requirements:
|
115
157
|
- - "~>"
|
116
158
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0.
|
118
|
-
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
159
|
+
version: '0.15'
|
160
|
+
- - ">="
|
123
161
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: reek
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '3.7'
|
162
|
+
version: 0.15.0
|
132
163
|
type: :development
|
133
164
|
prerelease: false
|
134
165
|
version_requirements: !ruby/object:Gem::Requirement
|
135
166
|
requirements:
|
136
167
|
- - "~>"
|
137
168
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
139
|
-
-
|
140
|
-
name: roodi
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - "~>"
|
169
|
+
version: '0.15'
|
170
|
+
- - ">="
|
144
171
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '5.0'
|
172
|
+
version: 0.15.0
|
153
173
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
174
|
+
name: yard
|
155
175
|
requirement: !ruby/object:Gem::Requirement
|
156
176
|
requirements:
|
157
177
|
- - "~>"
|
158
178
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
160
|
-
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - "~>"
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '4.5'
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: rspec-autotest
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - "~>"
|
179
|
+
version: '0.9'
|
180
|
+
- - ">="
|
172
181
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
182
|
+
version: 0.9.0
|
174
183
|
type: :development
|
175
184
|
prerelease: false
|
176
185
|
version_requirements: !ruby/object:Gem::Requirement
|
177
186
|
requirements:
|
178
187
|
- - "~>"
|
179
188
|
- !ruby/object:Gem::Version
|
180
|
-
version: '
|
181
|
-
|
189
|
+
version: '0.9'
|
190
|
+
- - ">="
|
191
|
+
- !ruby/object:Gem::Version
|
192
|
+
version: 0.9.0
|
193
|
+
description:
|
182
194
|
email: chris@olstrom.com
|
183
195
|
executables: []
|
184
196
|
extensions: []
|
185
|
-
extra_rdoc_files:
|
186
|
-
- LICENSE
|
187
|
-
- LICENSE.txt
|
188
|
-
- README.md
|
189
|
-
- README.rdoc
|
197
|
+
extra_rdoc_files: []
|
190
198
|
files:
|
191
199
|
- ".document"
|
200
|
+
- ".gitignore"
|
192
201
|
- ".rspec"
|
193
202
|
- Gemfile
|
194
|
-
- Gemfile.lock
|
195
|
-
- LICENSE
|
196
203
|
- LICENSE.txt
|
197
|
-
- README.
|
198
|
-
- README.rdoc
|
204
|
+
- README.org
|
199
205
|
- Rakefile
|
200
206
|
- VERSION
|
201
207
|
- kanban.gemspec
|
202
208
|
- lib/kanban.rb
|
209
|
+
- lib/kanban/backlog.rb
|
203
210
|
- lib/kanban/hash_safety.rb
|
211
|
+
- lib/kanban/version.rb
|
204
212
|
- spec/kanban/hash_safety_spec.rb
|
205
213
|
- spec/kanban_spec.rb
|
206
214
|
- spec/spec_helper.rb
|
207
|
-
homepage:
|
215
|
+
homepage: https://github.com/colstrom/kanban
|
208
216
|
licenses:
|
209
217
|
- MIT
|
210
218
|
metadata: {}
|
@@ -224,8 +232,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
232
|
version: '0'
|
225
233
|
requirements: []
|
226
234
|
rubyforge_project:
|
227
|
-
rubygems_version: 2.
|
235
|
+
rubygems_version: 2.6.13
|
228
236
|
signing_key:
|
229
237
|
specification_version: 4
|
230
|
-
summary: Agile Workflow for
|
231
|
-
test_files:
|
238
|
+
summary: Agile Workflow for Ruby Programs
|
239
|
+
test_files:
|
240
|
+
- spec/kanban/hash_safety_spec.rb
|
241
|
+
- spec/kanban_spec.rb
|
242
|
+
- spec/spec_helper.rb
|
data/Gemfile.lock
DELETED
@@ -1,142 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
abstract_type (0.0.7)
|
5
|
-
adamantium (0.2.0)
|
6
|
-
ice_nine (~> 0.11.0)
|
7
|
-
memoizable (~> 0.4.0)
|
8
|
-
addressable (2.3.8)
|
9
|
-
ast (2.1.0)
|
10
|
-
autotest-standalone (4.5.11)
|
11
|
-
axiom-types (0.1.1)
|
12
|
-
descendants_tracker (~> 0.0.4)
|
13
|
-
ice_nine (~> 0.11.0)
|
14
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
15
|
-
builder (3.2.2)
|
16
|
-
codeclimate-engine-rb (0.1.0)
|
17
|
-
virtus (~> 1.0)
|
18
|
-
coercible (1.0.0)
|
19
|
-
descendants_tracker (~> 0.0.1)
|
20
|
-
concord (0.1.5)
|
21
|
-
adamantium (~> 0.2.0)
|
22
|
-
equalizer (~> 0.0.9)
|
23
|
-
contracts (0.12.0)
|
24
|
-
descendants_tracker (0.0.4)
|
25
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
26
|
-
diff-lcs (1.2.5)
|
27
|
-
docile (1.1.5)
|
28
|
-
equalizer (0.0.11)
|
29
|
-
faraday (0.9.2)
|
30
|
-
multipart-post (>= 1.2, < 3)
|
31
|
-
git (1.2.9.1)
|
32
|
-
github_api (0.13.0)
|
33
|
-
addressable (~> 2.3)
|
34
|
-
descendants_tracker (~> 0.0.4)
|
35
|
-
faraday (~> 0.8, < 0.10)
|
36
|
-
hashie (>= 3.4)
|
37
|
-
multi_json (>= 1.7.5, < 2.0)
|
38
|
-
nokogiri (~> 1.6.6)
|
39
|
-
oauth2
|
40
|
-
hashie (3.4.3)
|
41
|
-
highline (1.7.8)
|
42
|
-
ice_nine (0.11.1)
|
43
|
-
jeweler (2.0.1)
|
44
|
-
builder
|
45
|
-
bundler (>= 1.0)
|
46
|
-
git (>= 1.2.5)
|
47
|
-
github_api
|
48
|
-
highline (>= 1.6.15)
|
49
|
-
nokogiri (>= 1.5.10)
|
50
|
-
rake
|
51
|
-
rdoc
|
52
|
-
json (1.8.3)
|
53
|
-
jwt (1.5.2)
|
54
|
-
memoizable (0.4.2)
|
55
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
56
|
-
mini_portile2 (2.0.0)
|
57
|
-
multi_json (1.11.2)
|
58
|
-
multi_xml (0.5.5)
|
59
|
-
multipart-post (2.0.0)
|
60
|
-
nokogiri (1.6.7)
|
61
|
-
mini_portile2 (~> 2.0.0.rc2)
|
62
|
-
oauth2 (1.0.0)
|
63
|
-
faraday (>= 0.8, < 0.10)
|
64
|
-
jwt (~> 1.0)
|
65
|
-
multi_json (~> 1.3)
|
66
|
-
multi_xml (~> 0.5)
|
67
|
-
rack (~> 1.2)
|
68
|
-
parser (2.2.3.0)
|
69
|
-
ast (>= 1.1, < 3.0)
|
70
|
-
private_attr (1.1.0)
|
71
|
-
procto (0.0.2)
|
72
|
-
rack (1.6.4)
|
73
|
-
rainbow (2.0.0)
|
74
|
-
rake (10.4.2)
|
75
|
-
rdoc (4.2.0)
|
76
|
-
redis (3.2.2)
|
77
|
-
reek (3.7.1)
|
78
|
-
codeclimate-engine-rb (~> 0.1.0)
|
79
|
-
parser (~> 2.2, >= 2.2.2.5)
|
80
|
-
private_attr (~> 1.1)
|
81
|
-
rainbow (~> 2.0)
|
82
|
-
unparser (~> 0.2.2)
|
83
|
-
roodi (5.0.0)
|
84
|
-
ruby_parser (~> 3.2, >= 3.2.2)
|
85
|
-
rspec (3.4.0)
|
86
|
-
rspec-core (~> 3.4.0)
|
87
|
-
rspec-expectations (~> 3.4.0)
|
88
|
-
rspec-mocks (~> 3.4.0)
|
89
|
-
rspec-autotest (1.0.0)
|
90
|
-
rspec-core (>= 2.99.0.beta1, < 4.0.0)
|
91
|
-
rspec-core (3.4.1)
|
92
|
-
rspec-support (~> 3.4.0)
|
93
|
-
rspec-expectations (3.4.0)
|
94
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
95
|
-
rspec-support (~> 3.4.0)
|
96
|
-
rspec-mocks (3.4.0)
|
97
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
98
|
-
rspec-support (~> 3.4.0)
|
99
|
-
rspec-support (3.4.1)
|
100
|
-
ruby_parser (3.7.2)
|
101
|
-
sexp_processor (~> 4.1)
|
102
|
-
sexp_processor (4.6.0)
|
103
|
-
simplecov (0.11.0)
|
104
|
-
docile (~> 1.1.0)
|
105
|
-
json (~> 1.8)
|
106
|
-
simplecov-html (~> 0.10.0)
|
107
|
-
simplecov-html (0.10.0)
|
108
|
-
thread_safe (0.3.5)
|
109
|
-
unparser (0.2.4)
|
110
|
-
abstract_type (~> 0.0.7)
|
111
|
-
adamantium (~> 0.2.0)
|
112
|
-
concord (~> 0.1.5)
|
113
|
-
diff-lcs (~> 1.2.5)
|
114
|
-
equalizer (~> 0.0.9)
|
115
|
-
parser (~> 2.2.2)
|
116
|
-
procto (~> 0.0.2)
|
117
|
-
virtus (1.0.5)
|
118
|
-
axiom-types (~> 0.1)
|
119
|
-
coercible (~> 1.0)
|
120
|
-
descendants_tracker (~> 0.0, >= 0.0.3)
|
121
|
-
equalizer (~> 0.0, >= 0.0.9)
|
122
|
-
yard (0.8.7.6)
|
123
|
-
|
124
|
-
PLATFORMS
|
125
|
-
ruby
|
126
|
-
|
127
|
-
DEPENDENCIES
|
128
|
-
autotest-standalone (~> 4.5)
|
129
|
-
bundler (~> 1.0)
|
130
|
-
contracts (~> 0.12)
|
131
|
-
jeweler (~> 2.0)
|
132
|
-
rdoc (~> 4.2)
|
133
|
-
redis (~> 3.2)
|
134
|
-
reek (~> 3.7)
|
135
|
-
roodi (~> 5.0)
|
136
|
-
rspec (~> 3.2)
|
137
|
-
rspec-autotest (~> 1.0)
|
138
|
-
simplecov (~> 0.11)
|
139
|
-
yard (~> 0.8)
|
140
|
-
|
141
|
-
BUNDLED WITH
|
142
|
-
1.10.6
|
data/LICENSE
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2015 Chris Olstrom
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
22
|
-
|
data/README.md
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
# kanban
|
2
|
-
Because your code totally needed an Agile workflow.
|
3
|
-
|
4
|
-
Description
|
5
|
-
===========
|
6
|
-
Kanban provides tools to model task flow in distributed apps.
|
7
|
-
|
8
|
-
Create a Backlog
|
9
|
-
----------------
|
10
|
-
```ruby
|
11
|
-
require 'redis'
|
12
|
-
require 'kanban'
|
13
|
-
|
14
|
-
backlog = Kanban::Backlog.new backend: Redis.new
|
15
|
-
```
|
16
|
-
|
17
|
-
Add some tasks to your shiny new Backlog
|
18
|
-
----------------------------------------
|
19
|
-
```ruby
|
20
|
-
task = { 'foo' => 'bar' }
|
21
|
-
5.times { backlog.add task }
|
22
|
-
```
|
23
|
-
|
24
|
-
(Elsewhere) Stake a claim on a task from the backlog
|
25
|
-
----------------------------------------------------
|
26
|
-
```ruby
|
27
|
-
task_id = backlog.claim # Will block until there is a task, if the backlog is empty or all tasks are being worked.
|
28
|
-
details = backlog.get task_id
|
29
|
-
```
|
30
|
-
|
31
|
-
Mark a task as complete (or unworkable)
|
32
|
-
---------------------------------------
|
33
|
-
```ruby
|
34
|
-
backlog.complete task_id
|
35
|
-
# or backlog.unworkable task_id
|
36
|
-
backlog.done? task_id # => true
|
37
|
-
```
|
38
|
-
|
39
|
-
Claims expire after awhile (default 3 seconds), and become eligible to be worked by something else.
|
data/README.rdoc
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
= kanban
|
2
|
-
|
3
|
-
Description goes here.
|
4
|
-
|
5
|
-
== Contributing to kanban
|
6
|
-
|
7
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
8
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
9
|
-
* Fork the project.
|
10
|
-
* Start a feature/bugfix branch.
|
11
|
-
* Commit and push until you are happy with your contribution.
|
12
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
-
|
15
|
-
== Copyright
|
16
|
-
|
17
|
-
Copyright (c) 2015 Chris Olstrom. See LICENSE.txt for
|
18
|
-
further details.
|
19
|
-
|