openstax_api 9.1.0 → 9.4.1

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: a1a90407b8004ba1f67b9028f96c19d53c7c8721750bf090a9832b7d8529618d
4
- data.tar.gz: 5f8c3af4ea5e5ddebd7128aaded0b93b1bc52d4172c48266b7053965d15d2b04
3
+ metadata.gz: 4d5d6224f04656ce0e18a4509f1607ab91b9cc85c3318b35f50c5ec35b77836c
4
+ data.tar.gz: '0763692f5e718a104134f64d1b048ce6ddbeca37627ae6f9d8556c9f5399292a'
5
5
  SHA512:
6
- metadata.gz: 37a2b07de1047c3cbb46fa4e8aa2eaf2531ad7b2793052c85850356f790c25f4135e06fe6f8f846c41d61ea8b13a2203a34a674ac3136fce47827da9fc48ef18
7
- data.tar.gz: 82be1b50f10c1625279fc29c249a91a077d254f1a26ec63d73bb428388ce6c531603af065edbb0abba9f6a7a359b5cc08b1439a61f8b27842bfd1cc2978407bd
6
+ metadata.gz: e27275ee2d4fb35f17ee548c46fb488cf7121042145ba17328d5cf68a2fb1472ebbc8c16444efc5825e59db255b4335a62ca4d14549f0822bdcd1c3d482a0985
7
+ data.tar.gz: fda7d0523f84c2549859f80ad05bd326793608950874c851ce63c4c94b988a2f33cbd5225eb4ef543620e14f8dc77f503aa83439536fb8b5796238c444ea8675
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # openstax_api
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/openstax_api.svg)](http://badge.fury.io/rb/openstax_api)
4
- [![Build Status](https://travis-ci.org/openstax/openstax_api.svg?branch=master)](https://travis-ci.org/openstax/openstax_api)
4
+ [![Tests](https://github.com/openstax/openstax_api/workflows/Tests/badge.svg)](https://github.com/openstax/openstax_api/actions?query=workflow:Tests)
5
5
  [![Code Climate](https://codeclimate.com/github/openstax/openstax_api/badges/gpa.svg)](https://codeclimate.com/github/openstax/openstax_api)
6
6
 
7
7
  API utilities for OpenStax products and tools.
@@ -79,4 +79,3 @@ From the gem's main folder, run `bundle`, `rake db:migrate` and then `rake` to r
79
79
  5. Commit your changes (`git commit -am 'Add some feature'`)
80
80
  6. Push to the branch (`git push origin my-new-feature`)
81
81
  7. Create new pull request
82
-
@@ -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'
@@ -150,8 +150,11 @@ module OpenStax
150
150
  hash = { status: Rack::Utils.status_code(status) }
151
151
 
152
152
  case errors
153
- when ActiveModel::Errors, Lev::BetterActiveModelErrors
154
- hash[:errors] = errors.map do |attribute, message|
153
+ when ActiveModel::Errors
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.1.0'
3
+ VERSION = '9.4.1'
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.1.0
4
+ version: 9.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dante Soares
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-11-08 00:00:00.000000000 Z
12
+ date: 2021-07-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -17,138 +17,132 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '3.1'
20
+ version: '5.2'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '6.0'
23
+ version: '7'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
28
  - - ">="
29
29
  - !ruby/object:Gem::Version
30
- version: '3.1'
30
+ version: '5.2'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '6.0'
33
+ version: '7'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: representable
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '2.4'
41
- - - "<"
42
- - !ruby/object:Gem::Version
43
- version: '4.0'
40
+ version: '0'
44
41
  type: :runtime
45
42
  prerelease: false
46
43
  version_requirements: !ruby/object:Gem::Requirement
47
44
  requirements:
48
45
  - - ">="
49
46
  - !ruby/object:Gem::Version
50
- version: '2.4'
51
- - - "<"
52
- - !ruby/object:Gem::Version
53
- version: '4.0'
47
+ version: '0'
54
48
  - !ruby/object:Gem::Dependency
55
49
  name: roar
56
50
  requirement: !ruby/object:Gem::Requirement
57
51
  requirements:
58
52
  - - ">="
59
53
  - !ruby/object:Gem::Version
60
- version: '1.0'
54
+ version: '0'
61
55
  type: :runtime
62
56
  prerelease: false
63
57
  version_requirements: !ruby/object:Gem::Requirement
64
58
  requirements:
65
59
  - - ">="
66
60
  - !ruby/object:Gem::Version
67
- version: '1.0'
61
+ version: '0'
68
62
  - !ruby/object:Gem::Dependency
69
63
  name: roar-rails
70
64
  requirement: !ruby/object:Gem::Requirement
71
65
  requirements:
72
66
  - - ">="
73
67
  - !ruby/object:Gem::Version
74
- version: '1.0'
68
+ version: '1'
75
69
  type: :runtime
76
70
  prerelease: false
77
71
  version_requirements: !ruby/object:Gem::Requirement
78
72
  requirements:
79
73
  - - ">="
80
74
  - !ruby/object:Gem::Version
81
- version: '1.0'
75
+ version: '1'
82
76
  - !ruby/object:Gem::Dependency
83
77
  name: uber
84
78
  requirement: !ruby/object:Gem::Requirement
85
79
  requirements:
86
- - - "<"
80
+ - - ">="
87
81
  - !ruby/object:Gem::Version
88
- version: 0.1.0
82
+ version: '0'
89
83
  type: :runtime
90
84
  prerelease: false
91
85
  version_requirements: !ruby/object:Gem::Requirement
92
86
  requirements:
93
- - - "<"
87
+ - - ">="
94
88
  - !ruby/object:Gem::Version
95
- version: 0.1.0
89
+ version: '0'
96
90
  - !ruby/object:Gem::Dependency
97
91
  name: doorkeeper
98
92
  requirement: !ruby/object:Gem::Requirement
99
93
  requirements:
100
94
  - - ">="
101
95
  - !ruby/object:Gem::Version
102
- version: '2.0'
96
+ version: '0'
103
97
  type: :runtime
104
98
  prerelease: false
105
99
  version_requirements: !ruby/object:Gem::Requirement
106
100
  requirements:
107
101
  - - ">="
108
102
  - !ruby/object:Gem::Version
109
- version: '2.0'
103
+ version: '0'
110
104
  - !ruby/object:Gem::Dependency
111
105
  name: exception_notification
112
106
  requirement: !ruby/object:Gem::Requirement
113
107
  requirements:
114
108
  - - ">="
115
109
  - !ruby/object:Gem::Version
116
- version: '4.0'
110
+ version: '0'
117
111
  type: :runtime
118
112
  prerelease: false
119
113
  version_requirements: !ruby/object:Gem::Requirement
120
114
  requirements:
121
115
  - - ">="
122
116
  - !ruby/object:Gem::Version
123
- version: '4.0'
117
+ version: '0'
124
118
  - !ruby/object:Gem::Dependency
125
119
  name: openstax_utilities
126
120
  requirement: !ruby/object:Gem::Requirement
127
121
  requirements:
128
122
  - - ">="
129
123
  - !ruby/object:Gem::Version
130
- version: 4.2.0
124
+ version: '0'
131
125
  type: :runtime
132
126
  prerelease: false
133
127
  version_requirements: !ruby/object:Gem::Requirement
134
128
  requirements:
135
129
  - - ">="
136
130
  - !ruby/object:Gem::Version
137
- version: 4.2.0
131
+ version: '0'
138
132
  - !ruby/object:Gem::Dependency
139
133
  name: lev
140
134
  requirement: !ruby/object:Gem::Requirement
141
135
  requirements:
142
136
  - - ">="
143
137
  - !ruby/object:Gem::Version
144
- version: 1.0.0
138
+ version: '11'
145
139
  type: :runtime
146
140
  prerelease: false
147
141
  version_requirements: !ruby/object:Gem::Requirement
148
142
  requirements:
149
143
  - - ">="
150
144
  - !ruby/object:Gem::Version
151
- version: 1.0.0
145
+ version: '11'
152
146
  - !ruby/object:Gem::Dependency
153
147
  name: responders
154
148
  requirement: !ruby/object:Gem::Requirement
@@ -167,16 +161,30 @@ dependencies:
167
161
  name: sprockets
168
162
  requirement: !ruby/object:Gem::Requirement
169
163
  requirements:
170
- - - "<"
164
+ - - ">="
171
165
  - !ruby/object:Gem::Version
172
- version: '4.0'
166
+ version: '0'
173
167
  type: :development
174
168
  prerelease: false
175
169
  version_requirements: !ruby/object:Gem::Requirement
176
170
  requirements:
177
- - - "<"
171
+ - - ">="
178
172
  - !ruby/object:Gem::Version
179
- version: '4.0'
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'
180
188
  - !ruby/object:Gem::Dependency
181
189
  name: sqlite3
182
190
  requirement: !ruby/object:Gem::Requirement
@@ -294,7 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
294
302
  - !ruby/object:Gem::Version
295
303
  version: '0'
296
304
  requirements: []
297
- rubygems_version: 3.0.3
305
+ rubygems_version: 3.2.19
298
306
  signing_key:
299
307
  specification_version: 4
300
308
  summary: API utilities for OpenStax products and tools.