jekyll-last-modified 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f47e0601cefb896369bac29cb594fadd2647f9c953bffd3c4b3b3bbc64e9b770
4
- data.tar.gz: 7d97a4177607ff4360d21559ace39bfc59e0205895e6ad6570e21aca0143aa9d
3
+ metadata.gz: 4be742904ecb10d151c7180bd1388c2d4582aad9e5e03aa7c2d548773378adc7
4
+ data.tar.gz: 65f3395beb4de1a5e8abb742c50b19d2499b807c987e053bd74388945a43f2f7
5
5
  SHA512:
6
- metadata.gz: cc8b09475d9272ee8336429619fcc811e443a40273ef8c3ce2f7dbfb0d304d703f9780ebc72e373fe6cf383b1f43b5bce7246ca315344790c43b544c303d8455
7
- data.tar.gz: 17e32abb23844638dc404325ee64834a61dcc71f1343dbe1ced216c83d3605f47fff0059f54e6ad10ed9dfce681ad3dfbd07d14eb90b1fdbf1cb860f0fe9a3e9
6
+ metadata.gz: 47bf13b2c85e7e15c4508e0548d2aad56eb0f9b0b31d7445e2c3154f504dc6bd495bd59efc9880c439deb45a2f7a52eca4b89f30b11749fdf194c3505c5dca53
7
+ data.tar.gz: 511a5cab6fb907b78750a9d586afccaa273541451b94f5eda7de5561e83f14f4f5c0530ec6f7c25a19efafcd859e41766bc92584de47a179641dc9e8a1f0cd7d
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "jekyll-last-modified"
7
- spec.version = '1.0.0'
7
+ spec.version = '1.0.1'
8
8
  spec.authors = ["iBug"]
9
9
  spec.email = ["i@ibugone.com"]
10
10
  spec.summary = %q{Set page date from Git database}
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_dependency "jekyll", '>= 3.0'
20
+ spec.add_dependency "jekyll", '>= 3.5'
21
21
 
22
22
  spec.add_development_dependency "bundler", "~> 1.6"
23
23
  spec.add_development_dependency "shoulda"
@@ -3,6 +3,7 @@ require 'rbconfig'
3
3
  module Jekyll
4
4
  module LastModified
5
5
  class Generator < Jekyll::Generator
6
+ VERSION = '1.0.1'
6
7
 
7
8
  safe true
8
9
 
@@ -10,6 +11,7 @@ module Jekyll
10
11
  raise "Git is not installed" unless git_installed?
11
12
 
12
13
  Dir.chdir(site.source) do
14
+ base_path = site.config['collections_dir']
13
15
  data = load_git_metadata(site)
14
16
  site.config['git'] = data['site_data']
15
17
  jekyll_items(site).each do |page|
@@ -17,6 +19,7 @@ module Jekyll
17
19
  path = page.path
18
20
  else
19
21
  path = page.relative_path
22
+ path = File.join base_path, path if base_path
20
23
  end
21
24
  page.data['git'] = data['pages_data'][path]
22
25
  unless page.data['git'].nil?
@@ -40,12 +43,14 @@ module Jekyll
40
43
  return JSON.parse(IO.read(cache_file))
41
44
  end
42
45
 
46
+ base_path = site.config['collections_dir']
43
47
  pages_data = {}
44
48
  jekyll_items(site).each do |page|
45
49
  if page.is_a?(Jekyll::Page)
46
50
  path = page.path
47
51
  else
48
52
  path = page.relative_path
53
+ path = File.join base_path, path if base_path
49
54
  end
50
55
  pages_data[path] = page_data(path)
51
56
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-last-modified
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - iBug
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-21 00:00:00.000000000 Z
11
+ date: 2020-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.0'
19
+ version: '3.5'
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: '3.0'
26
+ version: '3.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  requirements: []
103
- rubygems_version: 3.0.4
103
+ rubygems_version: 3.1.3
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Set page date from Git database