ekylibre-plugin_system 0.6.0 → 0.7.0

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: f489278c56ee14505f74b3670446f8bcee9615593883ec4f6c5d093b78dde4fd
4
- data.tar.gz: 296cbdf74855727bd85dcc2675d1554e46609c256025814c00bc808028e73560
3
+ metadata.gz: 248611796020d263b5ca597be00e352160708e1c6c5bf5ea5b9f6dffa26624d2
4
+ data.tar.gz: 2340a5ceaf0acc58b03416067f45c89e03d0989a61f892ccb3549bc810945c2e
5
5
  SHA512:
6
- metadata.gz: 6bdada763a72c4cd932a3d6acd922bffc362c5bf49a42c6ec3f5d41b6ba7f04b9d76cae562b9f3a291c914a202e5d0918c293cb7d64ac576d3b9c8caf1e3ad44
7
- data.tar.gz: 5e4665ba7af9d0b922c65194efb41b5e7b5b537767705b9bd74b95cefc8d5f74a0ca386784b05ff82be76aff638327dbc780036cf5b4dbe86a0e2a6c85ba03f2
6
+ metadata.gz: 04b7ca39cee2d8f0b481738df528ce160bf65358b8353d501f185f956e9be31fe4213b6a68dc65def6f1a6e8ff51b13239d1c0fcab7d35270e36fb52d2b49496
7
+ data.tar.gz: 2cb43d0c7f74950765d650891b7fc279ae7ece32ce823025760f819e744d4ef78e36bb072f3eba7c7c46a1bd71e97412de8f140039ffde4db6a9994888f4a958
@@ -6,7 +6,7 @@ module Ekylibre
6
6
  module PluginSystem
7
7
  # Utility class defining some InjectionTokens for the plugin system
8
8
  class Parameters
9
- CURRENT_TENANT = make_parameter('current_tenant')
9
+ APPLICATION_ENV = make_parameter('application_env')
10
10
  RAILS_APPLICATION = make_parameter('rails_application')
11
11
  end
12
12
  end
@@ -10,11 +10,12 @@ module Ekylibre
10
10
  initializer(:register_application) do |app|
11
11
  container = app.system.container
12
12
 
13
- container.set_parameter(Ekylibre::PluginSystem::Parameters::RAILS_APPLICATION, app)
13
+ container.set_parameter(Parameters::APPLICATION_ENV, ::Rails.env)
14
+ container.set_parameter(Parameters::RAILS_APPLICATION, app)
14
15
  end
15
16
 
16
17
  initializer(:register_middleware, after: :engines_blank_point) do |app|
17
- app.config.middleware.use(Middleware::RackMiddleware, app.system.container)
18
+ app.config.middleware.insert_before(Warden::Manager, Middleware::RackMiddleware, app.system.container)
18
19
  end
19
20
 
20
21
  initializer(:register_sidekiq_middleware, after: :engines_blank_point) do |app|
@@ -25,6 +26,9 @@ module Ekylibre
25
26
  console do |app|
26
27
  # Make the app container accessible in the RequestStore when in rails console
27
28
  GlobalContainer.set(app.system.container)
29
+ ActiveSupport::Reloader.to_prepare do
30
+ GlobalContainer.set(app.system.container)
31
+ end
28
32
 
29
33
  ::Rails::ConsoleMethods.send :include, ConsoleHelper
30
34
  end
@@ -33,7 +37,7 @@ module Ekylibre
33
37
  # Reboot system between requests if reloading is enabled.
34
38
  # Application configuration cannot be changed but this allow us to use rails reloading system in development.
35
39
  config.to_prepare do
36
- app = Ekylibre::Application.instance
40
+ app = ::Rails.application
37
41
 
38
42
  app.system.reset
39
43
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ekylibre
4
4
  module PluginSystem
5
- VERSION = '0.6.0'
5
+ VERSION = '0.7.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ekylibre-plugin_system
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ekylibre developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-18 00:00:00.000000000 Z
11
+ date: 2021-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: corindon