jekyll-write-and-commit-changes 0.2.0 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/document_writer.rb +12 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1861eb1e9821fc6eeb6b728019add0efc2594dab19d9c927702fc56c16776a6
|
4
|
+
data.tar.gz: 69f8e3bdd0b90a7b55b66d200b39ee9f60a413e122fd402f4566eb69342cbf7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3f0498280143b872d32706442c6889b3ae463674624fe28b9fbdf2c635bd7c23d9d6c5e558efe3e709409f53b4a06fbe59e48736037be12b1ee56bc230dfa84
|
7
|
+
data.tar.gz: 3c6da359fbb2c6b7cd793f20c8a2978222adb191e8374a3d647ac374a0d0e80f8288a4174fb084ceb9f18908e7df2f67494fac924a2638c4b84be40e3ec087b9
|
@@ -10,7 +10,7 @@ module Jekyll
|
|
10
10
|
def save
|
11
11
|
return unless data.fetch('save', true)
|
12
12
|
|
13
|
-
Jekyll.logger.debug
|
13
|
+
Jekyll.logger.debug 'Writing', path
|
14
14
|
|
15
15
|
file = File.open(path, File::RDWR | File::CREAT, 0o640) do |f|
|
16
16
|
f.flock(File::LOCK_EX)
|
@@ -24,11 +24,17 @@ module Jekyll
|
|
24
24
|
f.truncate(f.pos)
|
25
25
|
end
|
26
26
|
|
27
|
-
site.staged_files <<
|
27
|
+
site.staged_files << real_path if file.zero?
|
28
28
|
|
29
29
|
file.zero?
|
30
30
|
end
|
31
31
|
|
32
|
+
# Resolves the real path for the document
|
33
|
+
# @return [String]
|
34
|
+
def real_path
|
35
|
+
@real_path ||= Pathname.new(relative_path).realpath.relative_path_from(site.source).to_s
|
36
|
+
end
|
37
|
+
|
32
38
|
# Prepares the data for dumping, by excluding some keys and
|
33
39
|
# transforming other Documents replaced by jekyll-linked-posts.
|
34
40
|
#
|
@@ -42,6 +48,10 @@ module Jekyll
|
|
42
48
|
value.data['uuid']
|
43
49
|
when Jekyll::Convertible
|
44
50
|
value.data['uuid']
|
51
|
+
when Set
|
52
|
+
value.map do |v|
|
53
|
+
v.respond_to?(:data) ? v.data['uuid'] : v
|
54
|
+
end
|
45
55
|
when Array
|
46
56
|
value.map do |v|
|
47
57
|
v.respond_to?(:data) ? v.data['uuid'] : v
|
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.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- f
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
requirements: []
|
87
|
-
rubygems_version: 3.
|
87
|
+
rubygems_version: 3.3.15
|
88
88
|
signing_key:
|
89
89
|
specification_version: 4
|
90
90
|
summary: Write changes to the repository
|