distant 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/distant.gemspec +1 -1
- data/lib/distant/base.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b013860fb76db4c918bb3dc7a2de9821d9ec8f47
|
4
|
+
data.tar.gz: b8d368d98798f9e79f19af8202d56ed9ab2d6205
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73df7dd9644e1521668a611708a163f0163f330b9ad488488ab521eebaa4e7c951f6b10af1aff7066c6efeccc38c71b52804e84d64a31788842f54a1b51550cc
|
7
|
+
data.tar.gz: 9c3254be7bff13ff9d0acc4fc6a5104de935c3730a1a8035d7f1f26e50032774544d7659c924b7a4aceb45e2ffc403517a676f37ea0ad5fa7733343806352a7e
|
data/Gemfile.lock
CHANGED
data/distant.gemspec
CHANGED
data/lib/distant/base.rb
CHANGED
@@ -68,8 +68,8 @@ module Distant
|
|
68
68
|
path = self.class.path_closure_generator(route).call(id: self.id)
|
69
69
|
headers = Distant.config.default_headers('')
|
70
70
|
.merge(Distant.config.auth_headers(''))
|
71
|
-
response_data = self.class.preprocess_response connection.get(path, headers: headers)
|
72
71
|
class_ref = Kernel.const_get self.class.to_s.deconstantize + '::' + plural.to_s.singularize.classify
|
72
|
+
response_data = class_ref.preprocess_response connection.get(path, headers: headers)
|
73
73
|
response_data.map{ |item| class_ref.marshal(item) }
|
74
74
|
end
|
75
75
|
end
|
@@ -82,8 +82,8 @@ module Distant
|
|
82
82
|
path = self.class.path_closure_generator(route).call(id: foreign_key_value)
|
83
83
|
headers = Distant.config.default_headers('')
|
84
84
|
.merge(Distant.config.auth_headers(''))
|
85
|
-
response_data = self.class.preprocess_response connection.get(path, headers: headers)
|
86
85
|
class_ref = Kernel.const_get self.class.to_s.deconstantize + '::' + singular.to_s.classify
|
86
|
+
response_data = class_ref.preprocess_response connection.get(path, headers: headers)
|
87
87
|
class_ref.marshal(response_data)
|
88
88
|
end
|
89
89
|
end
|