openstax_api 9.3.0 → 9.4.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: aec2631a5eebf6c105ae15fa8462c06577027583db6b2cbaa952aea4acf52280
4
- data.tar.gz: 3d0ee92a6bdaa1e01f9040dd62fb8b65be37c30262f678aeda4e9ec6a8324f88
3
+ metadata.gz: 6edbd981e494d9f1063ba9d150596c629c7d0bf3908f87809664a6ce18befa2f
4
+ data.tar.gz: 35a521253e0bc888a538e28aeaaccac1b5380fbb9529cd6a8a202b540d2ec48e
5
5
  SHA512:
6
- metadata.gz: 9d01d88bad42186d009a46dc9030399c9c36542a170a3d8f711ea03dedc4f09548da45ecf6f75c39bb22f3553efb4f4f7a050335e5290cf475dcaa37f7b9a326
7
- data.tar.gz: c796fbdfde096f09fea43bb50091e6df8137d5d82064d3357c661506a73cc312c15c044aceec6b66ebc6616f7d57f4d11c189c4fd20282af9c84c03ddcbd5bce
6
+ metadata.gz: 14638e9706ece06c415252c5765fd334da5ac00e04ab6489c289bb606ed647adc48430bae0be3df93531c1c39e699e702207eeb7a3ee654a0460177cfb39e48c
7
+ data.tar.gz: 37e430223b7aef6665c9cb4f9065cef1f41e90cf6dc67795dc29cc04fb49c354e23cb0c0105ddb751de472b26dc58b86378194d54b1594861542ba4879909270
@@ -13,8 +13,6 @@ module OpenStax
13
13
  class Engine < ::Rails::Engine
14
14
  isolate_namespace OpenStax::Api
15
15
 
16
- config.autoload_paths += Dir[config.root.join('app', 'representers', '{**}')]
17
-
18
16
  config.generators do |g|
19
17
  g.test_framework :rspec, fixture: false
20
18
  g.fixture_replacement :factory_bot, dir: 'spec/factories'
@@ -151,7 +151,10 @@ module OpenStax
151
151
 
152
152
  case errors
153
153
  when ActiveModel::Errors, Lev::BetterActiveModelErrors
154
- hash[:errors] = errors.map do |attribute, message|
154
+ hash[:errors] = errors.map do |error|
155
+ attribute = error.attribute
156
+ message = error.message
157
+
155
158
  {
156
159
  code: "#{attribute.to_s}_#{message.to_s.gsub(/[\s-]/, '_').gsub(/[^\w]/, '')}",
157
160
  message: errors.full_message(attribute, message)
@@ -163,8 +166,8 @@ module OpenStax
163
166
  end
164
167
  else
165
168
  hash[:errors] = [errors].flatten.map do |error|
166
- error.is_a?(Hash) ? error : { code: error.to_s.underscore,
167
- message: error.to_s.humanize }
169
+ error.is_a?(Hash) ? error :
170
+ { code: error.to_s.underscore, message: error.to_s.humanize }
168
171
  end
169
172
  end
170
173
 
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Api
3
- VERSION = '9.3.0'
3
+ VERSION = '9.4.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.3.0
4
+ version: 9.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dante Soares
@@ -9,22 +9,28 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-09-10 00:00:00.000000000 Z
12
+ date: 2021-02-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '5.2'
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '7'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
- - - "~>"
28
+ - - ">="
26
29
  - !ruby/object:Gem::Version
27
30
  version: '5.2'
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '7'
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: representable
30
36
  requirement: !ruby/object:Gem::Requirement
@@ -165,6 +171,20 @@ dependencies:
165
171
  - - ">="
166
172
  - !ruby/object:Gem::Version
167
173
  version: '0'
174
+ - !ruby/object:Gem::Dependency
175
+ name: listen
176
+ requirement: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ type: :development
182
+ prerelease: false
183
+ version_requirements: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
168
188
  - !ruby/object:Gem::Dependency
169
189
  name: sqlite3
170
190
  requirement: !ruby/object:Gem::Requirement
@@ -282,7 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
282
302
  - !ruby/object:Gem::Version
283
303
  version: '0'
284
304
  requirements: []
285
- rubygems_version: 3.1.4
305
+ rubygems_version: 3.2.7
286
306
  signing_key:
287
307
  specification_version: 4
288
308
  summary: API utilities for OpenStax products and tools.