jsonapi-resources 0.10.0.beta8 → 0.10.0.beta9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8058151c97ec20cfa1d8d1606c19a0c24094fb7f70e27970772d5e0df5cc96b
4
- data.tar.gz: 24604b487e967e5e24260e5d30d8a3f5891c6bf3fd1b1d8554a2f4eced9f503f
3
+ metadata.gz: 46a8c66a46d4472b937170a49042d8562590625617e7cacf7ffeea41a82833f6
4
+ data.tar.gz: '056962b1332867b7d5c787c896ab27b09dbc20f32fc1e393bab92926368d0d4e'
5
5
  SHA512:
6
- metadata.gz: 9f486e212c1a44a440d4dad9b94c822a72e4080eca619e3838e8f4d1237223c882abf7f19c35cfa98af90a30d5f5799f79272f4393b0d8453134f7942fb14333
7
- data.tar.gz: 299ed1970270e8d69deea9a5a4fe6f67909a915c0c76f1d0608b3ce0ff3d82dbe1676a74082677e65ff9f0cbfa4ba97dc4be88ef46ffe52bac8e42b36810fedf
6
+ metadata.gz: 7054515d6f28adb20a7df94f9fe85a70cd7489f3e75a89eca4daa6b7c75d056a34512fe825dc9c2b12ca4c2e3e0bc0ca10f3db27586e91b757b06bd72b04dad1
7
+ data.tar.gz: 99514c00fa4f01507f38a60c8c62796790116e60406bee10666c83fef3072a572b03a33a4a9867741064ed60d1337e9c73f83a4c7d52fd8483821bac0958ef9b
@@ -7,7 +7,13 @@ require 'jsonapi/resource'
7
7
  require 'jsonapi/cached_response_fragment'
8
8
  require 'jsonapi/response_document'
9
9
  require 'jsonapi/acts_as_resource_controller'
10
- require 'jsonapi/resource_controller'
10
+ if Rails::VERSION::MAJOR >= 6
11
+ ActiveSupport.on_load(:action_controller_base) do
12
+ require 'jsonapi/resource_controller'
13
+ end
14
+ else
15
+ require 'jsonapi/resource_controller'
16
+ end
11
17
  require 'jsonapi/resource_controller_metal'
12
18
  require 'jsonapi/resources/version'
13
19
  require 'jsonapi/configuration'
@@ -8,7 +8,7 @@ module JSONAPI
8
8
  # example Post.joins(:comments).joins_left(comments: :author) will join the comments table twice,
9
9
  # once inner and once left in 5.2, but only as inner in earlier versions.
10
10
  def joins_left(*columns)
11
- if Rails::VERSION::MAJOR >= 5 && ActiveRecord::VERSION::MINOR >= 2
11
+ if Rails::VERSION::MAJOR >= 6 || (Rails::VERSION::MAJOR >= 5 && ActiveRecord::VERSION::MINOR >= 2)
12
12
  left_joins(columns)
13
13
  else
14
14
  join_dependency = ActiveRecord::Associations::JoinDependency.new(self, columns, [])
@@ -152,7 +152,7 @@ module JSONAPI
152
152
  end
153
153
 
154
154
  def base_url
155
- @base_url ||= request.protocol + request.host_with_port
155
+ @base_url ||= "#{request.protocol}#{request.host_with_port}#{Rails.application.config.relative_url_root}"
156
156
  end
157
157
 
158
158
  def resource_klass_name
@@ -131,7 +131,7 @@ module JSONAPI
131
131
  def config_description(resource_klass)
132
132
  {
133
133
  class_name: self.class.name,
134
- seriserialization_options: serialization_options.sort.map(&:as_json),
134
+ serialization_options: serialization_options.sort.map(&:as_json),
135
135
  supplying_attribute_fields: supplying_attribute_fields(resource_klass).sort,
136
136
  supplying_relationship_fields: supplying_relationship_fields(resource_klass).sort,
137
137
  link_builder_base_url: link_builder.base_url,
@@ -1,5 +1,5 @@
1
1
  module JSONAPI
2
2
  module Resources
3
- VERSION = '0.10.0.beta8'
3
+ VERSION = '0.10.0.beta9'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi-resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0.beta8
4
+ version: 0.10.0.beta9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Gebhardt
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-07-19 00:00:00.000000000 Z
12
+ date: 2019-09-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '1.5'
20
+ version: 1.17.3
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '1.5'
27
+ version: 1.17.3
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -240,7 +240,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
240
240
  requirements:
241
241
  - - ">="
242
242
  - !ruby/object:Gem::Version
243
- version: '2.1'
243
+ version: '2.3'
244
244
  required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  requirements:
246
246
  - - ">"