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

Build the extension correctly #5

Merged
merged 1 commit into from
Dec 31, 2020
Merged
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
2 changes: 1 addition & 1 deletion .commit/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ruby:
gem:
namespace: "LLHttp"
extra: |-2
spec.files = Dir["CHANGELOG.md", "README.md", "LICENSE", "lib/**/*"]
spec.files = Dir["CHANGELOG.md", "README.md", "LICENSE", "lib/**/*", "ext/**/*"]
spec.require_path = "lib"

spec.extensions = %w[ext/llhttp/extconf.rb]
5 changes: 3 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ require "rake/extensiontask"

Rake::ExtensionTask.new "llhttp_ext" do |ext|
ext.ext_dir = "ext/llhttp"
ext.lib_dir = "lib/llhttp"
end

task test: :compile do
Expand All @@ -16,8 +15,10 @@ end

task :clean do
[
"./lib/llhttp/llhttp_ext.bundle"
"./lib/llhttp_ext.bundle"
].each do |file|
next unless File.exist?(file)

FileUtils.rm(file)
end
end
Expand Down
5 changes: 2 additions & 3 deletions ext/llhttp/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

require "mkmf"

dir_config "llhttp_ext"

create_makefile "llhttp_ext"
dir_config("llhttp_ext")
create_makefile("llhttp_ext")
2 changes: 1 addition & 1 deletion lib/llhttp/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ def initialize(delegate, type: :both)
end
end

require_relative "llhttp_ext"
require_relative "../llhttp_ext"
2 changes: 1 addition & 1 deletion llhttp.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gem::Specification.new do |spec|

spec.license = "MIT"

spec.files = Dir["CHANGELOG.md", "README.md", "LICENSE", "lib/**/*"]
spec.files = Dir["CHANGELOG.md", "README.md", "LICENSE", "lib/**/*", "ext/**/*"]
spec.require_path = "lib"

spec.extensions = %w[ext/llhttp/extconf.rb]
Expand Down