beanstalk_farmer 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog.md ADDED
@@ -0,0 +1,13 @@
1
+ ## 0.2.1
2
+
3
+ * Fix malformed gemspec. Gem should actually work now.
4
+ * Bump Rake dependency
5
+
6
+ ## 0.2.0
7
+
8
+ * Integration testing
9
+ * `BeanstalkFarmer::Service` is a singleton
10
+
11
+ ## 0.1.0
12
+
13
+ * Initial release
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Beanstalk Farmer
1
+ # Beanstalk Farmer [![Build Status](http://travis-ci.org/jherdman/beanstalk_farmer.png)](http://travis-ci.org/jherdman/beanstalk_farmer)
2
2
 
3
3
  Farmer is a simple library that helps you manage your Beanstalk job queue. Its
4
4
  API is heavily inspired by [Stalker](https://github.com/han/stalker), to help
@@ -1,3 +1,3 @@
1
1
  module BeanstalkFarmer
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: beanstalk_farmer
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Herdamn
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-20 00:00:00 Z
13
+ date: 2011-06-06 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: beanstalk-client
@@ -35,24 +35,24 @@ dependencies:
35
35
  prerelease: false
36
36
  version_requirements: *id002
37
37
  - !ruby/object:Gem::Dependency
38
- name: rake
38
+ name: rspec
39
39
  requirement: &id003 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
43
43
  - !ruby/object:Gem::Version
44
- version: 0.8.7
44
+ version: "2.6"
45
45
  type: :development
46
46
  prerelease: false
47
47
  version_requirements: *id003
48
48
  - !ruby/object:Gem::Dependency
49
- name: rspec
49
+ name: rake
50
50
  requirement: &id004 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
54
54
  - !ruby/object:Gem::Version
55
- version: "2.6"
55
+ version: 0.9.0
56
56
  type: :development
57
57
  prerelease: false
58
58
  version_requirements: *id004
@@ -77,26 +77,16 @@ extensions: []
77
77
  extra_rdoc_files: []
78
78
 
79
79
  files:
80
- - .gitignore
81
- - .rspec
82
- - .rvmrc
83
- - .travis.yml
84
- - .yardopts
85
- - Gemfile
86
- - LICENSE
87
- - README.md
88
- - Rakefile
89
- - beanstalk_farmer.gemspec
90
- - example/echo.rb
91
- - example/echo_enqueuer.rb
92
- - lib/beanstalk_farmer.rb
93
80
  - lib/beanstalk_farmer/config.rb
94
81
  - lib/beanstalk_farmer/dsl.rb
95
82
  - lib/beanstalk_farmer/job.rb
96
83
  - lib/beanstalk_farmer/runner.rb
97
84
  - lib/beanstalk_farmer/service.rb
98
85
  - lib/beanstalk_farmer/version.rb
99
- - log/.gitkeep
86
+ - lib/beanstalk_farmer.rb
87
+ - LICENSE
88
+ - Changelog.md
89
+ - README.md
100
90
  - spec/beanstalk_farmer/config_spec.rb
101
91
  - spec/beanstalk_farmer/dsl_spec.rb
102
92
  - spec/beanstalk_farmer/job_spec.rb
@@ -107,19 +97,19 @@ files:
107
97
  - spec/spec_helper.rb
108
98
  - spec/support/have_tube_named.rb
109
99
  homepage: https://github.com/jherdman/beanstalk_farmer
110
- licenses: []
111
-
100
+ licenses:
101
+ - MIT
112
102
  post_install_message:
113
103
  rdoc_options: []
114
104
 
115
105
  require_paths:
116
- - - lib
106
+ - lib
117
107
  required_ruby_version: !ruby/object:Gem::Requirement
118
108
  none: false
119
109
  requirements:
120
110
  - - ">="
121
111
  - !ruby/object:Gem::Version
122
- hash: 3832172194492424674
112
+ hash: -599220295651760896
123
113
  segments:
124
114
  - 0
125
115
  version: "0"
@@ -128,13 +118,24 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
118
  requirements:
129
119
  - - ">="
130
120
  - !ruby/object:Gem::Version
131
- version: 1.3.6
121
+ hash: -599220295651760896
122
+ segments:
123
+ - 0
124
+ version: "0"
132
125
  requirements: []
133
126
 
134
- rubyforge_project: farmer
135
- rubygems_version: 1.8.2
127
+ rubyforge_project:
128
+ rubygems_version: 1.8.5
136
129
  signing_key:
137
130
  specification_version: 3
138
131
  summary: A nice little kit to manage a Beanstalk job queue
139
- test_files: []
140
-
132
+ test_files:
133
+ - spec/beanstalk_farmer/config_spec.rb
134
+ - spec/beanstalk_farmer/dsl_spec.rb
135
+ - spec/beanstalk_farmer/job_spec.rb
136
+ - spec/beanstalk_farmer/runner_spec.rb
137
+ - spec/beanstalk_farmer/service_spec.rb
138
+ - spec/beastalk_farmer_spec.rb
139
+ - spec/integration/working_spec.rb
140
+ - spec/spec_helper.rb
141
+ - spec/support/have_tube_named.rb
data/.gitignore DELETED
@@ -1,6 +0,0 @@
1
- Gemfile.lock
2
- doc/
3
- .yardoc/
4
- pkg/*.gem
5
- coverage/
6
- log/
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color
data/.rvmrc DELETED
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- #
4
- # The following is cribbed directly from the rvm-site project. It's a more
5
- # convenient way of ensuring we're using the correct gemset, or initializing it
6
- # if need be.
7
- #
8
-
9
- ruby_name="ruby-1.9.2"
10
- gemset_name="farmer"
11
- environment_id="$ruby_name@$gemset_name"
12
-
13
- #
14
- # First we attempt to load the desired environment directly from the environment
15
- # file, this is very fast and efficient compared to running through the entire
16
- # CLI and selector. If you want feedback on which environment was used then
17
- # insert the word 'use' after --create as this triggers verbose mode.
18
- #
19
-
20
- if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
21
- && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]] ; then
22
- \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
23
- else
24
- # If the environment file has not yet been created, use the RVM CLI to select.
25
- rvm --create use "$environment_id"
26
- fi
data/.travis.yml DELETED
@@ -1,3 +0,0 @@
1
- rvm:
2
- - 1.9.2
3
- script: bundle exec rspec --tag "~beanstalk_required" -f d spec
data/.yardopts DELETED
@@ -1,4 +0,0 @@
1
- --no-private
2
- --title "Beanstalk Farmer: a Beanstalk Job Queue Gem"
3
- lib/**/*.rb -
4
- LICENSE
data/Gemfile DELETED
@@ -1,7 +0,0 @@
1
- source "http://rubygems.org"
2
- gemspec
3
-
4
- group :documentation do
5
- gem "yard", "~> 0.6.8"
6
- gem "bluecloth"
7
- end
data/Rakefile DELETED
@@ -1,21 +0,0 @@
1
- require 'bundler'
2
- require 'bundler/setup'
3
- require 'bundler/gem_helper'
4
-
5
- Bundler::GemHelper.install_tasks
6
-
7
- require 'rspec/core/rake_task'
8
-
9
- RSpec::Core::RakeTask.new("spec") do |t|
10
- t.verbose = false
11
- t.rspec_opts = "--tag ~beanstalk_required -f d"
12
- end
13
-
14
- task default: "spec"
15
-
16
- require 'yard'
17
- require 'yard/rake/yardoc_task'
18
-
19
- YARD::Rake::YardocTask.new do |t|
20
- # Options managed by .yardopts
21
- end
@@ -1,30 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- lib = File.expand_path('../lib', __FILE__)
3
- $:.unshift(lib) unless $:.include?(lib)
4
-
5
- require 'beanstalk_farmer/version'
6
-
7
- Gem::Specification.new do |s|
8
- s.name = 'beanstalk_farmer'
9
- s.version = BeanstalkFarmer::VERSION
10
- s.platform = Gem::Platform::RUBY
11
- s.authors = ['James Herdamn']
12
- s.email = ['james.herdman@me.com']
13
- s.homepage = 'https://github.com/jherdman/beanstalk_farmer'
14
- s.summary = 'A nice little kit to manage a Beanstalk job queue'
15
- s.description = 'Farmer is a nice little kit to manage a Beanstalk job queue'
16
-
17
- s.required_rubygems_version = '>= 1.3.6'
18
- s.rubyforge_project = 'farmer'
19
-
20
- s.add_dependency 'beanstalk-client', ['~> 1.1.0']
21
- s.add_dependency 'multi_json', ['~> 1.0.2']
22
-
23
- s.add_development_dependency 'rake', ['~> 0.8.7']
24
- s.add_development_dependency 'rspec', ['~> 2.6']
25
- s.add_development_dependency 'simplecov', ['~> 0.4.2']
26
-
27
- s.files = `git ls-files`.split("\n")
28
- s.test_files = `git ls-files -- {spec}/*`.split("\n")
29
- s.require_path = ['lib']
30
- end
data/example/echo.rb DELETED
@@ -1,37 +0,0 @@
1
- ##
2
- # This is a simple echo worker example. To use this, you must have the Farmer
3
- # gem installed, or built.
4
-
5
- $:.unshift(File.dirname(__FILE__) + '/../lib')
6
- require 'beanstalk_farmer'
7
-
8
- class ObjectHandler
9
- attr_accessor :args
10
-
11
- def initialize(args)
12
- self.args = args
13
- end
14
-
15
- def call
16
- BeanstalkFarmer.logger.info "Object handler says #{args.inspect}"
17
- end
18
-
19
- def self.call(args)
20
- new(args).call
21
- end
22
- end
23
-
24
- BeanstalkFarmer::Runner.register_handlers do
25
- tube 'echo.object', ObjectHandler
26
- tube 'echo.small_proc', proc { |args| BeanstalkFarmer.logger.info "Small proc says: #{args.inspect}" }
27
- tube 'echo.big_proc', Proc.new { |args| BeanstalkFarmer.logger.info "Big Proc says: #{args.inspect}" }
28
- tube 'echo.block', do |args| BeanstalkFarmer.logger.info "Block handler says: #{args.inspect}"; end
29
- end
30
-
31
- trap 'INT' do
32
- puts "\rExiting"
33
- BeanstalkFarmer::Runner.close_connection
34
- exit
35
- end
36
-
37
- BeanstalkFarmer::Runner.run!
@@ -1,15 +0,0 @@
1
- $:.unshift(File.dirname(__FILE__) + '/../lib')
2
- require 'beanstalk_farmer'
3
-
4
- loop do
5
- handler_types = %w[object small_proc big_proc block]
6
- handler_type = handler_types[rand(handler_types.length).round]
7
- BeanstalkFarmer::Service.instance.enqueue "echo.#{handler_type}", "Hello, world!"
8
- sleep 10
9
- end
10
-
11
- trap 'INT' do
12
- puts "\rExiting"
13
- BeanstalkFarmer::Runner.close_connection
14
- exit
15
- end
data/log/.gitkeep DELETED
File without changes