pipekit-webmock 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 828aad84c6d8fd8d9327059ab174d82dda5763af
4
- data.tar.gz: 77623899081db92ef293e41b742aa27ef7759515
3
+ metadata.gz: 00b8a6d3cf154ae84c6296d760beceff04da12bd
4
+ data.tar.gz: 40bdf964299aae07e6ebc3b8189d8aadf44af767
5
5
  SHA512:
6
- metadata.gz: 34d661057eab593994ad6b0825995174268a384a715fe57d8bea6aab25b7066df477a842fffed7c5c62cd423769cecd870b4146dc92a157e15f669f245bf61d6
7
- data.tar.gz: dc34027fe20af0a5d28dcbbb4171fd627c91774e8fca5e51589c0db37b64a479530f518f5d73b88685bd4196e2c31683cdb2fb2c286ca93f204bf9806c3ef010
6
+ metadata.gz: 110a606d77115c24f274716aaeb760b85231ca22091daed927e25a2acd9c4a72c8d4985b2a1feeaeaece61a7fe4b258d930e3004c89e349544bd23d6caf3ddd7
7
+ data.tar.gz: 3e87d2bdc82ec2e45bb539ee6fe168ece38b266c67e3c7302c4e2c8d462ca204b6c5aa3a10ce0237b4f25e2e6ef51a29bf0d647958a17cef550e59896f6a1bce
@@ -54,12 +54,12 @@ module Pipekit
54
54
  end
55
55
 
56
56
  def stub_update_request(params)
57
- id = params.delete(:id)
57
+ id = params.delete(:id) || params.delete("id")
58
58
  stub_request(:put, resource_uri(id)).with(body: body_from(params))
59
59
  end
60
60
 
61
61
  def stub_get_request(params)
62
- id = params.delete(:id)
62
+ id = params.delete(:id) || params.delete("id")
63
63
  uri = "#{resource_uri(id)}&#{body_from(params)}&#{body_from(pagination_params)}"
64
64
  stub_request(:get, uri)
65
65
  end
@@ -8,10 +8,17 @@ module Pipekit
8
8
  class UnregisteredPipedriveRequestError < StandardError
9
9
  WebMockNetConnectNotAllowedError = ::WebMock::NetConnectNotAllowedError unless const_defined?(:WebMockNetConnectNotAllowedError)
10
10
 
11
- def initialize(request_signature)
11
+ def self.new(*args)
12
+ request_signature = args[0]
12
13
  request_signature_snippet = RequestSignatureSnippet.new(request_signature)
13
14
 
14
15
  return WebMockNetConnectNotAllowedError.new(request_signature) unless request_signature_snippet.pipedrive_request?
16
+ super(request_signature)
17
+ end
18
+
19
+ def initialize(request_signature)
20
+ request_signature_snippet = RequestSignatureSnippet.new(request_signature)
21
+
15
22
  text = [
16
23
  "Unregistered request to Pipedrive: #{request_signature}",
17
24
  "with params:",
@@ -1,5 +1,5 @@
1
1
  module Pipekit
2
2
  module WebMock
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipekit-webmock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jafrog
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-22 00:00:00.000000000 Z
11
+ date: 2016-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: webmock
@@ -126,7 +126,6 @@ files:
126
126
  - Rakefile
127
127
  - bin/console
128
128
  - bin/setup
129
- - lib/pipekit/.#webmock.rb
130
129
  - lib/pipekit/webmock.rb
131
130
  - lib/pipekit/webmock/api.rb
132
131
  - lib/pipekit/webmock/errors.rb
@@ -1 +0,0 @@
1
- jafrog@Irinas-MacBook-Pro.local.30214