cloudcannon-jekyll 0.5.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CloudCannonJekyll
4
- VERSION = "0.5.0"
4
+ VERSION = "1.0.0"
5
5
  end
@@ -2,17 +2,19 @@
2
2
 
3
3
  require "jekyll"
4
4
 
5
- require_relative "cloudcannon-jekyll/page-without-a-file"
6
- require_relative "cloudcannon-jekyll/generator"
7
- require_relative "cloudcannon-jekyll/configuration"
8
- require_relative "cloudcannon-jekyll/jsonify-filter"
9
- require_relative "cloudcannon-jekyll/version"
5
+ module CloudCannonJekyll
6
+ autoload :PageWithoutAFile, "cloudcannon-jekyll/page-without-a-file"
7
+ autoload :Generator, "cloudcannon-jekyll/generator"
8
+ autoload :Configuration, "cloudcannon-jekyll/configuration"
9
+ autoload :SafeJsonifyFilter, "cloudcannon-jekyll/safe-jsonify-filter"
10
+ autoload :VERSION, "cloudcannon-jekyll/version"
11
+ end
10
12
 
11
- Liquid::Template.register_filter(CloudCannonJekyll::JsonifyFilter)
13
+ Liquid::Template.register_filter(CloudCannonJekyll::SafeJsonifyFilter)
12
14
 
13
- if Jekyll::VERSION.start_with? "2."
15
+ # Hooks didn't exist in Jekyll 2 so we monkey patch to get an :after_reset hook
16
+ if Jekyll::VERSION.start_with? "2"
14
17
  module Jekyll
15
- # Hooks didn't exist in Jekyll 2 so we monkey patch to get an :after_reset hook
16
18
  class Site
17
19
  alias_method :jekyll_reset, :reset
18
20
 
data/script/cibuild CHANGED
@@ -2,5 +2,6 @@
2
2
 
3
3
  set -ex
4
4
 
5
- $(dirname "$0")/test
5
+ bundle exec rspec "$@"
6
+ bundle exec rubocop -S
6
7
  bundle exec gem build cloudcannon-jekyll.gemspec
data/script/release CHANGED
@@ -11,10 +11,10 @@ cd $(dirname "$0")/..
11
11
  rm -rf cloudcannon-jekyll-*.gem
12
12
  gem build -q cloudcannon-jekyll.gemspec
13
13
 
14
- # Ensure we're on the legacy branch
14
+ # Ensure we're on the master branch
15
15
 
