openstax_api 9.2.0 → 9.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openstax/api/roar.rb +3 -9
- data/lib/openstax/api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aec2631a5eebf6c105ae15fa8462c06577027583db6b2cbaa952aea4acf52280
|
4
|
+
data.tar.gz: 3d0ee92a6bdaa1e01f9040dd62fb8b65be37c30262f678aeda4e9ec6a8324f88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d01d88bad42186d009a46dc9030399c9c36542a170a3d8f711ea03dedc4f09548da45ecf6f75c39bb22f3553efb4f4f7a050335e5290cf475dcaa37f7b9a326
|
7
|
+
data.tar.gz: c796fbdfde096f09fea43bb50091e6df8137d5d82064d3357c661506a73cc312c15c044aceec6b66ebc6616f7d57f4d11c189c4fd20282af9c84c03ddcbd5bce
|
data/lib/openstax/api/roar.rb
CHANGED
@@ -80,9 +80,7 @@ module OpenStax
|
|
80
80
|
responder_options = { responder: ResponderWithPutPatchDeleteContent }
|
81
81
|
represent_with_options = { user_options: options, represent_with: represent_with }
|
82
82
|
|
83
|
-
model.
|
84
|
-
model.reload lock: true
|
85
|
-
|
83
|
+
model.with_lock do
|
86
84
|
consume!(model, represent_with_options.dup)
|
87
85
|
yield model if block_given?
|
88
86
|
OSU::AccessPolicy.require_action_allowed!(:update, current_api_user, model)
|
@@ -106,9 +104,7 @@ module OpenStax
|
|
106
104
|
responder_options = { responder: ResponderWithPutPatchDeleteContent }
|
107
105
|
represent_with_options = { user_options: options, represent_with: represent_with }
|
108
106
|
|
109
|
-
model.
|
110
|
-
model.reload lock: true
|
111
|
-
|
107
|
+
model.with_lock do
|
112
108
|
if model.destroy
|
113
109
|
model.send :clear_association_cache
|
114
110
|
yield model if block_given?
|
@@ -133,9 +129,7 @@ module OpenStax
|
|
133
129
|
user_options: options.except(:recursive), represent_with: represent_with
|
134
130
|
}
|
135
131
|
|
136
|
-
model.
|
137
|
-
model.reload lock: true
|
138
|
-
|
132
|
+
model.with_lock do
|
139
133
|
if model.restore(recursive: recursive)
|
140
134
|
model.send :clear_association_cache
|
141
135
|
yield model if block_given?
|
data/lib/openstax/api/version.rb
CHANGED