jekyll-last-modified-at 0.3.2 → 0.3.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1217c3ccb3f6a4d7903489ce9c6f3313d7f00b6
|
4
|
+
data.tar.gz: 09f8ccd79f8eda5dcdf2fe22f6c8bfdac0380e37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3d1ea10e2da0a710e31e2eefcdf2cad463ced5bdf7a746a4846f0fdbe12b9aa9949334d54679675313ad3421b09e5f4115ca66e4f7fb6be85b5ad78a1e470bc
|
7
|
+
data.tar.gz: 05c6c0da4237227a7b79e8e605a106f975cbafdaba6f87b1514546adbec2704984dff5d790a28320b584c48e65d84f8736fb14965b9d5b777276eaeb4fb43f5e
|
@@ -9,15 +9,19 @@ module Jekyll
|
|
9
9
|
@opts = opts
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
12
|
+
def formatted_last_modified_date
|
13
|
+
last_modified_at_time.strftime(format)
|
14
|
+
end
|
15
|
+
|
16
|
+
def last_modified_at_time
|
13
17
|
unless File.exists? absolute_path_to_article
|
14
18
|
raise Errno::ENOENT, "#{absolute_path_to_article} does not exist!"
|
15
19
|
end
|
16
20
|
|
17
|
-
Time.at(
|
21
|
+
Time.at(last_modified_at_unix.to_i)
|
18
22
|
end
|
19
23
|
|
20
|
-
def
|
24
|
+
def last_modified_at_unix
|
21
25
|
if is_git_repo?(site_source)
|
22
26
|
last_commit_date = Executor.sh(
|
23
27
|
'git',
|
@@ -35,8 +39,12 @@ module Jekyll
|
|
35
39
|
end
|
36
40
|
end
|
37
41
|
|
42
|
+
def to_s
|
43
|
+
@to_s ||= formatted_last_modified_date
|
44
|
+
end
|
45
|
+
|
38
46
|
def to_liquid
|
39
|
-
@to_liquid ||=
|
47
|
+
@to_liquid ||= last_modified_at_time
|
40
48
|
end
|
41
49
|
|
42
50
|
def format
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-last-modified-at
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen J. Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|