simple_jsonapi_client 0.2.5 → 0.3.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
  SHA256:
3
- metadata.gz: 87849cea3879d98446f4b38def54869878ee782a4cd5982eba053ba38df0163e
4
- data.tar.gz: 4abec126d2887df66b608c1497d70b5d539b74f4b83b5df3da2973c0012a04e7
3
+ metadata.gz: 8e72a2d0cea7bff8938a532d200fe3da6f87d20050f24fe0b8ddb77cb3b6854c
4
+ data.tar.gz: 239dd8b6acab3f55408c3335fdc94c475a94f6b69144f8eb26b7082589d4162a
5
5
  SHA512:
6
- metadata.gz: 6bbb34268e4fbeecebadca831d8ae1e7cf26e422f729973e837686eb3c1b918b23a1d557fd9f13d4cf2844578193470449aff1c165ad4e183d103d2945205ee7
7
- data.tar.gz: 73086d69a203c6f67077540e13c02f549cf74009698991bd2f5c698aa8c5c847df8219f99ce49d917850da9323f0f742b659306984e82b24da8d7f77e98c46cf
6
+ metadata.gz: a41f9dcb9329fab138f1034e6a71150d5e0e73feff8b6543b0f441c256169d844f682abf565a6336a7e2b6dafcf43518005563db8d91ebd2fae92e2c1946954f
7
+ data.tar.gz: f56c4a42c6d07be0edab577677b128aabef784c9c410da23eb656cfae7a09f6a33fd7fc2851d969a7afc7cc430a999b54534b5d6c26bb2bed15dfb718df2d837
data/docker-compose.yml CHANGED
@@ -2,6 +2,8 @@ version: '3'
2
2
  services:
3
3
  db:
4
4
  image: postgres
5
+ environment:
6
+ POSTGRES_HOST_AUTH_METHOD: trust
5
7
  ports:
6
8
  - "5432:5432"
7
9
  spec:
@@ -110,20 +110,21 @@ module SimpleJSONAPIClient
110
110
  end
111
111
 
112
112
  def operation(request_method, response_type, opts)
113
- response = send(request_method, opts)
113
+ response = send(request_method, **opts)
114
114
  handling_error(response) do
115
115
  send(:"interpret_#{response_type}_response", response, opts[:connection])
116
116
  end
117
117
  end
118
118
 
119
119
  def create_request(connection:,
120
+ id: nil,
120
121
  url_opts: {},
121
122
  url: self::COLLECTION_URL % url_opts,
122
123
  attributes: {},
123
124
  relationships: {},
124
125
  **attrs)
125
126
  attributes, relationships = extract_attrs(attrs, attributes, relationships)
126
- body = template(attributes: attributes, relationships: relationships)
127
+ body = template(id: id, attributes: attributes, relationships: relationships)
127
128
  connection.post(url, body)
128
129
  end
129
130
 
@@ -1,3 +1,3 @@
1
1
  module SimpleJSONAPIClient
2
- VERSION = "0.2.5"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_jsonapi_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ariel Caplan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-28 00:00:00.000000000 Z
11
+ date: 2022-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  requirements: []
168
- rubygems_version: 3.2.3
168
+ rubygems_version: 3.2.22
169
169
  signing_key:
170
170
  specification_version: 4
171
171
  summary: Framework for writing clients for JSONAPI APIs in Ruby.