Rubocop: Style/LineEndConcatenation
- Use \ instead of + or << to concatenate those strings
This commit is contained in:
		
							parent
							
								
									44d2995277
								
							
						
					
					
						commit
						0eae36aec2
					
				|  | @ -39,8 +39,8 @@ module Jekyll | ||||||
| 
 | 
 | ||||||
|         def deprecated_relative_permalinks(site) |         def deprecated_relative_permalinks(site) | ||||||
|           if site.config['relative_permalinks'] |           if site.config['relative_permalinks'] | ||||||
|             Jekyll::Deprecator.deprecation_message "Your site still uses relative" + |             Jekyll::Deprecator.deprecation_message "Your site still uses relative" \ | ||||||
|                                 " permalinks, which was removed in" + |                                 " permalinks, which was removed in" \ | ||||||
|                                 " Jekyll v3.0.0." |                                 " Jekyll v3.0.0." | ||||||
|             return true |             return true | ||||||
|           end |           end | ||||||
|  | @ -54,7 +54,7 @@ module Jekyll | ||||||
|           urls.each do |url, paths| |           urls.each do |url, paths| | ||||||
|             if paths.size > 1 |             if paths.size > 1 | ||||||
|               conflicting_urls = true |               conflicting_urls = true | ||||||
|               Jekyll.logger.warn "Conflict:", "The URL '#{url}' is the destination" + |               Jekyll.logger.warn "Conflict:", "The URL '#{url}' is the destination" \ | ||||||
|                 " for the following pages: #{paths.join(", ")}" |                 " for the following pages: #{paths.join(", ")}" | ||||||
|             end |             end | ||||||
|           end |           end | ||||||
|  | @ -83,8 +83,8 @@ module Jekyll | ||||||
|           urls.each do |case_insensitive_url, real_urls| |           urls.each do |case_insensitive_url, real_urls| | ||||||
|             if real_urls.uniq.size > 1 |             if real_urls.uniq.size > 1 | ||||||
|               urls_only_differ_by_case = true |               urls_only_differ_by_case = true | ||||||
|               Jekyll.logger.warn "Warning:", "The following URLs only differ" + |               Jekyll.logger.warn "Warning:", "The following URLs only differ" \ | ||||||
|                 " by case. On a case-insensitive file system one of the URLs" + |                 " by case. On a case-insensitive file system one of the URLs" \ | ||||||
|                 " will be overwritten by the other: #{real_urls.join(", ")}" |                 " will be overwritten by the other: #{real_urls.join(", ")}" | ||||||
|             end |             end | ||||||
|           end |           end | ||||||
|  |  | ||||||
|  | @ -173,7 +173,7 @@ module Jekyll | ||||||
|           configuration = Utils.deep_merge_hashes(configuration, new_config) |           configuration = Utils.deep_merge_hashes(configuration, new_config) | ||||||
|         end |         end | ||||||
|       rescue ArgumentError => err |       rescue ArgumentError => err | ||||||
|         Jekyll.logger.warn "WARNING:", "Error reading configuration. " + |         Jekyll.logger.warn "WARNING:", "Error reading configuration. " \ | ||||||
|                      "Using defaults (and options)." |                      "Using defaults (and options)." | ||||||
|         $stderr.puts "#{err}" |         $stderr.puts "#{err}" | ||||||
|       end |       end | ||||||
|  | @ -198,16 +198,16 @@ module Jekyll | ||||||
|       config = clone |       config = clone | ||||||
|       # Provide backwards-compatibility |       # Provide backwards-compatibility | ||||||
|       if config.key?('auto') || config.key?('watch') |       if config.key?('auto') || config.key?('watch') | ||||||
|         Jekyll::Deprecator.deprecation_message "Auto-regeneration can no longer" + |         Jekyll::Deprecator.deprecation_message "Auto-regeneration can no longer" \ | ||||||
|                             " be set from your configuration file(s). Use the"+ |                             " be set from your configuration file(s). Use the"\ | ||||||
|                             " --[no-]watch/-w command-line option instead." |                             " --[no-]watch/-w command-line option instead." | ||||||
|         config.delete('auto') |         config.delete('auto') | ||||||
|         config.delete('watch') |         config.delete('watch') | ||||||
|       end |       end | ||||||
| 
 | 
 | ||||||
|       if config.key? 'server' |       if config.key? 'server' | ||||||
|         Jekyll::Deprecator.deprecation_message "The 'server' configuration option" + |         Jekyll::Deprecator.deprecation_message "The 'server' configuration option" \ | ||||||
|                             " is no longer accepted. Use the 'jekyll serve'" + |                             " is no longer accepted. Use the 'jekyll serve'" \ | ||||||
|                             " subcommand to serve your site with WEBrick." |                             " subcommand to serve your site with WEBrick." | ||||||
|         config.delete('server') |         config.delete('server') | ||||||
|       end |       end | ||||||
|  | @ -218,9 +218,9 @@ module Jekyll | ||||||
|       renamed_key 'data_source', 'data_dir', config |       renamed_key 'data_source', 'data_dir', config | ||||||
| 
 | 
 | ||||||
