edoxen 0.7.2 → 0.8.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/.rubocop.yml +26 -1
- data/.rubocop_todo.yml +1 -1
- data/CHANGELOG.md +133 -0
- data/README.adoc +414 -182
- data/edoxen.gemspec +10 -10
- data/lib/edoxen/action.rb +5 -4
- data/lib/edoxen/agenda.rb +4 -7
- data/lib/edoxen/agenda_item.rb +12 -5
- data/lib/edoxen/approval.rb +2 -2
- data/lib/edoxen/attendance.rb +16 -10
- data/lib/edoxen/body_vocabulary_entry.rb +24 -0
- data/lib/edoxen/body_vocabulary_host.rb +40 -0
- data/lib/edoxen/cli.rb +175 -115
- data/lib/edoxen/consideration.rb +6 -4
- data/lib/edoxen/contact.rb +35 -0
- data/lib/edoxen/contact_collection.rb +26 -0
- data/lib/edoxen/contact_identifier.rb +13 -0
- data/lib/edoxen/contact_method.rb +16 -0
- data/lib/edoxen/date_time_range.rb +16 -0
- data/lib/edoxen/deadline.rb +1 -1
- data/lib/edoxen/decision.rb +57 -0
- data/lib/edoxen/decision_collection.rb +10 -0
- data/lib/edoxen/decision_date.rb +9 -0
- data/lib/edoxen/decision_metadata.rb +27 -0
- data/lib/edoxen/decision_relation.rb +11 -0
- data/lib/edoxen/declaration.rb +25 -0
- data/lib/edoxen/entity_ref.rb +74 -0
- data/lib/edoxen/enums.rb +123 -9
- data/lib/edoxen/error.rb +1 -1
- data/lib/edoxen/extension_attribute.rb +78 -0
- data/lib/edoxen/host_ref.rb +1 -1
- data/lib/edoxen/link_checker.rb +143 -34
- data/lib/edoxen/localized_name.rb +16 -0
- data/lib/edoxen/localized_string.rb +22 -0
- data/lib/edoxen/meeting.rb +34 -42
- data/lib/edoxen/meeting_collection.rb +1 -2
- data/lib/edoxen/meeting_collection_metadata.rb +4 -2
- data/lib/edoxen/meeting_component.rb +37 -0
- data/lib/edoxen/meeting_extension.rb +25 -0
- data/lib/edoxen/meeting_identifier.rb +1 -1
- data/lib/edoxen/meeting_series.rb +26 -0
- data/lib/edoxen/minutes.rb +3 -4
- data/lib/edoxen/minutes_section.rb +12 -13
- data/lib/edoxen/motion.rb +51 -0
- data/lib/edoxen/name.rb +29 -0
- data/lib/edoxen/officer.rb +19 -0
- data/lib/edoxen/officers_host.rb +19 -0
- data/lib/edoxen/person.rb +5 -9
- data/lib/edoxen/physical_venue.rb +15 -0
- data/lib/edoxen/recurrence.rb +27 -0
- data/lib/edoxen/recurrence_by_day.rb +10 -0
- data/lib/edoxen/reference.rb +1 -1
- data/lib/edoxen/reference_data.rb +34 -44
- data/lib/edoxen/schema_validator.rb +3 -4
- data/lib/edoxen/source_url.rb +4 -4
- data/lib/edoxen/statement.rb +21 -0
- data/lib/edoxen/structured_identifier.rb +2 -2
- data/lib/edoxen/topic.rb +39 -0
- data/lib/edoxen/topic_asset.rb +14 -0
- data/lib/edoxen/topic_document.rb +16 -0
- data/lib/edoxen/venue.rb +79 -0
- data/lib/edoxen/venue_collection.rb +18 -0
- data/lib/edoxen/venue_validator.rb +74 -0
- data/lib/edoxen/version.rb +1 -1
- data/lib/edoxen/virtual_venue.rb +15 -0
- data/lib/edoxen/vote_record.rb +17 -13
- data/lib/edoxen/voting.rb +45 -0
- data/lib/edoxen/voting_counts.rb +23 -0
- data/lib/edoxen.rb +47 -15
- data/schema/edoxen.yaml +1376 -246
- data/schema/meeting.yaml +1207 -272
- data/sig/edoxen.rbs +581 -1
- metadata +62 -22
- data/lib/edoxen/_metadata.rb.deprecated +0 -57
- data/lib/edoxen/localization.rb +0 -18
- data/lib/edoxen/location.rb +0 -15
- data/lib/edoxen/meeting_localization.rb +0 -15
- data/lib/edoxen/resolution.rb +0 -43
- data/lib/edoxen/resolution_collection.rb +0 -10
- data/lib/edoxen/resolution_date.rb +0 -11
- data/lib/edoxen/resolution_metadata.rb +0 -30
- data/lib/edoxen/resolution_relation.rb +0 -11
- data/lib/edoxen/resolution_set.rb +0 -17
- data/lib/edoxen/schedule_item.rb +0 -27
- data/lib/edoxen/schedule_item_localization.rb +0 -21
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Edoxen
|
|
4
|
+
# Voting — state machine for a single vote on a Motion.
|
|
5
|
+
# Multiple votings can occur on the same Motion (e.g., unclear voice
|
|
6
|
+
# vote → chair calls a formal division → second Voting instance).
|
|
7
|
+
#
|
|
8
|
+
# State machine (VotingStatus):
|
|
9
|
+
# called → in_progress → decided | withdrawn | deferred
|
|
10
|
+
class Voting < Lutaml::Model::Serializable
|
|
11
|
+
attribute :identifier, :string
|
|
12
|
+
attribute :urn, :string
|
|
13
|
+
attribute :on_motion, :string
|
|
14
|
+
attribute :status, :string, values: Enums::VOTING_STATUS
|
|
15
|
+
attribute :voting_method, :string, values: Enums::VOTING_METHOD
|
|
16
|
+
attribute :called_by, Person
|
|
17
|
+
attribute :called_at, :date_time
|
|
18
|
+
attribute :result_declared_at, :date_time
|
|
19
|
+
attribute :result, :string, values: Enums::VOTING_OUTCOME
|
|
20
|
+
attribute :counts, VotingCounts
|
|
21
|
+
attribute :casting_vote, VoteRecord
|
|
22
|
+
attribute :vote_records, VoteRecord, collection: true
|
|
23
|
+
attribute :extensions, MeetingExtension, collection: true
|
|
24
|
+
|
|
25
|
+
def decided?
|
|
26
|
+
status == "decided"
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def in_progress?
|
|
30
|
+
status == "in_progress"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def passed?
|
|
34
|
+
decided? && result == "passed"
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def negatived?
|
|
38
|
+
decided? && result == "negatived"
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def tied?
|
|
42
|
+
decided? && result == "tied"
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Edoxen
|
|
4
|
+
# VotingCounts — tally for a Voting instance.
|
|
5
|
+
class VotingCounts < Lutaml::Model::Serializable
|
|
6
|
+
attribute :ayes, :integer
|
|
7
|
+
attribute :noes, :integer
|
|
8
|
+
attribute :abstentions, :integer
|
|
9
|
+
attribute :absent, :integer
|
|
10
|
+
|
|
11
|
+
def total
|
|
12
|
+
(ayes || 0) + (noes || 0) + (abstentions || 0) + (absent || 0)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def margin
|
|
16
|
+
(ayes || 0) - (noes || 0)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def tied?
|
|
20
|
+
ayes == noes
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
data/lib/edoxen.rb
CHANGED
|
@@ -18,36 +18,41 @@ module Edoxen
|
|
|
18
18
|
# There are intentionally NO `require_relative` calls in this gem —
|
|
19
19
|
# autoload keeps load-order semantics clean and lets us tolerate the
|
|
20
20
|
# extensive cross-references between model classes
|
|
21
|
-
# (
|
|
21
|
+
# (Decision <-> Localization, DecisionMetadata <-> Localization, etc.).
|
|
22
22
|
autoload :VERSION, "edoxen/version"
|
|
23
23
|
autoload :Error, "edoxen/error"
|
|
24
24
|
autoload :ValidationError, "edoxen/error"
|
|
25
25
|
autoload :Enums, "edoxen/enums"
|
|
26
26
|
autoload :ReferenceData, "edoxen/reference_data"
|
|
27
27
|
|
|
28
|
-
#
|
|
29
|
-
|
|
28
|
+
# --- Shared behaviours (mixed into entity + metadata classes) --------
|
|
29
|
+
autoload :OfficersHost, "edoxen/officers_host"
|
|
30
|
+
autoload :BodyVocabularyHost, "edoxen/body_vocabulary_host"
|
|
31
|
+
|
|
32
|
+
# --- Decision side ----------------------------------------------------
|
|
30
33
|
autoload :StructuredIdentifier, "edoxen/structured_identifier"
|
|
31
34
|
autoload :MeetingIdentifier, "edoxen/meeting_identifier"
|
|
32
|
-
autoload :
|
|
35
|
+
autoload :DecisionDate, "edoxen/decision_date"
|
|
33
36
|
autoload :Action, "edoxen/action"
|
|
34
37
|
autoload :Approval, "edoxen/approval"
|
|
35
38
|
autoload :Consideration, "edoxen/consideration"
|
|
36
39
|
autoload :SourceUrl, "edoxen/source_url"
|
|
37
|
-
autoload :Localization, "edoxen/localization"
|
|
38
40
|
autoload :Url, "edoxen/url"
|
|
39
|
-
autoload :
|
|
40
|
-
autoload :
|
|
41
|
-
autoload :
|
|
42
|
-
autoload :
|
|
41
|
+
autoload :DecisionRelation, "edoxen/decision_relation"
|
|
42
|
+
autoload :Decision, "edoxen/decision"
|
|
43
|
+
autoload :DecisionMetadata, "edoxen/decision_metadata"
|
|
44
|
+
autoload :DecisionCollection, "edoxen/decision_collection"
|
|
43
45
|
|
|
44
|
-
# Meeting
|
|
46
|
+
# --- Meeting/Agenda side ----------------------------------------------
|
|
45
47
|
autoload :DateRange, "edoxen/date_range"
|
|
46
|
-
autoload :
|
|
48
|
+
autoload :ContactMethod, "edoxen/contact_method"
|
|
49
|
+
autoload :ContactIdentifier, "edoxen/contact_identifier"
|
|
50
|
+
autoload :Name, "edoxen/name"
|
|
51
|
+
autoload :Contact, "edoxen/contact"
|
|
52
|
+
autoload :LocalizedString, "edoxen/localized_string"
|
|
53
|
+
autoload :LocalizedName, "edoxen/localized_name"
|
|
47
54
|
autoload :Person, "edoxen/person"
|
|
48
55
|
autoload :HostRef, "edoxen/host_ref"
|
|
49
|
-
autoload :ScheduleItemLocalization, "edoxen/schedule_item_localization"
|
|
50
|
-
autoload :ScheduleItem, "edoxen/schedule_item"
|
|
51
56
|
autoload :Deadline, "edoxen/deadline"
|
|
52
57
|
autoload :Reference, "edoxen/reference"
|
|
53
58
|
autoload :AgendaItem, "edoxen/agenda_item"
|
|
@@ -57,12 +62,39 @@ module Edoxen
|
|
|
57
62
|
autoload :MinutesSection, "edoxen/minutes_section"
|
|
58
63
|
autoload :Minutes, "edoxen/minutes"
|
|
59
64
|
autoload :MeetingRelation, "edoxen/meeting_relation"
|
|
60
|
-
autoload :MeetingLocalization, "edoxen/meeting_localization"
|
|
61
65
|
autoload :Meeting, "edoxen/meeting"
|
|
62
66
|
autoload :MeetingCollectionMetadata, "edoxen/meeting_collection_metadata"
|
|
63
67
|
autoload :MeetingCollection, "edoxen/meeting_collection"
|
|
64
68
|
|
|
65
|
-
#
|
|
69
|
+
# --- BS 0:2006 meeting-minutes concepts --------------------------------
|
|
70
|
+
autoload :Statement, "edoxen/statement"
|
|
71
|
+
autoload :Declaration, "edoxen/declaration"
|
|
72
|
+
autoload :DateTimeRange, "edoxen/date_time_range"
|
|
73
|
+
|
|
74
|
+
# --- v2 broadened-scope entities --------------------------------------
|
|
75
|
+
autoload :ExtensionAttribute, "edoxen/extension_attribute"
|
|
76
|
+
autoload :MeetingExtension, "edoxen/meeting_extension"
|
|
77
|
+
autoload :BodyVocabularyEntry, "edoxen/body_vocabulary_entry"
|
|
78
|
+
autoload :EntityRef, "edoxen/entity_ref"
|
|
79
|
+
autoload :Venue, "edoxen/venue"
|
|
80
|
+
autoload :PhysicalVenue, "edoxen/physical_venue"
|
|
81
|
+
autoload :VirtualVenue, "edoxen/virtual_venue"
|
|
82
|
+
autoload :Motion, "edoxen/motion"
|
|
83
|
+
autoload :VotingCounts, "edoxen/voting_counts"
|
|
84
|
+
autoload :Voting, "edoxen/voting"
|
|
85
|
+
autoload :TopicDocument, "edoxen/topic_document"
|
|
86
|
+
autoload :TopicAsset, "edoxen/topic_asset"
|
|
87
|
+
autoload :Topic, "edoxen/topic"
|
|
88
|
+
autoload :RecurrenceByDay, "edoxen/recurrence_by_day"
|
|
89
|
+
autoload :Recurrence, "edoxen/recurrence"
|
|
90
|
+
autoload :MeetingSeries, "edoxen/meeting_series"
|
|
91
|
+
autoload :MeetingComponent, "edoxen/meeting_component"
|
|
92
|
+
autoload :Officer, "edoxen/officer"
|
|
93
|
+
autoload :VenueValidator, "edoxen/venue_validator"
|
|
94
|
+
autoload :ContactCollection, "edoxen/contact_collection"
|
|
95
|
+
autoload :VenueCollection, "edoxen/venue_collection"
|
|
96
|
+
|
|
97
|
+
# --- Services ---------------------------------------------------------
|
|
66
98
|
autoload :SchemaValidator, "edoxen/schema_validator"
|
|
67
99
|
autoload :LinkChecker, "edoxen/link_checker"
|
|
68
100
|
autoload :Cli, "edoxen/cli"
|