clustered 0.0.0
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.
- checksums.yaml +7 -0
- data/lib/client.rb +17 -0
- data/lib/client_manager.rb +18 -0
- metadata +45 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8da48f1afdf9016bf016a6e19f9ff0751903fd0e
|
4
|
+
data.tar.gz: feebe4dc25ffd342ed4019eb95635e54c5ff178e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b5a5e6f35dd71e2a8048fdea680400257aab36e1a67385cb9d1be4e1086686947be95b23ac2da0acf951ff12d0ceaf6f488c080f5a8190d149bc9fb1cf8cbcf0
|
7
|
+
data.tar.gz: acaecf34592ee46fb4ff1fd8bcc44f2044b9ac3dd050d974769178adc890ce688cdac5b2a84094b8442881586a912283678a440663b4aeae760cf20e2b39f6c4
|
data/lib/client.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
class Client
|
2
|
+
attr_accessor :tasks, :name, :top_task
|
3
|
+
|
4
|
+
def initialize(name)
|
5
|
+
@name = name
|
6
|
+
@tasks = []
|
7
|
+
@top_task = top_task
|
8
|
+
end
|
9
|
+
|
10
|
+
def add_task(task_description)
|
11
|
+
tasks << task_description
|
12
|
+
end
|
13
|
+
|
14
|
+
def top_task
|
15
|
+
@tasks[-1]
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'client'
|
2
|
+
|
3
|
+
class ClientManager
|
4
|
+
attr_accessor :clients
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
@clients = {}
|
8
|
+
end
|
9
|
+
|
10
|
+
def add_client(client)
|
11
|
+
@clients[client.name] = client
|
12
|
+
end
|
13
|
+
|
14
|
+
def new_client(name)
|
15
|
+
new_client = Client.new(name)
|
16
|
+
add_client(new_client)
|
17
|
+
end
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: clustered
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Philip Szalwinski
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-10-11 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A simple task tracking tool
|
14
|
+
email: pszalwinski@gmail.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/client.rb
|
20
|
+
- lib/client_manager.rb
|
21
|
+
homepage: http://rubygems.org/gems/clustered
|
22
|
+
licenses:
|
23
|
+
- MIT
|
24
|
+
metadata: {}
|
25
|
+
post_install_message:
|
26
|
+
rdoc_options: []
|
27
|
+
require_paths:
|
28
|
+
- lib
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
requirements: []
|
40
|
+
rubyforge_project:
|
41
|
+
rubygems_version: 2.1.8
|
42
|
+
signing_key:
|
43
|
+
specification_version: 4
|
44
|
+
summary: Task master, masters the tasks
|
45
|
+
test_files: []
|