cloudq_client 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,19 @@
1
+ module Cloudq
2
+ class Complete < Base
3
+ def job(job_id)
4
+ remove(job_id)
5
+ end
6
+
7
+ private
8
+
9
+ def remove(job_id)
10
+ RestClient.delete [url, job_id].join('/')
11
+ end
12
+
13
+ def url
14
+ [Cloudq::Connection.url, @queue].join('/')
15
+ end
16
+ end
17
+ end
18
+
19
+
@@ -0,0 +1,24 @@
1
+ module Cloudq
2
+ class Request < Base
3
+ def job
4
+ get
5
+ end
6
+
7
+ private
8
+
9
+ def get
10
+ resp = RestClient.get url
11
+ if resp.code == 200
12
+ result = JSON.parse(resp)
13
+ return nil if result['status'] == 'empty'
14
+ result
15
+ end
16
+ end
17
+
18
+ def url
19
+ [Cloudq::Connection.url, @queue].join('/')
20
+ end
21
+ end
22
+ end
23
+
24
+
@@ -1,4 +1,4 @@
1
1
  module Cloudq
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
4
4
 
data/lib/cloudq.rb CHANGED
@@ -3,6 +3,10 @@ require 'json'
3
3
 
4
4
  require 'cloudq/connection'
5
5
  require 'cloudq/base'
6
+ # added for shake and bake
7
+ require 'cloudq/request'
8
+ require 'cloudq/complete'
9
+
6
10
  require 'cloudq/publish'
7
11
  require 'cloudq/consume'
8
12
  require 'cloudq/worker'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudq_client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 6
10
- version: 0.0.6
9
+ - 7
10
+ version: 0.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tom Wilson
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-10 00:00:00 -04:00
19
- default_executable:
18
+ date: 2012-06-12 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: rspec
@@ -89,15 +88,16 @@ extra_rdoc_files: []
89
88
 
90
89
  files:
91
90
  - lib/cloudq/base.rb
91
+ - lib/cloudq/complete.rb
92
92
  - lib/cloudq/connection.rb
93
93
  - lib/cloudq/consume.rb
94
94
  - lib/cloudq/publish.rb
95
+ - lib/cloudq/request.rb
95
96
  - lib/cloudq/version.rb
96
97
  - lib/cloudq/worker.rb
97
98
  - lib/cloudq.rb
98
99
  - LICENSE
99
100
  - readme.md
100
- has_rdoc: true
101
101
  homepage: http://github.com/twilson63/cloudq_client
102
102
  licenses: []
103
103
 
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  requirements: []
130
130
 
131
131
  rubyforge_project:
132
- rubygems_version: 1.6.2
132
+ rubygems_version: 1.8.10
133
133
  signing_key:
134
134
  specification_version: 3
135
135
  summary: A Ruby Interface to the Cloudq