Skip to content

Commit

Permalink
fix key typo and iso8601 the time
Browse files Browse the repository at this point in the history
  • Loading branch information
rphillips-nz committed Sep 15, 2020
1 parent fb5d55c commit 3a9abbf
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions lib/cloudcannon-jekyll/_cloudcannon/config-2.x.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"time": {{ site.time | cc_jsonify }},
"time": {{ site.time | date_to_xmlschema | cc_jsonify }},
"cloudcannon": {
"name": "cloudcannon-jekyll",
"version": {{ gem_version | cc_jsonify }}
Expand All @@ -8,7 +8,7 @@
"include": {{ config.include | cc_jsonify }},
"exclude": {{ config.exclude | cc_jsonify }},
{% if config.baseurl %}"base-url": {{ config.baseurl | cc_jsonify }},{% endif %}
{% if config.collections %}"comments": {{ config.collections | cc_jsonify: 'collections' }},{% endif %}
{% if config.collections %}"collections": {{ config.collections | cc_jsonify: 'collections' }},{% endif %}
{% if config._comments %}"comments": {{ config._comments | cc_jsonify }},{% endif %}
{% if config._options %}"input-options": {{ config._options | cc_jsonify }},{% endif %}
{% if config.defaults %}"defaults": {{ config.defaults | cc_jsonify }},{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions lib/cloudcannon-jekyll/_cloudcannon/config-3.0-4.x.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"time": {{ site.time | cc_jsonify }},
"time": {{ site.time | date_to_xmlschema | cc_jsonify }},
"cloudcannon": {
"name": "cloudcannon-jekyll",
"version": {{ gem_version | cc_jsonify }}
Expand All @@ -8,7 +8,7 @@
"include": {{ config.include | cc_jsonify }},
"exclude": {{ config.exclude | cc_jsonify }},
{% if config.baseurl %}"base-url": {{ config.baseurl | cc_jsonify }},{% endif %}
{% if config.collections %}"comments": {{ config.collections | cc_jsonify: 'collections' }},{% endif %}
{% if config.collections %}"collections": {{ config.collections | cc_jsonify: 'collections' }},{% endif %}
{% if config._comments %}"comments": {{ config._comments | cc_jsonify }},{% endif %}
{% if config._options %}"input-options": {{ config._options | cc_jsonify }},{% endif %}
{% if config.defaults %}"defaults": {{ config.defaults | cc_jsonify }},{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion lib/cloudcannon-jekyll/_cloudcannon/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"time": {{ site.time | cc_jsonify }},
"time": {{ site.time | date_to_xmlschema | cc_jsonify }},
"cloudcannon": {
"name": "cloudcannon-jekyll",
"version": {{ gem_version | cc_jsonify }}
Expand Down
2 changes: 1 addition & 1 deletion lib/cloudcannon-jekyll/_cloudcannon/details-2.x.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"time": {{ site.time | cc_jsonify }},
"time": {{ site.time | date_to_xmlschema | cc_jsonify }},
"cloudcannon": {
"name": "cloudcannon-jekyll",
"version": {{ gem_version | cc_jsonify }}
Expand Down
2 changes: 1 addition & 1 deletion lib/cloudcannon-jekyll/_cloudcannon/details-3.0-4.x.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"time": {{ site.time | cc_jsonify }},
"time": {{ site.time | date_to_xmlschema | cc_jsonify }},
"cloudcannon": {
"name": "cloudcannon-jekyll",
"version": {{ gem_version | cc_jsonify }}
Expand Down
2 changes: 1 addition & 1 deletion lib/cloudcannon-jekyll/_cloudcannon/details.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"time": {{ site.time | cc_jsonify }},
"time": {{ site.time | date_to_xmlschema | cc_jsonify }},
"cloudcannon": {
"name": "cloudcannon-jekyll",
"version": {{ gem_version | cc_jsonify }}
Expand Down
2 changes: 1 addition & 1 deletion spec/build-configuration-schema.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"$ref": "https://raw.githubusercontent.com/CloudCannon/build-configuration-schema/v0.0.2/schema.json"
"$ref": "https://raw.githubusercontent.com/CloudCannon/build-configuration-schema/v0.0.3/schema.json"
}
8 changes: 4 additions & 4 deletions spec/generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
let(:site_data) { { :cloudcannon => { "data" => true } } }

it "contains valid time" do
expect(details["time"]).to match(%r!\d{4}\-\d\d\-\d\d \d\d:\d\d:\d\d [+-]\d{4}!)
expect(details["time"]).to match(%r!\d{4}\-\d\d\-\d\dT\d\d:\d\d:\d\d[+-]\d\d:\d\d!)
end

it "contains gem information" do
Expand Down Expand Up @@ -134,7 +134,7 @@ def log_schema_error(error)
end

it "contains valid time" do
expect(details["time"]).to match(%r!\d{4}\-\d\d\-\d\d \d\d:\d\d:\d\d [+-]\d{4}!)
expect(details["time"]).to match(%r!\d{4}\-\d\d\-\d\dT\d\d:\d\d:\d\d[+-]\d\d:\d\d!)
end

it "contains gem information" do
Expand Down Expand Up @@ -315,8 +315,8 @@ def log_schema_error(error)
end
end

it "has no non-default collections", focus: true do
if Jekyll::VERSION.start_with?("2") || Jekyll::VERSION.match?(%r!3\.[0-4]\.!)
it "has no non-default collections" do
if Jekyll::VERSION.start_with?("2")
expect(config["collections"]).to be_nil
else
expect(config["collections"].length).to eq(1)
Expand Down

0 comments on commit 3a9abbf

Please sign in to comment.