16
- (git branch | grep -q '* legacy') || {
17
- echo "Only release from the legacy branch."
16
+ (git branch | grep -q '* master') || {
17
+ echo "Only release from the master branch."
18
18
  exit 1
19
19
  }
20
20
 
@@ -33,7 +33,5 @@ git fetch -t origin
33
33
 
34
34
  # Push tag and upload new gem
35
35
 
36
- git tag "$tag" &&
37
- git push origin legacy &&
38
- git push origin "$tag" &&
39
- gem push cloudcannon-jekyll-*.gem
36
+ gem push cloudcannon-jekyll-*.gem && git tag "$tag" &&
37
+ git push origin master && git push origin "$tag"
data/script/test CHANGED
@@ -3,4 +3,3 @@
3
3
  set -ex
4
4
 
5
5
  bundle exec rspec "$@"
6
- bundle exec rubocop -S
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.5.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CloudCannon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-15 00:00:00.000000000 Z
11
+ date: 2019-11-19 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,21 +29,7 @@ dependencies:
29
29
  version: 2.4.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '4'
33
- - !ruby/object:Gem::Dependency
34
- name: json_schemer
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: 0.2.4
40
- type: :development
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: 0.2.4
32
+ version: '5'
47
33
  - !ruby/object:Gem::Dependency
48
34
  name: rake
49
35
  requirement: !ruby/object:Gem::Requirement
@@ -78,28 +64,28 @@ dependencies:
78
64
  requirements:
79
65
  - - "~>"
80
66
  - !ruby/object:Gem::Version
81
- version: '0.80'
67
+ version: '0.71'
82
68
  type: :development
83
69
  prerelease: false
84
70
  version_requirements: !ruby/object:Gem::Requirement
85
71
  requirements:
86
72
  - - "~>"
87
73
  - !ruby/object:Gem::Version
88
- version: '0.80'
74
+ version: '0.71'
89
75
  - !ruby/object:Gem::Dependency
90
76
  name: rubocop-jekyll
91
77
  requirement: !ruby/object:Gem::Requirement
92
78
  requirements:
93
79
  - - "~>"
94
80
  - !ruby/object:Gem::Version
95
- version: '0.11'
81
+ version: '0.10'
96
82
  type: :development
97
83
  prerelease: false
98
84
  version_requirements: !ruby/object:Gem::Requirement
99
85
  requirements:
100
86
  - - "~>"
101
87
  - !ruby/object:Gem::Version
102
- version: '0.11'
88
+ version: '0.10'
103
89
  description: Creates CloudCannon editor details for Jekyll
104
90
  email:
105
91
  - support@cloudcannon.com
@@ -107,9 +93,7 @@ executables: []
107
93
  extensions: []
108
94
  extra_rdoc_files: []
109
95
  files:
110
- - ".github/workflows/stale.yml"
111
96
  - ".gitignore"
112
- - ".reek.yml"
113
97
  - ".rspec"
114
98
  - ".rubocop.yml"
115
99
  - ".travis.yml"
@@ -120,18 +104,14 @@ files:
120
104
  - Rakefile
121
105
  - cloudcannon-jekyll.gemspec
122
106
  - lib/cloudcannon-jekyll.rb
123
- - lib/cloudcannon-jekyll/_cloudcannon/info-2.x.json
124
- - lib/cloudcannon-jekyll/_cloudcannon/info-3.0-4.x.json
125
- - lib/cloudcannon-jekyll/_cloudcannon/info.json
107
+ - lib/cloudcannon-jekyll/_cloudcannon/details-2.x.json
108
+ - lib/cloudcannon-jekyll/_cloudcannon/details-3.0.x.json
109
+ - lib/cloudcannon-jekyll/_cloudcannon/details.json
126
110
  - lib/cloudcannon-jekyll/configuration.rb
127
111
  - lib/cloudcannon-jekyll/generator.rb
128
- - lib/cloudcannon-jekyll/jsonify-filter.rb
129
112
  - lib/cloudcannon-jekyll/page-without-a-file.rb
130
- - lib/cloudcannon-jekyll/reader.rb
131
- - lib/cloudcannon-jekyll/readers/data-reader.rb
132
- - lib/cloudcannon-jekyll/readers/old-data-reader.rb
113
+ - lib/cloudcannon-jekyll/safe-jsonify-filter.rb
133
114
  - lib/cloudcannon-jekyll/version.rb
134
- - script/ci-smoke-test
135
115
  - script/cibuild
136
116
  - script/release
137
117
  - script/test
@@ -154,7 +134,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
134
  - !ruby/object:Gem::Version
155
135
  version: '0'
156
136
  requirements: []
157
- rubygems_version: 3.0.3
137
+ rubyforge_project:
138
+ rubygems_version: 2.7.6.2
158
139
  signing_key:
159
140
  specification_version: 4
160
141
  summary: CloudCannon Jekyll integration
@@ -1,19 +0,0 @@
1
- name: Mark stale issues
2
-
3
- on:
4
- schedule:
5
- - cron: "30 1 * * *"
6
-
7
- jobs:
8
- stale:
9
-
10
- runs-on: ubuntu-latest
11
-
12
- steps:
13
- - uses: actions/stale@v1
14
- with:
15
- repo-token: ${{ secrets.GITHUB_TOKEN }}
16
- stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days'
17
- stale-issue-label: 'no-issue-activity'
18
- days-before-stale: 30
19
- days-before-close: 5
data/.reek.yml DELETED
@@ -1,6 +0,0 @@
1
- detectors:
2
- LongParameterList:
3
- max_params: 4 # Matches the Rubocop setting
4
-
5
- exclude_paths:
6
- - spec
@@ -1,76 +0,0 @@
1
- {
2
- "time": {{ site.time | date_to_xmlschema | cc_jsonify }},
3
- "cloudcannon": {
4
- "name": "cloudcannon-jekyll",
5
- "version": {{ gem_version | cc_jsonify }}
6
- },
7
- "generator": {
8
- "name": "jekyll",
9
- "version": {{ jekyll.version | cc_jsonify }},
10
- "environment": {{ jekyll.env | cc_jsonify }},
11
- "metadata": {
12
- "markdown": {{ site.markdown | cc_jsonify }},
13
- "kramdown": {{ site.kramdown | cc_jsonify }},
14
- "commonmark": {{ site.commonmark | cc_jsonify }}
15
- }
16
- },
17
- {% if config.timezone %}
18
- "timezone": {{ config.timezone | cc_jsonify }},
19
- {% endif %}
20
- "collections-config": {{ collections_config | cc_jsonify: 'collections' }},
21
- "collections": {
22
- "drafts": {{ drafts | cc_jsonify }},
23
- "posts": {{ site.posts | reverse | cc_jsonify }}{% if site.collections.size > 0 %},{% endif %}
24
- {% for collection in site.collections %}"{{ collection[0] | xml_escape }}": {{ collection[1].docs | cc_jsonify }}{% unless forloop.last %},{% endunless %}
25
- {% endfor %}
26
- },
27
- "pages": {{ site.html_pages | cc_jsonify }},
28
- "static-pages": {{ site.static_files | cc_static_files_jsonify }},
29
- {% if site.cloudcannon.data.first %}{% assign data_seen = false %}
30
- "data": {
31
- {% for data in site.data %}{% assign key = data[0] %}{% if site.cloudcannon.data[key] %}{% if data_seen %},{% endif %}{{ data[0] | cc_jsonify }}: {{ data[1] | cc_jsonify }}{% assign data_seen = true %}{% endif %}{% endfor %}},
32
- {% elsif site.cloudcannon.data %}"data": {{ site.data | cc_jsonify }},{% endif %}
33
- {% if config.baseurl %}
34
- "base-url": {{ config.baseurl | cc_jsonify }},
35
- {% endif %}
36
- {% if config._comments %}
37
- "_comments": {{ config._comments | cc_jsonify }},
38
- {% endif %}
39
- {% if config._options %}
40
- "_options": {{ config._options | cc_jsonify }},
41
- {% endif %}
42
- {% if config._collection_groups %}
43
- "_collection_groups": {{ config._collection_groups | cc_jsonify }},
44
- {% endif %}
45
- {% if config._editor %}
46
- "_editor": {
47
- "default_path": {{ config._editor.default_path | cc_jsonify }}
48
- },
49
- {% endif %}
50
- {% if config._source_editor %}
51
- "_source_editor": {
52
- "tab_size": {{ config._source_editor.tab_size | cc_jsonify }},
53
- "show_gutter": {{ config._source_editor.show_gutter | cc_jsonify }},
54
- "theme": {{ config._source_editor.theme | cc_jsonify }}
55
- },
56
- {% endif %}
57
- "paths": {
58
- "uploads": {{ config.uploads_dir | cc_jsonify }},
59
- "data": {{ config.data_dir | cc_jsonify }},
60
- "pages": "",
61
- "collections": {{ config.collections_dir | cc_jsonify }},
62
- "includes": {{ config.includes_dir | cc_jsonify }},
63
- "layouts": {{ config.layouts_dir | cc_jsonify }}
64
- },
65
- {% if config._array_structures %}
66
- "_array_structures": {{ config._array_structures | cc_jsonify: nil, 50 }},
67
- {% endif %}
68
- {% assign select_data = config | cc_select_data_jsonify %}
69
- {% if select_data %}
70
- "_select_data": {{ select_data }},
71
- {% endif %}
72
- {% if config.defaults %}
73
- "defaults": {{ config.defaults | cc_jsonify }},
74
- {% endif %}
75
- "source": {{ config.source | replace: pwd, "" | cc_jsonify }}
76
- }
@@ -1,75 +0,0 @@
1
- {
2
- "time": {{ site.time | date_to_xmlschema | cc_jsonify }},
3
- "cloudcannon": {
4
- "name": "cloudcannon-jekyll",
5
- "version": {{ gem_version | cc_jsonify }}
6
- },
7
- "generator": {
8
- "name": "jekyll",
9
- "version": {{ jekyll.version | cc_jsonify }},
10
- "environment": {{ jekyll.env | cc_jsonify }},
11
- "metadata": {
12
- "markdown": {{ site.markdown | cc_jsonify }},
13
- "kramdown": {{ site.kramdown | cc_jsonify }},
14
- "commonmark": {{ site.commonmark | cc_jsonify }}
15
- }
16
- },
17
- {% if config.timezone %}
18
- "timezone": {{ config.timezone | cc_jsonify }},
19
- {% endif %}
20
- "collections-config": {{ collections_config | cc_jsonify: 'collections' }},
21
- "collections": {
22
- "drafts": {{ drafts | cc_jsonify }}{% if site.collections.size > 0 %},{% endif %}
23
- {% for collection in site.collections %}"{{ collection.label | xml_escape }}": {{ collection.docs | cc_jsonify }}{% unless forloop.last %},{% endunless %}
24
- {% endfor %}
25
- },
26
- "pages": {{ site.html_pages | cc_jsonify }},
27
- "static-pages": {{ site.static_files | cc_static_files_jsonify }},
28
- {% if site.cloudcannon.data.first %}{% assign data_seen = false %}
29
- "data": {
30
- {% for data in site.data %}{% assign key = data[0] %}{% if site.cloudcannon.data[key] %}{% if data_seen %},{% endif %}{{ data[0] | cc_jsonify }}: {{ data[1] | cc_jsonify }}{% assign data_seen = true %}{% endif %}{% endfor %}},
31
- {% elsif site.cloudcannon.data %}"data": {{ site.data | cc_jsonify }},{% endif %}
32
- {% if config.baseurl %}
33
- "base-url": {{ config.baseurl | cc_jsonify }},
34
- {% endif %}
35
- {% if config._comments %}
36
- "_comments": {{ config._comments | cc_jsonify }},
37
- {% endif %}
38
- {% if config._options %}
39
- "_options": {{ config._options | cc_jsonify }},
40
- {% endif %}
41
- {% if config._collection_groups %}
42
- "_collection_groups": {{ config._collection_groups | cc_jsonify }},
43
- {% endif %}
44
- {% if config._editor %}
45
- "_editor": {
46
- "default_path": {{ config._editor.default_path | cc_jsonify }}
47
- },
48
- {% endif %}
49
- {% if config._source_editor %}
50
- "_source_editor": {
51
- "tab_size": {{ config._source_editor.tab_size | cc_jsonify }},
52
- "show_gutter": {{ config._source_editor.show_gutter | cc_jsonify }},
53
- "theme": {{ config._source_editor.theme | cc_jsonify }}
54
- },
55
- {% endif %}
56
- "paths": {
57
- "uploads": {{ config.uploads_dir | cc_jsonify }},
58
- "data": {{ config.data_dir | cc_jsonify }},
59
- "pages": "",
60
- "collections": {{ config.collections_dir | cc_jsonify }},
61
- "includes": {{ config.includes_dir | cc_jsonify }},
62
- "layouts": {{ config.layouts_dir | cc_jsonify }}
63
- },
64
- {% if config._array_structures %}
65
- "_array_structures": {{ config._array_structures | cc_jsonify: nil, 50 }},
66
- {% endif %}
67
- {% assign select_data = config | cc_select_data_jsonify %}
68
- {% if select_data %}
69
- "_select_data": {{ select_data }},
70
- {% endif %}
71
- {% if config.defaults %}
72
- "defaults": {{ config.defaults | cc_jsonify }},
73
- {% endif %}
74
- "source": {{ config.source | replace: pwd, "" | cc_jsonify }}
75
- }
@@ -1,88 +0,0 @@
1
- {
2
- "time": {{ site.time | date_to_xmlschema | cc_jsonify }},
3
- "cloudcannon": {
4
- "name": "cloudcannon-jekyll",
5
- "version": {{ gem_version | cc_jsonify }}
6
- },
7
- "generator": {
8
- "name": "jekyll",
9
- "version": {{ jekyll.version | cc_jsonify }},
10
- "environment": {{ jekyll.env | cc_jsonify }},
11
- "metadata": {
12
- "markdown": {{ site.markdown | cc_jsonify }},
13
- "kramdown": {{ site.kramdown | cc_jsonify }},
14
- "commonmark": {{ site.commonmark | cc_jsonify }}
15
- }
16
- },
17
- {% if config.timezone -%}
18
- "timezone": {{ config.timezone | cc_jsonify }},
19
- {%- endif %}
20
- "collections-config": {{ collections_config | cc_jsonify: 'collections' }},
21
- "collections": {
22
- "drafts": {{ drafts | cc_jsonify }}{% if site.collections.size > 0 %},{% endif %}
23
- {%- for collection in site.collections -%}
24
- "{{ collection.label | xml_escape }}": {{ collection.docs | cc_jsonify }}
25
- {%- unless forloop.last %},{% endunless %}
26
- {%- endfor -%}
27
- },
28
- "pages": {{ site.html_pages | cc_jsonify }},
29
- "static-pages": {{ site.static_files | cc_static_files_jsonify }},
30
- {% if site.cloudcannon.data.first -%}
31
- "data": {
32
- {%- assign data_seen = false %}
33
- {%- for data in site.data %}
34
- {%- assign key = data[0] %}
35
- {%- if site.cloudcannon.data[key] %}
36
- {%- if data_seen %},{% endif -%}
37
- {{ data[0] | cc_jsonify }}: {{ data[1] | cc_jsonify }}
38
- {%- assign data_seen = true %}
39
- {%- endif %}
40
- {%- endfor -%}
41
- },
42
- {% elsif site.cloudcannon.data -%}
43
- "data": {{ site.data | cc_jsonify }},
44
- {%- endif %}
45
- {% if config.baseurl -%}
46
- "base-url": {{ config.baseurl | cc_jsonify }},
47
- {%- endif %}
48
- {% if config._comments -%}
49
- "_comments": {{ config._comments | cc_jsonify }},
50
- {%- endif %}
51
- {% if config._options -%}
52
- "_options": {{ config._options | cc_jsonify }},
53
- {%- endif %}
54
- {% if config._collection_groups -%}
55
- "_collection_groups": {{ config._collection_groups | cc_jsonify }},
56
- {%- endif %}
57
- {% if config._editor -%}
58
- "_editor": {
59
- "default_path": {{ config._editor.default_path | cc_jsonify }}
60
- },
61
- {%- endif %}
62
- {% if config._source_editor -%}
63
- "_source_editor": {
64
- "tab_size": {{ config._source_editor.tab_size | cc_jsonify }},
65
- "show_gutter": {{ config._source_editor.show_gutter | cc_jsonify }},
66
- "theme": {{ config._source_editor.theme | cc_jsonify }}
67
- },
68
- {%- endif %}
69
- "paths": {
70
- "uploads": {{ config.uploads_dir | cc_jsonify }},
71
- "data": {{ config.data_dir | cc_jsonify }},
72
- "pages": "",
73
- "collections": {{ config.collections_dir | cc_jsonify }},
74
- "includes": {{ config.includes_dir | cc_jsonify }},
75
- "layouts": {{ config.layouts_dir | cc_jsonify }}
76
- },
77
- {% if config._array_structures -%}
78
- "_array_structures": {{ config._array_structures | cc_jsonify: nil, 50 }},
79
- {%- endif %}
80
- {% assign select_data = config | cc_select_data_jsonify -%}
81
- {% if select_data -%}
82
- "_select_data": {{ select_data }},
83
- {%- endif %}
84
- {% if config.defaults -%}
85
- "defaults": {{ config.defaults | cc_jsonify }},
86
- {%- endif %}
87
- "source": {{ config.source | replace: pwd, "" | cc_jsonify }}
88
- }