cloudcannon-jekyll 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +5 -0
- data/.travis.yml +2 -1
- data/HISTORY.md +7 -0
- data/cloudcannon-jekyll.gemspec +1 -1
- data/lib/cloudcannon-jekyll/_cloudcannon/config-2.x.json +2 -0
- data/lib/cloudcannon-jekyll/_cloudcannon/config-3.0-4.x.json +2 -0
- data/lib/cloudcannon-jekyll/_cloudcannon/config.json +6 -0
- data/lib/cloudcannon-jekyll/generator.rb +1 -1
- data/lib/cloudcannon-jekyll/safe-jsonify-filter.rb +15 -9
- data/lib/cloudcannon-jekyll/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 71e33735df4c89f5a837224c14fc5830262d6296
|
4
|
+
data.tar.gz: 748068f64fd86fb1514533a9b84f8576c7cd79e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0872a4182a09614927851140c865ad761c5f2ee41c8e79798ad27efc08ef270b1ec9acf60c75da436aea327cf4e11cade050f308921807116fb18e8d8d07fbe5'
|
7
|
+
data.tar.gz: 6f9207baa8d6084af8a968c2aad4f3d7c9e16e1ec6283408c372e5db156cc890b75e9f22cd98e59619f37172d4981fb859b728f5935d0d3fac40ad17b589ee0e
|
data/.rubocop.yml
CHANGED
@@ -25,3 +25,8 @@ AllCops:
|
|
25
25
|
Naming/MemoizedInstanceVariableName:
|
26
26
|
Exclude:
|
27
27
|
- lib/cloudcannon-jekyll/page-without-a-file.rb
|
28
|
+
|
29
|
+
# This is excluded since the ruby target is 2.3.8 which doesn't support String.match?(Regexp)
|
30
|
+
Performance/RegexpMatch:
|
31
|
+
Exclude:
|
32
|
+
- lib/cloudcannon-jekyll/generator.rb
|
data/.travis.yml
CHANGED
data/HISTORY.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# 0.2.0
|
2
|
+
|
3
|
+
* Add defaults and input-options keys to config output
|
4
|
+
* Add more ignore keys for legacy select data filter
|
5
|
+
* Reduce methods added from other plugins clashing
|
6
|
+
* Fix invalid output when unsupported class found
|
7
|
+
|
1
8
|
# 0.1.0
|
2
9
|
|
3
10
|
* Add output config file
|
data/cloudcannon-jekyll.gemspec
CHANGED
@@ -25,5 +25,5 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency "rspec", "~> 3.9"
|
26
26
|
spec.add_development_dependency "rubocop", "~> 0.80"
|
27
27
|
spec.add_development_dependency "rubocop-jekyll", "~> 0.11"
|
28
|
-
spec.add_development_dependency "json_schemer", "~> 0.2.
|
28
|
+
spec.add_development_dependency "json_schemer", "~> 0.2.4"
|
29
29
|
end
|
@@ -20,6 +20,8 @@
|
|
20
20
|
{% endfor %}
|
21
21
|
},
|
22
22
|
{% if site._comments %}"comments": {{ site._comments | cc_safe_jsonify }},{% endif %}
|
23
|
+
{% if site._options %}"input-options": {{ site._options | cc_safe_jsonify }},{% endif %}
|
24
|
+
{% if site.defaults %}"defaults": {{ site.defaults | cc_safe_jsonify }},{% endif %}
|
23
25
|
{% if site._editor %}"editor": {
|
24
26
|
"default-path": {{ site._editor.default_path | jsonify }}
|
25
27
|
},{% endif %}
|
@@ -20,6 +20,8 @@
|
|
20
20
|
{% endfor %}
|
21
21
|
},
|
22
22
|
{% if site._comments %}"comments": {{ site._comments | cc_safe_jsonify }},{% endif %}
|
23
|
+
{% if site._options %}"input-options": {{ site._options | cc_safe_jsonify }},{% endif %}
|
24
|
+
{% if site.defaults %}"defaults": {{ site.defaults | cc_safe_jsonify }},{% endif %}
|
23
25
|
{% if site._editor %}"editor": {
|
24
26
|
"default-path": {{ site._editor.default_path | jsonify }}
|
25
27
|
},{% endif %}
|
@@ -27,6 +27,12 @@
|
|
27
27
|
{% if site._comments -%}
|
28
28
|
"comments": {{ site._comments | cc_safe_jsonify }},
|
29
29
|
{%- endif %}
|
30
|
+
{% if site._options -%}
|
31
|
+
"input-options": {{ site._options | cc_safe_jsonify }},
|
32
|
+
{%- endif %}
|
33
|
+
{% if site.defaults -%}
|
34
|
+
"defaults": {{ site.defaults | cc_safe_jsonify }},
|
35
|
+
{%- endif %}
|
30
36
|
{% if site._editor -%}
|
31
37
|
"editor": {
|
32
38
|
"default-path": {{ site._editor.default_path | jsonify }}
|
@@ -136,25 +136,31 @@ module CloudCannonJekyll
|
|
136
136
|
documents posts related_posts time source timezone include exclude
|
137
137
|
baseurl collections _comments _editor _source_editor _explore
|
138
138
|
uploads_dir plugins_dir data_dir collections_dir includes_dir
|
139
|
-
layouts_dir _array_structures cloudcannon rdiscount redcarpet
|
139
|
+
layouts_dir _array_structures _options cloudcannon rdiscount redcarpet
|
140
|
+
redcloth jekyll-archives archives)
|
140
141
|
|
141
142
|
if Jekyll::VERSION.start_with?("2.")
|
143
|
+
prevent.push "gems"
|
142
144
|
prevent = prevent.concat input["collections"].keys
|
145
|
+
elsif %r!3\.[0-4]\.! =~ Jekyll::VERSION
|
143
146
|
prevent.push "gems"
|
144
|
-
|
145
|
-
prevent = prevent.concat
|
146
|
-
prevent = prevent.concat %w(plugins gems)
|
147
|
+
prevent.push "plugins"
|
148
|
+
prevent = prevent.concat(input["collections"].map { |c| c["label"] })
|
147
149
|
else
|
148
150
|
prevent.push "plugins"
|
151
|
+
prevent = prevent.concat(input.content_methods).uniq
|
149
152
|
end
|
150
153
|
|
151
|
-
out =
|
152
|
-
|
154
|
+
out = []
|
155
|
+
|
156
|
+
input.each_key { |key|
|
153
157
|
next if prevent.include? key
|
154
158
|
prevent.push key
|
155
159
|
|
156
|
-
|
157
|
-
|
160
|
+
next unless input[key].is_a?(Array) || input[key].is_a?(Hash)
|
161
|
+
|
162
|
+
out << "#{key.to_json}: #{SafeJsonifyFilter.to_json(input[key], depth + 1)}"
|
163
|
+
}
|
158
164
|
|
159
165
|
"{#{out.join(",")}}" if out.any?
|
160
166
|
end
|
@@ -177,7 +183,7 @@ module CloudCannonJekyll
|
|
177
183
|
elsif input.is_a?(Hash)
|
178
184
|
SafeJsonifyFilter.hash_to_json(input, depth)
|
179
185
|
else
|
180
|
-
|
186
|
+
input.class.to_s.prepend("UNSUPPORTED:").to_json
|
181
187
|
end
|
182
188
|
end
|
183
189
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudcannon-jekyll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CloudCannon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -92,14 +92,14 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 0.2.
|
95
|
+
version: 0.2.4
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 0.2.
|
102
|
+
version: 0.2.4
|
103
103
|
description: Creates CloudCannon editor details for Jekyll
|
104
104
|
email:
|
105
105
|
- support@cloudcannon.com
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
154
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.
|
155
|
+
rubygems_version: 2.5.2.3
|
156
156
|
signing_key:
|
157
157
|
specification_version: 4
|
158
158
|
summary: CloudCannon Jekyll integration
|