ietf-data-importer 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/check_update.yml +7 -7
- data/.gitignore +4 -0
- data/.rubocop.yml +8 -1
- data/.rubocop_todo.yml +49 -0
- data/CLAUDE.md +73 -0
- data/Gemfile +1 -2
- data/README.adoc +32 -24
- data/exe/ietf-data-importer +1 -1
- data/ietf-data-importer.gemspec +3 -2
- data/lib/ietf/data/importer/cli.rb +14 -23
- data/lib/ietf/data/importer/group.rb +39 -4
- data/lib/ietf/data/importer/group_collection.rb +101 -1
- data/lib/ietf/data/importer/scrapers/base_scraper.rb +18 -9
- data/lib/ietf/data/importer/scrapers/ietf_scraper.rb +137 -213
- data/lib/ietf/data/importer/scrapers/irtf_scraper.rb +142 -291
- data/lib/ietf/data/importer/scrapers.rb +7 -35
- data/lib/ietf/data/importer/version.rb +1 -1
- data/lib/ietf/data/importer.rb +56 -66
- metadata +14 -11
data/lib/ietf/data/importer.rb
CHANGED
|
@@ -1,92 +1,82 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "yaml"
|
|
4
|
-
require_relative "importer/version"
|
|
5
|
-
require_relative "importer/group_collection"
|
|
6
|
-
require_relative "importer/scrapers"
|
|
7
|
-
require_relative "importer/cli"
|
|
8
4
|
|
|
9
5
|
module Ietf
|
|
10
6
|
module Data
|
|
11
|
-
# Main module for IETF/IRTF group data importer
|
|
12
7
|
module Importer
|
|
13
|
-
|
|
8
|
+
autoload :VERSION, "#{__dir__}/importer/version"
|
|
9
|
+
autoload :Group, "#{__dir__}/importer/group"
|
|
10
|
+
autoload :GroupCollection, "#{__dir__}/importer/group_collection"
|
|
11
|
+
autoload :Cli, "#{__dir__}/importer/cli"
|
|
12
|
+
autoload :Scrapers, "#{__dir__}/importer/scrapers"
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
GROUPS_PATH = File.join(File.dirname(__FILE__), "importer", "groups.yaml")
|
|
14
|
+
GROUPS_PATH = File.join(__dir__, "importer", "groups.yaml")
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
GroupCollection.from_yaml(File.read(GROUPS_PATH))
|
|
22
|
-
else
|
|
23
|
-
GroupCollection.new(groups: [])
|
|
16
|
+
class << self
|
|
17
|
+
def collection
|
|
18
|
+
@collection ||= GroupCollection.from_file(GROUPS_PATH)
|
|
24
19
|
end
|
|
25
|
-
end
|
|
26
20
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
end
|
|
21
|
+
def reset!
|
|
22
|
+
@collection = nil
|
|
23
|
+
end
|
|
31
24
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
end
|
|
25
|
+
def load_groups
|
|
26
|
+
collection
|
|
27
|
+
end
|
|
36
28
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
end
|
|
29
|
+
def groups
|
|
30
|
+
collection.groups
|
|
31
|
+
end
|
|
41
32
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
end
|
|
33
|
+
def group_exists?(abbreviation)
|
|
34
|
+
collection.exists?(abbreviation)
|
|
35
|
+
end
|
|
46
36
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
end
|
|
37
|
+
def find_group(abbreviation)
|
|
38
|
+
collection.find_by_abbreviation(abbreviation)
|
|
39
|
+
end
|
|
51
40
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
end
|
|
41
|
+
def ietf_groups
|
|
42
|
+
collection.ietf_groups
|
|
43
|
+
end
|
|
56
44
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
end
|
|
45
|
+
def irtf_groups
|
|
46
|
+
collection.irtf_groups
|
|
47
|
+
end
|
|
61
48
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
end
|
|
49
|
+
def working_groups
|
|
50
|
+
collection.working_groups
|
|
51
|
+
end
|
|
66
52
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
end
|
|
53
|
+
def research_groups
|
|
54
|
+
collection.research_groups
|
|
55
|
+
end
|
|
71
56
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
end
|
|
57
|
+
def groups_by_type(type)
|
|
58
|
+
collection.by_type(type)
|
|
59
|
+
end
|
|
76
60
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
end
|
|
61
|
+
def groups_by_area(area)
|
|
62
|
+
collection.by_area(area)
|
|
63
|
+
end
|
|
81
64
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
65
|
+
def active_groups
|
|
66
|
+
collection.active
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def concluded_groups
|
|
70
|
+
collection.concluded
|
|
71
|
+
end
|
|
86
72
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
73
|
+
def group_types
|
|
74
|
+
collection.group_types
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def areas
|
|
78
|
+
collection.areas
|
|
79
|
+
end
|
|
90
80
|
end
|
|
91
81
|
end
|
|
92
82
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ietf-data-importer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-05-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|
|
@@ -16,42 +16,42 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0.
|
|
19
|
+
version: '0.8'
|
|
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: '0.
|
|
26
|
+
version: '0.8'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: nokogiri
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '1.
|
|
33
|
+
version: '1.19'
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '1.
|
|
40
|
+
version: '1.19'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
42
|
+
name: thor
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '1.
|
|
47
|
+
version: '1.0'
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '1.
|
|
54
|
+
version: '1.0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: yaml
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -83,6 +83,8 @@ files:
|
|
|
83
83
|
- ".github/workflows/release.yml"
|
|
84
84
|
- ".gitignore"
|
|
85
85
|
- ".rubocop.yml"
|
|
86
|
+
- ".rubocop_todo.yml"
|
|
87
|
+
- CLAUDE.md
|
|
86
88
|
- Gemfile
|
|
87
89
|
- README.adoc
|
|
88
90
|
- Rakefile
|
|
@@ -103,7 +105,8 @@ files:
|
|
|
103
105
|
homepage: https://github.com/metanorma/ietf-data-importer
|
|
104
106
|
licenses:
|
|
105
107
|
- BSD-2-Clause
|
|
106
|
-
metadata:
|
|
108
|
+
metadata:
|
|
109
|
+
rubygems_mfa_required: 'true'
|
|
107
110
|
post_install_message:
|
|
108
111
|
rdoc_options: []
|
|
109
112
|
require_paths:
|