mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
parent
5e9a0931fd
commit
a1234cdd2e
1 changed files with 7 additions and 8 deletions
15
Rakefile
15
Rakefile
|
@ -7,14 +7,12 @@ require_relative 'lib/puma/detect'
|
||||||
require 'rubygems/package_task'
|
require 'rubygems/package_task'
|
||||||
require 'bundler/gem_tasks'
|
require 'bundler/gem_tasks'
|
||||||
|
|
||||||
gemspec = Gem::Specification.load(Dir['*.gemspec'].first)
|
gemspec = Gem::Specification.load("puma.gemspec")
|
||||||
Gem::PackageTask.new(gemspec).define
|
Gem::PackageTask.new(gemspec).define
|
||||||
|
|
||||||
# Add rubocop task
|
# Add rubocop task
|
||||||
RuboCop::RakeTask.new
|
RuboCop::RakeTask.new
|
||||||
|
|
||||||
spec = Gem::Specification.load("puma.gemspec")
|
|
||||||
|
|
||||||
# generate extension code using Ragel (C and Java)
|
# generate extension code using Ragel (C and Java)
|
||||||
desc "Generate extension code (C and Java) using Ragel"
|
desc "Generate extension code (C and Java) using Ragel"
|
||||||
task :ragel
|
task :ragel
|
||||||
|
@ -40,16 +38,16 @@ task :ragel => ['ext/puma_http11/org/jruby/puma/Http11Parser.java']
|
||||||
if !Puma.jruby?
|
if !Puma.jruby?
|
||||||
# compile extensions using rake-compiler
|
# compile extensions using rake-compiler
|
||||||
# C (MRI, Rubinius)
|
# C (MRI, Rubinius)
|
||||||
Rake::ExtensionTask.new("puma_http11", spec) do |ext|
|
Rake::ExtensionTask.new("puma_http11", gemspec) do |ext|
|
||||||
# place extension inside namespace
|
# place extension inside namespace
|
||||||
ext.lib_dir = "lib/puma"
|
ext.lib_dir = "lib/puma"
|
||||||
|
|
||||||
CLEAN.include "lib/puma/{1.8,1.9}"
|
CLEAN.include "lib/puma/{1.8,1.9}"
|
||||||
CLEAN.include "lib/puma/puma_http11.rb"
|
CLEAN.include "lib/puma/puma_http11.rb"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
# Java (JRuby)
|
# Java (JRuby)
|
||||||
Rake::JavaExtensionTask.new("puma_http11", spec) do |ext|
|
Rake::JavaExtensionTask.new("puma_http11", gemspec) do |ext|
|
||||||
ext.lib_dir = "lib/puma"
|
ext.lib_dir = "lib/puma"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -75,6 +73,7 @@ end
|
||||||
|
|
||||||
namespace :test do
|
namespace :test do
|
||||||
desc "Run the integration tests"
|
desc "Run the integration tests"
|
||||||
|
|
||||||
task :integration do
|
task :integration do
|
||||||
sh "ruby test/shell/run.rb"
|
sh "ruby test/shell/run.rb"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue