jekyll 3.8.0.pre.rc2 → 3.8.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jekyll might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11fddf298655ecad13b88d1e7a5fdd6ee54a8379c8724ad17a5d07dcb895a304
4
- data.tar.gz: 2aa7a239d6bb42e3975e495ee074c999b85d7f6e0e652b349bbd3bc213df973b
3
+ metadata.gz: fd590fa00abc66e1aeafd4bdff3020bb88eff683f76f454cb3fdd95c5a07e2d4
4
+ data.tar.gz: 41bed706beaf0e5ceed8aa6706233ab7e183b5d1409954a1c05e8cd09aeade93
5
5
  SHA512:
6
- metadata.gz: 676bce947226ac467d5d036b181b3f652d4867098a0f3b62ee1405fa737c727c0fc9038dcce3c894ff805a7ca115374a1b1545f662a889cf64c35eda93d3cac2
7
- data.tar.gz: 3322935bfadd96623322592f1c4aeefcdf56dcb4932f02278c90a822370726364fd80e0262f13d4b5e09e49853eca30d61a777e332a32bd612a2e496ff6ea6c9
6
+ metadata.gz: 43f920daab74a63b7ed8cd4cfb9d8c39b786863c815f36e8ac891e3568b063dd4c186eeb2267d79122ff63f04b9da5a8d6ad429915e7bd49d6079f96f6a6cdab
7
+ data.tar.gz: 81e8e732a58e5accf834f343ec846dcf4333e3706ea669844324f1eacdda283a97b019c10d410a3447c76498bf19159d23ac153e3ac49d8e8130be609a8062d1
@@ -49,11 +49,9 @@ Layout/MultilineOperationIndentation:
49
49
  Lint/NestedPercentLiteral:
50
50
  Exclude:
51
51
  - test/test_site.rb
52
- Layout/SpaceInsideBrackets:
53
- Enabled: false
54
52
  Layout/EmptyComment:
55
53
  Enabled: false
56
- Lint/EndAlignment:
54
+ Layout/EndAlignment:
57
55
  Severity: error
58
56
  Lint/UnreachableCode:
59
57
  Severity: error
@@ -3,8 +3,8 @@
3
3
  [![Gem Version](https://img.shields.io/gem/v/jekyll.svg)][ruby-gems]
4
4
  [![Linux Build Status](https://img.shields.io/travis/jekyll/jekyll/master.svg?label=Linux%20build)][travis]
5
5
  [![Windows Build status](https://img.shields.io/appveyor/ci/jekyll/jekyll/master.svg?label=Windows%20build)][appveyor]
6
- [![Test Coverage](https://img.shields.io/codeclimate/coverage/github/jekyll/jekyll.svg)][coverage]
7
- [![Code Climate](https://img.shields.io/codeclimate/github/jekyll/jekyll.svg)][codeclimate]
6
+ [![Maintainability](https://api.codeclimate.com/v1/badges/8ba0cb5b17bb9848e128/maintainability)](codeclimate)
7
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/8ba0cb5b17bb9848e128/test_coverage)](coverage)
8
8
  [![Dependency Status](https://img.shields.io/gemnasium/jekyll/jekyll.svg)][gemnasium]
9
9
  [![Security](https://hakiri.io/github/jekyll/jekyll/master.svg)][hakiri]
10
10
 
@@ -108,13 +108,14 @@ module Jekyll
108
108
 
109
109
  if scope["path"].to_s.include?("*")
110
110
  Dir.glob(abs_scope_path).each do |scope_path|
111
- scope_path = Pathname.new(scope_path).relative_path_from site_path
111
+ scope_path = Pathname.new(scope_path).relative_path_from(site_path)
112
+ scope_path = strip_collections_dir(scope_path)
112
113
  Jekyll.logger.debug "Globbed Scope Path:", scope_path
113
114
  return true if path_is_subpath?(sanitized_path, scope_path)
114
115
  end
115
116
  false
116
117
  else
117
- path_is_subpath?(sanitized_path, rel_scope_path)
118
+ path_is_subpath?(sanitized_path, strip_collections_dir(rel_scope_path))
118
119
  end
119
120
  end
120
121
  # rubocop:enable Metrics/AbcSize
@@ -129,6 +130,13 @@ module Jekyll
129
130
  false
130
131
  end
131
132
 
133
+ def strip_collections_dir(path)
134
+ collections_dir = @site.config["collections_dir"]
135
+ slashed_coll_dir = "#{collections_dir}/"
136
+ return path if collections_dir.empty? || !path.to_s.start_with?(slashed_coll_dir)
137
+ path.sub(slashed_coll_dir, "")
138
+ end
139
+
132
140
  # Determines whether the scope applies to type.
133
141
  # The scope applies to the type if:
134
142
  # 1. no 'type' is specified
@@ -65,23 +65,24 @@ MSG
65
65
 
66
66
  private
67
67
 
68
+ OPTIONS_REGEX = %r!(?:\w="[^"]*"|\w=\w|\w)+!
69
+
68
70
  def parse_options(input)
69
71
  options = {}
70
- unless input.empty?
71
- # Split along 3 possible forms -- key="<quoted list>", key=value, or key
72
- input.scan(%r!(?:\w="[^"]*"|\w=\w|\w)+!) do |opt|
73
- key, value = opt.split("=")
74
- # If a quoted list, convert to array
75
- if value && value.include?("\"")
76
- value.delete!('"')
77
- value = value.split
78
- end
79
- options[key.to_sym] = value || true
72
+ return options if input.empty?
73
+
74
+ # Split along 3 possible forms -- key="<quoted list>", key=value, or key
75
+ input.scan(OPTIONS_REGEX) do |opt|
76
+ key, value = opt.split("=")
77
+ # If a quoted list, convert to array
78
+ if value && value.include?('"')
79
+ value.delete!('"')
80
+ value = value.split
80
81
  end
82
+ options[key.to_sym] = value || true
81
83
  end
82
- if options.key?(:linenos) && options[:linenos] == true
83
- options[:linenos] = "inline"
84
- end
84
+
85
+ options[:linenos] = "inline" if options[:linenos] == true
85
86
  options
86
87
  end
87
88
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Jekyll
4
- VERSION = "3.8.0.pre.rc2".freeze
4
+ VERSION = "3.8.0".freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.0.pre.rc2
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Preston-Werner
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-12 00:00:00.000000000 Z
11
+ date: 2018-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -323,9 +323,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
323
323
  version: 2.1.0
324
324
  required_rubygems_version: !ruby/object:Gem::Requirement
325
325
  requirements:
326
- - - ">"
326
+ - - ">="
327
327
  - !ruby/object:Gem::Version
328
- version: 1.3.1
328
+ version: '0'
329
329
  requirements: []
330
330
  rubyforge_project:
331
331
  rubygems_version: 2.7.3