Skip to content

Commit

Permalink
Support 3.2+
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Apr 6, 2024
1 parent 8b066f2 commit 13079ee
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,11 @@ jobs:
matrix:
os: ["ubuntu-latest", "macos-latest"]
ruby-version:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- "3.3"
- "head"
- "truffleruby-22.2"
- "truffleruby-22.3"
- "jruby-9.4.6.0"
- "jruby-head"
- "truffleruby-23.1"
- "truffleruby-24.0"

runs-on: ${{ matrix.os }}
steps:
Expand Down
8 changes: 7 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ inherit_from:
- "https://www.goodcop.style/tabs.yml"

AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.2

Style/ExplicitBlockArgument:
Enabled: false
Expand All @@ -25,3 +25,9 @@ Naming/MethodName:

Style/ReturnNilInPredicateMethodDefinition:
Enabled: false

Naming/BlockForwarding:
Enabled: false

Style/ArgumentsForwarding:
Enabled: false
2 changes: 0 additions & 2 deletions lib/phlex/helpers.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require "set"

module Phlex::Helpers
private

Expand Down
4 changes: 2 additions & 2 deletions lib/phlex/sgml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def __final_attributes__(**attributes)
end

buffer = +""
__build_attributes__(attributes, buffer: buffer)
__build_attributes__(attributes, buffer:)

buffer
end
Expand Down Expand Up @@ -437,7 +437,7 @@ def __build_attributes__(attributes, buffer:)
when Symbol then"#{name}-#{subkey.name.tr('_', '-')}"
else "#{name}-#{subkey}"
end
}, buffer: buffer
}, buffer:
)
when Array
buffer << " " << name << '="' << Phlex::Escape.html_escape(v.compact.join(" ")) << '"'
Expand Down
2 changes: 1 addition & 1 deletion lib/phlex/testing/view_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def render(view, &block)
view = view.new
end

view.call(view_context: view_context, &block)
view.call(view_context:, &block)
end

def view_context
Expand Down
2 changes: 1 addition & 1 deletion phlex.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.description = "A high-performance view framework optimised for fun."
spec.homepage = "https://www.phlex.fun"
spec.license = "MIT"
spec.required_ruby_version = ">= 2.7"
spec.required_ruby_version = ">= 3.2"

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/phlex-ruby/phlex"
Expand Down
2 changes: 1 addition & 1 deletion test/phlex/view/capture.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def view_template
def view_template
srcdoc = capture { yield } if block_given?

iframe srcdoc: srcdoc
iframe srcdoc:
end
end
end
Expand Down

0 comments on commit 13079ee

Please sign in to comment.