actionview 4.1.1 → 4.1.2.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.

@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2e3a512ceed2a3ea2553f544f90dc2e6152e7661
4
+ data.tar.gz: 263e594047da5a7cdaf20cf37c808991364838eb
5
+ SHA512:
6
+ metadata.gz: 291b378ecd2e46d17695d4e17d864d879f48239a2ebcbc8f62622ce32033c5464749370fbd1419aee091a22d38900b4ab4e5c328dfe1f9fd21b170c8e63ce043
7
+ data.tar.gz: 14c8f31799725665f742dab7df38c8cfa21c9171daa1760b1ac931045a0aa86f9ec91982e082b56fb62e7210cab88e71a3ddab020a93147b58d46210497bdd0b
@@ -1,3 +1,26 @@
1
+ ## Rails 4.1.2 (May 27, 2014) ##
2
+
3
+ * Change `asset_path` to use File.join to create proper paths.
4
+
5
+ https://some.host.com//assets/some.js
6
+
7
+ becomes
8
+
9
+ https://some.host.com/assets/some.js
10
+
11
+ *Peter Schröder*
12
+
13
+ * `collection_check_boxes` respects `:index` option for the hidden filed name.
14
+
15
+ Fixes #14147.
16
+
17
+ *Vasiliy Ermolovich*
18
+
19
+ * `date_select` helper with option `with_css_classes: true` does not overwrite other classes.
20
+
21
+ *Izumi Wong-Horiuchi*
22
+
23
+
1
24
  ## Rails 4.1.1 (May 6, 2014) ##
2
25
 
3
26
  * No changes.
@@ -7,8 +7,8 @@ module ActionView
7
7
  module VERSION
8
8
  MAJOR = 4
9
9
  MINOR = 1
10
- TINY = 1
11
- PRE = nil
10
+ TINY = 2
11
+ PRE = "rc1"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
@@ -134,11 +134,11 @@ module ActionView
134
134
 
135
135
  relative_url_root = defined?(config.relative_url_root) && config.relative_url_root
136
136
  if relative_url_root
137
- source = "#{relative_url_root}#{source}" unless source.starts_with?("#{relative_url_root}/")
137
+ source = File.join(relative_url_root, source) unless source.starts_with?("#{relative_url_root}/")
138
138
  end
139
139
 
140
140
  if host = compute_asset_host(source, options)
141
- source = "#{host}#{source}"
141
+ source = File.join(host, source)
142
142
  end
143
143
 
144
144
  "#{source}#{tail}"
@@ -961,7 +961,7 @@ module ActionView
961
961
  :name => input_name_from_type(type)
962
962
  }.merge!(@html_options)
963
963
  select_options[:disabled] = 'disabled' if @options[:disabled]
964
- select_options[:class] = type if @options[:with_css_classes]
964
+ select_options[:class] = [select_options[:class], type].compact.join(' ') if @options[:with_css_classes]
965
965
 
966
966
  select_html = "\n"
967
967
  select_html << content_tag(:option, '', :value => '') + "\n" if @options[:include_blank]
@@ -360,8 +360,8 @@ module ActionView
360
360
  html_attributes = option_html_attributes(element)
361
361
  text, value = option_text_and_value(element).map { |item| item.to_s }
362
362
 
363
- html_attributes[:selected] = option_value_selected?(value, selected)
364
- html_attributes[:disabled] = disabled && option_value_selected?(value, disabled)
363
+ html_attributes[:selected] ||= option_value_selected?(value, selected)
364
+ html_attributes[:disabled] ||= disabled && option_value_selected?(value, disabled)
365
365
  html_attributes[:value] = value
366
366
 
367
367
  content_tag_string(:option, text, html_attributes)
@@ -27,10 +27,7 @@ module ActionView
27
27
 
28
28
  # Append a hidden field to make sure something will be sent back to the
29
29
  # server if all check boxes are unchecked.
30
- hidden_name = @html_options[:name] || "#{tag_name}[]"
31
- hidden = @template_object.hidden_field_tag(hidden_name, "", :id => nil)
32
-
33
- rendered_collection + hidden
30
+ rendered_collection + hidden_field
34
31
  end
35
32
 
36
33
  private
@@ -38,6 +35,18 @@ module ActionView
38
35
  def render_component(builder)
