jekyll 4.0.0.pre.beta1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 557bf944b97df515f8ac16b41b21317a4361fa27e45c44d63ea8579e14a8188e
4
- data.tar.gz: 436685ee32413cf98111372ca82f1f39d38f549cc2cf482c86a1aba53e627b93
3
+ metadata.gz: 3d628ad7c78b42c6430f0fa42153b0039881f581d1151678cb2d99a5256f0628
4
+ data.tar.gz: 22a33c4249c92f5ce5e75d60420c11df71852a58b64a254ddb53c6ffec4f3ce9
5
5
  SHA512:
6
- metadata.gz: 76c7cfa113e1a0741584a34be45ed4380e57250d1829d905d4aa1bba33ec06d6e1debf02a474ab36aca8f65ff1f4fca9cb97ce06c52e74715327267bb2bb5345
7
- data.tar.gz: 4f25d89074b8aae2dfdcad4a56246b7541137e5a226040898e13b0f610acce79e8d8aaee0c63ea7aae185d09156b85643269440d6a02bc59dac8e2d26033e4af
6
+ metadata.gz: 68b602c0af4b2e2540584f3bf6210f07363d51b50a484d5134f8c69d38a7f5893fe130f6e63218e36e2f3a6e05a54eb8a46c220540a852cdc2417d8e0b24fb1d
7
+ data.tar.gz: ab9c8776960d49245f22c6b5b759e2928cd77338a592374c14357e561c1525f1f6720e10c8bdecf0d3bb5c1231bb823ad9cd40fb6038a9c7198572f9879a1ba8
@@ -190,7 +190,7 @@ module Jekyll
190
190
  end
191
191
 
192
192
  # Conditional optimizations
193
- Jekyll::External.require_if_present("liquid-c")
193
+ Jekyll::External.require_if_present("liquid/c")
194
194
  end
195
195
  end
196
196
 
@@ -80,13 +80,13 @@ module Jekyll
80
80
  # Happy Jekylling!
81
81
  gem "jekyll", "~> #{Jekyll::VERSION}"
82
82
  # This is the default theme for new Jekyll sites. You may change this to anything you like.
83
- gem "minima", "~> 2.0"
83
+ gem "minima", "~> 2.5"
84
84
  # If you want to use GitHub Pages, remove the "gem "jekyll"" above and
85
85
  # uncomment the line below. To upgrade, run `bundle update github-pages`.
86
86
  # gem "github-pages", group: :jekyll_plugins
87
87
  # If you have any plugins, put them here!
88
88
  group :jekyll_plugins do
89
- gem "jekyll-feed", "~> 0.6"
89
+ gem "jekyll-feed", "~> 0.12"
90
90
  end
91
91
 
92
92
  # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
@@ -4,7 +4,7 @@ module Jekyll
4
4
  class Configuration < Hash
5
5
  # Default options. Overridden by values in _config.yml.
6
6
  # Strings rather than symbols are used for compatibility with YAML.
7
- DEFAULTS = Configuration[{
7
+ DEFAULTS = {
8
8
  # Where things are
9
9
  "source" => Dir.pwd,
10
10
  "destination" => File.join(Dir.pwd, "_site"),
@@ -75,7 +75,7 @@ module Jekyll
75
75
  "footnote_nr" => 1,
76
76
  "show_warnings" => false,
77
77
  },
78
- }.map { |k, v| [k, v.freeze] }].freeze
78
+ }.each_with_object(Configuration.new) { |(k, v), hsh| hsh[k] = v.freeze }.freeze
79
79
 
80
80
  class << self
81
81
  # Static: Produce a Configuration ready for use in a Site.
@@ -94,7 +94,7 @@ module Jekyll
94
94
  #
95
95
  # Return a copy of the hash where all its keys are strings
96
96
  def stringify_keys
97
- reduce({}) { |hsh, (k, v)| hsh.merge(k.to_s => v) }
97
+ each_with_object({}) { |(k, v), hsh| hsh[k.to_s] = v }
98
98
  end
99
99
 
