jekyll-last-modified-at 0.3.2 → 0.3.3

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
  SHA1:
3
- metadata.gz: 65e24940002184996cba7d2ac55bcd9f23615164
4
- data.tar.gz: 0754e42cf000393d9e76b1e02b8da51256e7453e
3
+ metadata.gz: c1217c3ccb3f6a4d7903489ce9c6f3313d7f00b6
4
+ data.tar.gz: 09f8ccd79f8eda5dcdf2fe22f6c8bfdac0380e37
5
5
  SHA512:
6
- metadata.gz: de86cb53ccc5e6d1aa9dd8442108c99c3a8f30aeacea3b80b0283dedf8c30cd83da5ce865d8592537accc2e57f0fc2f475395a07018a79c3ec3608be0e8129ee
7
- data.tar.gz: e1f29afcc63909e78f701a9c349a76c58268083ceea1adcf601c9ec72ec6c611cc857f7c5dc35e2948ab815309027d922c3fe53badfd27ebd3eb7128689f0281
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 last_modified_at_date
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(last_modified_time.to_i).strftime(format)
21
+ Time.at(last_modified_at_unix.to_i)
18
22
  end
19
23
 
20
- def last_modified_time
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 ||= last_modified_at_date
47
+ @to_liquid ||= last_modified_at_time
40
48
  end
41
49
 
42
50
  def format
@@ -12,7 +12,7 @@ module Jekyll
12
12
 
13
13
  Determinator.new(site_source, article_file, {
14
14
  "format" => @format
15
- }).last_modified_at_date
15
+ }).formatted_last_modified_date
16
16
  end
17
17
  end
18
18
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module LastModifiedAt
3
- VERSION = "0.3.2"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
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.2
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-07-20 00:00:00.000000000 Z
11
+ date: 2014-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll