hal_api-rails 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hal_api.rb +1 -1
- data/lib/hal_api/controller.rb +2 -4
- data/lib/hal_api/controller/exceptions.rb +1 -2
- data/lib/hal_api/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0316407b967e74603428b99f752626d6fa4a95f
|
4
|
+
data.tar.gz: 43b51a70a75c311fb0bd08196c7f6058ec9af7b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a079010ce5c86f951791178cd5ab5516894ec76d7deb2de4e9a4b0570673083f1946ef0332d0c6ac10325564e08309474d22f5e48e4f8803d9890a2b023fb06c
|
7
|
+
data.tar.gz: 907505ccc54531e8a24ecd0180c170da9c2ddb3b25cd5e49372f7b8b0acf8456c22f3a1aee36229a82c6c695cc7dafec13e368fc985fe67c6d2ec588601431fe
|
data/lib/hal_api.rb
CHANGED
data/lib/hal_api/controller.rb
CHANGED
@@ -36,8 +36,7 @@ module HalApi::Controller
|
|
36
36
|
private
|
37
37
|
|
38
38
|
def set_accepts
|
39
|
-
mime_comparator =
|
40
|
-
when 5
|
39
|
+
mime_comparator = if HalApi::rails_major_version >= 5
|
41
40
|
Mime[:html]
|
42
41
|
else
|
43
42
|
Mime::HTML
|
@@ -46,8 +45,7 @@ module HalApi::Controller
|
|
46
45
|
end
|
47
46
|
|
48
47
|
def env
|
49
|
-
|
50
|
-
when 5
|
48
|
+
if HalApi.rails_major_version >= 5
|
51
49
|
request.env
|
52
50
|
else
|
53
51
|
super
|
@@ -7,8 +7,7 @@ module HalApi::Controller::Exceptions
|
|
7
7
|
extend ActiveSupport::Concern
|
8
8
|
|
9
9
|
def respond_with_error(exception)
|
10
|
-
wrapper =
|
11
|
-
when 5
|
10
|
+
wrapper = if HalApi.rails_major_version >= 5
|
12
11
|
::ActionDispatch::ExceptionWrapper.new(ActiveSupport::BacktraceCleaner.new, exception)
|
13
12
|
else
|
14
13
|
::ActionDispatch::ExceptionWrapper.new(request.env, exception)
|
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.1.
|
4
|
+
version: 1.1.5
|
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:
|
12
|
+
date: 2021-01-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|