100
100
  def get_config_value_with_override(config_key, override)
@@ -235,7 +235,9 @@ module Jekyll
235
235
 
236
236
  # Ensure we have a hash.
237
237
  if config["collections"].is_a?(Array)
238
- config["collections"] = Hash[config["collections"].map { |c| [c, {}] }]
238
+ config["collections"] = config["collections"].each_with_object({}) do |collection, hash|
239
+ hash[collection] = {}
240
+ end
239
241
  end
240
242
 
241
243
  config["collections"] = Utils.deep_merge_hashes(
@@ -112,9 +112,10 @@ module Jekyll
112
112
  #
113
113
  # Returns the Hash representation of this Convertible.
114
114
  def to_liquid(attrs = nil)
115
- further_data = Hash[(attrs || self.class::ATTRIBUTES_FOR_LIQUID).map do |attribute|
116
- [attribute, send(attribute)]
117
- end]
115
+ further_data = \
116
+ (attrs || self.class::ATTRIBUTES_FOR_LIQUID).each_with_object({}) do |attribute, hsh|
117
+ hsh[attribute] = send(attribute)
118
+ end
118
119
 
119
120
  defaults = site.frontmatter_defaults.all(relative_path, type)
120
121
  Utils.deep_merge_hashes defaults, Utils.deep_merge_hashes(data, further_data)
@@ -125,7 +125,7 @@ module Jekyll
125
125
  private
126
126
 
127
127
  def fallback_data
128
- {}
128
+ @fallback_data ||= {}
129
129
  end
130
130
  end
131
131
  end
@@ -53,7 +53,7 @@ module Jekyll
53
53
  end
54
54
 
55
55
  def backup?(entry)
56
- entry[-1..-1] == "~"
56
+ entry.end_with?("~")
57
57
  end
58
58
 
59
59
  def excluded?(entry)
@@ -372,7 +372,7 @@ module Jekyll
372
372
  # return numeric values as numbers for proper sorting
373
373
  def parse_sort_input(property)
374
374
  number_like = %r!\A\s*-?(?:\d+\.?\d*|\.\d+)\s*\Z!
375
- return property.to_f if property =~ number_like
375
+ return property.to_f if property.to_s =~ number_like
376
376
 
377
377
  property
378
378
  end
@@ -10,72 +10,29 @@ module Jekyll
10
10
  end
11
11
 
12
12
  def to_s(num_of_rows = 50)
13
- data = data_for_table(num_of_rows)
14
- widths = table_widths(data)
15
- generate_table(data, widths)
13
+ tabulate(data_for_table(num_of_rows))
16
14
  end
17
15
 
18
16
  private
19
17
 
20
- def generate_table(data, widths)
21
- str = +"\n"
22
-
23
- table_head = data.shift
24
- table_foot = data.pop
25
-
26
- str << generate_row(table_head, widths)
27
- str << generate_table_head_border(table_head, widths)
28
-
29
- data.each do |row_data|
30
- str << generate_row(row_data, widths)
31
- end
32
-
33
- str << generate_table_head_border(table_foot, widths)
34
- str << generate_row(table_foot, widths).rstrip
35
-
36
- str << "\n"
37
- str
38
- end
39
-
40
- def generate_table_head_border(row_data, widths)
41
- str = +""
42
-
43
- row_data.each_index do |cell_index|
44
- str << "-" * widths[cell_index]
45
- str << "-+-" unless cell_index == row_data.length - 1
46
- end
47
-
48
- str << "\n"
49
- str
50
- end
51
-
52
- def generate_row(row_data, widths)
53
- str = +""
54
-
55
- row_data.each_with_index do |cell_data, cell_index|
56
- str << if cell_index.zero?
57
- cell_data.ljust(widths[cell_index], " ")
58
- else
59
- cell_data.rjust(widths[cell_index], " ")
60
- end
61
-
62
- str << " | " unless cell_index == row_data.length - 1
63
- end
64
-
65
- str << "\n"
66
- str
67
- end
68
-
69
- def table_widths(data)
70
- widths = []
71
-
72
- data.each do |row|
73
- row.each_with_index do |cell, index|
74
- widths[index] = [cell.length, widths[index]].compact.max
75
- end
18
+ def tabulate(data)
19
+ require "terminal-table"
20
+
21
+ header = data.shift
22
+ footer = data.pop
23
+ output = +"\n"
24
+
25
+ table = Terminal::Table.new do |t|
26
+ t << header
27
+ t << :separator
28
+ data.each { |row| t << row }
29
+ t << :separator
30
+ t << footer
31
+ t.style = { :alignment => :right, :border_top => false, :border_bottom => false }
32
+ t.align_column(0, :left)
76
33
  end
77
34
 
78
- widths
35
+ output << table.to_s << "\n"
79
36
  end
80
37
 
81
38
  # rubocop:disable Metrics/AbcSize
@@ -145,9 +145,9 @@ module Jekyll
145
145
  #
146
146
  # Returns a Hash containing collection name-to-instance pairs.
147
147
  def collections
148
- @collections ||= Hash[collection_names.map do |coll|
149
- [coll, Jekyll::Collection.new(self, coll)]
150
- end]
148
+ @collections ||= collection_names.each_with_object({}) do |name, hsh|
149
+ hsh[name] = Jekyll::Collection.new(self, name)
150
+ end
151
151
  end
152
152
 
153
153
  # The list of collection names.
@@ -10,7 +10,6 @@ module Jekyll
10
10
  @name = name.downcase.strip
11
11
  Jekyll.logger.debug "Theme:", name
12
12
  Jekyll.logger.debug "Theme source:", root
13
- configure_sass
14
13
  end
15
14
 
16
15
  def root
@@ -38,13 +37,6 @@ module Jekyll
38
37
  @assets_path ||= path_for "assets"
39
38
  end
40
39
 
41
- def configure_sass
42
- return unless sass_path
43
-
44
- External.require_with_graceful_fail("sass") unless defined?(Sass)
45
- Sass.load_paths << sass_path
46
- end
47
-
48
40
  def runtime_dependencies
49
41
  gemspec.runtime_dependencies
50
42
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Jekyll
4
- VERSION = "4.0.0.pre.beta1"
4
+ VERSION = "4.0.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.pre.beta1
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Preston-Werner
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2019-08-04 00:00:00.000000000 Z
13
+ date: 2019-08-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable
@@ -80,14 +80,14 @@ dependencies:
80
80
  requirements:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: '1.0'
83
+ version: '2.0'
84
84
  type: :runtime
85
85
  prerelease: false
86
86
  version_requirements: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '1.0'
90
+ version: '2.0'
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: jekyll-watch
93
93
  requirement: !ruby/object:Gem::Requirement
@@ -200,6 +200,20 @@ dependencies:
200
200
  - - "~>"
201
201
  - !ruby/object:Gem::Version
202
202
  version: '1.0'
203
+ - !ruby/object:Gem::Dependency
204
+ name: terminal-table
205
+ requirement: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - "~>"
208
+ - !ruby/object:Gem::Version
209
+ version: '1.8'
210
+ type: :runtime
211
+ prerelease: false
212
+ version_requirements: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - "~>"
215
+ - !ruby/object:Gem::Version
216
+ version: '1.8'
203
217
  description: Jekyll is a simple, blog aware, static site generator.
204
218
  email:
205
219
  - maintainers@jekyllrb.com
@@ -339,9 +353,8 @@ metadata:
339
353
  source_code_uri: https://github.com/jekyll/jekyll
340
354
  post_install_message: |
341
355
  -------------------------------------------------------------------------------------
342
- This version of Jekyll comes with some major changes.
356
+ Jekyll 4.0 comes with some major changes, notably:
343
357
 
344
- Most notably:
345
358
  * Our `link` tag now comes with the `relative_url` filter incorporated into it.
346
359
  You should no longer prepend `{{ site.baseurl }}` to `{% link foo.md %}`
347
360
  For further details: https://github.com/jekyll/jekyll/pull/6727