beanqueue 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ === 0.1.1 2011-10-20
2
+
3
+ * 1 minor enhancement:
4
+ * Added Railtie
5
+
1
6
  === 0.1.0 2011-10-20
2
7
 
3
8
  * 2 minor enhancements:
data/Manifest.txt CHANGED
@@ -3,3 +3,4 @@ Manifest.txt
3
3
  README.rdoc
4
4
  Rakefile
5
5
  lib/beanqueue.rb
6
+ lib/beanqueue/railtie.rb
@@ -0,0 +1,9 @@
1
+ module Rails
2
+ module Beanqueue
3
+ class Railtie < Rails::Railtie
4
+ initializer "load YAML config" do
5
+ ::Beanqueue.connect ::Beanqueue.get_params(Rails.root.join('config', 'beanstalk.yml'))
6
+ end
7
+ end
8
+ end
9
+ end
data/lib/beanqueue.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'beanstalk-client'
2
2
 
3
3
  module Beanqueue
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
 
6
6
  class << self
7
7
  def get_params(yaml_path)
@@ -25,6 +25,6 @@ module Beanqueue
25
25
  end
26
26
  end
27
27
 
28
- if defined? Rails
29
- Beanqueue.connect Beanqueue.get_params(Rails.root.join('config', 'beanstalk.yml'))
28
+ if defined?(Rails)
29
+ require "beanqueue/railtie"
30
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beanqueue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-20 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: beanstalk-client
16
- requirement: &21543920 !ruby/object:Gem::Requirement
16
+ requirement: &7335920 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *21543920
24
+ version_requirements: *7335920
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: hoe
27
- requirement: &21542600 !ruby/object:Gem::Requirement
27
+ requirement: &7335360 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '2.12'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *21542600
35
+ version_requirements: *7335360
36
36
  description: ! 'This is a beanstalk-based job-queueing-manager, replacement for gem
37
37
  ''stalker'' with additions:
38
38
 
@@ -65,6 +65,7 @@ files:
65
65
  - README.rdoc
66
66
  - Rakefile
67
67
  - lib/beanqueue.rb
68
+ - lib/beanqueue/railtie.rb
68
69
  - test/test_beanqueue.rb
69
70
  - .gemtest
70
71
  homepage: http://github.com/GearHead90/beanqueue