diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..a18f075 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,29 @@ +.defaults: &defaults + before_script: + - sudo apk add --update ragel=6.9 + - gem install bundler --no-ri --no-rdoc + - ruby --version + - gem --version + - bundle --version + - bundle install -j $(nproc) --path vendor --retry=3 + script: + - bundle exec rake + cache: + paths: + - vendor/ruby + +Ruby 2.2: + image: "ruby:2.2-alpine" + <<: *defaults + +Ruby 2.3: + image: "ruby:2.3-alpine" + <<: *defaults + +Ruby 2.4: + image: "ruby:2.4-alpine" + <<: *defaults + +JRuby 9.1: + image: "jruby:9.1-alpine" + <<: *defaults diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index abff30f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -language: ruby - -script: bundle exec rake - -sudo: false - -addons: - apt: - packages: - - ragel - -before_install: - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install ragel; fi - -install: - - bundle install --retry=3 - -rvm: - - jruby - - 2.2.5 - - 2.3.3 - - 2.4.0 - - rbx - -matrix: - allow_failures: - - rvm: rbx - fast_finish: true - -notifications: - email: - recipients: - - yorickpeterse@gmail.com - on_success: change - on_failure: change - -cache: bundler - -os: - - linux - - osx diff --git a/CHANGELOG.md b/CHANGELOG.md index 1da0e0b..c75f7d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ Dates are in the format `yyyy-mm-dd`. ## 2.11 - 2017-09-07 Various Ruby warnings have been resolved by Loic Nageleisen. See pull request - for more information. + for more information. ## 2.10 - 2017-04-18 @@ -14,7 +14,7 @@ Various Ruby warnings have been resolved by Loic Nageleisen. See pull request You can now pass a Symbol to `Oga::XML::Element#attribute` for both XML and HTML documents, previously this only worked for XML documents. See -[PR #174](https://github.com/YorickPeterse/oga/pull/174) for more information. +[PR #174](https://gitlab.com/yorickpeterse/oga/pull/174) for more information. ## 2.9 - 2017-02-10 @@ -77,7 +77,7 @@ for more information and thanks to Scott Wheeler for contributing the patch. This release fixes a bug in the XML generation code that would cause it to get stuck in the generation loop. See issue - and commit + and commit 38284278d542640c3d8300ef15890af93b6df779 for more information. ## 2.5 - 2016-09-06 @@ -85,7 +85,7 @@ stuck in the generation loop. See issue This release fixes a bug in the XML parser that would prevent it from parsing doctypes that contain a mixture of public/system IDs, a name, and inline rules. -See issue and commit +See issue and commit 68f1f9f660b90a43d22c8514e8cbf53f7ca0097d for more information. ## 2.4 - 2016-09-04 @@ -96,7 +96,7 @@ Oga can now serialise large documents without causing the call stack to overflow thanks to the new `Oga::XML::Generator` class. This class can generate XML without using a stack at all. -See issue and commit +See issue and commit dd138981f68a606eff5d5a01e990f04398087dc4 for more information. ### Faster retrieval of previous/next nodes @@ -114,14 +114,14 @@ See commit 5a58b1413767fed4518e8a67c4eb432a31592660 for more information. Thanks to various changes provided by Erik Michaels-Ober Oga can now be used to parse XML input from a pipe (as returned by for example `IO.pipe`). See the following pull request for more information: -. +. ## 2.2 - 2016-02-23 ### XPath support for nested pipe operators Nested pipe operators such as `a | b | c` are now supported as XPath -expressions. See issue and +expressions. See issue and commit 6d3c5c2ce93cbce337338bdc1a4971da72517038 for more information. ## 2.1 - 2016-02-09 @@ -130,7 +130,7 @@ commit 6d3c5c2ce93cbce337338bdc1a4971da72517038 for more information. Decoding of invalid XML/HTML entities now results in these entities being preserved as-is, instead of raising an EncodingError in certain places. See - and commit + and commit 5bfc2d50f2a3d387cb9fc28826d1f3d5a2d9d224 for more information. ### New Versioning Format @@ -228,8 +228,8 @@ new compiler setup, how it works, how it performs, etc. In the mean time, see the following issues/pull requests for more information: -* -* +* +* ### Escaping of characters in CSS expressions @@ -238,14 +238,14 @@ namespace. This can be done by escaping the dot using a backslash. For example: Oga.parse_xml('').css('foo\.bar') # => NodeSet(Element(name: "foo.bar")) -See issue for more +See issue for more information. ### Support for the CSS :not() pseudo class CSS expressions can now use the `:not()` pseudo class. -See issue for more +See issue for more information. ### Improved parsing of CSS expressions @@ -255,8 +255,8 @@ these would result in parser errors. See the following issues for more information: -* -* +* +* ### Unicode support for CSS/XPath @@ -264,7 +264,7 @@ CSS and XPath expressions can now contain Unicode characters, previously only ASCII characters were allowed for identifiers (node tests, attribute names, etc). -See issue for more +See issue for more information. ## 1.2.3 - 2015-08-19 @@ -312,8 +312,8 @@ Jakub Pawlowicz improved the process of decoding XML/HTML entities so that it handles unrecognized entities better. Previously Oga would raise an error when trying to decode entities such as `&#TAB;` instead of just leaving them as-is. -See issue and pull request - for more information. +See issue and pull request + for more information. ## 1.2.0 - 2015-06-30 @@ -372,7 +372,7 @@ replaced with a Text node). For example: Thanks to Tero Tasanen for adding this. See commit 0b4791b277abf492ae0feb1c467dfc03aef4f2ec and - for more information. + for more information. ### Encoding quotes in attribute values @@ -527,8 +527,8 @@ See the following commits for more information: The following issues are also worth checking out: -* https://github.com/YorickPeterse/oga/issues/101 -* https://github.com/YorickPeterse/oga/issues/99 +* https://gitlab.com/yorickpeterse/oga/issues/101 +* https://gitlab.com/yorickpeterse/oga/issues/99 ### Handling of invalid XML/HTML @@ -605,7 +605,7 @@ And so is this: Foo/bar -See Github issue and the +See GitLab issue and the following commits for more information: * bc9b9bc9537d9dc614b47323e0a6727a4ec2dd04 @@ -629,7 +629,7 @@ The XML lexer has been tweaked so it can handle multi-line CDATA tags, comments and processing instructions, both when using a String and IO (or similar) as input. -See Github issue and the +See GitLab issue and the following commits for more information: * b2ea20ba615953254554565e0c8b11587ac4f59c @@ -745,7 +745,7 @@ like the other callbacks. ### Parser rewritten using ruby-ll The XML, CSS and XPath parsers have been re-written using ruby-ll -(). While Racc served its purpose +(). While Racc served its purpose (until now) it has three main problems: 1. Performance is not as good as it should be. @@ -758,7 +758,7 @@ ruby-ll parsers. These parsers are LL(1) parsers which makes them a lot easier to debug. Performance is currently a tiny bit faster than the old Racc parsers, but this will be improved in the coming releases of both Oga and ruby-ll. -See pull request for more +See pull request for more information. ### Lazy decoding of XML/HTML entities @@ -804,7 +804,7 @@ documents _don't_ have their contents converted, ensuring proper Javascript syntax upon output. See commit 874d7124af540f0bc78e6c586868bbffb4310c5d and issue - for more information. + for more information. ### Proper lexing support for script tags @@ -812,7 +812,7 @@ When lexing HTML documents the XML lexer is now capable of lexing the contents of `` would result in incorrect tokens being emitted. See commit ba2177e2cfda958ea12c5b04dbf60907aaa8816d and issue - for more information. + for more information. ### Element Inner Text @@ -820,7 +820,7 @@ When setting the inner text of an element using `Oga::XML::Element#inner_text=` _all_ child nodes of the element are now removed first, instead of only text nodes being removed. -See for more information. +See for more information. ### Support for extra XML entities @@ -878,14 +878,14 @@ perhaps other libraries) the parser _does not_ output XPath expressions as a String or a CSS specific AST. Instead it directly emits an XPath AST. This allows the resulting AST to be directly evaluated by `Oga::XPath::Evaluator`. -See for more information. +See for more information. ### Mutli-line Attribute Support Oga can now lex/parse elements that have attributes with newlines in them. Previously this would trigger memory allocation errors. -See for more information. +See for more information. ### SAX after_element @@ -893,7 +893,7 @@ The `after_element` method in the SAX parsing API now always takes two arguments: the namespace name and element name. Previously this method would always receive a single nil value as its argument, which is rather pointless. -See for more information. +See for more information. ### XPath Grouping @@ -913,7 +913,7 @@ This can be used to download and parse XML files on the fly. For example: document = Oga.parse_xml(enum) -See for more information. +See for more information. ### Removing Attributes @@ -947,7 +947,7 @@ the usage of the default `Object#==` method. XML entities such as `&` and `<` are now encoded/decoded by the lexer, string and text nodes. -See for more information. +See for more information. ### General @@ -970,7 +970,7 @@ improved by removing String allocations that were not needed. ## 0.1.3 - 2014-09-24 This release fixes a problem with serializing attributes using the namespace -prefix "xmlns". See for more +prefix "xmlns". See for more information. ## 0.1.2 - 2014-09-23 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6a0f7fc..dfd90a7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,7 @@ stated in this CoC. ## Submitting Changes -Before making any big changes it's best to open a Github issue to discuss the +Before making any big changes it's best to open a GitLab issue to discuss the matter, this saves you from potentially spending hours on something that might ultimately be rejected. @@ -43,11 +43,11 @@ changes are submitted. Some examples of good pull request: -* https://github.com/YorickPeterse/oga/pull/96 -* https://github.com/YorickPeterse/oga/pull/67 -* https://github.com/YorickPeterse/ffi-aspell/pull/21 -* https://github.com/YorickPeterse/ffi-aspell/pull/20 -* https://github.com/YorickPeterse/ruby-ll/pull/16 +* https://gitlab.com/yorickpeterse/oga/pull/96 +* https://gitlab.com/yorickpeterse/oga/pull/67 +* https://gitlab.com/yorickpeterse/ffi-aspell/pull/21 +* https://gitlab.com/yorickpeterse/ffi-aspell/pull/20 +* https://gitlab.com/yorickpeterse/ruby-ll/pull/16 ## Git diff --git a/README.md b/README.md index 39c0266..c79345a 100644 --- a/README.md +++ b/README.md @@ -270,7 +270,7 @@ well as complicating the parsing internals of Oga. As a result I have decided that Oga _does not_ insert these tags when left out. A more in depth explanation can be found here: -. + ## Documentation diff --git a/oga.gemspec b/oga.gemspec index e9b96b9..3990ac6 100644 --- a/oga.gemspec +++ b/oga.gemspec @@ -6,7 +6,7 @@ Gem::Specification.new do |s| s.authors = ['Yorick Peterse'] s.email = 'yorickpeterse@gmail.com' s.summary = 'Oga is an XML/HTML parser written in Ruby.' - s.homepage = 'https://github.com/yorickpeterse/oga/' + s.homepage = 'https://gitlab.com.com/yorickpeterse/oga/' s.description = s.summary s.license = 'MPL-2.0'