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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c249aeec578b4f5cf0b205b75e83fb5daab0ec4
4
- data.tar.gz: 751fe2196d141fccacf0a51536c6eada012326d1
3
+ metadata.gz: aeda92f511a8d674977782658312b5786bbf2541
4
+ data.tar.gz: b4b5ec6a0e021f308d66c128bafcc7ccd6ec2640
5
5
  SHA512:
6
- metadata.gz: 62b6c79f61a7203a3c6944002bea338b9d1c72ca760161aa5386331fb3eaf2cc34acb0b5252f176f9c2bbb825b0304f0d1c9292c445503fb1f16b199f2383b09
7
- data.tar.gz: 77186d271e4dd364e5cfec47c54ca0a1337837d06baac776214f1f1ea06e36f1b3ae646419f2047b385f3484fa52d00853bc5fe8b8c010bf96bf883880b31e8b
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 [ String ] parser The parser to use.
34
- def self.from_file(filename, parser="yaml")
35
- send("from_file_#{parser}".to_sym, filename, self[:environment])
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], config[:environment]
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
@@ -2,7 +2,7 @@ $:.unshift File.dirname(__FILE__)
2
2
 
3
3
  module BeanStalk
4
4
  class Worker
5
- VERSION = '0.1.5'
5
+ VERSION = '0.1.6'
6
6
  end
7
7
  end
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beanstalk-worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Veremey