cloudist 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cloudist}
8
- s.version = "0.4.1"
8
+ s.version = "0.4.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ivan Vanderbyl"]
12
- s.date = %q{2011-05-23}
12
+ s.date = %q{2011-05-24}
13
13
  s.description = %q{Cloudist is a simple, highly scalable job queue for Ruby applications, it can run within Rails, DaemonKit or your own custom application. Refer to github page for examples}
14
14
  s.email = %q{ivanvanderbyl@me.com}
15
15
  s.extra_rdoc_files = [
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
26
26
  "Rakefile",
27
27
  "VERSION",
28
28
  "cloudist.gemspec",
29
+ "doc/cloudist.png",
29
30
  "examples/amqp/Gemfile",
30
31
  "examples/amqp/Gemfile.lock",
31
32
  "examples/amqp/amqp_consumer.rb",
Binary file
@@ -51,9 +51,14 @@ module Cloudist
51
51
  #
52
52
  # Refer to default config below for how to set these as defaults
53
53
  #
54
- def start(options = {}, &block)
55
- config = settings.update(options)
56
- AMQP.start(config) do
54
+ def start(options_or_connection = {}, &block)
55
+ if options_or_connection.is_a?(Hash)
56
+ config = settings.update(options_or_connection)
57
+ AMQP.start(config) do
58
+ self.instance_eval(&block) if block_given?
59
+ end
60
+ else
61
+ # self.connection = options_or_connection
57
62
  self.instance_eval(&block) if block_given?
58
63
  end
59
64
  end
@@ -1,13 +1,16 @@
1
1
  module Cloudist
2
2
  module Encoding
3
3
  def encode(message)
4
- Marshal.dump(message)
4
+ # Marshal.dump(message)
5
+ # JSON.dump(message.to_hash)
6
+ message.to_json
5
7
  end
6
8
 
7
9
  def decode(message)
8
10
  raise ArgumentError, "First argument can't be nil" if message.nil?
9
11
  return message unless message.is_a?(String)
10
- Marshal.load(message)
12
+ # Marshal.load(message)
13
+ JSON.load(message)
11
14
  end
12
15
  end
13
16
  end
@@ -2,9 +2,9 @@ module Cloudist
2
2
  class ReplyQueue < Cloudist::Queues::BasicQueue
3
3
  def initialize(queue_name, options={})
4
4
  options[:auto_delete] = true
5
- options[:nowait] = true
5
+ options[:nowait] = false
6
6
 
7
- @prefetch = 2
7
+ @prefetch = 1
8
8
 
9
9
  super(queue_name, options)
10
10
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: cloudist
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.1
5
+ version: 0.4.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ivan Vanderbyl
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-23 00:00:00 +10:00
13
+ date: 2011-05-24 00:00:00 +10:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -197,6 +197,7 @@ files:
197
197
  - Rakefile
198
198
  - VERSION
199
199
  - cloudist.gemspec
200
+ - doc/cloudist.png
200
201
  - examples/amqp/Gemfile
201
202
  - examples/amqp/Gemfile.lock
202
203
  - examples/amqp/amqp_consumer.rb
@@ -258,7 +259,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
258
259
  requirements:
259
260
  - - ">="
260
261
  - !ruby/object:Gem::Version
261
- hash: 599422849760493927
262
+ hash: -987302179253893862
262
263
  segments:
263
264
  - 0
264
265
  version: "0"