vcr-uri-catcher 0.5.0 → 0.5.1

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: b0b23a630faa42b6ee6ce29a6bdb6c778c68f69a
4
- data.tar.gz: f6654654ddddd0fd03770e89de1f109f2c669c69
3
+ metadata.gz: ba1f391a9dd1f8ac920413208fd427507cdc7aea
4
+ data.tar.gz: 802dd518b735d647ab3c7f2d20084124a5231326
5
5
  SHA512:
6
- metadata.gz: a206796b14b27ed71490b6a2ebda6fef7f60fbb7ffa76ce0c4d1a78f9a9db0b18e26f8e9dded68205f0ed74646020e4fc749419f5087b1988e97d6294b3d0cfd
7
- data.tar.gz: 6c0c15552e0a3b8e26c4c5594195e5359b291b4cc77ff9f453fbf64c3a386af3d5cd0ad5f81385b55a584c234054b5cc9f9f2b69dee05777188e9c51d70205e3
6
+ metadata.gz: 6de5ad998439566cd6b58fd57857a47524f5c401de9f2c664f5b45ea92d83f58d09ecddb2092b274542db5bf7dbba27269484a12d9c28d5839096e7402f092c5
7
+ data.tar.gz: 16df316a2a91a256327c36c4a6ba7ac59e7ed7025317d1e0b155a18270d54aaed0c616e20df35ee12c5dfeab9f9d178244fa643da4857a839fdfab3da02f6e5f
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -30,6 +30,7 @@ class Catcher
30
30
  raise URICatcher::MissingVCR if VCR.nil?
31
31
  VCR.configure do |c|
32
32
  c.before_http_request do |request|
33
+ STDERR.puts "URICatcher: caught uri #{request.uri}" if $VERBOSE
33
34
  catch_request(request) if active?
34
35
  end
35
36
  end
@@ -55,6 +56,7 @@ class Catcher
55
56
  if @uris.has_key?(uri)
56
57
  raise "uri #{uri} already registered"
57
58
  else
59
+ STDERR.puts "URICatcher: will try to catch uri #{uri}" if $VERBOSE
58
60
  @uris[uri] = { :once => once, :block => block }
59
61
  end
60
62
  end
@@ -66,6 +68,7 @@ class Catcher
66
68
  def catch_request(r)
67
69
  if found = @uris.keys.find{|uri| (uri.class == String && uri == r.uri) || (uri.class == Regexp && r.uri =~ uri)}
68
70
  begin
71
+ STDERR.puts "URICatcher: matched uri #{found}, calling block" if $VERBOSE
69
72
  @uris[found][:block].call()
70
73
  ensure
71
74
  @uris.delete(found) if @uris[found][:once]
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: vcr-uri-catcher 0.5.0 ruby lib
5
+ # stub: vcr-uri-catcher 0.5.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "vcr-uri-catcher"
9
- s.version = "0.5.0"
9
+ s.version = "0.5.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Mischa Molhoek"]
14
- s.date = "2015-03-20"
14
+ s.date = "2015-04-24"
15
15
  s.description = "execute arbitrary code (like {raise RestClient::RequestTimeout}) the moment vcr tries to access certain configurable uri('s)"
16
16
  s.email = "mischamolhoek@gmail.com"
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vcr-uri-catcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mischa Molhoek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-20 00:00:00.000000000 Z
11
+ date: 2015-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc