termium 0.1.4 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +13 -0
- data/.github/workflows/{release.yaml → release.yml} +6 -3
- data/Gemfile +8 -0
- data/README.adoc +34 -1
- data/lib/termium/abbreviation.rb +4 -4
- data/lib/termium/cli.rb +6 -1
- data/lib/termium/core.rb +36 -19
- data/lib/termium/entry_term.rb +7 -6
- data/lib/termium/extract.rb +16 -5
- data/lib/termium/extract_language.rb +3 -3
- data/lib/termium/language_module.rb +4 -4
- data/lib/termium/parameter.rb +2 -2
- data/lib/termium/source.rb +4 -4
- data/lib/termium/source_ref.rb +2 -2
- data/lib/termium/subject.rb +3 -3
- data/lib/termium/textual_support.rb +6 -4
- data/lib/termium/universal_entry.rb +3 -3
- data/lib/termium/version.rb +1 -1
- data/lib/termium.rb +7 -3
- data/termium.gemspec +10 -14
- metadata +10 -52
- data/.github/workflows/main.yml +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86c7b7ab35fb63b5d7bc8a085125db1452284327970939abd89808bf6e628097
|
4
|
+
data.tar.gz: 2229305a3891ae26ec4b8ec82ad3ae55735912c7503c19ed5c478c52d3c1db68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67d16aa7301c765ec97865d5eff33b98e02de93d8cce9332fb7d8953613fa638719941bc2e5b695a29ae4f0e8e4960864d4ad17a8d1ee8332bc66e877f81c099
|
7
|
+
data.tar.gz: 97d56933d5946f70209e0c3b054583e683e2e510ff235615d324dbb80c3f76dcdc1acea3fb1fd3003b9f1c417b193636df701685c85dfee0f2f33aee4173bc17
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
|
+
name: rake
|
4
|
+
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches: [ master, main ]
|
8
|
+
tags: [ v* ]
|
9
|
+
pull_request:
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
rake:
|
13
|
+
uses: relaton/support/.github/workflows/rake.yml@main
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
1
3
|
name: release
|
2
4
|
|
3
5
|
on:
|
@@ -5,17 +7,18 @@ on:
|
|
5
7
|
inputs:
|
6
8
|
next_version:
|
7
9
|
description: |
|
8
|
-
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
10
|
+
Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc).
|
11
|
+
Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
|
9
12
|
required: true
|
10
13
|
default: 'skip'
|
11
14
|
repository_dispatch:
|
12
15
|
types: [ do-release ]
|
13
16
|
|
17
|
+
|
14
18
|
jobs:
|
15
19
|
release:
|
16
|
-
uses:
|
20
|
+
uses: relaton/support/.github/workflows/release.yml@main
|
17
21
|
with:
|
18
22
|
next_version: ${{ github.event.inputs.next_version }}
|
19
23
|
secrets:
|
20
24
|
rubygems-api-key: ${{ secrets.GLOSSARIST_CI_RUBYGEMS_API_KEY }}
|
21
|
-
pat_token: ${{ secrets.GLOSSARIST_CI_PAT_TOKEN }}
|
data/Gemfile
CHANGED
data/README.adoc
CHANGED
@@ -6,6 +6,39 @@ The Termium Ruby gem parses export data formats from the
|
|
6
6
|
https://www.btb.termiumplus.gc.ca[TERMIUM Plus]
|
7
7
|
terminology database service from the Government of Canada.
|
8
8
|
|
9
|
+
== WARNING - Termium XML output requires manual correction
|
10
|
+
|
11
|
+
The default Termium XML output is invalid where the term domains using angular
|
12
|
+
brackets have the "greater than" sign not escaped:
|
13
|
+
|
14
|
+
[source,xml]
|
15
|
+
----
|
16
|
+
<textualSupport order="1" type="DEF">
|
17
|
+
<value><artificial intelligence> operation that allows the firing of a rule, or the
|
18
|
+
invocation of a program or a subprogram</value>
|
19
|
+
<sourceRef order="1" />
|
20
|
+
</textualSupport>
|
21
|
+
----
|
22
|
+
|
23
|
+
The remedy is to manually escape the "greater than" sign using a find/replace or a regular expression:
|
24
|
+
|
25
|
+
[source,ruby]
|
26
|
+
----
|
27
|
+
string.gsub(/<([^>]+)>/, '<\1>')
|
28
|
+
----
|
29
|
+
|
30
|
+
Results in:
|
31
|
+
|
32
|
+
[source,xml]
|
33
|
+
----
|
34
|
+
<textualSupport order="1" type="DEF">
|
35
|
+
<value><artificial intelligence> operation that allows the firing of a rule, or the
|
36
|
+
invocation of a program or a subprogram</value>
|
37
|
+
<sourceRef order="1" />
|
38
|
+
</textualSupport>
|
39
|
+
----
|
40
|
+
|
41
|
+
|
9
42
|
|
10
43
|
== Commands
|
11
44
|
|
@@ -43,7 +76,7 @@ If not provided, defaults to the basename of the input file, e.g. `foo/bar.xml`
|
|
43
76
|
|
44
77
|
=== Usage
|
45
78
|
|
46
|
-
This gem makes heavy use of the `
|
79
|
+
This gem makes heavy use of the `lutaml-model` classes for XML serialization.
|
47
80
|
|
48
81
|
The following code converts the Termium extract into a Glossarist dataset.
|
49
82
|
|
data/lib/termium/abbreviation.rb
CHANGED
@@ -6,9 +6,9 @@ require_relative "designation_operations"
|
|
6
6
|
|
7
7
|
module Termium
|
8
8
|
# For <abbreviation>
|
9
|
-
class Abbreviation <
|
10
|
-
attribute :order,
|
11
|
-
attribute :value,
|
9
|
+
class Abbreviation < Lutaml::Model::Serializable
|
10
|
+
attribute :order, :integer
|
11
|
+
attribute :value, :string
|
12
12
|
attribute :source_ref, SourceRef
|
13
13
|
attribute :parameter, Parameter, collection: true
|
14
14
|
include DesignationOperations
|
@@ -35,7 +35,7 @@ module Termium
|
|
35
35
|
set = {
|
36
36
|
"designation" => value,
|
37
37
|
"type" => "abbreviation",
|
38
|
-
"normative_status" => deprecated ? "deprecated" : "preferred"
|
38
|
+
"normative_status" => deprecated ? "deprecated" : "preferred",
|
39
39
|
}
|
40
40
|
|
41
41
|
# if geographical_area
|
data/lib/termium/cli.rb
CHANGED
@@ -9,6 +9,7 @@ module Termium
|
|
9
9
|
|
10
10
|
option :input_file, aliases: :i, required: true, desc: "Path to TERMIUM Plus XML extract"
|
11
11
|
option :output_file, aliases: :o, desc: "Output file path"
|
12
|
+
option :date_accepted, desc: "Date of acceptance for the dataset"
|
12
13
|
|
13
14
|
no_commands do
|
14
15
|
def input_file_as_path(input_file)
|
@@ -50,7 +51,11 @@ module Termium
|
|
50
51
|
puts "Size of TERMIUM dataset: #{termium_extract.core.size}"
|
51
52
|
|
52
53
|
puts "Converting to Glossarist..."
|
53
|
-
|
54
|
+
convert_options = {}
|
55
|
+
if options[:date_accepted]
|
56
|
+
convert_options[:date_accepted] = Date.parse(options[:date_accepted])
|
57
|
+
end
|
58
|
+
glossarist_col = termium_extract.to_concept(convert_options)
|
54
59
|
# pp glossarist_col.first
|
55
60
|
|
56
61
|
output_path = output_dir_as_path(options[:output_file], input_path)
|
data/lib/termium/core.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "uuidtools"
|
3
4
|
require_relative "language_module"
|
4
5
|
require_relative "subject"
|
5
6
|
require_relative "universal_entry"
|
@@ -7,13 +8,13 @@ require_relative "source"
|
|
7
8
|
|
8
9
|
module Termium
|
9
10
|
# For <core>
|
10
|
-
class Core <
|
11
|
-
attribute :identification_number,
|
12
|
-
attribute :dissemination_level,
|
11
|
+
class Core < Lutaml::Model::Serializable
|
12
|
+
attribute :identification_number, :string
|
13
|
+
attribute :dissemination_level, :string
|
13
14
|
|
14
15
|
attribute :language_module, LanguageModule, collection: true
|
15
16
|
attribute :subject, Subject
|
16
|
-
attribute :universal_entry, UniversalEntry
|
17
|
+
attribute :universal_entry, UniversalEntry, collection: true
|
17
18
|
attribute :source, Source, collection: true
|
18
19
|
|
19
20
|
xml do
|
@@ -36,25 +37,41 @@ module Termium
|
|
36
37
|
source.map(&:to_concept_source)
|
37
38
|
end
|
38
39
|
|
40
|
+
# Deterministic v4 UUID by using the number string
|
41
|
+
def uuid
|
42
|
+
UUIDTools::UUID.md5_create(UUIDTools::UUID_DNS_NAMESPACE, identification_number).to_s
|
43
|
+
end
|
44
|
+
|
39
45
|
# TODO: Utilize "subject" in the Glossarist object:
|
40
46
|
# <subject abbreviation="YBB"
|
41
47
|
# details="Compartment - ISO/IEC JTC 1 Information Technology Vocabulary" />
|
42
|
-
def to_concept
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
localized_concept.id = identification_number
|
50
|
-
# TODO: this should just be localized_concept.notes << universal_entry.value
|
51
|
-
# TODO: Depends on https://github.com/glossarist/glossarist-ruby/issues/82
|
52
|
-
localized_concept.notes << Glossarist::DetailedDefinition.new(universal_entry.value)
|
53
|
-
localized_concept.sources = concept_sources
|
54
|
-
concept.add_localization(localized_concept)
|
55
|
-
end
|
48
|
+
def to_concept(options = {})
|
49
|
+
Glossarist::ManagedConcept.new.tap do |concept|
|
50
|
+
# The way to set the universal concept's identifier: data.identifier
|
51
|
+
concept.id = identification_number
|
52
|
+
|
53
|
+
concept.uuid = uuid
|
56
54
|
|
57
|
-
|
55
|
+
# Assume no related concepts
|
56
|
+
concept.related = []
|
57
|
+
concept.status = "valid"
|
58
|
+
|
59
|
+
if options[:date_accepted]
|
60
|
+
concept.date_accepted = options[:date_accepted]
|
61
|
+
end
|
62
|
+
|
63
|
+
language_module.map(&:to_concept).each do |localized_concept|
|
64
|
+
# TODO: This is needed to skip the empty french entries of 10031781 and 10031778
|
65
|
+
next if localized_concept.nil?
|
66
|
+
|
67
|
+
localized_concept.id = identification_number
|
68
|
+
universal_entry.each do |entry|
|
69
|
+
localized_concept.notes << entry.value
|
70
|
+
end
|
71
|
+
localized_concept.sources = concept_sources
|
72
|
+
concept.add_localization(localized_concept)
|
73
|
+
end
|
74
|
+
end
|
58
75
|
end
|
59
76
|
end
|
60
77
|
end
|
data/lib/termium/entry_term.rb
CHANGED
@@ -7,9 +7,9 @@ require_relative "designation_operations"
|
|
7
7
|
|
8
8
|
module Termium
|
9
9
|
# For <entryTerm>
|
10
|
-
class EntryTerm <
|
11
|
-
attribute :order,
|
12
|
-
attribute :value,
|
10
|
+
class EntryTerm < Lutaml::Model::Serializable
|
11
|
+
attribute :order, :integer
|
12
|
+
attribute :value, :string
|
13
13
|
attribute :source_ref, SourceRef
|
14
14
|
attribute :abbreviation, Abbreviation, collection: true
|
15
15
|
attribute :parameter, Parameter, collection: true
|
@@ -19,9 +19,9 @@ module Termium
|
|
19
19
|
root "entryTerm"
|
20
20
|
map_attribute "order", to: :order
|
21
21
|
map_attribute "value", to: :value
|
22
|
-
map_element "abbreviation", to: :abbreviation
|
23
22
|
map_element "sourceRef", to: :source_ref
|
24
23
|
map_element "parameter", to: :parameter
|
24
|
+
map_element "abbreviation", to: :abbreviation
|
25
25
|
end
|
26
26
|
|
27
27
|
# attr_accessor :geographical_area,
|
@@ -35,8 +35,9 @@ module Termium
|
|
35
35
|
"CAN" => "CA",
|
36
36
|
"GB" => "GB",
|
37
37
|
"AUS" => "AU",
|
38
|
-
"EUR" => "EU"
|
38
|
+
"EUR" => "EU",
|
39
39
|
}.freeze
|
40
|
+
|
40
41
|
def geographical_area
|
41
42
|
keys = GEOGRAPHICAL_CODE_MAPPING.keys
|
42
43
|
usage = parameter.select do |x|
|
@@ -72,7 +73,7 @@ module Termium
|
|
72
73
|
set = {
|
73
74
|
"designation" => value,
|
74
75
|
"type" => "expression",
|
75
|
-
"normative_status" => normative_status
|
76
|
+
"normative_status" => normative_status,
|
76
77
|
}
|
77
78
|
|
78
79
|
set["geographical_area"] = geographical_area if geographical_area
|
data/lib/termium/extract.rb
CHANGED
@@ -5,23 +5,34 @@ require_relative "core"
|
|
5
5
|
|
6
6
|
module Termium
|
7
7
|
# For <extract>
|
8
|
-
class Extract <
|
9
|
-
attribute :language,
|
8
|
+
class Extract < Lutaml::Model::Serializable
|
9
|
+
attribute :language, :string
|
10
10
|
attribute :extract_language, ExtractLanguage, collection: true
|
11
11
|
attribute :core, Core, collection: true
|
12
12
|
|
13
13
|
xml do
|
14
14
|
root "termium_extract"
|
15
|
-
# namespace
|
15
|
+
# namespace "http://termium.tpsgc-pwgsc.gc.ca/schemas/2012/06/Termium", "ns2"
|
16
16
|
|
17
17
|
map_attribute "language", to: :language
|
18
18
|
map_element "extractLanguage", to: :extract_language
|
19
19
|
map_element "core", to: :core
|
20
20
|
end
|
21
21
|
|
22
|
-
|
22
|
+
# xml do
|
23
|
+
# root "termium_extract"
|
24
|
+
# namespace "http://termium.tpsgc-pwgsc.gc.ca/schemas/2012/06/Termium", "ns2"
|
25
|
+
|
26
|
+
# map_attribute "language", to: :language, namespace: nil
|
27
|
+
# map_element "extractLanguage", to: :extract_language, namespace: nil
|
28
|
+
# map_element "core", to: :core, namespace: nil
|
29
|
+
# end
|
30
|
+
|
31
|
+
def to_concept(options = {})
|
23
32
|
coll = Glossarist::ManagedConceptCollection.new
|
24
|
-
coll.managed_concepts = core.map
|
33
|
+
coll.managed_concepts = core.map do |managed_concept|
|
34
|
+
managed_concept.to_concept(options)
|
35
|
+
end
|
25
36
|
coll
|
26
37
|
end
|
27
38
|
end
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
module Termium
|
4
4
|
# For <extractLanguage>
|
5
|
-
class ExtractLanguage <
|
6
|
-
attribute :language,
|
7
|
-
attribute :order,
|
5
|
+
class ExtractLanguage < Lutaml::Model::Serializable
|
6
|
+
attribute :language, :string
|
7
|
+
attribute :order, :integer
|
8
8
|
xml do
|
9
9
|
root "extractLanguage"
|
10
10
|
map_attribute "language", to: :language
|
@@ -5,8 +5,8 @@ require_relative "textual_support"
|
|
5
5
|
|
6
6
|
module Termium
|
7
7
|
# For <languageModule>
|
8
|
-
class LanguageModule <
|
9
|
-
attribute :language,
|
8
|
+
class LanguageModule < Lutaml::Model::Serializable
|
9
|
+
attribute :language, :string
|
10
10
|
attribute :entry_term, EntryTerm, collection: true
|
11
11
|
attribute :textual_support, TextualSupport, collection: true
|
12
12
|
xml do
|
@@ -42,7 +42,7 @@ module Termium
|
|
42
42
|
|
43
43
|
LANGUAGE_CODE_MAPPING = {
|
44
44
|
"en" => "eng",
|
45
|
-
"fr" => "fre"
|
45
|
+
"fr" => "fre",
|
46
46
|
}.freeze
|
47
47
|
|
48
48
|
def designations
|
@@ -59,7 +59,7 @@ module Termium
|
|
59
59
|
"terms" => designations.map(&:to_h),
|
60
60
|
"definition" => [{ content: definition }],
|
61
61
|
"notes" => notes,
|
62
|
-
"examples" => examples
|
62
|
+
"examples" => examples,
|
63
63
|
}
|
64
64
|
|
65
65
|
src["domain"] = domain if domain
|
data/lib/termium/parameter.rb
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
module Termium
|
4
4
|
# For <parameter>
|
5
|
-
class Parameter <
|
5
|
+
class Parameter < Lutaml::Model::Serializable
|
6
6
|
# <parameter abbreviation="NORM"/>
|
7
|
-
attribute :abbreviation,
|
7
|
+
attribute :abbreviation, :string
|
8
8
|
xml do
|
9
9
|
root "parameter"
|
10
10
|
map_attribute "abbreviation", to: :abbreviation
|
data/lib/termium/source.rb
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
module Termium
|
4
4
|
# For <source>
|
5
|
-
class Source <
|
5
|
+
class Source < Lutaml::Model::Serializable
|
6
6
|
ISO_BIB_REGEX = /\AISO-([\d-]+)\s+\*\s+(\d{4})\s+.*/.freeze
|
7
7
|
ISOIEC_BIB_REGEX = /\AISO-IEC-([\d-]+)\s+\*\s+(\d{4})\s+.*/.freeze
|
8
8
|
|
9
|
-
attribute :order,
|
10
|
-
attribute :details,
|
9
|
+
attribute :order, :integer
|
10
|
+
attribute :details, :string
|
11
11
|
xml do
|
12
12
|
root "source"
|
13
13
|
map_attribute "order", to: :order
|
@@ -28,7 +28,7 @@ module Termium
|
|
28
28
|
Glossarist::ConceptSource.new({
|
29
29
|
"type" => "lineage",
|
30
30
|
"ref" => content,
|
31
|
-
"status" => "identical"
|
31
|
+
"status" => "identical",
|
32
32
|
})
|
33
33
|
end
|
34
34
|
end
|
data/lib/termium/source_ref.rb
CHANGED
data/lib/termium/subject.rb
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
module Termium
|
4
4
|
# For <subject>
|
5
|
-
class Subject <
|
6
|
-
attribute :abbreviation,
|
7
|
-
attribute :details,
|
5
|
+
class Subject < Lutaml::Model::Serializable
|
6
|
+
attribute :abbreviation, :string
|
7
|
+
attribute :details, :string
|
8
8
|
|
9
9
|
# <subject abbreviation="YBB" details="Compartment - ISO/IEC JTC 1 Information Technology Vocabulary"/>
|
10
10
|
xml do
|
@@ -4,10 +4,10 @@ require_relative "source_ref"
|
|
4
4
|
|
5
5
|
module Termium
|
6
6
|
# For <textualSupport>
|
7
|
-
class TextualSupport <
|
8
|
-
attribute :order,
|
9
|
-
attribute :type,
|
10
|
-
attribute :value,
|
7
|
+
class TextualSupport < Lutaml::Model::Serializable
|
8
|
+
attribute :order, :integer
|
9
|
+
attribute :type, :string
|
10
|
+
attribute :value, :string
|
11
11
|
attribute :source_ref, SourceRef
|
12
12
|
xml do
|
13
13
|
root "textualSupport"
|
@@ -32,6 +32,7 @@ module Termium
|
|
32
32
|
end
|
33
33
|
|
34
34
|
EXAMPLE_REGEX = /\AEx[ea]mples?\s*:\s*/.freeze
|
35
|
+
|
35
36
|
def is_example?
|
36
37
|
value_cleaned.match(EXAMPLE_REGEX)
|
37
38
|
end
|
@@ -53,6 +54,7 @@ module Termium
|
|
53
54
|
end
|
54
55
|
|
55
56
|
DEFINITION_REGEX = /\A<(.+?)>\s*/.freeze
|
57
|
+
|
56
58
|
def value_definition
|
57
59
|
value_cleaned.gsub(DEFINITION_REGEX, "")
|
58
60
|
end
|
@@ -5,9 +5,9 @@ require_relative "parameter"
|
|
5
5
|
|
6
6
|
module Termium
|
7
7
|
# For <universalEntry>
|
8
|
-
class UniversalEntry <
|
9
|
-
attribute :order,
|
10
|
-
attribute :value,
|
8
|
+
class UniversalEntry < Lutaml::Model::Serializable
|
9
|
+
attribute :order, :integer
|
10
|
+
attribute :value, :string
|
11
11
|
attribute :source_ref, SourceRef
|
12
12
|
attribute :parameter, Parameter
|
13
13
|
|
data/lib/termium/version.rb
CHANGED
data/lib/termium.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "glossarist"
|
4
|
-
|
5
|
-
require "
|
6
|
-
|
4
|
+
|
5
|
+
require "lutaml/model"
|
6
|
+
require "lutaml/model/xml_adapter/nokogiri_adapter"
|
7
|
+
|
8
|
+
Lutaml::Model::Config.configure do |config|
|
9
|
+
config.xml_adapter = Lutaml::Model::XmlAdapter::NokogiriAdapter
|
10
|
+
end
|
7
11
|
|
8
12
|
module Termium
|
9
13
|
class Error < StandardError; end
|
data/termium.gemspec
CHANGED
@@ -12,10 +12,10 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.authors = ["Ribose"]
|
13
13
|
spec.email = ["open.source@ribose.com"]
|
14
14
|
|
15
|
-
spec.summary
|
15
|
+
spec.summary =
|
16
16
|
"Parser for the TERMIUM Plus terminology database of the Government of Canada"
|
17
|
-
spec.homepage
|
18
|
-
spec.license
|
17
|
+
spec.homepage = "https://github.com/glossarist/termium"
|
18
|
+
spec.license = "BSD-2-Clause"
|
19
19
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
|
20
20
|
|
21
21
|
spec.metadata["homepage_uri"] = spec.homepage
|
@@ -23,19 +23,15 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues"
|
24
24
|
|
25
25
|
# Specify which files should be added to the gem when it is released.
|
26
|
-
spec.files
|
27
|
-
|
26
|
+
spec.files = all_files_in_git
|
27
|
+
.reject { |f| f.match(%r{\A(?:test|spec|features|bin|\.)/}) }
|
28
28
|
|
29
|
-
spec.bindir
|
30
|
-
spec.executables
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
|
-
spec.add_dependency "glossarist", "~> 2.
|
34
|
-
spec.add_dependency "
|
33
|
+
spec.add_dependency "glossarist", "~> 2.2"
|
34
|
+
spec.add_dependency "lutaml-model"
|
35
35
|
spec.add_dependency "thor"
|
36
|
-
|
37
|
-
spec.add_development_dependency "pry", "~> 0.14.0"
|
38
|
-
spec.add_development_dependency "rake", "~> 13.0"
|
39
|
-
spec.add_development_dependency "rspec", "~> 3.10"
|
40
|
-
spec.add_development_dependency "rubocop"
|
36
|
+
spec.add_dependency "uuidtools"
|
41
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: termium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: glossarist
|
@@ -16,16 +16,16 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: lutaml-model
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -53,55 +53,13 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 0.14.0
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 0.14.0
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rake
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '13.0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '13.0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rspec
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '3.10'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '3.10'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rubocop
|
56
|
+
name: uuidtools
|
99
57
|
requirement: !ruby/object:Gem::Requirement
|
100
58
|
requirements:
|
101
59
|
- - ">="
|
102
60
|
- !ruby/object:Gem::Version
|
103
61
|
version: '0'
|
104
|
-
type: :
|
62
|
+
type: :runtime
|
105
63
|
prerelease: false
|
106
64
|
version_requirements: !ruby/object:Gem::Requirement
|
107
65
|
requirements:
|
@@ -116,8 +74,8 @@ executables:
|
|
116
74
|
extensions: []
|
117
75
|
extra_rdoc_files: []
|
118
76
|
files:
|
119
|
-
- ".github/workflows/
|
120
|
-
- ".github/workflows/release.
|
77
|
+
- ".github/workflows/rake.yml"
|
78
|
+
- ".github/workflows/release.yml"
|
121
79
|
- ".gitignore"
|
122
80
|
- ".rspec"
|
123
81
|
- CODE_OF_CONDUCT.md
|
@@ -165,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
123
|
- !ruby/object:Gem::Version
|
166
124
|
version: '0'
|
167
125
|
requirements: []
|
168
|
-
rubygems_version: 3.3.
|
126
|
+
rubygems_version: 3.3.27
|
169
127
|
signing_key:
|
170
128
|
specification_version: 4
|
171
129
|
summary: Parser for the TERMIUM Plus terminology database of the Government of Canada
|
data/.github/workflows/main.yml
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
name: Ruby
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- main
|
7
|
-
|
8
|
-
pull_request:
|
9
|
-
|
10
|
-
jobs:
|
11
|
-
build:
|
12
|
-
runs-on: ubuntu-latest
|
13
|
-
name: Ruby ${{ matrix.ruby }}
|
14
|
-
strategy:
|
15
|
-
matrix:
|
16
|
-
ruby:
|
17
|
-
- '3.1.2'
|
18
|
-
|
19
|
-
steps:
|
20
|
-
- uses: actions/checkout@v3
|
21
|
-
- name: Set up Ruby
|
22
|
-
uses: ruby/setup-ruby@v1
|
23
|
-
with:
|
24
|
-
ruby-version: ${{ matrix.ruby }}
|
25
|
-
bundler-cache: true
|
26
|
-
- name: Run the default task
|
27
|
-
run: bundle exec rake
|