cloudcannon-jekyll 0.0.8 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 820899b808d590cf65c42865d41fedce52857e4d2b5e3937152954abdb610a6d
4
- data.tar.gz: 1be3d23935705c3d4a1f645fe7956caf5a241f4febb28bd6dfe27815c899fd2d
3
+ metadata.gz: 5a1489947c5458dc3b86e9f9029907b96805cb5b07bdb19b32af7385f553e4ca
4
+ data.tar.gz: 025be6f5267d6189c84ebd6f6c1120bdb6f752c0e23188b14d5a9154a18ab856
5
5
  SHA512:
6
- metadata.gz: ad2f91e08bff7a4e359436acfe5c77112e3f4730df9fbe956ad9aaa19771151b90eb4857fb3b87149ec8fa277060405e458120b3f3043bbca2523cbaf417c7e1
7
- data.tar.gz: a4f2a57a65d13ca88afd8d09b4bed5fb9125719adce949f4de25435d036f7cf8920cfd6017c83814d8d83537b0e9678db16a5605d07d51d68b6d5516b40a07a9
6
+ metadata.gz: 56fb7b286b350a9a976facd293de984fe7d5a09ee7c8a53b35b505a815360069c2a54729573ac3fabe2bac7e705b0fcc037258f1d4edd0111c7f91feefc5b4f8
7
+ data.tar.gz: c1768862573f74c2d8b6cf3241759b1776c538abc5f731fbc3848206f98eb8898d9a563017a556a1e78910b313d4ffe2db6fb7cf0a439c2be59297248806c93e
@@ -15,3 +15,5 @@ env:
15
15
  matrix:
16
16
  - JEKYLL_VERSION="2.4.0"
17
17
  - JEKYLL_VERSION="3.0.0"
18
+ - JEKYLL_VERSION="3.8.5"
19
+ - JEKYLL_VERSION="4.1.1"
data/HISTORY.md CHANGED
@@ -1,15 +1,23 @@
1
- # 0.0.8
1
+ # 1.1.0
2
2
 
3
- * Removed unsupported Jekyll test targets
3
+ * Add support for including only specified `data` keys
4
4
 
5
- # 0.0.7
5
+ # 1.0.3
6
6
 
7
7
  * Fix invalid JSON issue for sites built with Jekyll 2 and no collections
8
8
 
9
- # 0.0.6
9
+ # 1.0.2
10
10
 
11
- * Fixed unsupported Fixnum for Ruby 2.3
12
- * Fixed reference to unsupported String::match? for Ruby 2.3
11
+ * Change module load style for easier dropping into _plugins
12
+
13
+ # 1.0.1
14
+
15
+ * Set required Ruby version
16
+
17
+ # 1.0.0
18
+
19
+ * Initial release
20
+ * Dropped support for ruby 2.3
13
21
 
14
22
  # 0.0.5
15
23
 
@@ -19,10 +19,12 @@ Gem::Specification.new do |spec|
19
19
  all_files = `git ls-files -z`.split("\x0")
20
20
  spec.files = all_files.reject { |f| f.match(%r!^(test|spec|features)/!) }
21
21
 
22
- spec.add_dependency "jekyll", ">= 2.4.0", "< 4"
22
+ spec.required_ruby_version = ">= 2.4.0"
23
+
24
+ spec.add_dependency "jekyll", ">= 2.4.0", "< 5"
23
25
 
24
26
  spec.add_development_dependency "rake", "~> 13.0"
25
27
  spec.add_development_dependency "rspec", "~> 3.9"
26
- spec.add_development_dependency "rubocop", "~> 0.71"
27
- spec.add_development_dependency "rubocop-jekyll", "~> 0.10"
28
+ spec.add_development_dependency "rubocop", "~> 0.80"
29
+ spec.add_development_dependency "rubocop-jekyll", "~> 0.11"
28
30
  end
@@ -13,8 +13,10 @@
13
13
  "kramdown": {{ site.kramdown | cc_safe_jsonify }},
14
14
  "commonmark": {{ site.commonmark | cc_safe_jsonify }}
15
15
  }
16
- },{% if site.cloudcannon.data %}
17
- "data": {{ site.data | cc_safe_jsonify }},{% endif %}
16
+ },{% if site.cloudcannon.data.first %}{% assign data_seen = false %}
17
+ "data": {
18
+ {% for data in site.data %}{% assign key = data[0] %}{% if site.cloudcannon.data[key] %}{% if data_seen %},{% endif %}{{ data[0] | cc_safe_jsonify }}: {{ data[1] | cc_safe_jsonify }}{% assign data_seen = true %}{% endif %}{% endfor %}},
19
+ {% elsif site.cloudcannon.data %}"data": {{ site.data | cc_safe_jsonify }},{% endif %}
18
20
  "collections": {
19
21
  "posts": {{ site.posts | reverse | cc_safe_jsonify }}{% if site.collections.size > 0 %},{% endif %}
20
22
  {% for collection in site.collections %}"{{ collection[0] | xml_escape }}": {{ collection[1].docs | cc_safe_jsonify }}{% unless forloop.last %},{% endunless %}
@@ -13,8 +13,10 @@
13
13
  "kramdown": {{ site.kramdown | cc_safe_jsonify }},
14
14
  "commonmark": {{ site.commonmark | cc_safe_jsonify }}
15
15
  }
