-
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: load
initializers.rb
instead of require for working tests (#700)
* fix: load `initializers.rb` instead of require for working tests * fix cop
- Loading branch information
1 parent
4359adb
commit 4b7b90f
Showing
4 changed files
with
16 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
Bridgetown.configure do | ||
init :ssr do | ||
setup ->(site) do | ||
site.data.iterations ||= 0 | ||
site.data.iterations += 1 | ||
end | ||
end | ||
# attempt multiple inits just to ensure it is idempotent | ||
init :local_ssr_init, require_gem: false | ||
init :local_ssr_init, require_gem: false | ||
init :local_ssr_init, require_gem: false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
Bridgetown.initializer :local_ssr_init do |config| | ||
config.init :ssr do | ||
setup ->(site) do | ||
site.data.iterations ||= 0 | ||
site.data.iterations += 1 | ||
end | ||
end | ||
end |