aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/xml_mini/nokogiri.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add `Style/RedundantFreeze` to remove redudant `.freeze`Yasuo Honda2018-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | Since Rails 6.0 will support Ruby 2.4.1 or higher `# frozen_string_literal: true` magic comment is enough to make string object frozen. This magic comment is enabled by `Style/FrozenStringLiteralComment` cop. * Exclude these files not to auto correct false positive `Regexp#freeze` - 'actionpack/lib/action_dispatch/journey/router/utils.rb' - 'activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb' It has been fixed by https://github.com/rubocop-hq/rubocop/pull/6333 Once the newer version of RuboCop released and available at Code Climate these exclude entries should be removed. * Replace `String#freeze` with `String#-@` manually if explicit frozen string objects are required - 'actionpack/test/controller/test_case_test.rb' - 'activemodel/test/cases/type/string_test.rb' - 'activesupport/lib/active_support/core_ext/string/strip.rb' - 'activesupport/test/core_ext/string_ext_test.rb' - 'railties/test/generators/actions_test.rb'
* Enable `Performance/UnfreezeString` copyuuji.yaginuma2018-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Ruby 2.3 or later, `String#+@` is available and `+@` is faster than `dup`. ```ruby # frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "benchmark-ips" end Benchmark.ips do |x| x.report('+@') { +"" } x.report('dup') { "".dup } x.compare! end ``` ``` $ ruby -v benchmark.rb ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux] Warming up -------------------------------------- +@ 282.289k i/100ms dup 187.638k i/100ms Calculating ------------------------------------- +@ 6.775M (± 3.6%) i/s - 33.875M in 5.006253s dup 3.320M (± 2.2%) i/s - 16.700M in 5.032125s Comparison: +@: 6775299.3 i/s dup: 3320400.7 i/s - 2.04x slower ```
* [Active Support] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts 8da30ad6be34339124ba4cb4e36aea260dda12bc
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* Merge branch 'master' into require_relative_2017Xavier Noria2017-07-021-1/+1
|\
| * Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
| * Merge pull request #29540 from kirs/rubocop-frozen-stringMatthew Draper2017-07-021-0/+1
| |\ | | | | | | | | | Enforce frozen string in Rubocop
| | * Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
| | |
| * | Make ActiveSupport frozen string literal friendly.Pat Allan2017-06-201-1/+1
| |/ | | | | | | | | | | | | The ActiveSupport test suite only passes currently if it uses the latest unreleased commits for dalli, and a patch for Builder: https://github.com/tenderlove/builder/pull/6 Beyond that, all external dependencies (at least, to the extent they’re used by ActiveSupport) are happy, including Nokogiri as of 1.8.0.
* / [Active Support] require => require_relativeAkira Matsuda2017-07-011-1/+1
|/
* Fixes Hash.from_xml with frozen strings for all backendsJosh Nussbaum2017-04-201-3/+1
|
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-1/+1
|
* applies remaining conventions across the projectXavier Noria2016-08-061-3/+3
|
* applies new string literal convention in activesupport/libXavier Noria2016-08-061-6/+6
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846robertomiranda2015-01-311-2/+2
| | | | ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
* update AS/values and AS/xml_mini docs [ci skip]Francesco Rodriguez2012-09-141-1/+1
|
* Clean up module docs [ci skip]Vijay Dev2012-03-071-1/+0
| | | | Removed some useless docstrings and no-doc'ed some.
* Revert "Used any? instead of length call"Xavier Noria2011-11-281-1/+1
| | | | | | | | | Reason: This is slower, and any? is not equivalent in the general case. See discussion in https://github.com/rails/rails/pull/3779 This reverts commit 20cbf8eddc3844126d20f1218f068889d17b0dcf.
* Used any? instead of length callRahul P. Chaudhari2011-11-281-1/+1
|
* fixed a missing require that causes trouble when using AS in a non-rails env.Nick Sutterer2011-01-181-0/+1
|
* AS gem doesn't depend on nokogiri so shows a nicer error if users haven't ↵Santiago Pastorino2010-07-301-1/+6
| | | | installed
* nokogiri.rb needs active_support/core_ext/object/blankXavier Noria2010-01-011-0/+1
|
* Code cleanup, bugfixes and speed improvements for the Nokogiri and LibXML ↵Willem van Bergen2010-01-011-24/+26
| | | | | | | | XmlMini backends [#3641 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* making nokogiri to hash less clever, more fast O_oAaron Patterson2009-09-171-20/+12
| | | | | | [#2243 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Allow Nokogiri XmlMini backend to process cdata elementsDeveloper2009-09-171-1/+1
| | | | | | [#3219 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Merge docrailsPratik Naik2009-07-251-1/+1
|
* enable *real* IO parsing for the libxml, nokogiri and rexml backends [#2659 ↵Brian Lopez2009-06-091-4/+6
| | | | | | state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Add support for parsing XML and JSON from an IO as well as a string [#2659 ↵Brian Lopez2009-05-171-6/+10
| | | | | | state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Hide XmlMini backend details from rdocJeremy Kemper2009-03-211-3/+3
|
* adding more nokogiri tests and making the main rails tests passAaron Patterson2009-03-101-7/+14
| | | | | | [#2190 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Make it easier to swap XmlMini backends. Require Nokogiri >= 1.1.1 for ↵Jeremy Kemper2009-03-101-3/+6
| | | | XmlMini backend tests.
* Nokogiri backend for XmlMiniAaron Patterson2009-03-101-0/+67
[#2190 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>