39
36
  builder.check_box + builder.label
40
37
  end
38
+
39
+ def hidden_field
40
+ hidden_name = @html_options[:name]
41
+
42
+ hidden_name ||= if @options.has_key?(:index)
43
+ "#{tag_name_with_index(@options[:index])}[]"
44
+ else
45
+ "#{tag_name}[]"
46
+ end
47
+
48
+ @template_object.hidden_field_tag(hidden_name, "", id: nil)
49
+ end
41
50
  end
42
51
  end
43
52
  end
@@ -181,13 +181,7 @@ module ActionView
181
181
  def query(path, details, formats)
182
182
  query = build_query(path, details)
183
183
 
184
- # deals with case-insensitive file systems.
185
- sanitizer = Hash.new { |h,dir| h[dir] = Dir["#{dir}/*"] }
186
-
187
- template_paths = Dir[query].reject { |filename|
188
- File.directory?(filename) ||
189
- !sanitizer[File.dirname(filename)].include?(filename)
190
- }
184
+ template_paths = find_template_paths query
191
185
 
192
186
  template_paths.map { |template|
193
187
  handler, format, variant = extract_handler_and_format_and_variant(template, formats)
@@ -202,6 +196,26 @@ module ActionView
202
196
  }
203
197
  end
204
198
 
199
+ if RUBY_VERSION >= '2.2.0'
200
+ def find_template_paths(query)
201
+ Dir[query].reject { |filename|
202
+ File.directory?(filename) ||
203
+ # deals with case-insensitive file systems.
204
+ !File.fnmatch(query, filename, File::FNM_EXTGLOB)
205
+ }
206
+ end
207
+ else
208
+ def find_template_paths(query)
209
+ # deals with case-insensitive file systems.
210
+ sanitizer = Hash.new { |h,dir| h[dir] = Dir["#{dir}/*"] }
211
+
212
+ Dir[query].reject { |filename|
213
+ File.directory?(filename) ||
214
+ !sanitizer[File.dirname(filename)].include?(filename)
215
+ }
216
+ end
217
+ end
218
+
205
219
  # Helper for building query glob string based on resolver's pattern.
206
220
  def build_query(path, details)
207
221
  query = @pattern.dup
metadata CHANGED
@@ -1,96 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionview
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.1
5
- prerelease:
4
+ version: 4.1.2.rc1
6
5
  platform: ruby
7
6
  authors:
8
7
  - David Heinemeier Hansson
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-05-06 00:00:00.000000000 Z
11
+ date: 2014-05-27 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activesupport
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - '='
20
18
  - !ruby/object:Gem::Version
21
- version: 4.1.1
19
+ version: 4.1.2.rc1
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - '='
28
25
  - !ruby/object:Gem::Version
29
- version: 4.1.1
26
+ version: 4.1.2.rc1
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: builder
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: '3.1'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: '3.1'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: erubis
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
47
  version: 2.7.0
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
54
  version: 2.7.0
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: actionpack
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - '='
68
60
  - !ruby/object:Gem::Version
69
- version: 4.1.1
61
+ version: 4.1.2.rc1
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - '='
76
67
  - !ruby/object:Gem::Version
77
- version: 4.1.1
68
+ version: 4.1.2.rc1
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: activemodel
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - '='
84
74
  - !ruby/object:Gem::Version
85
- version: 4.1.1
75
+ version: 4.1.2.rc1
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - '='
92
81
  - !ruby/object:Gem::Version
93
- version: 4.1.1
82
+ version: 4.1.2.rc1
94
83
  description: Simple, battle-tested conventions and helpers for building web pages.
95
84
  email: david@loudthinking.com
96
85
  executables: []
@@ -98,8 +87,9 @@ extensions: []
98
87
  extra_rdoc_files: []
99
88
  files:
100
89
  - CHANGELOG.md
101
- - README.rdoc
102
90
  - MIT-LICENSE
91
+ - README.rdoc
92
+ - lib/action_view.rb
103
93
  - lib/action_view/base.rb
104
94
  - lib/action_view/buffers.rb
105
95
  - lib/action_view/context.rb
@@ -107,6 +97,7 @@ files:
107
97
  - lib/action_view/digestor.rb
108
98
  - lib/action_view/flows.rb
109
99
  - lib/action_view/gem_version.rb
