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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d1af91c55bf42a53d4ecfe0c6ed673bd2856a57
4
- data.tar.gz: 0f0dac6e3b4e33821d9c20b0efe5fa1ead07b30e
3
+ metadata.gz: a0316407b967e74603428b99f752626d6fa4a95f
4
+ data.tar.gz: 43b51a70a75c311fb0bd08196c7f6058ec9af7b2
5
5
  SHA512:
6
- metadata.gz: 9bdfb40d56cfac300c5b2263ab25eec3b6162420cb417897c558b3e4bdfbd556acefe32da9387939ced5cb35046ad9295a6c7889881f385d996621914c0f5f3a
7
- data.tar.gz: 5c0745b9303bae2e66046fbda5ded266b0b642350968e5bbaf409a55d6c49186770217c22a2f80813e85f4f3e4b9e58b69c6a548689e44f55dba6c8def4b3e02
6
+ metadata.gz: a079010ce5c86f951791178cd5ab5516894ec76d7deb2de4e9a4b0570673083f1946ef0332d0c6ac10325564e08309474d22f5e48e4f8803d9890a2b023fb06c
7
+ data.tar.gz: 907505ccc54531e8a24ecd0180c170da9c2ddb3b25cd5e49372f7b8b0acf8456c22f3a1aee36229a82c6c695cc7dafec13e368fc985fe67c6d2ec588601431fe
@@ -6,6 +6,6 @@ module HalApi
6
6
  require 'hal_api/responders/api_responder'
7
7
 
8
8
  def self.rails_major_version
9
- ::Rails.version.split('.')[0].to_i
9
+ ::Rails::VERSION::MAJOR
10
10
  end
11
11
  end
@@ -36,8 +36,7 @@ module HalApi::Controller
36
36
  private
37
37
 
38
38
  def set_accepts
39
- mime_comparator = case HalApi::rails_major_version
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
- case HalApi.rails_major_version
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 = case HalApi.rails_major_version
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)
@@ -1,5 +1,5 @@
1
1
  module HalApi
2
2
  module Rails
3
- VERSION = '1.1.4'
3
+ VERSION = '1.1.5'
4
4
  end
5
5
  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.1.4
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: 2020-06-10 00:00:00.000000000 Z
12
+ date: 2021-01-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel