Commit Graph

55 Commits

Author SHA1 Message Date
Jean Boussier
6ba2fdb2fe Bump the required Ruby version to 3.1.0
Until now, Rails only droped compatibility with older
rubies on new majors, but I propose to change this policy
because it causes us to either keep compatibility with long
EOLed rubies or to bump the Rails major more often, and to
drop multiple Ruby versions at once when we bump the major.

In my opinion it's a bad alignments of incentives. And we'd
be much better to just drop support in new minors whenever they
go EOL (so 3 years).

Also Ruby being an upstream dependency, it's not even
a semver violation AFAICT.

Since Rails 7.2 isn't planned before a few months, we
can already drop Ruby 3.0 as it will be EOL in March.
2023-12-31 08:54:03 +01:00
Mike Dalessio
8a57ba8c0e
Update Action View and Dispatch to use Rails::Dom::Testing helpers
Use the helpers introduced in rails-dom-testing 2.2.0 instead of
managing the HTML parsers as was done in #48523.

See also related #47144 / ad79ed0e
2023-08-03 11:17:38 -04:00
Mike Dalessio
500ccaaeea
Update dependency on rails-html-sanitizer to ~>1.6
for HTML5 sanitizer support
2023-05-28 14:00:35 -04:00
Rafael Mendonça França
3d1f38fa30
Merge pull request #45546 from skipkayhil/decaffeinate-ujs
Convert rails-ujs to ES2015 modules
2022-09-14 18:59:58 -04:00
Jean Boussier
476aeda794 Avoid explictly freezing literals strings when possible
Ref: https://github.com/jeremyevans/erubi/pull/33

If the template is compiled with `frozen_string_literals: true`,
then explicitly freezing string is slightly wasteful as it will be
compiled as `opt_str_freeze` instead of a simple `putobject`.

The former has to check wether `String#freeze` was redefined every
time, which while fast is useless extra work.
2022-08-03 11:15:36 +02:00
Hartley McGuire
7d116c93cf
Convert rails-ujs to ES2015 modules
Building and linting are setup similar to other packages

Most of the changes are related to converting from sprockets requires to
ESM imports/export. However, there are a few notable changes as well:

- A few methods have been refactored to store the Rails object in a
  closure so that properties on it can be overriden by applications (as
  documented and tested). This also resulted in the "start" module
  getting inlined so that it can use the resulting functions.

- The logic for running Rails.start() automatically had to change
  because Rollup uses a slightly different module format than the
  previous coffeescript bundle. The Rollup bundle does not set
  window.Rails until the end up the bundle, so the condition had to be
  updated and window.Rails had to be set manually to ensure backwards
  compatability with scripts listening to the rails:attachBindings event
2022-07-07 21:52:08 -04:00
Rafael Mendonça França
1fde031e89 Fix gemspec 2021-11-15 21:06:21 +00:00
Rafael Mendonça França
9195b7fd0a
Require MFA to release rails 2021-11-15 20:37:42 +00:00
Rafael Mendonça França
6487836af8
Rails 7 requires Ruby 2.7 and prefer Ruby 3+
The code cleanup is comming in later commits but this
already remove support to Ruby < 2.7.
2021-02-04 16:34:53 +00:00
Abhay Nikam
bdfffd1355 Update the Rails mailing list URLs to new discuss discourse URL [ci skip] 2020-04-02 22:00:28 +05:30
Orien Madgwick
493edf044f Add bug tracker/documentation/mailing list URIs to the gemspecs 2019-10-11 20:47:19 -04:00
Kasper Timm Hansen
12001611d6
Require and support rails-html-sanitzer 1.2.0
Rails now requires 1.2.0 because it relies on the safe_list_sanitizer
API exclusively.

Also raise `sanitizer_vendor` API from the dead for
rails-deprecated_sanitizer.

Fixes https://github.com/rails/rails-deprecated_sanitizer/pull/6
2019-08-09 00:07:45 +02:00
Cliff Pruitt
265f97f1c1 Update rails-html-sanitizer to 1.1.0 in actionview.gemspec
Commit 52f0b050e2 replaces `white_list_sanitizer` with `safe_list_sanitizer`. This is a breaking change unless the installed version of `rails-html-sanitizer` is `>= 1.1.0`.

