jekyll-write-and-commit-changes 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/jekyll/document_writer.rb +6 -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: 78d20acdf607a3be5c5ba44f765a89e5913b9f9fca9b687a21740c0cb9b6aedc
|
4
|
+
data.tar.gz: ba74dbbb3b777b4357902d58a50c296c17d4954d0496ab705e5a2774b2c9140d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81a7a75d6bf724b19dc5ef5fc63cc460ba370c09fa407ffb4fd63be46e43bec31674baf2acba79c39430b7a74084f1d0efc02ee530ba62350b36f9fddd5f98ff
|
7
|
+
data.tar.gz: 3f689cd694d958c5ab3a4c941137031b9b40b28344fc7b1065668437260f786f331ae6eda08d9f6004af893a049ee6201ff9e608093745dd1b35d290017f1c52
|
data/README.md
CHANGED
@@ -8,6 +8,8 @@ module Jekyll
|
|
8
8
|
base.class_eval do
|
9
9
|
# Writes changes to the file and adds it to git staged changes
|
10
10
|
def save
|
11
|
+
return unless data.fetch('save', true)
|
12
|
+
|
11
13
|
Jekyll.logger.debug "Writing #{relative_path}"
|
12
14
|
|
13
15
|
file = File.open(path, File::RDWR | File::CREAT, 0o640) do |f|
|
@@ -38,13 +40,15 @@ module Jekyll
|
|
38
40
|
case value
|
39
41
|
when Jekyll::Document
|
40
42
|
value.data['uuid']
|
43
|
+
when Jekyll::Convertible
|
44
|
+
value.data['uuid']
|
41
45
|
when Array
|
42
46
|
value.map do |v|
|
43
|
-
v.
|
47
|
+
v.respond_to?(:data) ? v.data['uuid'] : v
|
44
48
|
end
|
45
49
|
when Hash
|
46
50
|
value.transform_values do |v|
|
47
|
-
v.
|
51
|
+
v.respond_to?(:data) ? v.data['uuid'] : v
|
48
52
|
end
|
49
53
|
else
|
50
54
|
value
|
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.
|
4
|
+
version: 0.2.0
|
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: 2021-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|