jekyll-geolexica 1.8.9 → 1.8.11

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: c1f27c1600cd1a9dc7e89734a4efd24884207d7f3c5d30532272f7398356ccce
4
- data.tar.gz: aa46d0148829369821096f02159616c1e69c094db0729aad69ce971c34364eae
3
+ metadata.gz: aaa9065328d0f51222f0f6e770de9066f0c2ab7e0f9bd74c711bfb1274a9fc23
4
+ data.tar.gz: fa425de8cecbc750b6805bf4c48b3050209fa35bf9746823a62b63319bee5767
5
5
  SHA512:
6
- metadata.gz: 21384cd0d8e86a16c25bf5d33dbddb673e890ac0de6782faf6da36b71a4c65a1202fd8bfc329c6ed08dfa4f327d82b77797fb96f81e60cf8ecbd60fa612f34c2
7
- data.tar.gz: 6499a366ddf7b8dcf510671dfca22329c727fe5ec876f3da57e597c3752861c4c7cb3de0e7650bbbe407cac3e6ce43d669e98e7e794f481d10586145d8155078
6
+ metadata.gz: 7bce803d29510284253d69a9bba46752f497a9c52716e0919ddc0fc3c2bfb1bef42d729026552c459472b6965fb45370c6bd71bda0be9366892eb6be80b99651
7
+ data.tar.gz: 980d903d2d6bb184454ba6ad09119a031e963a17b15191ef972d6714761e9de6e8229f6edc55ae977df8a728620b10ed12234d9bef85f1aca403ab73d6b803b4
@@ -27,7 +27,7 @@ json.array! site["concepts"].each_with_index.to_a do |(concept, idx)|
27
27
  json.term localized.dig("terms", 0, "designation")
28
28
  json.id localized["id"]
29
29
  json.term_url "#{concept.url}#entry-lang-#{lang}"
30
- json.entry_status english["entry_status"]
30
+ json.entry_status concept["status"]
31
31
  json.language_code localized["language_code"]
32
32
  json.review_decision english["review_decision"]
33
33
  end
@@ -71,17 +71,22 @@ module Jekyll
71
71
 
72
72
  next unless concept[lang]
73
73
 
74
+ normalize_sources(concept[lang])
74
75
  concept['term'] = concept[lang]['terms'].first['designation'] if lang == 'eng'
75
-
76
- if concept[lang]['status'] && !concept[lang]['status'].empty? &&
77
- (concept[lang]['entry_status'].nil? || concept[lang]['entry_status'].empty?)
78
- concept[lang]['entry_status'] = concept[lang]['status']
79
- end
80
76
  end
81
77
 
82
78
  concept
83
79
  end
84
80
 
81
+ def normalize_sources(concept)
82
+ authoritative_sources = concept.delete('authoritativeSource') || []
83
+ concept['sources'] ||= []
84
+
85
+ authoritative_sources.each do |authoritative_source|
86
+ concept['sources'] << authoritative_source.merge({ 'type' => 'authoritative' })
87
+ end
88
+ end
89
+
85
90
  # Does nothing, but some sites may replace this method.
86
91
  def preprocess_concept_hash(concept_hash); end
87
92
 
@@ -3,6 +3,6 @@
3
3
 
4
4
  module Jekyll
5
5
  module Geolexica
6
- VERSION = "1.8.9".freeze
6
+ VERSION = "1.8.11".freeze
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-geolexica
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.9
4
+ version: 1.8.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-21 00:00:00.000000000 Z
11
+ date: 2023-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll