Skip to content

Commit

Permalink
vector addition task added
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksander Dabrowski committed Dec 19, 2010
1 parent ee70108 commit b85d7df
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -30,3 +30,4 @@ scripts_compressed.js
data/output.jpg
data/output.jpeg
data/small.jpeg
data/output.txt
6 changes: 6 additions & 0 deletions config/tasks.yml
Expand Up @@ -4,4 +4,10 @@ foo:
delimeter: ;
timeout: 3
binary: true

vector_add:
source: data/vector.txt
output: data/output.txt
delimeter: ;
binary: false

1 change: 1 addition & 0 deletions data/vector.txt
@@ -0,0 +1 @@
1;2;3;4;5;6;7;8;9;10
2 changes: 1 addition & 1 deletion lib/topserver/listener.rb
Expand Up @@ -6,7 +6,7 @@ def post_init
end

def receive_data(data)
#puts "Recieved_data: #{data}"
puts "Recieved_data: #{data}"
splitted_data = data.split
if splitted_data[0] == "REGISTER"
server.log 'Registering new client'
Expand Down
1 change: 1 addition & 0 deletions lib/topserver/task_loader.rb
Expand Up @@ -2,6 +2,7 @@ class TaskLoader
def self.load(server)
tasks_config = YAML::load(File.open("config/tasks.yml"))
tasks_config.each do |conf|
#File extenson should be in config and done using constantize
if conf[1]["binary"]
file_extension = BinaryFileExtension.new( conf[1]["source"], conf[1]["output"], conf[1]["delimeter"])
else
Expand Down

0 comments on commit b85d7df

Please sign in to comment.