~goofansu/rails-config-demo

fb6e00880c80a00a19bf91b571a17c228b53a992 — Yejun Su 2 years ago 2e77870
gem with zeitwerk mode lazy load classes

Output:

before_configuration
application.rb loaded
before_initialize
config/initializers loaded
ActiveSupport.on_load(:before_initialize) runs at the end of before_initialize
after_initialize
default_protect_from_forgery is false, expected: false
ActiveSupport.on_load(:after_initialize) runs at the end of after_initialize
2 files changed, 6 insertions(+), 5 deletions(-)

M Gemfile
M Gemfile.lock
M Gemfile => Gemfile +2 -2
@@ 26,5 26,5 @@ end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'wechat', '~> 0.12.0' # classic mode
# gem 'wechat', '~> 0.13.0' # zeitwerk mode
# gem 'wechat', '~> 0.12.0' # classic mode
gem 'wechat', '~> 0.13.0' # zeitwerk mode

M Gemfile.lock => Gemfile.lock +4 -3
@@ 172,12 172,13 @@ GEM
    websocket-driver (0.7.3)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.5)
    wechat (0.12.2)
      activesupport (>= 3.2, < 7)
    wechat (0.13.0)
      activesupport (>= 6.0, < 7)
      http (>= 1.0.4, < 5)
      nokogiri (>= 1.6.0)
      rexml
      thor
      zeitwerk (~> 2.4)
    zeitwerk (2.4.2)

PLATFORMS


@@ 191,7 192,7 @@ DEPENDENCIES
  sass-rails (>= 6)
  sqlite3 (~> 1.4)
  tzinfo-data
  wechat (~> 0.12.0)
  wechat (~> 0.13.0)

RUBY VERSION
   ruby 2.6.5p114