Skip to content

Commit 7a069e2

Browse files
authored
Merge pull request #371 from dpep/fix-warnings
fix warnings
2 parents c94d6c7 + a7a5985 commit 7a069e2

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

lib/json_api_client/query/requestor.rb

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,21 @@ def initialize(klass)
1010

1111
# expects a record
1212
def create(record)
13-
request(:post, klass.path(record.path_attributes), {
14-
body: { data: record.as_json_api },
15-
params: record.request_params.to_params
16-
})
13+
request(
14+
:post,
15+
klass.path(record.path_attributes),
16+
body: { data: record.as_json_api },
17+
params: record.request_params.to_params
18+
)
1719
end
1820

1921
def update(record)
20-
request(:patch, resource_path(record.path_attributes), {
21-
body: { data: record.as_json_api },
22-
params: record.request_params.to_params
23-
})
22+
request(
23+
:patch,
24+
resource_path(record.path_attributes),
25+
body: { data: record.as_json_api },
26+
params: record.request_params.to_params
27+
)
2428
end
2529

2630
def get(params = {})

test/unit/errors_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def test_connection_errors
1010
User.all
1111
end
1212

13-
assert_match /specific message/, err.message
13+
assert_match(/specific message/, err.message)
1414
end
1515

1616
def test_timeout_errors

0 commit comments

Comments
 (0)