openstax_api 9.3.1 → 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: 0123d440a662f7a4d147465c86fcf59d446a933dcdaa62e6f40b93c76d552297
4
- data.tar.gz: 2591a952d00cf27d7369d513a5090009e6681055e3c0c8887035b9736cadeb7c
3
+ metadata.gz: 6edbd981e494d9f1063ba9d150596c629c7d0bf3908f87809664a6ce18befa2f
4
+ data.tar.gz: 35a521253e0bc888a538e28aeaaccac1b5380fbb9529cd6a8a202b540d2ec48e
5
5
  SHA512:
6
- metadata.gz: 19f2e12774276689e255a3d5fd525625cf9ffbfa5f32cec156a979425b3f4025d87be13b38725b9a732ef4381d695db2c825e388d3c5179bbc7c0b3a2ea437ee
7
- data.tar.gz: 255b1b2158142611ed55bcb709d44b0db8e137b18893545a5e20458e481e3b1771660e6765eb2eb61aeb06b5a982200297c6068c45ef263b905cd28c63041c43
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'
@@ -1,5 +1,3 @@
1
- require 'addressable/uri'
2
-
3
1
  module OpenStax
4
2
  module Api
5
3
  module Params
@@ -46,7 +44,7 @@ module OpenStax
46
44
  end
47
45
 
48
46
  def _escape(string)
49
- Addressable::URI.escape_component(string, RESERVED_CHARACTERS)
47
+ URI.escape(string, RESERVED_CHARACTERS)
50
48
  end
51
49
 
52
50
  # Normalize a +Hash+ of parameter values. Parameters are sorted by name, using lexicographical
@@ -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.1'
3
+ VERSION = '9.4.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,32 +1,38 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstax_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.3.1
4
+ version: 9.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dante Soares
8
8
  - JP Slavinsky
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-11-05 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
- name: addressable
35
+ name: representable
30
36
  requirement: !ruby/object:Gem::Requirement
31
37
  requirements:
32
38
  - - ">="
@@ -40,7 +46,7 @@ dependencies:
40
46
  - !ruby/object:Gem::Version
41
47
  version: '0'
42
48
  - !ruby/object:Gem::Dependency
43
- name: representable
49
+ name: roar
44
50
  requirement: !ruby/object:Gem::Requirement
45
51
  requirements:
46
52
  - - ">="
@@ -54,7 +60,7 @@ dependencies:
54
60
  - !ruby/object:Gem::Version
55
61
  version: '0'
56
62
  - !ruby/object:Gem::Dependency
57
- name: roar
63
+ name: roar-rails
58
64
  requirement: !ruby/object:Gem::Requirement
59
65
  requirements:
60
66
  - - ">="
@@ -68,7 +74,7 @@ dependencies:
68
74
  - !ruby/object:Gem::Version
69
75
  version: '0'
70
76
  - !ruby/object:Gem::Dependency
71
- name: roar-rails
77
+ name: uber
72
78
  requirement: !ruby/object:Gem::Requirement
73
79
  requirements:
74
80
  - - ">="
@@ -82,7 +88,7 @@ dependencies:
82
88
  - !ruby/object:Gem::Version
83
89
  version: '0'
84
90
  - !ruby/object:Gem::Dependency
85
- name: uber
91
+ name: doorkeeper
86
92
  requirement: !ruby/object:Gem::Requirement
87
93
  requirements:
88
94
  - - ">="
@@ -96,7 +102,7 @@ dependencies:
96
102
  - !ruby/object:Gem::Version
97
103
  version: '0'
98
104
  - !ruby/object:Gem::Dependency
99
- name: doorkeeper
105
+ name: exception_notification
100
106
  requirement: !ruby/object:Gem::Requirement
101
107
  requirements:
102
108
  - - ">="
@@ -110,7 +116,7 @@ dependencies:
110
116
  - !ruby/object:Gem::Version
111
117
  version: '0'
112
118
  - !ruby/object:Gem::Dependency
113
- name: exception_notification
119
+ name: openstax_utilities
114
120
  requirement: !ruby/object:Gem::Requirement
115
121
  requirements:
116
122
  - - ">="
@@ -124,7 +130,7 @@ dependencies:
124
130
  - !ruby/object:Gem::Version
125
131
  version: '0'
126
132
  - !ruby/object:Gem::Dependency
127
- name: openstax_utilities
133
+ name: lev
128
134
  requirement: !ruby/object:Gem::Requirement
129
135
  requirements:
130
136
  - - ">="
@@ -138,7 +144,7 @@ dependencies:
138
144
  - !ruby/object:Gem::Version
139
145
  version: '0'
140
146
  - !ruby/object:Gem::Dependency
141
- name: lev
147
+ name: responders
142
148
  requirement: !ruby/object:Gem::Requirement
143
149
  requirements:
144
150
  - - ">="
@@ -152,13 +158,13 @@ dependencies:
152
158
  - !ruby/object:Gem::Version
153
159
  version: '0'
154
160
  - !ruby/object:Gem::Dependency
155
- name: responders
161
+ name: sprockets
156
162
  requirement: !ruby/object:Gem::Requirement
157
163
  requirements:
158
164
  - - ">="
159
165
  - !ruby/object:Gem::Version
160
166
  version: '0'
161
- type: :runtime
167
+ type: :development
162
168
  prerelease: false
163
169
  version_requirements: !ruby/object:Gem::Requirement
164
170
  requirements:
@@ -166,7 +172,7 @@ dependencies:
166
172
  - !ruby/object:Gem::Version
167
173
  version: '0'
168
174
  - !ruby/object:Gem::Dependency
169
- name: sprockets
175
+ name: listen
170
176
  requirement: !ruby/object:Gem::Requirement
171
177
  requirements:
172
178
  - - ">="
@@ -281,7 +287,7 @@ homepage: https://github.com/openstax/openstax_api
281
287
  licenses:
282
288
  - MIT
283
289
  metadata: {}
284
- post_install_message:
290
+ post_install_message:
285
291
  rdoc_options: []
286
292
  require_paths:
287
293
  - lib
@@ -296,8 +302,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
296
302
  - !ruby/object:Gem::Version
297
303
  version: '0'
298
304
  requirements: []
299
- rubygems_version: 3.1.4
300
- signing_key:
305
+ rubygems_version: 3.2.7
306
+ signing_key:
301
307
  specification_version: 4
302
308
  summary: API utilities for OpenStax products and tools.
303
309
  test_files: []