16
- },{% if site.cloudcannon.data %}
17
- "data": {{ site.data | cc_safe_jsonify }},{% endif %}
16
+ },{% if site.cloudcannon.data.first %}{% assign data_seen = false %}
17
+ "data": {
18
+ {% for data in site.data %}{% assign key = data[0] %}{% if site.cloudcannon.data[key] %}{% if data_seen %},{% endif %}{{ data[0] | cc_safe_jsonify }}: {{ data[1] | cc_safe_jsonify }}{% assign data_seen = true %}{% endif %}{% endfor %}},
19
+ {% elsif site.cloudcannon.data %}"data": {{ site.data | cc_safe_jsonify }},{% endif %}
18
20
  "collections": {
19
21
  {% for collection in site.collections %}"{{ collection.label | xml_escape }}": {{ collection.docs | cc_safe_jsonify }}{% unless forloop.last %},{% endunless %}
20
22
  {% endfor %}
@@ -14,14 +14,26 @@
14
14
  "commonmark": {{ site.commonmark | cc_safe_jsonify }}
15
15
  }
16
16
  },
17
- {%- if site.cloudcannon.data %}
17
+ {% if site.cloudcannon.data.first -%}
18
+ "data": {
19
+ {%- assign data_seen = false %}
20
+ {%- for data in site.data %}
21
+ {%- assign key = data[0] %}
22
+ {%- if site.cloudcannon.data[key] %}
23
+ {%- if data_seen %},{% endif -%}
24
+ {{ data[0] | cc_safe_jsonify }}: {{ data[1] | cc_safe_jsonify }}
25
+ {%- assign data_seen = true %}
26
+ {%- endif %}
27
+ {%- endfor -%}
28
+ },
29
+ {% elsif site.cloudcannon.data -%}
18
30
  "data": {{ site.data | cc_safe_jsonify }},
19
- {% endif %}
31
+ {%- endif %}
20
32
  "collections": {
21
- {% for collection in site.collections -%}
33
+ {%- for collection in site.collections -%}
22
34
  "{{ collection.label | xml_escape }}": {{ collection.docs | cc_safe_jsonify }}
23
35
  {%- unless forloop.last %},{% endunless %}
24
- {%- endfor %}
36
+ {%- endfor -%}
25
37
  },
26
38
  "pages": {{ site.pages | cc_safe_jsonify }},
27
39
  "static": {{ site.static_files | cc_static_files_jsonify }}
@@ -18,7 +18,7 @@ module CloudCannonJekyll
18
18
  def source_path
19
19
  path = "_cloudcannon/details.json"
20
20
  path = "_cloudcannon/details-2.x.json" if Jekyll::VERSION.start_with? "2."
21
- path = "_cloudcannon/details-3.0.x.json" unless (%r!3\.[0-4]\.! =~ Jekyll::VERSION).nil?
21
+ path = "_cloudcannon/details-3.0.x.json" if Jekyll::VERSION.match? %r!3\.[0-4]\.!
22
22
 
23
23
  File.expand_path(path, File.dirname(__FILE__))
24
24
  end
@@ -12,8 +12,7 @@ module CloudCannonJekyll
12
12
  Date,
13
13
  Time,
14
14
  NilClass,
15
- Object.const_defined?("Fixnum") ? Fixnum : nil,
16
- ].compact.freeze
15
+ ].freeze
17
16
 
18
17
  @document_types = [
19
18
  Jekyll::Document,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CloudCannonJekyll
4
- VERSION = "0.0.8"
4
+ VERSION = "1.1.0"
5
5
  end
@@ -33,5 +33,7 @@ git fetch -t origin
33
33
 
34
34
  # Push tag and upload new gem
35
35
 
36
- gem push cloudcannon-jekyll-*.gem && git tag "$tag" &&
37
- git push origin master && git push origin "$tag"
36
+ git tag "$tag" &&
37
+ git push origin master &&
38
+ git push origin "$tag" &&
39
+ gem push cloudcannon-jekyll-*.gem
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.0.8
4
+ version: 1.1.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-01-08 00:00:00.000000000 Z
11
+ date: 2020-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 2.4.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '4'
22
+ version: '5'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 2.4.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '4'
32
+ version: '5'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rake
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -64,28 +64,28 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '0.71'
67
+ version: '0.80'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '0.71'
74
+ version: '0.80'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rubocop-jekyll
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.10'
81
+ version: '0.11'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '0.10'
88
+ version: '0.11'
89
89
  description: Creates CloudCannon editor details for Jekyll
90
90
  email:
91
91
  - support@cloudcannon.com
@@ -127,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - ">="
129
129
  - !ruby/object:Gem::Version
130
- version: '0'
130
+ version: 2.4.0
131
131
  required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  requirements:
133
133
  - - ">="