timcharper-beanstalk-client 1.0.3

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.
@@ -0,0 +1,34 @@
1
+ desc 'Release the website and new gem version'
2
+ task :deploy => [:check_version, :website, :release] do
3
+ puts "Remember to create SVN tag:"
4
+ puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
5
+ "svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
6
+ puts "Suggested comment:"
7
+ puts "Tagging release #{CHANGES}"
8
+ end
9
+
10
+ desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
11
+ task :local_deploy => [:website_generate, :install_gem]
12
+
13
+ task :check_version do
14
+ unless ENV['VERSION']
15
+ puts 'Must pass a VERSION=x.y.z release version'
16
+ exit
17
+ end
18
+ unless ENV['VERSION'] == VERS
19
+ puts "Please update your version.rb to match the release version, currently #{VERS}"
20
+ exit
21
+ end
22
+ end
23
+
24
+ desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
25
+ task :install_gem_no_doc => [:clean, :package] do
26
+ sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
27
+ end
28
+
29
+ namespace :manifest do
30
+ desc 'Recreate Manifest.txt to include ALL files'
31
+ task :refresh do
32
+ `rake check_manifest | patch -p0 > Manifest.txt`
33
+ end
34
+ end
@@ -0,0 +1,7 @@
1
+ task :ruby_env do
2
+ RUBY_APP = if RUBY_PLATFORM =~ /java/
3
+ "jruby"
4
+ else
5
+ "ruby"
6
+ end unless defined? RUBY_APP
7
+ end
@@ -0,0 +1,12 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ require 'beanstalk-client'
4
+
5
+ class TestBeanstalk < Test::Unit::TestCase
6
+ def setup
7
+ end
8
+
9
+ def test_truth
10
+ assert true
11
+ end
12
+ end
@@ -0,0 +1,2 @@
1
+ require 'test/unit'
2
+ require File.dirname(__FILE__) + '/../lib/beanstalk-client'
data/website/index.txt ADDED
@@ -0,0 +1,79 @@
1
+ h1. Beanstalk Client
2
+
3
+ h1. &#x2192; 'beanstalk-client'
4
+
5
+
6
+ h2. What
7
+
8
+ This is a Ruby client library for the Beanstalk protocol.
9
+
10
+ "<tt>beanstalkd</tt>":http://xph.us/software/beanstalkd/ is a fast,
11
+ distributed, in-memory work-queue service. Its interface is generic, but is
12
+ intended for use in reducing the latency of page views in high-volume web
13
+ applications by running most time-consuming tasks asynchronously.
14
+
15
+ h2. Installing
16
+
17
+ <p>First you must download and install the
18
+ "<tt>beanstalkd</tt>":http://xph.us/software/beanstalkd/ server.</p>
19
+
20
+ <p>Then just:</p>
21
+
22
+ <pre syntax="sh">sudo gem install beanstalk-client</pre>
23
+
24
+ <p>and you're ready to go!</p>
25
+
26
+ h2. How to use it
27
+
28
+ Here's an example of the low-level Ruby interface.
29
+
30
+ First, have one process put a job into the queue:
31
+
32
+ <pre syntax="ruby">
33
+ beanstalk = Beanstalk::Pool.new(['localhost:11300'])
34
+ ...
35
+ beanstalk.put('hello')
36
+ </pre>
37
+
38
+ Then start another process to take jobs out of the queue and run them:
39
+
40
+ <pre syntax="ruby">
41
+ beanstalk = Beanstalk::Pool.new(['localhost:11300'])
42
+ loop do
43
+ job = beanstalk.reserve
44
+ puts job.body # prints "hello"
45
+ job.delete
46
+ end
47
+ </pre>
48
+
49
+ h2. Rails Integration
50
+
51
+ But you very likely want to use this in a Rails project. In that case, you
52
+ should check out the <a href=http://async-observer.rubyforge.org/>Async
53
+ Observer Rails plugin</a>. It gives far more functionality and a
54
+ super-easy-to-use interface.
55
+
56
+ h2. Forum
57
+
58
+ There's a google group called
59
+ "beanstalk-talk":http://groups.google.com/group/beanstalk-talk for all
60
+ discussion regarding <tt>beanstalkd</tt> and the various client libraries.
61
+
62
+ h2. How to submit patches
63
+
64
+ Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
65
+
66
+ The repository is <code>http://xph.us/src/beanstalk-client-ruby.git</code> for anonymous access.
67
+
68
+ You can browse the repo at
69
+ "http://xph.us/git/beanstalk-client-ruby/":http://xph.us/git/beanstalk-client-ruby/.
70
+
71
+ h2. License
72
+
73
+ You can share this code under the terms of the GPL version 3.
74
+
75
+ h2. Contact
76
+
77
+ Comments are welcome. Send any questions or comments to the
78
+ "beanstalk-talk":http://groups.google.com/group/beanstalk-talk google group.
79
+
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: timcharper-beanstalk-client
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Keith Rarick
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-05-01 00:00:00 -06:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Ruby client library for the Beanstalk protocol
17
+ email: kr@causes.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - History.txt
24
+ - License.txt
25
+ - Manifest.txt
26
+ - README.txt
27
+ - website/index.txt
28
+ files:
29
+ - History.txt
30
+ - License.txt
31
+ - Manifest.txt
32
+ - README.txt
33
+ - Rakefile
34
+ - config/hoe.rb
35
+ - config/requirements.rb
36
+ - lib/beanstalk-client.rb
37
+ - lib/beanstalk-client/connection.rb
38
+ - lib/beanstalk-client/errors.rb
39
+ - lib/beanstalk-client/job.rb
40
+ - lib/beanstalk-client/version.rb
41
+ - log/debug.log
42
+ - script/destroy
43
+ - script/generate
44
+ - script/txt2html
45
+ - setup.rb
46
+ - tasks/deployment.rake
47
+ - tasks/environment.rake
48
+ - test/test_beanstalk-client.rb
49
+ - test/test_helper.rb
50
+ - website/index.txt
51
+ has_rdoc: true
52
+ homepage: http://beanstalk.rubyforge.org
53
+ licenses: []
54
+
55
+ post_install_message:
56
+ rdoc_options:
57
+ - --main
58
+ - README.txt
59
+ require_paths:
60
+ - lib
61
+ required_ruby_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: "0"
66
+ version:
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: "0"
72
+ version:
73
+ requirements: []
74
+
75
+ rubyforge_project: beanstalk
76
+ rubygems_version: 1.3.5
77
+ signing_key:
78
+ specification_version: 2
79
+ summary: Ruby client library for the Beanstalk protocol
80
+ test_files:
81
+ - test/test_beanstalk-client.rb
82
+ - test/test_helper.rb