rhino_project_core 0.20.0.beta.83 → 0.20.0.beta.84
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3c51efa857ca590575cf699ed0f796ae7911e7a3a0d8d5eb060b2714d834322
|
4
|
+
data.tar.gz: 0b3ef1439527c46a6ecb57ed9e5aaff88e58050d96ae2cad54efe47507dac80c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c203b19dfec0e8ae34005ca2fdf05a1f7d0dba71c1cedd50a6da40fc664859e243ab34c8234bbc7a24567d33a66d59ea817532454c7e11c9b91d98af5c13611f
|
7
|
+
data.tar.gz: 2b84c93bf3562e9987fc5b5bdd90d6ecc882f3bd3f21d0f6acd03b1e772a75b9fa1ae6c639359483b2c2ae6f9fce5fa06b1706086b704cc6471109d1a685a457
|
@@ -30,7 +30,7 @@ module DeviseTokenAuth::OmniauthCallbacksController::Extensions
|
|
30
30
|
|
31
31
|
# set a server cookie if configured
|
32
32
|
if DeviseTokenAuth.cookie_enabled
|
33
|
-
auth_header = @resource.
|
33
|
+
auth_header = @resource.build_auth_headers(@token.token, @token.client)
|
34
34
|
cookies[DeviseTokenAuth.cookie_name] = DeviseTokenAuth.cookie_attributes.merge(value: auth_header.to_json)
|
35
35
|
end
|
36
36
|
rescue ActiveRecord::RecordInvalid
|
@@ -5,15 +5,20 @@ require "rails/generators/active_record/model/model_generator"
|
|
5
5
|
|
6
6
|
module Rhino
|
7
7
|
class ModelGenerator < ::ActiveRecord::Generators::ModelGenerator
|
8
|
-
|
9
|
-
# I think this can be removed in Rails 7.1 https://github.com/rails/rails/pull/47181
|
10
|
-
source_root File.join(File.dirname(::ActiveRecord::Generators::ModelGenerator.instance_method(:create_migration_file).source_location.first),
|
11
|
-
"templates")
|
8
|
+
source_root File.expand_path("templates", __dir__)
|
12
9
|
|
13
10
|
class_option :owner, type: :string, desc: "The model is owned by the reference attribute", group: :owner
|
14
11
|
class_option :base_owner, type: :boolean, default: false, desc: "The model is owned by the base owner", group: :owner
|
15
12
|
class_option :global_owner, type: :boolean, default: false, desc: "The model is globally owned", group: :owner
|
16
13
|
|
14
|
+
# Parent source paths
|
15
|
+
def source_paths
|
16
|
+
[
|
17
|
+
File.expand_path("templates", __dir__),
|
18
|
+
::ActiveRecord::Generators::ModelGenerator.source_root
|
19
|
+
]
|
20
|
+
end
|
21
|
+
|
17
22
|
def create_migration_file
|
18
23
|
# We check the ownership of the reference attributes before creating the migration
|
19
24
|
check_ownership
|
data/lib/rhino/engine.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "rhino/version"
|
4
|
+
|
5
|
+
require "devise_token_auth"
|
4
6
|
module Rhino
|
5
7
|
class Engine < ::Rails::Engine
|
6
8
|
config.before_configuration do
|
@@ -12,19 +14,19 @@ module Rhino
|
|
12
14
|
end
|
13
15
|
end
|
14
16
|
|
15
|
-
initializer
|
17
|
+
initializer "rhino.active_record_extension" do
|
16
18
|
ActiveSupport.on_load(:active_record) do
|
17
|
-
require_relative
|
18
|
-
require_relative
|
19
|
-
require_relative
|
19
|
+
require_relative "resource/active_record_extension"
|
20
|
+
require_relative "resource/active_record_tree"
|
21
|
+
require_relative "resource/active_model_extension"
|
20
22
|
|
21
23
|
include Rhino::Resource::ActiveRecordExtension if Rhino.auto_include_active_record
|
22
24
|
end
|
23
25
|
end
|
24
26
|
|
25
|
-
initializer
|
27
|
+
initializer "rhino.active_storage_extension" do
|
26
28
|
ActiveSupport.on_load(:active_storage_attachment) do
|
27
|
-
require_relative
|
29
|
+
require_relative "resource/active_storage_extension"
|
28
30
|
|
29
31
|
include Rhino::Resource::ActiveStorageExtension
|
30
32
|
end
|
@@ -32,7 +34,7 @@ module Rhino
|
|
32
34
|
|
33
35
|
# https://guides.rubyonrails.org/engines.html#overriding-models-and-controllers
|
34
36
|
# Use root instead of Rails.root to scope for this engine
|
35
|
-
initializer
|
37
|
+
initializer "rhino.overrides" do
|
36
38
|
overrides = "#{root}/app/overrides"
|
37
39
|
Rails.autoloaders.main.ignore(overrides)
|
38
40
|
|
@@ -43,13 +45,13 @@ module Rhino
|
|
43
45
|
end
|
44
46
|
end
|
45
47
|
|
46
|
-
initializer
|
48
|
+
initializer "rhino.check_resources" do
|
47
49
|
config.after_initialize do
|
48
50
|
check_resources
|
49
51
|
end
|
50
52
|
end
|
51
53
|
|
52
|
-
initializer
|
54
|
+
initializer "rhino.resource_reloader" do
|
53
55
|
config.after_initialize do
|
54
56
|
Rails.application.reloader.to_prepare do
|
55
57
|
Rhino.resource_classes = nil
|
@@ -57,8 +59,8 @@ module Rhino
|
|
57
59
|
end
|
58
60
|
end
|
59
61
|
|
60
|
-
initializer
|
61
|
-
require
|
62
|
+
initializer "rhino.register_module" do
|
63
|
+
require "rhino/omniauth/strategies/azure_o_auth2"
|
62
64
|
|
63
65
|
config.after_initialize do
|
64
66
|
Rhino.registered_modules[:rhino] = {
|
data/lib/rhino/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rhino_project_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.20.0.beta.
|
4
|
+
version: 0.20.0.beta.84
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Rosevear
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -54,16 +54,16 @@ dependencies:
|
|
54
54
|
name: devise_token_auth
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- -
|
57
|
+
- - '='
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
59
|
+
version: 1.2.3
|
60
60
|
type: :runtime
|
61
61
|
prerelease: false
|
62
62
|
version_requirements: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
|
-
- -
|
64
|
+
- - '='
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
66
|
+
version: 1.2.3
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: js_regex
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,6 +112,20 @@ dependencies:
|
|
112
112
|
- - "~>"
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '13.1'
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
name: rgl
|
117
|
+
requirement: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - '='
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: 0.6.6
|
122
|
+
type: :runtime
|
123
|
+
prerelease: false
|
124
|
+
version_requirements: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - '='
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: 0.6.6
|
115
129
|
description: ''
|
116
130
|
email:
|
117
131
|
- jprosevear@nubinary.com
|