Skip to content

Commit

Permalink
Merge pull request sparklemotion#2103 from sparklemotion/flavorjones-…
Browse files Browse the repository at this point in the history
…clean-up-vasprintf-and-some-warnings

clean up vasprintf and some warnings, and clean up extconf.rb
  • Loading branch information
flavorjones committed Oct 26, 2020
2 parents ad00764 + ed2aa3b commit 0785285
Show file tree
Hide file tree
Showing 19 changed files with 381 additions and 464 deletions.
3 changes: 2 additions & 1 deletion .hoerc
Expand Up @@ -4,12 +4,13 @@
exclude: !ruby/regexp '/
(^\.\/
((\.git
|.vagrant
|.yardoc
|concourse
|gems
|ports
|suppressions
|tasks
|rakelib
|test
|tmp
)\/)
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -88,6 +88,7 @@ This release ends support for:
* Improve performance of some namespace operations. [[#1916](https://github.com/sparklemotion/nokogiri/issues/1916)] (Thanks, [@ashmaroli](https://github.com/ashmaroli)!)
* Remove unnecessary array allocations from Node serialization methods [[#1911](https://github.com/sparklemotion/nokogiri/issues/1911)] (Thanks, [@ashmaroli](https://github.com/ashmaroli)!)
* Avoid creation of unnecessary zero-length String objects. [[#1970](https://github.com/sparklemotion/nokogiri/issues/1970)] (Thanks, [@ashmaroli](https://github.com/ashmaroli)!)
* Always compile libxml2 and libxslt with '-O2' [[#2022](https://github.com/sparklemotion/nokogiri/issues/2022), [#2100](https://github.com/sparklemotion/nokogiri/issues/2100)] (Thanks, [@ilyazub](https://github.com/ilyazub)!)
* [JRuby] Lots of code cleanup and performance improvements. [[#1934](https://github.com/sparklemotion/nokogiri/issues/1934)] (Thanks, [@kares](https://github.com/kares)!)
* [JRuby] Clean up deprecated calls into JRuby. [[#2027](https://github.com/sparklemotion/nokogiri/issues/2027)] (Thanks, [@headius](https://github.com/headius)!)

Expand Down
66 changes: 28 additions & 38 deletions Rakefile
@@ -1,52 +1,53 @@
# -*- ruby -*-
require 'hoe'
require "hoe"

Hoe.plugin :bundler
Hoe.plugin :debugging
Hoe.plugin :gemspec
Hoe.plugin :git
Hoe.plugin :markdown

require 'shellwords'
require_relative "rakelib/util"

require_relative "tasks/util"
HOE = Hoe.spec "nokogiri" do |hoe|
hoe.author = [
"Mike Dalessio",
"Aaron Patterson",
"John Shahid",
"Yoko Harada",
"Akinori MUSHA",
"Lars Kanis",
"Tim Elliott",
]

HOE = Hoe.spec 'nokogiri' do
developer 'Aaron Patterson', 'aaronp@rubyforge.org'
developer 'Mike Dalessio', 'mike.dalessio@gmail.com'
developer 'Yoko Harada', 'yokolet@gmail.com'
developer 'Tim Elliott', 'tle@holymonkey.com'
developer 'Akinori MUSHA', 'knu@idaemons.org'
developer 'John Shahid', 'jvshahid@gmail.com'
developer 'Lars Kanis', 'lars@greiz-reinsdorf.de'
hoe.email = "nokogiri-talk@googlegroups.com"

license "MIT"
hoe.license "MIT"

self.urls = {
hoe.urls = {
"home" => "https://nokogiri.org",
"bugs" => "https://github.com/sparklemotion/nokogiri/issues",
"doco" => "https://nokogiri.org/rdoc/index.html",
"clog" => "https://nokogiri.org/CHANGELOG.html",
"code" => "https://github.com/sparklemotion/nokogiri",
}

self.markdown_linkify_files = FileList["*.md"]
self.extra_rdoc_files = FileList['ext/nokogiri/*.c']
hoe.markdown_linkify_files = FileList["*.md"]
hoe.extra_rdoc_files = FileList["ext/nokogiri/*.c"]

self.clean_globs += [
'nokogiri.gemspec',
'lib/nokogiri/nokogiri.{bundle,jar,rb,so}',
'lib/nokogiri/[0-9].[0-9]',
hoe.clean_globs += [
"nokogiri.gemspec",
"lib/nokogiri/nokogiri.{bundle,jar,rb,so}",
"lib/nokogiri/[0-9].[0-9]",
]
self.clean_globs += Dir.glob("ports/*").reject { |d| d =~ %r{/archives$} }
hoe.clean_globs += Dir.glob("ports/*").reject { |d| d =~ %r{/archives$} }

unless java?
self.extra_deps += [
hoe.extra_deps += [
["mini_portile2", "~> 2.5.0"], # keep version in sync with extconf.rb
]
end

self.extra_dev_deps += [
hoe.extra_dev_deps += [
["concourse", "~> 0.38"],
["hoe", ["~> 3.22", ">= 3.22.1"]],
["hoe-bundler", "~> 1.2"],
Expand All @@ -64,26 +65,15 @@ HOE = Hoe.spec 'nokogiri' do
["simplecov", "~> 0.17.0"], # locked due to https://github.com/codeclimate/test-reporter/issues/413
]

self.spec_extras = {
hoe.spec_extras = {
:extensions => ["ext/nokogiri/extconf.rb"],
:required_ruby_version => '>= 2.4.0'
:required_ruby_version => ">= 2.4.0"
}

self.testlib = :minitest
self.test_prelude = 'require "helper"' # ensure simplecov gets loaded before anything else
hoe.testlib = :minitest
hoe.test_prelude = %q(require "helper") # ensure simplecov gets loaded before anything else
end

require_relative "tasks/cross-ruby"
require_relative "tasks/concourse"
require_relative "tasks/css-generate"
require_relative "tasks/debug"
require_relative "tasks/docker"
require_relative "tasks/docs-linkify"
require_relative "tasks/rubocop"
require_relative "tasks/set-version-to-timestamp"

# work around Hoe's inflexibility about the default tasks
Rake::Task[:default].prerequisites.unshift("compile")
Rake::Task[:default].prerequisites.unshift("rubocop")

# vim: syntax=Ruby

0 comments on commit 0785285

Please sign in to comment.