Skip to content

Commit

Permalink
Merge pull request #2176 from sparklemotion/flavorjones-clean-up-docu…
Browse files Browse the repository at this point in the history
…ment-java-methods

documentation and nonfunctional changes

---

**What problem is this PR intended to solve?**

- update copyright dates and authors
- simplify how the `NOKOGIRI_SPEC` constant is set
- further extract "Rakefile" into "/rakelib" files
- remove unused files
- improve the `check_manifest` rake task (in a post-Hoe world)
- set yard options in ".yardopts"
- improve test coverage for `XML::Document` java methods
- document `XML::Document` java methods
- start yardoc-ifying `XML::Node`
  • Loading branch information
flavorjones committed Jan 18, 2021
2 parents d79c2d0 + 98053de commit 73700b0
Show file tree
Hide file tree
Showing 17 changed files with 188 additions and 402 deletions.
7 changes: 7 additions & 0 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--embed-mixins
--main=README.md
lib/**/*.rb
ext/nokogiri/*.c
-
README.md
LICENSE.md
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright 2008 -- 2018 by Aaron Patterson, Mike Dalessio, Charles Nutter, Sergio Arbeo, Patrick Mahoney, Yoko Harada, Akinori MUSHA, John Shahid, Lars Kanis
Copyright 2008 -- 2020 by Mike Dalessio, Aaron Patterson, Yoko Harada, Akinori MUSHA, John Shahid, Karol Bucek, Lars Kanis, Sergio Arbeo, Timothy Elliott, Nobuyoshi Nakada, Charles Nutter, Patrick Mahoney.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
236 changes: 0 additions & 236 deletions Manifest.txt

This file was deleted.

33 changes: 5 additions & 28 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
# frozen_string_literal: true
#
# Tasks are all loaded from `rakelib/*.rake`.
# You may want to use `rake -T` to see what's available.
#
require "bundler"
Bundler.load_gemspec("nokogiri.gemspec")

require "rubygems/package_task"
Gem::PackageTask.new(NOKOGIRI_SPEC).define

require "rake/clean"
CLEAN.add(
"concourse/images/*.generated",
"coverage",
"doc",
"ext/nokogiri/include",
"lib/nokogiri/[0-9].[0-9]",
"lib/nokogiri/nokogiri.{bundle,jar,rb,so}",
"pkg",
"tmp",
)
CLOBBER.add("ports/*").exclude(%r{ports/archives$})
CLOBBER.add(".yardoc")
CLOBBER.add("gems")

require "hoe/markdown"
Hoe::Markdown::Standalone.new("nokogiri").define_markdown_tasks

require "yard"
YARD::Rake::YardocTask.new("doc") do |t|
t.files = ["lib/**/*.rb", "ext/nokogiri/*.c"]
t.options = ["--embed-mixins", "--main=README.md"]
end
NOKOGIRI_SPEC = Bundler.load_gemspec("nokogiri.gemspec")

task default: [:rubocop, :compile, :test]
47 changes: 0 additions & 47 deletions STANDARD_RESPONSES.md

This file was deleted.

15 changes: 9 additions & 6 deletions ext/nokogiri/xml_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,12 +1395,15 @@ static VALUE add_namespace_definition(VALUE self, VALUE prefix, VALUE href)
}

/*
* call-seq:
* new(name, document)
*
* Create a new node with +name+ sharing GC lifecycle with +document+
* @overload new(name, document)
* Create a new node with +name+ sharing GC lifecycle with +document+.
* @param name [String]
* @param document [Nokogiri::XML::Document]
* @return [Nokogiri::XML::Node]
* @see Nokogiri::XML::Node#initialize
*/
static VALUE new(int argc, VALUE *argv, VALUE klass)
static VALUE
rb_xml_node_new(int argc, VALUE *argv, VALUE klass)
{
xmlDocPtr doc;
xmlNodePtr node;
Expand Down Expand Up @@ -1711,7 +1714,7 @@ void init_xml_node()

cNokogiriXmlElement = rb_define_class_under(xml, "Element", klass);

rb_define_singleton_method(klass, "new", new, -1);
rb_define_singleton_method(klass, "new", rb_xml_node_new, -1);

rb_define_method(klass, "add_namespace_definition", add_namespace_definition, 2);
rb_define_method(klass, "node_name", get_name, 0);
Expand Down
2 changes: 1 addition & 1 deletion lib/nokogiri/css/parser.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
#
# DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.1
# This file is automatically generated by Racc 1.5.2
# from Racc grammar file "".
#

Expand Down

0 comments on commit 73700b0

Please sign in to comment.