graphiti_spec_helpers 1.0.2 → 1.0.3

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
  SHA256:
3
- metadata.gz: 15d378bcfa58e0e5d4a127d9dfb748c4043f9d1c760ff1e4ed8cc46d8b174d40
4
- data.tar.gz: 3acdaeb20bfd9ccc2570eabe0a4035fb01ee3cf21b5d5227c8f6d754723a4f42
3
+ metadata.gz: 21a04966da561d8c05c11bc4cf9e171c0020fa018440a0ba97ad9576914320bb
4
+ data.tar.gz: e530927f67aecbcd6efa4c099f020752e159116cbee4ede6e8fc79d23c910532
5
5
  SHA512:
6
- metadata.gz: d266802a014ba39badefaeb4695d63f5df1b65c850fe2cdeb160379939e5107ad040438d0605617ede830d146507a40fc6c136094152a0850f7832586d89ba40
7
- data.tar.gz: 798c7e573789526a45a2edb82852795a333bc6e79b967e0512f5fff6ed62533ce5c96a58864585c7712508dc7fd605f525c2910c6ca210df3b528d6a7da025eb
6
+ metadata.gz: 3c8eae80f54e60beae541931bd9d9a68fcec54bb1745b0f5def00a99b9065fc30b9a5cdaec160d41f0ebe6da4ca6746512b4e6c2c20a7b6da072dfdcb64df6ad
7
+ data.tar.gz: 1fda338a8cc1c7bb3c951b15b24d37618d978578737c3e8779e8ba920322293b7c23e382c0d96b82833b980696cbf7c94237c7b0c01b943cfdac3af2c339c959
@@ -1,4 +1,4 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.3
3
+ - 2.6.3
4
4
  before_install: gem install bundler -v 1.11.2
@@ -49,24 +49,24 @@ module GraphitiSpecHelpers
49
49
  }
50
50
  end
51
51
 
52
- def jsonapi_get(url, params: {})
53
- get url, params: params, headers: jsonapi_headers
52
+ def jsonapi_get(url, params: {}, headers: {})
53
+ get url, params: params, headers: jsonapi_headers.merge(headers)
54
54
  end
55
55
 
56
- def jsonapi_post(url, payload)
57
- post url, params: payload.to_json, headers: jsonapi_headers
56
+ def jsonapi_post(url, payload, headers: {})
57
+ post url, params: payload.to_json, headers: jsonapi_headers.merge(headers)
58
58
  end
59
59
 
60
- def jsonapi_put(url, payload)
61
- put url, params: payload.to_json, headers: jsonapi_headers
60
+ def jsonapi_put(url, payload, headers: {})
61
+ put url, params: payload.to_json, headers: jsonapi_headers.merge(headers)
62
62
  end
63
63
 
64
- def jsonapi_patch(url, payload)
65
- patch url, params: payload.to_json, headers: jsonapi_headers
64
+ def jsonapi_patch(url, payload, headers: {})
65
+ patch url, params: payload.to_json, headers: jsonapi_headers.merge(headers)
66
66
  end
67
67
 
68
- def jsonapi_delete(url)
69
- delete url, headers: jsonapi_headers
68
+ def jsonapi_delete(url, headers)
69
+ delete url, headers: jsonapi_headers.merge(headers)
70
70
  end
71
71
 
72
72
  def json_datetime(value)
@@ -64,12 +64,6 @@ RSpec.shared_context 'remote api' do
64
64
 
65
65
  def mock_api(url, json, call_count = 1)
66
66
  api_response = double(body: json.to_json)
67
-
68
- # page
69
- @params[:fields] = @fields if @fields.present?
70
- @params[:extra_fields] = @extra_fields if @extra_fields.present?
71
- @params[:stats] = @stats if @stats.present?
72
-
73
67
  expect(Faraday).to receive(:get)
74
68
  .with(url, anything, anything)
75
69
  .exactly(call_count).times
@@ -1,3 +1,3 @@
1
1
  module GraphitiSpecHelpers
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti_spec_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-13 00:00:00.000000000 Z
11
+ date: 2019-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphiti