Skip to content

Commit

Permalink
Fix Ruby import
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonzlin committed Dec 23, 2023
1 parent 99e0a1c commit 63e780d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion minify-html-ruby/lib/minify_html.rb
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
require_relative "minify_html/minify_html"
# frozen_string_literal: true

begin
/(?<ruby_version>\d+\.\d+)/ =~ RUBY_VERSION
require_relative "#{ruby_version}/minify_html"
rescue LoadError
require_relative "minify_html.so"
end
3 changes: 2 additions & 1 deletion minify-html-ruby/minify_html.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Gem::Specification.new do |spec|
spec.authors = ["Wilson Lin"]
spec.email = ["[email protected]"]
spec.license = "MIT"
spec.files = Dir["lib/**", "ext/**", "README.md"]
# Cargo.toml represents workspace created during CI workflow, required for building native extension from source.
spec.files = Dir["lib/**", "ext/**", "Cargo.toml", "README.md"]
spec.summary = "Extremely fast and smart HTML + JS + CSS minifier"
spec.homepage = "https://github.com/wilsonzlin/minify-html"

Expand Down

0 comments on commit 63e780d

Please sign in to comment.