100
+ - lib/action_view/helpers.rb
110
101
  - lib/action_view/helpers/active_model_helper.rb
111
102
  - lib/action_view/helpers/asset_tag_helper.rb
112
103
  - lib/action_view/helpers/asset_url_helper.rb
@@ -127,6 +118,7 @@ files:
127
118
  - lib/action_view/helpers/rendering_helper.rb
128
119
  - lib/action_view/helpers/sanitize_helper.rb
129
120
  - lib/action_view/helpers/tag_helper.rb
121
+ - lib/action_view/helpers/tags.rb
130
122
  - lib/action_view/helpers/tags/base.rb
131
123
  - lib/action_view/helpers/tags/check_box.rb
132
124
  - lib/action_view/helpers/tags/checkable.rb
@@ -160,11 +152,9 @@ files:
160
152
  - lib/action_view/helpers/tags/time_zone_select.rb
161
153
  - lib/action_view/helpers/tags/url_field.rb
162
154
  - lib/action_view/helpers/tags/week_field.rb
163
- - lib/action_view/helpers/tags.rb
164
155
  - lib/action_view/helpers/text_helper.rb
165
156
  - lib/action_view/helpers/translation_helper.rb
166
157
  - lib/action_view/helpers/url_helper.rb
167
- - lib/action_view/helpers.rb
168
158
  - lib/action_view/layouts.rb
169
159
  - lib/action_view/locale/en.yml
170
160
  - lib/action_view/log_subscriber.rb
@@ -181,52 +171,50 @@ files:
181
171
  - lib/action_view/rendering.rb
182
172
  - lib/action_view/routing_url_for.rb
183
173
  - lib/action_view/tasks/dependencies.rake
174
+ - lib/action_view/template.rb
184
175
  - lib/action_view/template/error.rb
176
+ - lib/action_view/template/handlers.rb
185
177
  - lib/action_view/template/handlers/builder.rb
186
178
  - lib/action_view/template/handlers/erb.rb
187
179
  - lib/action_view/template/handlers/raw.rb
188
- - lib/action_view/template/handlers.rb
189
180
  - lib/action_view/template/html.rb
190
181
  - lib/action_view/template/resolver.rb
191
182
  - lib/action_view/template/text.rb
192
183
  - lib/action_view/template/types.rb
193
- - lib/action_view/template.rb
194
184
  - lib/action_view/test_case.rb
195
185
  - lib/action_view/testing/resolvers.rb
186
+ - lib/action_view/vendor/html-scanner.rb
196
187
  - lib/action_view/vendor/html-scanner/html/document.rb
197
188
  - lib/action_view/vendor/html-scanner/html/node.rb
198
189
  - lib/action_view/vendor/html-scanner/html/sanitizer.rb
199
190
  - lib/action_view/vendor/html-scanner/html/selector.rb
200
191
  - lib/action_view/vendor/html-scanner/html/tokenizer.rb
201
192
  - lib/action_view/vendor/html-scanner/html/version.rb
202
- - lib/action_view/vendor/html-scanner.rb
203
193
  - lib/action_view/version.rb
204
194
  - lib/action_view/view_paths.rb
205
- - lib/action_view.rb
206
195
  homepage: http://www.rubyonrails.org
207
196
  licenses:
208
197
  - MIT
198
+ metadata: {}
209
199
  post_install_message:
210
200
  rdoc_options: []
211
201
  require_paths:
212
202
  - lib
213
203
  required_ruby_version: !ruby/object:Gem::Requirement
214
- none: false
215
204
  requirements:
216
- - - ! '>='
205
+ - - ">="
217
206
  - !ruby/object:Gem::Version
218
207
  version: 1.9.3
219
208
  required_rubygems_version: !ruby/object:Gem::Requirement
220
- none: false
221
209
  requirements:
222
- - - ! '>='
210
+ - - ">"
223
211
  - !ruby/object:Gem::Version
224
- version: '0'
212
+ version: 1.3.1
225
213
  requirements:
226
214
  - none
227
215
  rubyforge_project:
228
- rubygems_version: 1.8.23.2
216
+ rubygems_version: 2.2.2
229
217
  signing_key:
230
- specification_version: 3
218
+ specification_version: 4
231
219
  summary: Rendering framework putting the V in MVC (part of Rails).
232
220
  test_files: []