1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

21 commits

Author SHA1 Message Date
Yasuo Honda
aa3dcabd87 Add Style/RedundantFreeze to remove redudant .freeze
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'
2018-09-29 07:18:44 +00:00
Koichi ITO
ac717d65a3 [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
Kir Shatrov
72950568dd Use frozen-string-literal in ActiveSupport 2017-07-09 15:08:29 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Kasper Timm Hansen
6d6249b1c1 ✂️ needless lines beneath private. 2016-11-20 17:58:36 +01:00
Jon Moss
0ab54f4a49 Create XMLMiniEngineTest; base class for all tests 2016-11-20 10:46:16 -05:00
Jon Moss
2bdc4ddc06 Code styling cleanup 2016-11-20 10:45:58 -05:00
Jon Moss
305e2922a4 Create CommonXMLMiniAdapterTest; common tests module
Created a new module (a la Action Cable subscription adapter's test
suite) to be included in all sub class test to ensure compatability and
reduce duplicated code.
2016-11-20 10:45:09 -05:00
Rafael Mendonça França
55f9b8129a
Add three new rubocop rules
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces

Fix all violations in the repository.
2016-08-16 04:30:11 -03:00
Xavier Noria
b326e82dc0 applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
Xavier Noria
80e66cc4d9 normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
Xavier Noria
a731125f12 applies new string literal convention in activesupport/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:10:53 +02:00
Marek Kirejczyk
dd829df07e Fix Hash#from_xml with frozen strings (#24718)
* Hash#from_xml works with frozen strings

Fixes #24647

* Fix rexml engine test

[Marek Kirejczyk + Rafael Mendonça França]
2016-05-21 09:14:22 -03:00
Rafael Mendonça França
eded51f3b4 Do not include Active Support on tests
It was not done to be included
2015-01-04 18:59:42 -03:00
Paco Guzman
20bd16330c Rewind StringIO instances before be parsed again 2013-06-16 00:32:33 +02:00
Paco Guzman
74c79104b9 Compare with the parsed result from REXML backend 2013-05-22 15:35:47 +02:00
Anupam Choudhury
ae984cb1ef Added missing assert 2013-04-02 11:50:25 +05:30
Aaron Patterson
b8d8c50785 use AS::TestCase as the base class 2012-01-05 17:12:46 -08:00
Brian Lopez
53dda29f8b Add support for parsing XML and JSON from an IO as well as a string [#2659 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-05-17 10:37:52 -05:00
Aaron Patterson
694998ee4f Nokogiri backend for XmlMini
[#2190 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-03-10 11:56:19 -07:00