|       if config.key? 'pygments' |       if config.key? 'pygments' | ||||||
|         Jekyll::Deprecator.deprecation_message "The 'pygments' configuration option" + |         Jekyll::Deprecator.deprecation_message "The 'pygments' configuration option" \ | ||||||
|                             " has been renamed to 'highlighter'. Please update your" + |                             " has been renamed to 'highlighter'. Please update your" \ | ||||||
|                             " config file accordingly. The allowed values are 'rouge', " + |                             " config file accordingly. The allowed values are 'rouge', " \ | ||||||
|                             "'pygments' or null." |                             "'pygments' or null." | ||||||
| 
 | 
 | ||||||
|         config['highlighter'] = 'pygments' if config['pygments'] |         config['highlighter'] = 'pygments' if config['pygments'] | ||||||
|  | @ -230,9 +230,9 @@ module Jekyll | ||||||
|       %w[include exclude].each do |option| |       %w[include exclude].each do |option| | ||||||
|         config[option] ||= [] |         config[option] ||= [] | ||||||
|         if config[option].is_a?(String) |         if config[option].is_a?(String) | ||||||
|           Jekyll::Deprecator.deprecation_message "The '#{option}' configuration option" + |           Jekyll::Deprecator.deprecation_message "The '#{option}' configuration option" \ | ||||||
|             " must now be specified as an array, but you specified" + |             " must now be specified as an array, but you specified" \ | ||||||
|             " a string. For now, we've treated the string you provided" + |             " a string. For now, we've treated the string you provided" \ | ||||||
|             " as a list of comma-separated values." |             " as a list of comma-separated values." | ||||||
|           config[option] = csv_to_array(config[option]) |           config[option] = csv_to_array(config[option]) | ||||||
|         end |         end | ||||||
|  | @ -240,16 +240,16 @@ module Jekyll | ||||||
|       end |       end | ||||||
| 
 | 
 | ||||||
|       if (config['kramdown'] || {}).key?('use_coderay') |       if (config['kramdown'] || {}).key?('use_coderay') | ||||||
|         Jekyll::Deprecator.deprecation_message "Please change 'use_coderay'" + |         Jekyll::Deprecator.deprecation_message "Please change 'use_coderay'" \ | ||||||
|           " to 'enable_coderay' in your configuration file." |           " to 'enable_coderay' in your configuration file." | ||||||
|         config['kramdown']['use_coderay'] = config['kramdown'].delete('enable_coderay') |         config['kramdown']['use_coderay'] = config['kramdown'].delete('enable_coderay') | ||||||
|       end |       end | ||||||
| 
 | 
 | ||||||
|       if config.fetch('markdown', 'kramdown').to_s.downcase.eql?("maruku") |       if config.fetch('markdown', 'kramdown').to_s.downcase.eql?("maruku") | ||||||
|         Jekyll.logger.abort_with "Error:", "You're using the 'maruku' " + |         Jekyll.logger.abort_with "Error:", "You're using the 'maruku' " \ | ||||||
|           "Markdown processor, which has been removed as of 3.0.0. " + |           "Markdown processor, which has been removed as of 3.0.0. " \ | ||||||
|           "We recommend you switch to Kramdown. To do this, replace " + |           "We recommend you switch to Kramdown. To do this, replace " \ | ||||||
|           "`markdown: maruku` with `markdown: kramdown` in your " + |           "`markdown: maruku` with `markdown: kramdown` in your " \ | ||||||
|           "`_config.yml` file." |           "`_config.yml` file." | ||||||
|       end |       end | ||||||
| 
 | 
 | ||||||
|  | @ -260,7 +260,7 @@ module Jekyll | ||||||
|       config = clone |       config = clone | ||||||
| 
 | 
 | ||||||
|       if config.key?('paginate') && (!config['paginate'].is_a?(Integer) || config['paginate'] < 1) |       if config.key?('paginate') && (!config['paginate'].is_a?(Integer) || config['paginate'] < 1) | ||||||
|         Jekyll.logger.warn "Config Warning:", "The `paginate` key must be a" + |         Jekyll.logger.warn "Config Warning:", "The `paginate` key must be a" \ | ||||||
|           " positive integer or nil. It's currently set to '#{config['paginate'].inspect}'." |           " positive integer or nil. It's currently set to '#{config['paginate'].inspect}'." | ||||||
|         config['paginate'] = nil |         config['paginate'] = nil | ||||||
|       end |       end | ||||||
|  | @ -285,8 +285,8 @@ module Jekyll | ||||||
| 
 | 
 | ||||||
