json_api_client 0.7.1 → 0.8.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd8f9ac0212ca4fcb8d9cf42de90d3c785a9a207
|
4
|
+
data.tar.gz: a522a5b045fa0dbf337ad6e7da4eb147940c6ad6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7c0439be92a37d160da10076a88a2a83206fb92ef9d8508877945ad045477b284cb504353f5376401282b55b58db7f46265dbac31a21fca7b7bac7843524026
|
7
|
+
data.tar.gz: 9bbb62d96189a5ba062b8bbcf13abbe51bc14bcea0c604898e2e6ff3bb9a13139d15797b009be56812da103187af27701a64fc53b8a5ea38efe8c9bbc74a094d
|
@@ -8,11 +8,16 @@ module JsonApiClient
|
|
8
8
|
@klass = klass
|
9
9
|
build_params(args)
|
10
10
|
@headers = klass.default_headers.dup
|
11
|
+
build_path(@params)
|
12
|
+
end
|
11
13
|
|
14
|
+
def build_path(parameters)
|
12
15
|
@path = begin
|
13
|
-
p = klass.path(
|
14
|
-
if
|
15
|
-
|
16
|
+
p = klass.path(parameters)
|
17
|
+
if parameters.has_key?(klass.primary_key) && !parameters[klass.primary_key].is_a?(Array)
|
18
|
+
resource_id = parameters.delete(klass.primary_key).to_s
|
19
|
+
encoded_resource_id = Addressable::URI.encode_component(resource_id, Addressable::URI::CharacterClasses::UNRESERVED)
|
20
|
+
p = File.join(p, encoded_resource_id)
|
16
21
|
end
|
17
22
|
p
|
18
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Ching
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.8.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: addressable
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.2'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.2'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: webmock
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
149
|
version: '0'
|
136
150
|
requirements: []
|
137
151
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.2.
|
152
|
+
rubygems_version: 2.2.2
|
139
153
|
signing_key:
|
140
154
|
specification_version: 4
|
141
155
|
summary: Build client libraries compliant with specification defined by jsonapi.org
|