cloudq 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/lib/cloudq/app.rb CHANGED
@@ -5,7 +5,7 @@ module Cloudq
5
5
  use Rack::Params
6
6
 
7
7
  def self.version
8
- "0.0.6"
8
+ "0.0.8"
9
9
  end
10
10
 
11
11
  aget '/' do
@@ -14,8 +14,9 @@ module Cloudq
14
14
 
15
15
  # Post Job to the Queue
16
16
  apost "/:queue" do |q|
17
- halt 500 if params["job"].nil?
18
- Job.create(params["job"].merge(:queue => q))
17
+ # Rack::Params set env['params'] not params
18
+ halt 500 if env["params"]["job"].nil?
19
+ Job.create(env["params"]["job"].merge(:queue => q))
19
20
  status = { :status => "success" }.to_json
20
21
  body status
21
22
  end
@@ -43,4 +44,4 @@ module Cloudq
43
44
  end
44
45
 
45
46
  end
46
- end
47
+ end
data/lib/cloudq/job.rb CHANGED
@@ -12,7 +12,7 @@ module Cloudq
12
12
 
13
13
  key :queue, String
14
14
  key :klass, String
15
- key :args, Hash
15
+ key :args, Array
16
16
  key :workflow_state, String
17
17
 
18
18
  timestamps!
@@ -44,4 +44,4 @@ module Cloudq
44
44
  end
45
45
 
46
46
  end
47
- end
47
+ end
@@ -1,3 +1,3 @@
1
1
  module Cloudq
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
data/lib/rack/params.rb CHANGED
@@ -18,6 +18,7 @@ module Rack
18
18
 
19
19
  def call(env)
20
20
  env['params'] = retrieve_params(env)
21
+
21
22
  @app.call(env)
22
23
  end
23
24
 
data/readme.md CHANGED
@@ -40,11 +40,16 @@ Make sure you have Ruby 1.9.2 installed on your machine, if you do not have 1.9.
40
40
 
41
41
  3. Install the Cloudq Gem
42
42
 
43
- gem install cloudq
43
+ ``` shell
44
+ gem install cloudq
45
+ ```
46
+
44
47
 
45
48
  4. Build your cloudq server
46
49
 
47
- cloudq [your name]
50
+ ```
51
+ cloudq [your name]
52
+ ```
48
53
 
49
54
  This will create a directory and add a config.ru and Gemfile. And if you don't want to add any other features,
50
55
  you are good to go. All you have to do is cd into your directory and run:
@@ -125,14 +130,19 @@ reserver, the worker will pull in a first in, first out process.
125
130
 
126
131
  ## Publish Job in Ruby
127
132
 
128
- gem install cloudq_client
133
+ ```
134
+ gem install cloudq_client
135
+ ```
129
136
 
130
- require 'cloudq_client/publish'
137
+ ``` ruby
138
+ require 'cloudq_client/publish'
131
139
 
132
- Cloudq::Connection.url = 'http://donuts.com'
133
- Cloudq::Publish.job(:make_donuts, 'Donut', :types => [:glazed,
140
+ Cloudq::Connection.url = 'http://donuts.com'
141
+ Cloudq::Publish.new(:make_donuts).job('Donut', :types => [:glazed,
134
142
  :chocolate])
135
143
 
144
+ ```
145
+
136
146
 
137
147
  ---
138
148
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: cloudq
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.7
5
+ version: 0.0.8
6
6
  platform: ruby
7
7
  authors:
8
8
  - Tom Wilson
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-19 00:00:00 -04:00
13
+ date: 2011-04-21 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -36,7 +36,7 @@ dependencies:
36
36
  type: :development
37
37
  version_requirements: *id002
38
38
  - !ruby/object:Gem::Dependency
39
- name: bundler
39
+ name: rest-client
40
40
  prerelease: false
41
41
  requirement: &id003 !ruby/object:Gem::Requirement
42
42
  none: false
@@ -44,10 +44,10 @@ dependencies:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: "0"
47
- type: :runtime
47
+ type: :development
48
48
  version_requirements: *id003
49
49
  - !ruby/object:Gem::Dependency
50
- name: thin
50
+ name: bundler
51
51
  prerelease: false
52
52
  requirement: &id004 !ruby/object:Gem::Requirement
53
53
  none: false
@@ -58,7 +58,7 @@ dependencies:
58
58
  type: :runtime
59
59
  version_requirements: *id004
60
60
  - !ruby/object:Gem::Dependency
61
- name: sinatra
61
+ name: thin
62
62
  prerelease: false
63
63
  requirement: &id005 !ruby/object:Gem::Requirement
64
64
  none: false
@@ -69,7 +69,7 @@ dependencies:
69
69
  type: :runtime
70
70
  version_requirements: *id005
71
71
  - !ruby/object:Gem::Dependency
72
- name: bson_ext
72
+ name: sinatra
73
73
  prerelease: false
74
74
  requirement: &id006 !ruby/object:Gem::Requirement
75
75
  none: false
@@ -80,7 +80,7 @@ dependencies:
80
80
  type: :runtime
81
81
  version_requirements: *id006
82
82
  - !ruby/object:Gem::Dependency
83
- name: mongo_mapper
83
+ name: bson_ext
84
84
  prerelease: false
85
85
  requirement: &id007 !ruby/object:Gem::Requirement
86
86
  none: false
@@ -91,29 +91,29 @@ dependencies:
91
91
  type: :runtime
92
92
  version_requirements: *id007
93
93
  - !ruby/object:Gem::Dependency
94
- name: eventmachine
94
+ name: mongo_mapper
95
95
  prerelease: false
96
96
  requirement: &id008 !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
99
  - - ">="
100
100
  - !ruby/object:Gem::Version
101
- version: 1.0.0.beta.3
101
+ version: "0"
102
102
  type: :runtime
103
103
  version_requirements: *id008
104
104
  - !ruby/object:Gem::Dependency
105
- name: async_sinatra
105
+ name: eventmachine
106
106
  prerelease: false
107
107
  requirement: &id009 !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements:
110
110
  - - ">="
111
111
  - !ruby/object:Gem::Version
112
- version: "0"
112
+ version: 1.0.0.beta.3
113
113
  type: :runtime
114
114
  version_requirements: *id009
115
115
  - !ruby/object:Gem::Dependency
116
- name: workflow
116
+ name: async_sinatra
117
117
  prerelease: false
118
118
  requirement: &id010 !ruby/object:Gem::Requirement
119
119
  none: false
@@ -123,6 +123,17 @@ dependencies:
123
123
  version: "0"
124
124
  type: :runtime
125
125
  version_requirements: *id010
126
+ - !ruby/object:Gem::Dependency
127
+ name: workflow
128
+ prerelease: false
129
+ requirement: &id011 !ruby/object:Gem::Requirement
130
+ none: false
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: "0"
135
+ type: :runtime
136
+ version_requirements: *id011
126
137
  description: The Cloudq Framework makes it easy to build remote job queue servers
127
138
  email:
128
139
  - tom@jackhq.com