api_resource 0.6.19 → 0.6.20
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 +4 -4
- data/Gemfile.lock +2 -2
- data/lib/api_resource/base.rb +9 -2
- data/lib/api_resource/local.rb +4 -0
- data/lib/api_resource/version.rb +1 -1
- 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: 2af71db2c3a963841ab839ade45d05ebb66d361d
|
|
4
|
+
data.tar.gz: 60c676ba2a79c483c9be7e4f9668eeb4e001ef90
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1c1ca6670e7d3d8141dec91c9efc617084b8b97bc32f9ea7bde82f7f917fdb457dc99dae65806553a94e291b97e3f5a5186a5f05377d80c32c995c7e1dcc0a3c
|
|
7
|
+
data.tar.gz: cef0c28c031cfa715ea50ce1b892aa2e8f05ae0db52ef54eb9a97ef84d406305db60234c72ef8c939f3ae4786c9d48f94f1e8e12fa0d37a676a0b2dd037cf0bb
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
api_resource (0.6.
|
|
4
|
+
api_resource (0.6.19)
|
|
5
5
|
activemodel
|
|
6
6
|
colorize
|
|
7
7
|
differ
|
|
@@ -40,7 +40,7 @@ GEM
|
|
|
40
40
|
activesupport (3.2.10)
|
|
41
41
|
i18n (~> 0.6)
|
|
42
42
|
multi_json (~> 1.0)
|
|
43
|
-
arel (3.0.
|
|
43
|
+
arel (3.0.3)
|
|
44
44
|
builder (3.0.4)
|
|
45
45
|
byebug (2.3.0)
|
|
46
46
|
columnize (~> 0.3.6)
|
data/lib/api_resource/base.rb
CHANGED
|
@@ -46,8 +46,6 @@ module ApiResource
|
|
|
46
46
|
class_attribute :format
|
|
47
47
|
self.format = ApiResource::Formats::JsonFormat
|
|
48
48
|
|
|
49
|
-
class_attribute :resource_definition_mutex
|
|
50
|
-
self.resource_definition_mutex = Mutex.new
|
|
51
49
|
|
|
52
50
|
delegate :logger, to: ApiResource
|
|
53
51
|
|
|
@@ -199,6 +197,15 @@ module ApiResource
|
|
|
199
197
|
# backwards compatibility
|
|
200
198
|
alias_method :reload_class_attributes, :reload_resource_definition
|
|
201
199
|
|
|
200
|
+
#
|
|
201
|
+
# Mutex so that multiple Threads don't try to load the resource
|
|
202
|
+
# definition at the same time
|
|
203
|
+
#
|
|
204
|
+
# @return [Mutex]
|
|
205
|
+
def resource_definition_mutex
|
|
206
|
+
@resource_definition_mutex ||= Mutex.new
|
|
207
|
+
end
|
|
208
|
+
|
|
202
209
|
#
|
|
203
210
|
# Reset our connection instance so that we will reconnect the
|
|
204
211
|
# next time we need it
|
data/lib/api_resource/local.rb
CHANGED
data/lib/api_resource/version.rb
CHANGED