This commit updates the minimum version in `actionview/actionview.gemspec` to `1.1.0`.
2019-08-05 13:20:53 -04:00
Abhay Nikam
027e492b6f Fix links in gemspec and docs from http to https. 2019-03-09 19:42:35 +05:30
Kasper Timm Hansen
647d7e6167
Revert "Revert "Merge pull request #34387 from yhirano55/rails_info_properties_json""
I reverted the wrong commit. Damn it.

This reverts commit f66a977fc7ae30d2a07124ad91924c4ee638a703.
2019-01-08 22:19:22 +01:00
Kasper Timm Hansen
f66a977fc7
Revert "Merge pull request #34387 from yhirano55/rails_info_properties_json"
We had a discussion on the Core team and we don't want to expose this information
as a JSON endpoint and not by default.

It doesn't make sense to expose this JSON locally and this controller is only
accessible in dev, so the proposed access from a production app seems off.

This reverts commit 8eaffe7e89719ac62ff29c2e4208cfbeb1cd1c38, reversing
changes made to b6e4305c3bca4c673996d0af9db0f4cfbf50215e.
2019-01-08 22:16:58 +01:00
Kasper Timm Hansen
1b7c3222e8
Require Ruby 2.5 for Rails 6.
Generally followed the pattern for https://github.com/rails/rails/pull/32034

* Removes needless CI configs for 2.4
* Targets 2.5 in rubocop
* Updates existing CHANGELOG entries for fewer merge conflicts
* Removes Hash#slice extension as that's inlined on Ruby 2.5.
* Removes the need for send on define_method in MethodCallAssertions.
2018-12-19 21:47:50 +01:00
Gannon McGibbon
e74fdbe00c Amend CVE note and security guide section wordings
Reword first sentence of dep management and CVE section of
security guide. Also, reword and move gemspec notes above deps.

[ci skip]
2018-11-06 18:06:57 -05:00
Gannon McGibbon
1c11688b56 Add CVE note to security guide and gemspecs
[ci skip]
2018-11-06 14:25:36 -05:00
Jeremy Daer
d4eb0dc89e Rails 6 requires Ruby 2.4.1+
Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug.

References #32028
2018-02-17 15:34:57 -08:00
Rafael Mendonça França
0ea8e7db1a Remove support to Ruby 2.2
Rails 6 will only support Ruby >= 2.3.
2018-02-16 18:52:10 -05:00
Kir Shatrov
424117281e Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Grey Baker
3e6ce1cd69 Add source code and changelog links to gemspecs 2017-06-28 10:06:01 +01:00
bogdanvlviv
40bdbce191
Define path with __dir__
".. with __dir__ we can restore order in the Universe." - by @fxn

Related to 5b8738c2df003a96f0e490c43559747618d10f5f
2017-05-23 00:53:51 +03:00
Toshi MARUYAMA
c388393e8c use rails-html-sanitizer >= 1.0.3
CVE-2015-7579 says rails-html-sanitizer 1.0.2 has XSS vulnerability.
2017-01-27 13:53:13 +09:00
Jeremy Evans
7da8d76206
Change ActionView ERB Handler from Erubis to Erubi
Erubi offers the following advantages for Rails:

* Works with ruby's --enable-frozen-string-literal option
* Has 88% smaller memory footprint
* Does no freedom patching (Erubis adds a method to Kernel)
* Has simpler internals (1 file, <150 lines of code)
* Has an open development model (Erubis doesn't have a
  public source control repository or bug tracker)
