actionview 6.0.0.rc1 → 6.0.3.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of actionview might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +62 -0
- data/README.rdoc +1 -1
- data/lib/action_view.rb +1 -0
- data/lib/action_view/base.rb +1 -1
- data/lib/action_view/cache_expiry.rb +13 -9
- data/lib/action_view/digestor.rb +5 -4
- data/lib/action_view/flows.rb +0 -1
- data/lib/action_view/gem_version.rb +1 -1
- data/lib/action_view/helpers/active_model_helper.rb +0 -1
- data/lib/action_view/helpers/asset_tag_helper.rb +1 -1
- data/lib/action_view/helpers/cache_helper.rb +1 -2
- data/lib/action_view/helpers/date_helper.rb +1 -2
- data/lib/action_view/helpers/form_helper.rb +2 -2
- data/lib/action_view/helpers/form_options_helper.rb +4 -3
- data/lib/action_view/helpers/form_tag_helper.rb +4 -1
- data/lib/action_view/helpers/javascript_helper.rb +4 -2
- data/lib/action_view/helpers/number_helper.rb +3 -2
- data/lib/action_view/helpers/sanitize_helper.rb +10 -16
- data/lib/action_view/helpers/tag_helper.rb +3 -3
- data/lib/action_view/helpers/tags/base.rb +0 -1
- data/lib/action_view/helpers/tags/check_box.rb +0 -1
- data/lib/action_view/helpers/tags/collection_check_boxes.rb +0 -1
- data/lib/action_view/helpers/tags/collection_helpers.rb +0 -1
- data/lib/action_view/helpers/tags/collection_radio_buttons.rb +0 -1
- data/lib/action_view/helpers/tags/color_field.rb +0 -1
- data/lib/action_view/helpers/tags/date_field.rb +0 -1
- data/lib/action_view/helpers/tags/date_select.rb +0 -1
- data/lib/action_view/helpers/tags/datetime_field.rb +0 -1
- data/lib/action_view/helpers/tags/datetime_local_field.rb +0 -1
- data/lib/action_view/helpers/tags/label.rb +0 -1
- data/lib/action_view/helpers/tags/month_field.rb +0 -1
- data/lib/action_view/helpers/tags/radio_button.rb +0 -1
- data/lib/action_view/helpers/tags/select.rb +0 -1
- data/lib/action_view/helpers/tags/text_field.rb +0 -1
- data/lib/action_view/helpers/tags/time_field.rb +0 -1
- data/lib/action_view/helpers/tags/week_field.rb +0 -1
- data/lib/action_view/helpers/text_helper.rb +0 -1
- data/lib/action_view/helpers/translation_helper.rb +7 -8
- data/lib/action_view/helpers/url_helper.rb +1 -1
- data/lib/action_view/layouts.rb +0 -3
- data/lib/action_view/log_subscriber.rb +0 -1
- data/lib/action_view/lookup_context.rb +4 -3
- data/lib/action_view/path_set.rb +0 -1
- data/lib/action_view/record_identifier.rb +0 -1
- data/lib/action_view/renderer/abstract_renderer.rb +0 -1
- data/lib/action_view/renderer/partial_renderer.rb +0 -4
- data/lib/action_view/renderer/partial_renderer/collection_caching.rb +1 -1
- data/lib/action_view/renderer/streaming_template_renderer.rb +0 -2
- data/lib/action_view/renderer/template_renderer.rb +1 -2
- data/lib/action_view/rendering.rb +0 -1
- data/lib/action_view/template.rb +0 -1
- data/lib/action_view/template/error.rb +9 -14
- data/lib/action_view/template/handlers/erb.rb +0 -1
- data/lib/action_view/template/resolver.rb +1 -5
- data/lib/action_view/test_case.rb +2 -3
- data/lib/action_view/testing/resolvers.rb +25 -14
- data/lib/action_view/unbound_template.rb +1 -2
- data/lib/action_view/view_paths.rb +0 -1
- data/lib/assets/compiled/rails-ujs.js +7 -4
- metadata +18 -15
@@ -75,8 +75,9 @@ module ActionView
|
|
75
75
|
methods.flatten.each do |method|
|
76
76
|
_helpers.module_eval <<-end_eval, __FILE__, __LINE__ + 1
|
77
77
|
def #{method}(*args, &block) # def current_user(*args, &block)
|
78
|
-
_test_case.send(
|
78
|
+
_test_case.send(:'#{method}', *args, &block) # _test_case.send(:'current_user', *args, &block)
|
79
79
|
end # end
|
80
|
+
ruby2_keywords(:'#{method}') if respond_to?(:ruby2_keywords, true)
|
80
81
|
end_eval
|
81
82
|
end
|
82
83
|
end
|
@@ -93,7 +94,6 @@ module ActionView
|
|
93
94
|
end
|
94
95
|
|
95
96
|
private
|
96
|
-
|
97
97
|
def include_helper_modules!
|
98
98
|
helper(helper_class) if helper_class
|
99
99
|
include _helpers
|
@@ -163,7 +163,6 @@ module ActionView
|
|
163
163
|
end
|
164
164
|
|
165
165
|
private
|
166
|
-
|
167
166
|
# Need to experiment if this priority is the best one: rendered => output_buffer
|
168
167
|
def document_root_element
|
169
168
|
Nokogiri::HTML::Document.parse(@rendered.blank? ? @output_buffer : @rendered).root
|
@@ -7,10 +7,15 @@ module ActionView #:nodoc:
|
|
7
7
|
# file system. This is used internally by Rails' own test suite, and is
|
8
8
|
# useful for testing extensions that have no way of knowing what the file
|
9
9
|
# system will look like at runtime.
|
10
|
-
class FixtureResolver <
|
10
|
+
class FixtureResolver < OptimizedFileSystemResolver
|
11
11
|
def initialize(hash = {}, pattern = nil)
|
12
|
-
super(
|
12
|
+
super("")
|
13
|
+
if pattern
|
14
|
+
ActiveSupport::Deprecation.warn "Specifying a custom path for #{self.class} is deprecated. Implement a custom Resolver subclass instead."
|
15
|
+
@pattern = pattern
|
16
|
+
end
|
13
17
|
@hash = hash
|
18
|
+
@path = ""
|
14
19
|
end
|
15
20
|
|
16
21
|
def data
|
@@ -22,27 +27,33 @@ module ActionView #:nodoc:
|
|
22
27
|
end
|
23
28
|
|
24
29
|
private
|
25
|
-
|
26
30
|
def query(path, exts, _, locals, cache:)
|
27
|
-
|
28
|
-
EXTENSIONS.each do |ext, prefix|
|
29
|
-
query << "(" << exts[ext].map { |e| e && Regexp.escape("#{prefix}#{e}") }.join("|") << "|)"
|
30
|
-
end
|
31
|
-
query = /^(#{Regexp.escape(path)})#{query}$/
|
31
|
+
regex = build_regex(path, exts)
|
32
32
|
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
@hash.select do |_path, _|
|
34
|
+
("/" + _path).match?(regex)
|
35
|
+
end.map do |_path, source|
|
36
36
|
handler, format, variant = extract_handler_and_format_and_variant(_path)
|
37
|
-
|
37
|
+
|
38
|
+
Template.new(source, _path, handler,
|
38
39
|
virtual_path: path.virtual,
|
39
40
|
format: format,
|
40
41
|
variant: variant,
|
41
42
|
locals: locals
|
42
43
|
)
|
44
|
+
end.sort_by do |t|
|
45
|
+
match = ("/" + t.identifier).match(regex)
|
46
|
+
EXTENSIONS.keys.reverse.map do |ext|
|
47
|
+
if ext == :variants && exts[ext] == :any
|
48
|
+
match[ext].nil? ? 0 : 1
|
49
|
+
elsif match[ext].nil?
|
50
|
+
exts[ext].length
|
51
|
+
else
|
52
|
+
found = match[ext].to_sym
|
53
|
+
exts[ext].index(found)
|
54
|
+
end
|
55
|
+
end
|
43
56
|
end
|
44
|
-
|
45
|
-
templates.sort_by { |t| -t.identifier.match(/^#{query}$/).captures.reject(&:blank?).size }
|
46
57
|
end
|
47
58
|
end
|
48
59
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Unobtrusive JavaScript
|
3
3
|
https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts
|
4
4
|
Released under the MIT license
|
5
|
-
|
5
|
+
*/;
|
6
6
|
|
7
7
|
(function() {
|
8
8
|
var context = this;
|
@@ -320,6 +320,9 @@ Released under the MIT license
|
|
320
320
|
if (!input.name || input.disabled) {
|
321
321
|
return;
|
322
322
|
}
|
323
|
+
if (matches(input, 'fieldset[disabled] *')) {
|
324
|
+
return;
|
325
|
+
}
|
323
326
|
if (matches(input, 'select')) {
|
324
327
|
return toArray(input.options).forEach(function(option) {
|
325
328
|
if (option.selected) {
|
@@ -645,14 +648,14 @@ Released under the MIT license
|
|
645
648
|
};
|
646
649
|
|
647
650
|
Rails.preventInsignificantClick = function(e) {
|
648
|
-
var data, insignificantMetaClick, link, metaClick, method,
|
651
|
+
var data, insignificantMetaClick, link, metaClick, method, nonPrimaryMouseClick;
|
649
652
|
link = this;
|
650
653
|
method = (link.getAttribute('data-method') || 'GET').toUpperCase();
|
651
654
|
data = link.getAttribute('data-params');
|
652
655
|
metaClick = e.metaKey || e.ctrlKey;
|
653
656
|
insignificantMetaClick = metaClick && method === 'GET' && !data;
|
654
|
-
|
655
|
-
if (
|
657
|
+
nonPrimaryMouseClick = (e.button != null) && e.button !== 0;
|
658
|
+
if (nonPrimaryMouseClick || insignificantMetaClick) {
|
656
659
|
return e.stopImmediatePropagation();
|
657
660
|
}
|
658
661
|
};
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.3.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 6.0.
|
19
|
+
version: 6.0.3.rc1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 6.0.
|
26
|
+
version: 6.0.3.rc1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: builder
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,20 +58,20 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.1'
|
62
62
|
- - ">="
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 1.0
|
64
|
+
version: 1.2.0
|
65
65
|
type: :runtime
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - "~>"
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version: '1.
|
71
|
+
version: '1.1'
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 1.0
|
74
|
+
version: 1.2.0
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rails-dom-testing
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,28 +92,28 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - '='
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 6.0.
|
95
|
+
version: 6.0.3.rc1
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - '='
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 6.0.
|
102
|
+
version: 6.0.3.rc1
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: activemodel
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - '='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 6.0.
|
109
|
+
version: 6.0.3.rc1
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - '='
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: 6.0.
|
116
|
+
version: 6.0.3.rc1
|
117
117
|
description: Simple, battle-tested conventions and helpers for building web pages.
|
118
118
|
email: david@loudthinking.com
|
119
119
|
executables: []
|
@@ -235,8 +235,11 @@ homepage: https://rubyonrails.org
|
|
235
235
|
licenses:
|
236
236
|
- MIT
|
237
237
|
metadata:
|
238
|
-
|
239
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.0.
|
238
|
+
bug_tracker_uri: https://github.com/rails/rails/issues
|
239
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.0.3.rc1/actionview/CHANGELOG.md
|
240
|
+
documentation_uri: https://api.rubyonrails.org/v6.0.3.rc1/
|
241
|
+
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
242
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.0.3.rc1/actionview
|
240
243
|
post_install_message:
|
241
244
|
rdoc_options: []
|
242
245
|
require_paths:
|
@@ -253,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
253
256
|
version: 1.3.1
|
254
257
|
requirements:
|
255
258
|
- none
|
256
|
-
rubygems_version: 3.
|
259
|
+
rubygems_version: 3.1.2
|
257
260
|
signing_key:
|
258
261
|
specification_version: 4
|
259
262
|
summary: Rendering framework putting the V in MVC (part of Rails).
|