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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46e463654e69b04d9db864f1b4f9b90bff16aefafa97ac14629692133ce5f5c8
4
- data.tar.gz: 434255f3790f10d0e4f15f74c377d507212a6a9cfafcd25b477aca88efc7cb5a
3
+ metadata.gz: aec2631a5eebf6c105ae15fa8462c06577027583db6b2cbaa952aea4acf52280
4
+ data.tar.gz: 3d0ee92a6bdaa1e01f9040dd62fb8b65be37c30262f678aeda4e9ec6a8324f88
5
5
  SHA512:
6
- metadata.gz: '09fa0ea34bd8dc7393ade1470d1e875a55b29a158cb1f1f6a5288ff58c1f9eaef5db223d7c2a96b6a73000b60aea59026a9db0cba142d471bb80a1611f0a35e0'
7
- data.tar.gz: 3e2279a4f1a7aaa670b54db869576666ce2677b06c6bd01806debe220a9ca21ec6e90679223b2419122f94c0d135ae33eaf78238f14a2ea4a6f4d5cf5049e8c2
6
+ metadata.gz: 9d01d88bad42186d009a46dc9030399c9c36542a170a3d8f711ea03dedc4f09548da45ecf6f75c39bb22f3553efb4f4f7a050335e5290cf475dcaa37f7b9a326
7
+ data.tar.gz: c796fbdfde096f09fea43bb50091e6df8137d5d82064d3357c661506a73cc312c15c044aceec6b66ebc6616f7d57f4d11c189c4fd20282af9c84c03ddcbd5bce
@@ -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.transaction do
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.transaction do
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.transaction do
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?
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Api
3
- VERSION = '9.2.0'
3
+ VERSION = '9.3.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstax_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.2.0
4
+ version: 9.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dante Soares