w3c_api 0.1.4 → 0.1.5
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/.rubocop.yml +16 -1
- data/.rubocop_todo.yml +20 -38
- data/README.adoc +51 -0
- data/Rakefile +3 -3
- data/demo/rate_limiting_demo.rb +135 -0
- data/demo/test_embed_functionality.rb +31 -30
- data/demo/test_improved_embed_functionality.rb +92 -0
- data/examples/rate_limiting_stress_test.rb +239 -0
- data/exe/w3c_api +1 -1
- data/lib/w3c_api/cli.rb +29 -28
- data/lib/w3c_api/client.rb +8 -7
- data/lib/w3c_api/commands/affiliation.rb +15 -12
- data/lib/w3c_api/commands/ecosystem.rb +22 -15
- data/lib/w3c_api/commands/group.rb +32 -25
- data/lib/w3c_api/commands/output_formatter.rb +1 -1
- data/lib/w3c_api/commands/participation.rb +11 -9
- data/lib/w3c_api/commands/series.rb +11 -9
- data/lib/w3c_api/commands/specification.rb +59 -45
- data/lib/w3c_api/commands/specification_version.rb +21 -12
- data/lib/w3c_api/commands/translation.rb +7 -6
- data/lib/w3c_api/commands/user.rb +36 -24
- data/lib/w3c_api/embed.rb +7 -7
- data/lib/w3c_api/hal.rb +168 -133
- data/lib/w3c_api/models/account.rb +3 -3
- data/lib/w3c_api/models/affiliation.rb +8 -7
- data/lib/w3c_api/models/affiliation_index.rb +3 -2
- data/lib/w3c_api/models/call_for_translation.rb +4 -3
- data/lib/w3c_api/models/chair_index.rb +2 -2
- data/lib/w3c_api/models/charter.rb +5 -5
- data/lib/w3c_api/models/charter_index.rb +3 -2
- data/lib/w3c_api/models/connected_account.rb +2 -2
- data/lib/w3c_api/models/deliverer_index.rb +3 -2
- data/lib/w3c_api/models/ecosystem.rb +8 -6
- data/lib/w3c_api/models/ecosystem_index.rb +3 -2
- data/lib/w3c_api/models/editor_index.rb +2 -2
- data/lib/w3c_api/models/evangelist_index.rb +3 -2
- data/lib/w3c_api/models/group.rb +16 -13
- data/lib/w3c_api/models/group_index.rb +2 -2
- data/lib/w3c_api/models/groups.rb +2 -2
- data/lib/w3c_api/models/participant_index.rb +3 -2
- data/lib/w3c_api/models/participation.rb +6 -5
- data/lib/w3c_api/models/participation_index.rb +3 -2
- data/lib/w3c_api/models/photo.rb +1 -1
- data/lib/w3c_api/models/serie.rb +6 -4
- data/lib/w3c_api/models/serie_index.rb +3 -2
- data/lib/w3c_api/models/spec_version.rb +10 -7
- data/lib/w3c_api/models/spec_version_index.rb +3 -2
- data/lib/w3c_api/models/spec_version_predecessor_index.rb +3 -2
- data/lib/w3c_api/models/spec_version_successor_index.rb +3 -2
- data/lib/w3c_api/models/specification.rb +17 -9
- data/lib/w3c_api/models/specification_index.rb +3 -2
- data/lib/w3c_api/models/team_contact_index.rb +3 -2
- data/lib/w3c_api/models/testimonial.rb +2 -2
- data/lib/w3c_api/models/translation.rb +4 -4
- data/lib/w3c_api/models/translation_index.rb +3 -2
- data/lib/w3c_api/models/user.rb +16 -11
- data/lib/w3c_api/models/user_index.rb +2 -2
- data/lib/w3c_api/models.rb +52 -37
- data/lib/w3c_api/version.rb +1 -1
- data/lib/w3c_api.rb +8 -8
- metadata +8 -5
data/lib/w3c_api/models/user.rb
CHANGED
@@ -62,8 +62,8 @@
|
|
62
62
|
# }
|
63
63
|
# }
|
64
64
|
|
65
|
-
require_relative
|
66
|
-
require_relative
|
65
|
+
require_relative "account"
|
66
|
+
require_relative "photo"
|
67
67
|
|
68
68
|
module W3cApi
|
69
69
|
module Models
|
@@ -79,14 +79,19 @@ module W3cApi
|
|
79
79
|
attribute :connected_accounts, Account, collection: true
|
80
80
|
attribute :photos, Photo, collection: true
|
81
81
|
|
82
|
-
hal_link :self, key:
|
83
|
-
hal_link :affiliations, key:
|
84
|
-
|
85
|
-
hal_link :
|
86
|
-
hal_link :
|
87
|
-
|
88
|
-
hal_link :
|
89
|
-
|
82
|
+
hal_link :self, key: "self", realize_class: "User"
|
83
|
+
hal_link :affiliations, key: "affiliations",
|
84
|
+
realize_class: "AffiliationIndex"
|
85
|
+
hal_link :groups, key: "groups", realize_class: "GroupIndex"
|
86
|
+
hal_link :specifications, key: "specifications",
|
87
|
+
realize_class: "SpecificationIndex"
|
88
|
+
hal_link :participations, key: "participations",
|
89
|
+
realize_class: "ParticipationIndex"
|
90
|
+
hal_link :chair_of_groups, key: "chair-of-groups",
|
91
|
+
realize_class: "GroupIndex"
|
92
|
+
hal_link :team_contact_of_groups, key: "team-contact-of-groups",
|
93
|
+
realize_class: "GroupIndex"
|
94
|
+
hal_link :photos, key: "photos", realize_class: "Photo", collection: true
|
90
95
|
|
91
96
|
key_value do
|
92
97
|
%i[
|
@@ -100,7 +105,7 @@ module W3cApi
|
|
100
105
|
connected_accounts
|
101
106
|
photos
|
102
107
|
].each do |key|
|
103
|
-
map key.to_s.tr(
|
108
|
+
map key.to_s.tr("_", "-"), to: key
|
104
109
|
end
|
105
110
|
end
|
106
111
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative
|
3
|
+
require_relative "user"
|
4
4
|
|
5
5
|
module W3cApi
|
6
6
|
module Models
|
7
7
|
class UserIndex < Lutaml::Hal::Page
|
8
|
-
hal_link :users, key:
|
8
|
+
hal_link :users, key: "users", realize_class: "User", collection: true
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
data/lib/w3c_api/models.rb
CHANGED
@@ -6,42 +6,57 @@ module W3cApi
|
|
6
6
|
# This eliminates the class loading order dependency that caused
|
7
7
|
# inconsistent type names in HAL output
|
8
8
|
|
9
|
-
autoload :Account, File.expand_path(
|
10
|
-
autoload :Affiliation, File.expand_path(
|
11
|
-
autoload :AffiliationIndex,
|
12
|
-
|
13
|
-
autoload :
|
14
|
-
|
15
|
-
autoload :
|
16
|
-
autoload :
|
17
|
-
autoload :
|
18
|
-
autoload :
|
19
|
-
|
20
|
-
autoload :
|
21
|
-
|
22
|
-
autoload :
|
23
|
-
autoload :
|
24
|
-
|
25
|
-
autoload :
|
26
|
-
autoload :
|
27
|
-
|
28
|
-
autoload :
|
29
|
-
autoload :
|
30
|
-
autoload :
|
31
|
-
autoload :
|
32
|
-
autoload :
|
33
|
-
autoload :
|
34
|
-
|
35
|
-
autoload :
|
36
|
-
autoload :
|
37
|
-
|
38
|
-
autoload :
|
39
|
-
autoload :
|
40
|
-
autoload :
|
41
|
-
autoload :
|
42
|
-
autoload :
|
43
|
-
|
44
|
-
autoload :
|
45
|
-
|
9
|
+
autoload :Account, File.expand_path("models/account", __dir__)
|
10
|
+
autoload :Affiliation, File.expand_path("models/affiliation", __dir__)
|
11
|
+
autoload :AffiliationIndex,
|
12
|
+
File.expand_path("models/affiliation_index", __dir__)
|
13
|
+
autoload :CallForTranslation,
|
14
|
+
File.expand_path("models/call_for_translation", __dir__)
|
15
|
+
autoload :ChairIndex, File.expand_path("models/chair_index", __dir__)
|
16
|
+
autoload :Charter, File.expand_path("models/charter", __dir__)
|
17
|
+
autoload :CharterIndex, File.expand_path("models/charter_index", __dir__)
|
18
|
+
autoload :ConnectedAccount,
|
19
|
+
File.expand_path("models/connected_account", __dir__)
|
20
|
+
autoload :DelivererIndex,
|
21
|
+
File.expand_path("models/deliverer_index", __dir__)
|
22
|
+
autoload :Ecosystem, File.expand_path("models/ecosystem", __dir__)
|
23
|
+
autoload :EcosystemIndex,
|
24
|
+
File.expand_path("models/ecosystem_index", __dir__)
|
25
|
+
autoload :EditorIndex, File.expand_path("models/editor_index", __dir__)
|
26
|
+
autoload :EvangelistIndex,
|
27
|
+
File.expand_path("models/evangelist_index", __dir__)
|
28
|
+
autoload :Extension, File.expand_path("models/extension", __dir__)
|
29
|
+
autoload :Group, File.expand_path("models/group", __dir__)
|
30
|
+
autoload :GroupIndex, File.expand_path("models/group_index", __dir__)
|
31
|
+
autoload :Groups, File.expand_path("models/groups", __dir__)
|
32
|
+
autoload :JoinEmailIndex, File.expand_path("models/join_emails", __dir__)
|
33
|
+
autoload :ParticipantIndex,
|
34
|
+
File.expand_path("models/participant_index", __dir__)
|
35
|
+
autoload :Participation, File.expand_path("models/participation", __dir__)
|
36
|
+
autoload :ParticipationIndex,
|
37
|
+
File.expand_path("models/participation_index", __dir__)
|
38
|
+
autoload :Photo, File.expand_path("models/photo", __dir__)
|
39
|
+
autoload :Serie, File.expand_path("models/serie", __dir__)
|
40
|
+
autoload :SerieIndex, File.expand_path("models/serie_index", __dir__)
|
41
|
+
autoload :SpecVersion, File.expand_path("models/spec_version", __dir__)
|
42
|
+
autoload :SpecVersionIndex,
|
43
|
+
File.expand_path("models/spec_version_index", __dir__)
|
44
|
+
autoload :SpecVersionPredecessorIndex,
|
45
|
+
File.expand_path("models/spec_version_predecessor_index", __dir__)
|
46
|
+
autoload :SpecVersionSuccessorIndex,
|
47
|
+
File.expand_path("models/spec_version_successor_index", __dir__)
|
48
|
+
autoload :SpecVersionRef,
|
49
|
+
File.expand_path("models/spec_version_ref", __dir__)
|
50
|
+
autoload :Specification, File.expand_path("models/specification", __dir__)
|
51
|
+
autoload :SpecificationIndex,
|
52
|
+
File.expand_path("models/specification_index", __dir__)
|
53
|
+
autoload :TeamContactIndex,
|
54
|
+
File.expand_path("models/team_contact_index", __dir__)
|
55
|
+
autoload :Testimonial, File.expand_path("models/testimonial", __dir__)
|
56
|
+
autoload :Translation, File.expand_path("models/translation", __dir__)
|
57
|
+
autoload :TranslationIndex,
|
58
|
+
File.expand_path("models/translation_index", __dir__)
|
59
|
+
autoload :User, File.expand_path("models/user", __dir__)
|
60
|
+
autoload :UserIndex, File.expand_path("models/user_index", __dir__)
|
46
61
|
end
|
47
62
|
end
|
data/lib/w3c_api/version.rb
CHANGED
data/lib/w3c_api.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "lutaml/model"
|
4
|
+
require "lutaml/hal"
|
5
5
|
|
6
|
-
require_relative
|
7
|
-
require_relative
|
8
|
-
require_relative
|
9
|
-
require_relative
|
10
|
-
require_relative
|
11
|
-
require_relative
|
6
|
+
require_relative "w3c_api/version"
|
7
|
+
require_relative "w3c_api/hal"
|
8
|
+
require_relative "w3c_api/models"
|
9
|
+
require_relative "w3c_api/client"
|
10
|
+
require_relative "w3c_api/embed"
|
11
|
+
require_relative "w3c_api/cli"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: w3c_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.1.
|
47
|
+
version: 0.1.10
|
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: 0.1.
|
54
|
+
version: 0.1.10
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rainbow
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,7 +93,10 @@ files:
|
|
93
93
|
- LICENSE.md
|
94
94
|
- README.adoc
|
95
95
|
- Rakefile
|
96
|
+
- demo/rate_limiting_demo.rb
|
96
97
|
- demo/test_embed_functionality.rb
|
98
|
+
- demo/test_improved_embed_functionality.rb
|
99
|
+
- examples/rate_limiting_stress_test.rb
|
97
100
|
- exe/w3c_api
|
98
101
|
- lib/w3c_api.rb
|
99
102
|
- lib/w3c_api/cli.rb
|
@@ -164,7 +167,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
164
167
|
requirements:
|
165
168
|
- - ">="
|
166
169
|
- !ruby/object:Gem::Version
|
167
|
-
version:
|
170
|
+
version: 3.1.0
|
168
171
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
172
|
requirements:
|
170
173
|
- - ">="
|