jekyll-open-sdg-plugins 1.0.0.rc9 → 1.0.0.rc10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c85aa307209e0077f967b1d97737ebb38d3ff70c6c1c49db6bd16d39a4384244
4
- data.tar.gz: 632f7ab08f3985b1b13436a2112f36dba43b7394f56317e3d43fe7a0f1146bb0
3
+ metadata.gz: 15ab6b5be8eeff35429449800edc336a66e125dd0e4ea8818890998a278cee4d
4
+ data.tar.gz: 6d728c433f257d54d37a5b714bfec1a08446b4843bfe31e856145e4b21f1cb03
5
5
  SHA512:
6
- metadata.gz: 488369f4cb3ed1081183b50bc440558d30774c51d7e2f75edf2b06e43d8e71394493a2b7b1f052b7e927f4656a85fd275455e6492db3b5d78c90cbd0167858d4
7
- data.tar.gz: 81dabd4d0fafefeb4f5c0ff415533764ce0bbbeeb7368270ea30dd72249d6eff62251b74e71e673247c490ed38b84e85290ed4782bd72dad111829348325158c
6
+ metadata.gz: 640399d80ef3c0354592fa9c5071df0978a3faf297303a2bc99f61f18a21079558c31560d331340a4f277de3dc7eef9dbaaa03724813f082672eccbe3b069417
7
+ data.tar.gz: ff0c4a04cf8566480df015b6dc9355c8bab6dda18cf3f572b7ad961e43e32918206fae058ab5120758737274a76c997349373a0a5c49bb2739986de93b48d2bf
@@ -85,7 +85,30 @@ module JekyllOpenSdgPlugins
85
85
  target.deep_merge(source)
86
86
  end
87
87
  else
88
- abort 'The "remote_data_prefix" configuration setting is missing.'
88
+ # If remote data is not configured, check to see if Jekyll's data folder
89
+ # already contains the data.
90
+ data_is_local = false
91
+ # Data will either be directly in site.data, or in a folder per language,
92
+ # depending on whether we are using translated builds.
93
+ if site.data.has_key? 'meta'
94
+ # We could be more thorough and check all the endpoints, but for now
95
+ # just assume that if 'meta' is there, all the endpoints are.
96
+ data_is_local = true
97
+ else
98
+ data_for_all_languages = true
99
+ site.config['languages'].each do |language|
100
+ if !site.data.has_key? language || !site.data[language].has_key? 'meta'
101
+ data_for_all_languages = false
102
+ end
103
+ end
104
+ if data_for_all_languages
105
+ data_is_local = true
106
+ end
107
+ end
108
+ # Finally give an error is there is no local data.
109
+ if !data_is_local
110
+ abort 'The "remote_data_prefix" configuration setting is missing and there is no local data.'
111
+ end
89
112
  end
90
113
 
91
114
  # Finally support the deprecated 'remote_translations' option.
@@ -1,3 +1,3 @@
1
1
  module JekyllOpenSdgPlugins
2
- VERSION = "1.0.0.rc9".freeze
2
+ VERSION = "1.0.0.rc10".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-open-sdg-plugins
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc9
4
+ version: 1.0.0.rc10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brock Fanning
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-25 00:00:00.000000000 Z
11
+ date: 2020-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll