hal_api-rails 1.2.1 → 1.2.2

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: e7c08d700a00bfc1ccec03c2cbd3c92d3094ad48d70eca4eba39dce8d9cb78fa
4
- data.tar.gz: 3a44c0e260cb3b50cd6e6dbabd2806a655d19a015b5029f50a8f7dc5db2b5ba5
3
+ metadata.gz: e860a4faedcb7482b0386c25f54c8772eb994462d701f2284102625779eb8495
4
+ data.tar.gz: c0d805143f39b55bd1c5eca1a806d6089705ff401a172237f33dc3e7405b21b0
5
5
  SHA512:
6
- metadata.gz: ebf622a8c79f64b987a20f30122b07277a905dc7964fd42e11e72ca45e638d653fa39d4ac06618a4037247d86579d94e30f41f30c0953d93804c17049cd827c4
7
- data.tar.gz: aacadd75279e2c4841ef3cf3c912fddbce1d9ae8110595541dbb07a470b5e7d639a1c51f91ddbfc256364608935ffe49842905c470ca349edd9b1aaf9d904263
6
+ metadata.gz: 33f3fbd03301ffe1b95bd2d386e81dcd424ef191e65be21817be4c96710af106c9ce1b86ecc8873e08b2d04b009d60fb886d2a73d8d199d56e2705797a32cf88
7
+ data.tar.gz: 2870c2e994dad97268a9024c8f12ff763b8f7aca902c7991f5651893ebdf6a6417486692a958374fa09edeba64e8766d7bfb36c1f112fb17eb95ab969d2d5666
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.2
1
+ 3.3.2
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.email = ['carhoden@gmail.com', 'andrew@beginsinwonder.com']
12
12
 
13
13
  spec.summary = 'JSON HAL APIs on Rails in the style of PRX'
14
- spec.description = 'JSON HAL APIs on Rails in the style of PRX v4. Uses ROAR'
14
+ spec.description = 'JSON HAL APIs on Rails in the style of PRX. Uses ROAR'
15
15
  spec.homepage = 'https://www.github.com/PRX/'
16
16
  spec.license = 'MIT'
17
17
 
@@ -30,6 +30,6 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'minitest'
31
31
  spec.add_development_dependency 'pry-byebug'
32
32
  spec.add_development_dependency 'rack-test'
33
- spec.add_development_dependency 'rails', '~> 5.2.4'
34
- spec.add_development_dependency 'rake', '>= 12.3.3'
33
+ spec.add_development_dependency 'rails', '>= 5'
34
+ spec.add_development_dependency 'rake', '>= 12'
35
35
  end
@@ -46,12 +46,14 @@ module HalApi::Controller::Exceptions
46
46
  trace = wrapper.application_trace
47
47
  trace = wrapper.framework_trace if trace.empty?
48
48
 
49
- ActiveSupport::Deprecation.silence do
50
- message = "\n#{exception.class} (#{exception.message}):\n"
51
- message << exception.annoted_source_code.to_s if exception.respond_to?(:annoted_source_code)
52
- message << " " << trace.join("\n ")
53
- logger.fatal("#{message}\n\n")
49
+ message = "\n#{exception.class} (#{exception.message}):\n"
50
+ if exception.respond_to?(:annoted_source_code)
51
+ ActiveSupport::Deprecation.silence do
52
+ message << exception.annoted_source_code.to_s
53
+ end
54
54
  end
55
+ message << " " << trace.join("\n ")
56
+ logger.fatal("#{message}\n\n")
55
57
  end
56
58
 
57
59
  def notice_error(error)
@@ -1,3 +1,5 @@
1
+ require 'ostruct'
2
+
1
3
  module HalApi::Controller::Filtering
2
4
  extend ActiveSupport::Concern
3
5
 
@@ -85,7 +87,7 @@ module HalApi::Controller::Filtering
85
87
 
86
88
  # parse query param
87
89
  (params[:filters] || '').split(',').each do |str|
88
- name, value = str.split('=', 2)
90
+ name, value = (str || '').split('=', 2)
89
91
  next unless filters_map.key?(name)
90
92
 
91
93
  # convert/guess type of known params
@@ -43,7 +43,7 @@ module HalApi::Controller::Sorting
43
43
  # parse sort param for name of the column and direction
44
44
  # default is descending, because I say so, and we have a bias towards the new
45
45
  (params[:sorts] || '').split(',').each do |str|
46
- name, direction = str.split(':', 2).map { |s| s.to_s.strip }
46
+ name, direction = (str || '').split(':', 2).map { |s| s.to_s.strip }
47
47
  name = name.underscore
48
48
  direction = direction.blank? ? 'desc' : direction.downcase
49
49
  unless allowed_sorts.include?(name)
@@ -1,6 +1,7 @@
1
1
  require 'forwardable'
2
2
  require 'openssl'
3
3
  require 'active_model'
4
+ require 'ostruct'
4
5
 
5
6
  class HalApi::PagedCollection
6
7
  extend ActiveModel::Naming
@@ -2,6 +2,6 @@
2
2
 
3
3
  module HalApi
4
4
  module Rails
5
- VERSION = '1.2.1'
5
+ VERSION = '1.2.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hal_api-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Rhoden
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-07-12 00:00:00.000000000 Z
12
+ date: 2024-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -141,31 +141,31 @@ dependencies:
141
141
  name: rails
142
142
  requirement: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - "~>"
144
+ - - ">="
145
145
  - !ruby/object:Gem::Version
146
- version: 5.2.4
146
+ version: '5'
147
147
  type: :development
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - "~>"
151
+ - - ">="
152
152
  - !ruby/object:Gem::Version
153
- version: 5.2.4
153
+ version: '5'
154
154
  - !ruby/object:Gem::Dependency
155
155
  name: rake
156
156
  requirement: !ruby/object:Gem::Requirement
157
157
  requirements:
158
158
  - - ">="
159
159
  - !ruby/object:Gem::Version
160
- version: 12.3.3
160
+ version: '12'
161
161
  type: :development
162
162
  prerelease: false
163
163
  version_requirements: !ruby/object:Gem::Requirement
164
164
  requirements:
165
165
  - - ">="
166
166
  - !ruby/object:Gem::Version
167
- version: 12.3.3
168
- description: JSON HAL APIs on Rails in the style of PRX v4. Uses ROAR
167
+ version: '12'
168
+ description: JSON HAL APIs on Rails in the style of PRX. Uses ROAR
169
169
  email:
170
170
  - carhoden@gmail.com
171
171
  - andrew@beginsinwonder.com
@@ -227,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
227
  - !ruby/object:Gem::Version
228
228
  version: '0'
229
229
  requirements: []
230
- rubygems_version: 3.1.6
230
+ rubygems_version: 3.5.9
231
231
  signing_key:
232
232
  specification_version: 4
233
233
  summary: JSON HAL APIs on Rails in the style of PRX