jekyll-write-and-commit-changes 0.1.0 → 0.1.2
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 +4 -4
- data/lib/jekyll/repository.rb +9 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d11364244720840dee84dc75c1b3e0ff4df4d6dda09bbda344bc4b8249f1d05
|
4
|
+
data.tar.gz: 0d398ab0f33984e5f20c89114f35ed8ed4eb3b98e26ceb4773430093dfb71509
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 136a964da322f74fb36f42072accf4f1e2fa4b6a219819432dc7ffbb19e6c1d19dcc2990f26d0de3e8f817258d819e1c7fff2f886837e7aff6999d00ec3652c3
|
7
|
+
data.tar.gz: 29c48b360a49e1188ff2524ac10ba1aa67b7e3e4ace6b4f07c5f40a05c8468f4f10c96ba44e0545b0163f1d1ae88dd256737060d347b50162206ac993517a331
|
data/lib/jekyll/repository.rb
CHANGED
@@ -10,7 +10,7 @@ module Jekyll
|
|
10
10
|
require 'rugged'
|
11
11
|
|
12
12
|
@site = site
|
13
|
-
@path = site.
|
13
|
+
@path = site.source
|
14
14
|
@git = Rugged::Repository.new(path)
|
15
15
|
end
|
16
16
|
|
@@ -24,7 +24,7 @@ module Jekyll
|
|
24
24
|
# @return [String] Commit hash
|
25
25
|
def commit(message, author = jekyll_author)
|
26
26
|
site.staged_files.each do |file|
|
27
|
-
git.index.add(file)
|
27
|
+
git.index.add(real_path file)
|
28
28
|
end
|
29
29
|
|
30
30
|
git.index.write
|
@@ -39,5 +39,12 @@ module Jekyll
|
|
39
39
|
def jekyll_author
|
40
40
|
@jekyll_author ||= { name: 'Jekyll', email: 'jekyll@localhost', time: Time.now }
|
41
41
|
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
# Find file's real path, relative to site.
|
46
|
+
def real_path(file)
|
47
|
+
Pathname.new(file).realpath.relative_path_from(path).to_s
|
48
|
+
end
|
42
49
|
end
|
43
50
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-write-and-commit-changes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- f
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|