beanstalk-worker 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/beanstalk-worker/config.rb +5 -3
- data/lib/beanstalk-worker/worker.rb +2 -1
- data/lib/beanstalk-worker.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aeda92f511a8d674977782658312b5786bbf2541
|
4
|
+
data.tar.gz: b4b5ec6a0e021f308d66c128bafcc7ccd6ec2640
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 497af4e17370e32b49d7cf68b0aad849a0d7f56219bf6b3f31997a2c8e2af16d394526aaf93307b85c37577522358abceba6e3ed4d524f8cfc4403f572d195cd
|
7
|
+
data.tar.gz: 3982aae177386d568b4940c7c87601279e241b221b11bb29ad42b01cf4c78c03310e72122eee385d808b6aa5dd4493fb99a9d6420076f3ec7bdbde15836e5131
|
@@ -30,9 +30,11 @@ class BeanStalk::Worker
|
|
30
30
|
# @raise [ IOError ] Any IO Exceptions that occur.
|
31
31
|
#
|
32
32
|
# @param [ String ] filename The filename to read.
|
33
|
-
# @param [
|
34
|
-
def self.from_file(filename,
|
35
|
-
|
33
|
+
# @param [ Hash ] opts The options to send
|
34
|
+
def self.from_file(filename, opts={})
|
35
|
+
opts = { :parser => "yaml" }.merge(opts)
|
36
|
+
send("from_file_#{opts[:parser]}".to_sym, filename,
|
37
|
+
(opts[:environment] || self[:environment]))
|
36
38
|
end
|
37
39
|
|
38
40
|
# Loads a given ruby file and runs instance_eval against it
|
@@ -7,7 +7,8 @@ class BeanStalk::Worker
|
|
7
7
|
@config = BeanStalk::Worker::Config
|
8
8
|
if File.exists? @config[:config_file]
|
9
9
|
if config[:environment]
|
10
|
-
@config.from_file @config[:config_file],
|
10
|
+
@config.from_file @config[:config_file],
|
11
|
+
:environment => config[:environment]
|
11
12
|
else
|
12
13
|
@config.from_file @config[:config_file]
|
13
14
|
end
|
data/lib/beanstalk-worker.rb
CHANGED