|     def renamed_key(old, new, config, allowed_values = nil) |     def renamed_key(old, new, config, allowed_values = nil) | ||||||
|       if config.key?(old) |       if config.key?(old) | ||||||
|         Jekyll::Deprecator.deprecation_message "The '#{old}' configuration" + |         Jekyll::Deprecator.deprecation_message "The '#{old}' configuration" \ | ||||||
|           "option has been renamed to '#{new}'. Please update your config " + |           "option has been renamed to '#{new}'. Please update your config " \ | ||||||
|           "file accordingly." |           "file accordingly." | ||||||
|         config[new] = config.delete(old) |         config[new] = config.delete(old) | ||||||
|       end |       end | ||||||
|  |  | ||||||
|  | @ -234,7 +234,7 @@ module Jekyll | ||||||
|         when nils == "last" |         when nils == "last" | ||||||
|           order = + 1 |           order = + 1 | ||||||
|         else |         else | ||||||
|           raise ArgumentError.new("Invalid nils order: " + |           raise ArgumentError.new("Invalid nils order: " \ | ||||||
|             "'#{nils}' is not a valid nils order. It must be 'first' or 'last'.") |             "'#{nils}' is not a valid nils order. It must be 'first' or 'last'.") | ||||||
|         end |         end | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -67,7 +67,7 @@ module Jekyll | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       unless @registry[owner][event] |       unless @registry[owner][event] | ||||||
|         raise NotAvailable, "Invalid hook. #{owner} supports only the " << |         raise NotAvailable, "Invalid hook. #{owner} supports only the " \ | ||||||
|           "following hooks #{@registry[owner].keys.inspect}" |           "following hooks #{@registry[owner].keys.inspect}" | ||||||
|       end |       end | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -86,8 +86,8 @@ module Jekyll | ||||||
|     def deprecation_checks |     def deprecation_checks | ||||||
|       pagination_included = (site.config['gems'] || []).include?('jekyll-paginate') || defined?(Jekyll::Paginate) |       pagination_included = (site.config['gems'] || []).include?('jekyll-paginate') || defined?(Jekyll::Paginate) | ||||||
|       if site.config['paginate'] && !pagination_included |       if site.config['paginate'] && !pagination_included | ||||||
|         Jekyll::Deprecator.deprecation_message "You appear to have pagination " + |         Jekyll::Deprecator.deprecation_message "You appear to have pagination " \ | ||||||
|           "turned on, but you haven't included the `jekyll-paginate` gem. " + |           "turned on, but you haven't included the `jekyll-paginate` gem. " \ | ||||||
|           "Ensure you have `gems: [jekyll-paginate]` in your configuration file." |           "Ensure you have `gems: [jekyll-paginate]` in your configuration file." | ||||||
|       end |       end | ||||||
|     end |     end | ||||||
|  |  | ||||||
|  | @ -292,10 +292,10 @@ module Jekyll | ||||||
|     # Returns |     # Returns | ||||||
|     def relative_permalinks_are_deprecated |     def relative_permalinks_are_deprecated | ||||||
|       if config['relative_permalinks'] |       if config['relative_permalinks'] | ||||||
|         Jekyll.logger.abort_with "Since v3.0, permalinks for pages" + |         Jekyll.logger.abort_with "Since v3.0, permalinks for pages" \ | ||||||
|                                 " in subfolders must be relative to the" + |                                 " in subfolders must be relative to the" \ | ||||||
|                                 " site source directory, not the parent" + |                                 " site source directory, not the parent" \ | ||||||
|                                 " directory. Check http://jekyllrb.com/docs/upgrading/"+ |                                 " directory. Check http://jekyllrb.com/docs/upgrading/"\ | ||||||
|                                 " for more info." |                                 " for more info." | ||||||
|       end |       end | ||||||
|     end |     end | ||||||
|  |  | ||||||
|  | @ -88,7 +88,7 @@ eos | ||||||
|           puts |           puts | ||||||
|           Jekyll.logger.error code |           Jekyll.logger.error code | ||||||
|           puts |           puts | ||||||
|           Jekyll.logger.error "While attempting to convert the above code, Pygments.rb" + |           Jekyll.logger.error "While attempting to convert the above code, Pygments.rb" \ | ||||||
|             " returned an unacceptable value." |             " returned an unacceptable value." | ||||||
|           Jekyll.logger.error "This is usually a timeout problem solved by running `jekyll build` again." |           Jekyll.logger.error "This is usually a timeout problem solved by running `jekyll build` again." | ||||||
|           raise ArgumentError.new("Pygments.rb returned an unacceptable value when attempting to highlight some code.") |           raise ArgumentError.new("Pygments.rb returned an unacceptable value when attempting to highlight some code.") | ||||||
|  |  | ||||||
|  | @ -70,9 +70,9 @@ eos | ||||||
| 
 | 
 | ||||||
|         site.posts.docs.each do |p| |         site.posts.docs.each do |p| | ||||||
|           if @post.deprecated_equality p |           if @post.deprecated_equality p | ||||||
|             Jekyll::Deprecator.deprecation_message "A call to '{{ post_url #{@post.name} }}' did not match " + |             Jekyll::Deprecator.deprecation_message "A call to '{{ post_url #{@post.name} }}' did not match " \ | ||||||
|               "a post using the new matching method of checking name " + |               "a post using the new matching method of checking name " \ | ||||||
|               "(path-date-slug) equality. Please make sure that you " + |               "(path-date-slug) equality. Please make sure that you " \ | ||||||
|               "change this tag to match the post's name exactly." |               "change this tag to match the post's name exactly." | ||||||
|             return p.url |             return p.url | ||||||
|           end |           end | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue