rhino_project_core 0.20.0.beta.82 → 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: d7f6123816342296824d915b225178c13a79bd0871a121557ccaf339305365a3
4
- data.tar.gz: 56f08bd75c8aea4b341e865834ccd6502ca6f05bb49c957fcc20474aeffda8d6
3
+ metadata.gz: d3c51efa857ca590575cf699ed0f796ae7911e7a3a0d8d5eb060b2714d834322
4
+ data.tar.gz: 0b3ef1439527c46a6ecb57ed9e5aaff88e58050d96ae2cad54efe47507dac80c
5
5
  SHA512:
6
- metadata.gz: 15782f70f64a12b73b61c5352212e120f0b3ddb6b4b0823842fa747229a6f8afe0eb67b2ab5f1bc0051c6292782cb568d9f110ff293b88822a3898a750c6f4eb
7
- data.tar.gz: a1967b590b68299ec87bb95567552e8835ed56f64db246e2cafd65dc04af70cbf2c11cd33c7213f256ff5b984cb61b3c9c5ec397d1fb777f1d04e75f6eb895de
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.build_auth_header(@token.token, @token.client)
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
- # This is the path to the templates used by the original model generator
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
@@ -32,7 +32,8 @@ module Rhino
32
32
  class ModuleGenerator < ::Rails::Generators::PluginGenerator
33
33
  source_root File.expand_path("templates", __dir__)
34
34
 
35
- class_option :database, type: :string, aliases: "-d", default: "postgresql"
35
+ class_option :database, type: :string, aliases: "-d", default: "postgresql", hide: true
36
+ class_option :full, type: :boolean, default: true, hide: true
36
37
  remove_class_option :template
37
38
 
38
39
  def self.banner
@@ -52,6 +53,17 @@ module Rhino
52
53
  ModuleBuilder
53
54
  end
54
55
 
56
+ def engine_config
57
+ content = []
58
+
59
+ content << "isolate_namespace #{camelized_modules}\n" if mountable?
60
+ content << "config.generators.api_only = true" if api?
61
+
62
+ return optimize_indentation(content.join("\n"), 4) if content.any?
63
+
64
+ nil
65
+ end
66
+
55
67
  def rhino_version
56
68
  ::Rhino::VERSION::STRING
57
69
  end
@@ -4,6 +4,7 @@ require "rhino/engine"
4
4
 
5
5
  module <%= camelized_modules %>
6
6
  class Engine < ::Rails::Engine
7
+ <%= engine_config -%>
7
8
  config.autoload_paths << File.expand_path("../../lib", __dir__)
8
9
 
9
10
  initializer "<%= namespaced_name %>.register_module" do
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 'rhino.active_record_extension' do
17
+ initializer "rhino.active_record_extension" do
16
18
  ActiveSupport.on_load(:active_record) do
17
- require_relative 'resource/active_record_extension'
18
- require_relative 'resource/active_record_tree'
19
- require_relative 'resource/active_model_extension'
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 'rhino.active_storage_extension' do
27
+ initializer "rhino.active_storage_extension" do
26
28
  ActiveSupport.on_load(:active_storage_attachment) do
27
- require_relative 'resource/active_storage_extension'
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 'rhino.overrides' do
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 'rhino.check_resources' do
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 'rhino.resource_reloader' do
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 'rhino.register_module' do
61
- require 'rhino/omniauth/strategies/azure_o_auth2'
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
@@ -10,7 +10,7 @@ module Rhino
10
10
  MAJOR = 0
11
11
  MINOR = 20
12
12
  TINY = 0
13
- PRE = "beta.82"
13
+ PRE = "beta.84"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
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.82
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-21 00:00:00.000000000 Z
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: '0'
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: '0'
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