kabutops 0.0.13 → 0.0.14

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: 2079759508e14efc73da0711fefa3bafa7e2cffa
4
- data.tar.gz: 0034b70dbeca4dafd3471125f47392a4c7e98693
3
+ metadata.gz: f9896b61e29581c8aa78c45522e12815a861edfd
4
+ data.tar.gz: 7ffaada9073a05d96a5add4a5207ad353de346b2
5
5
  SHA512:
6
- metadata.gz: 5315b48bff4207c58ff56242120cf6c9feb5297b29d668607241238ff9f1e0f01df16bf0ed45367b927690f6c55480b212761aec3dda0261a6af3ade1676e6b7
7
- data.tar.gz: c00e64003cd9b3bb26685ed74dd16052e9b952cfa5e89baf0cf36f35d4d2cca77e3ee618c50d68f82d3e15aa2d239d45aebadea33b774ec507813ce15abfeb51
6
+ metadata.gz: 47942c0ae11ee5f7838be897b38403aed97af44cf0e8ae898b7fbabfefa24be546155eb9d0eb5d3f179581e4aa3119479b802acef2bca2b81b0b5586c3653371
7
+ data.tar.gz: 3ef11d12b464b3c98b5e2a2a5f2b2aca757c69d24614c2e32a6f16ddcdc7e6a0303d14d8eef2caf75564eaffe9d2dee7c75157a7e9c5540a36f88a1c3d2a0b1e
data/README.md CHANGED
@@ -24,7 +24,7 @@ gem install kabutops
24
24
  Or you can put it in your Gemfile
25
25
 
26
26
  ```ruby
27
- gem 'kabutops', '~> 0.0.13'
27
+ gem 'kabutops', '~> 0.0.14'
28
28
  ```
29
29
 
30
30
  You will also need Redis database installed and running.
@@ -125,7 +125,9 @@ module Kabutops
125
125
  end
126
126
 
127
127
  def agent
128
- unless @agent
128
+ if params[:agent].is_a?(Proc)
129
+ @agent = params[:agent].call
130
+ elsif @agent.nil?
129
131
  @agent = params[:agent] || Mechanize.new
130
132
  @agent.set_proxy(*params[:proxy]) if params[:proxy]
131
133
  end
@@ -1,5 +1,5 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
3
  module Kabutops
4
- VERSION = '0.0.13'
4
+ VERSION = '0.0.14'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kabutops
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rene Klacan