Skip to content

Commit

Permalink
chore(deps): bump phlex to 2.0.0.rc
Browse files Browse the repository at this point in the history
  • Loading branch information
mhenrixon committed Dec 2, 2024
1 parent 53f5358 commit 05e5369
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
phlexy_ui (0.1.22)
phlex (>= 1.10)
phlex (>= 2.0.0.rc1)
zeitwerk (~> 2.6)

GEM
Expand All @@ -24,7 +24,7 @@ GEM
parser (3.3.4.0)
ast (~> 2.4.1)
racc
phlex (1.11.0)
phlex (2.0.0.rc1)
psych (5.1.2)
stringio
racc (1.8.1)
Expand Down
7 changes: 5 additions & 2 deletions lib/phlexy_ui/collapsible_sub_menu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
module PhlexyUI
# @private
class CollapsibleSubMenu < Base
include Phlex::DeferredRender

def initialize(*, **)
super
@items ||= []
Expand Down Expand Up @@ -52,6 +50,11 @@ def item(*, **, &)

private

def before_template(&)
vanish(&)
super
end

ATTRIBUTES_MAP = {
open: true
}.freeze
Expand Down
9 changes: 7 additions & 2 deletions lib/phlexy_ui/sub_menu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
module PhlexyUI
# @private
class SubMenu < Base
include Phlex::DeferredRender

def initialize(*, **)
super
@items ||= []
Expand Down Expand Up @@ -33,5 +31,12 @@ def title(&block)
def item(*, **, &)
@items << MenuItem.new(*, **, &)
end

private

def before_template(&)
vanish(&)
super
end
end
end
9 changes: 7 additions & 2 deletions lib/phlexy_ui/tab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
module PhlexyUI
# @private
class Tab < Base
include Phlex::DeferredRender

def initialize(*, id: nil, **)
super(*, **)
@id = id
Expand Down Expand Up @@ -39,5 +37,12 @@ def content(*, **options, &)
end
end
end

private

def before_template(&)
vanish(&)
super
end
end
end
2 changes: 1 addition & 1 deletion phlexy_ui.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |s|

s.required_ruby_version = ">= 3.2"

s.add_dependency "phlex", ">= 1.10"
s.add_dependency "phlex", ">= 2.0.0.rc1"
s.add_dependency "zeitwerk", "~> 2.6"

s.add_development_dependency "standard", "~> 1.39.2"
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Bundler.setup

require "phlexy_ui"
require "phlex/testing/view_helper"
require "phlex/testing"

Dir["./spec/support/**/*.rb"].each do |f|
require f
Expand Down
10 changes: 10 additions & 0 deletions spec/support/phlex_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ def phlex_context(&)
end
end

module Phlex
module Testing
module ViewHelper
include Phlex::Testing::SGML

alias render render_to_string
end
end
end

RSpec.configure do |config|
config.include Phlex::Testing::ViewHelper
config.include PhlexHelpers
Expand Down

0 comments on commit 05e5369

Please sign in to comment.