Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow hot-reloading phlexing gem #408

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ gem "cssbundling-rails"
# gem "bcrypt", "~> 3.1.7"

# Simple ERB to Phlex converter
gem "phlexing", path: "gem"
# gem "phlexing", path: "gem"

# dependencies of phlexing gem from gem/phlexing.gemspec
gem "deface", "~> 1.9"
gem "html_press", "~> 0.8.2"
gem "syntax_tree", "~> 6.0"
gem "phlex", "~> 1.6"
gem "phlex-rails", ">= 0.9", "< 2.0"
# end of dependencies of phlexing gem

# A pure Ruby code highlighter that is compatible with Pygments
gem "rouge", "~> 4.3"
Expand Down
26 changes: 9 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@ GIT
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)

PATH
remote: gem
specs:
phlexing (0.6.0)
deface (~> 1.9)
html_press (~> 0.8.2)
nokogiri (~> 1.0)
phlex (~> 1.6)
phlex-rails (>= 0.9, < 2.0)
syntax_tree (~> 6.0)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -130,7 +119,7 @@ GEM
rainbow (>= 2.1.0)
drb (2.2.1)
erubi (1.13.0)
execjs (2.8.1)
execjs (2.9.1)
globalid (1.2.1)
activesupport (>= 6.1)
html_press (0.8.2)
Expand Down Expand Up @@ -184,11 +173,10 @@ GEM
parser (3.3.4.0)
ast (~> 2.4.1)
racc
phlex (1.10.1)
phlex-rails (1.1.1)
phlex (~> 1.9)
phlex (1.10.3)
phlex-rails (1.2.1)
phlex (~> 1.10.0)
railties (>= 6.1, < 8)
zeitwerk (~> 2.6)
polyglot (0.3.5)
prettier_print (1.2.1)
psych (5.1.2)
Expand Down Expand Up @@ -297,16 +285,20 @@ DEPENDENCIES
bootsnap
cssbundling-rails
debug
deface (~> 1.9)
html_press (~> 0.8.2)
irb (~> 1.14)
jsbundling-rails
phlexing!
phlex (~> 1.6)
phlex-rails (>= 0.9, < 2.0)
puma (~> 6.4)
rack-rewrite (~> 1.5)
rails (~> 7.1.4)
rouge (~> 4.3)
rubocop!
sprockets-rails
stimulus-rails
syntax_tree (~> 6.0)
turbo-rails (~> 2.0)
turbo_power (~> 0.6)
tzinfo-data
Expand Down
5 changes: 4 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module Phlexing
module PhlexingApp
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.1
Expand All @@ -33,6 +33,9 @@ class Application < Rails::Application
# Common ones are `templates`, `generators`, or `middleware`, for example.
config.autoload_lib(ignore: %w(assets tasks))

# Instead of depending on the phlexing gem, add it to the autoload paths to enable hot reloading
config.autoload_paths << Rails.root.join("gem/lib")

# Configuration for the application, engines, and railties goes here.
#
# These settings can be overridden in specific environments using the files
Expand Down
Loading