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 +4 -4
- data/.travis.yml +1 -1
- data/lib/graphiti_spec_helpers/helpers.rb +10 -10
- data/lib/graphiti_spec_helpers/rspec.rb +0 -6
- data/lib/graphiti_spec_helpers/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21a04966da561d8c05c11bc4cf9e171c0020fa018440a0ba97ad9576914320bb
|
4
|
+
data.tar.gz: e530927f67aecbcd6efa4c099f020752e159116cbee4ede6e8fc79d23c910532
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c8eae80f54e60beae541931bd9d9a68fcec54bb1745b0f5def00a99b9065fc30b9a5cdaec160d41f0ebe6da4ca6746512b4e6c2c20a7b6da072dfdcb64df6ad
|
7
|
+
data.tar.gz: 1fda338a8cc1c7bb3c951b15b24d37618d978578737c3e8779e8ba920322293b7c23e382c0d96b82833b980696cbf7c94237c7b0c01b943cfdac3af2c339c959
|
data/.travis.yml
CHANGED
@@ -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
|
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.
|
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-
|
11
|
+
date: 2019-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphiti
|