* Is not dead (Erubis hasn't been updated since 2011)

Erubi is a simplified fork of Erubis that contains just the
parts that are generally needed (which includes the parts
that Rails uses).  The only intentional difference in
behavior is that it does not include support for <%=== tags
for debug output.  That could be added to the ActionView ERB
handler if it is desired.

The Erubis template handler remains in a deprecated state
so that code that accesses it directly does not break.  It
can be removed after Rails 5.1.
2017-01-25 01:41:27 -07:00
Xavier Noria
adca8154c6 applies new string literal convention in the gemspecs
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:27:12 +02:00
Connor Shea
86c860ff0c
Update rails-dom-testing gem to 2.0
Resolves #24924.
2016-05-09 20:23:42 -06:00
Xavier Noria
841c74ccba revises whitespace in the gemspec of AV [ci skip] 2016-03-10 07:55:42 +01:00
Xavier Noria
1eb27fafa9 revises the homepage URL in the gemspecs [ci skip]
References https://github.com/rails/homepage/issues/46.
2016-03-10 07:55:27 +01:00
Jon Atack
32f7491808 Upgrade to Ruby 2.2.2
and fix the grammar in the ruby_version_check.rb user message.
2015-04-14 08:41:56 +05:30
Rafael Mendonça França
2c1f6267f9 Merge pull request #19252 from kaspth/single-escaping-strip-tags
Let strip_tags leave HTML escaping to Rails.
2015-03-10 16:05:47 -03:00
Kasper Timm Hansen
37695b8aab Let strip_tags leave HTML escaping to Rails.
Prevents double escaping errors, such as "&amp;" becoming "&amp;amp;".
2015-03-10 20:04:01 +01:00
Peter Suschlik
f0768eba28 Target Ruby 2.2.1 in gemspecs
This is a follow-up to #19257
2015-03-09 09:56:26 +01:00
claudiob
d3b098b828 Require Ruby 2.2 for Rails 5.0
Stems from [this comment](https://github.com/rails/rails/pull/18203#issuecomment-68138096) by @robin850
and by the blog post http://weblog.rubyonrails.org/2014/12/19/Rails-4-2-final
2014-12-26 13:53:09 +01:00
claudiob
96d0f751f9 Bump required Ruby version to 2.1.0
[This article](http://weblog.rubyonrails.org/2014/8/20/Rails-4-2-beta1/#maintenance-consequences-and-rails-5-0) states that:

> Rails 5.0 is in most likelihood going to target Ruby 2.2.

Before the exact minimum version is fully decided, @arthurnn [suggests](https://github.com/rails/rails/pull/17830#issuecomment-64940383)
that **at least** version 2.1.0 **must** be required by the `gemspec` files.
2014-11-28 22:59:51 -08:00
Rafael Mendonça França
e3f7817cec Use released rails-dom-testing 2014-11-25 19:43:36 -02:00
Rafael Mendonça França
be5521eb4e Use released rails-dom-testing 2014-10-16 16:53:46 -03:00
Godfrey Chan
b008e4bd8a Use released rails-html-sanitizer and rails-deprecated_sanitizer 2014-09-26 01:37:05 +09:00
Rafael Mendonça França
2c0cad8034 Use released rails-dom-testing 2014-09-25 12:31:42 -03:00
Kasper Timm Hansen
28eecd934b Ship with rails-html-sanitizer instead. 2014-09-03 20:27:59 +02:00
Rafael Mendonça França
08f209614b Use released rails-deprecated_sanitizer 2014-08-19 16:45:31 -03:00
Rafael Mendonça França
fad9e729f1 Fix the rails-dom-testing dependecy 2014-08-19 16:41:38 -03:00
Kasper Timm Hansen
1e2ffe7ae6 Prepare for partial release.
- Default to Rails::DeprecatedSanitizer in ActionView::Helpers::SanitizeHelper.
- Add upgrade notes.
- Add sanitizer to new applications Gemfiles.
- Remove 'rails-dom-testing' as a dependency.
2014-08-17 19:25:47 +02:00
Rafael Mendonça França
a8c667e8f1 Defining the right dependencies 2014-07-15 13:40:22 -03:00
Timm
c94e24fbe7 Added Loofah as a dependency in actionview.gemspec.
Implemented ActionView: FullSanitizer, LinkSanitizer and WhiteListSanitizer in sanitizers.rb.
Deprecated protocol_separator and bad_tags.
Added new tests in sanitizers_test.rb and reimplemented assert_dom_equal with Loofah.
2014-06-11 17:53:28 +02:00
Łukasz Strzałkowski
9f506c494b More liberal builder dependency
Allowing us to get 3.2.x versions if needed.
2013-12-12 20:03:02 +01:00
Guillermo Iguaran
152edcc16b activemodel isn't a runtime dependency for actionview 2013-12-02 15:41:16 -05:00