graphiti_spec_helpers 1.0.1 → 1.1.0

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: dd35b4cbeadc10449673e318611e8732c339b8009a5340c489fc82ff72900559
4
- data.tar.gz: 11b660aa35c6a73e6b01014d5c2d74376caaad68ff359518d6261dfeafbe1493
3
+ metadata.gz: 6a00691315a444a8df06833ae41d8c7429b3bb259e18f1913cdc160733a08123
4
+ data.tar.gz: 6ed313ef3a0578d01b1714c663b269a5a3c3bac0d1ae8f7a95a0f42dc4ffcbae
5
5
  SHA512:
6
- metadata.gz: 91ba61209c01b4970b9466d15706075c117b39c32030620b4a41b0ac406857a074848146b0fae7e4a1337da1cf4a8ff551a65eb3fb31127cc7e73ae8f6122c08
7
- data.tar.gz: 483166868f17345bf93d5454015207b8d6ddafb4cccf3c54fbfafcdcb2eaafcd252749797e472fb52df985abd37d099bae2dd3f3b630c8656730b3fc8c980aa5
6
+ metadata.gz: c74d21897b216b6a39f54fd29da8e85664f43e931499fa32c08af145fba2863f31f07ea16de8bf63c4b36093e0568e8434b4531e793517a56942a3f009ebbc4e
7
+ data.tar.gz: ebeef28459f67952117255eac8c9871b6ee77ffd64da610fbf32408fee3ce5c1da6610f143270e608daef8e9421212ca207053a1ce84d5f9aff9ba7ac92ff86c
data/.travis.yml CHANGED
@@ -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)
@@ -9,7 +9,11 @@ module GraphitiSpecHelpers
9
9
  end
10
10
 
11
11
  def id
12
- rawid.to_i
12
+ begin
13
+ Integer(rawid) # Only convert if using integer ids
14
+ rescue ArgumentError
15
+ rawid
16
+ end
13
17
  end
14
18
 
15
19
  def rawid
@@ -1,3 +1,3 @@
1
1
  module GraphitiSpecHelpers
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
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.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-07 00:00:00.000000000 Z
11
+ date: 2021-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphiti
@@ -133,11 +133,11 @@ files:
133
133
  - lib/graphiti_spec_helpers/node.rb
134
134
  - lib/graphiti_spec_helpers/rspec.rb
135
135
  - lib/graphiti_spec_helpers/version.rb
136
- homepage:
136
+ homepage:
137
137
  licenses:
138
138
  - MIT
139
139
  metadata: {}
140
- post_install_message:
140
+ post_install_message:
141
141
  rdoc_options: []
142
142
  require_paths:
143
143
  - lib
@@ -152,9 +152,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  requirements: []
155
- rubyforge_project:
156
- rubygems_version: 2.7.6
157
- signing_key:
155
+ rubygems_version: 3.2.22
156
+ signing_key:
158
157
  specification_version: 4
159
158
  summary: Spec helpers for Graphiti and JSONAPI
160
159
  test_files: []