wikibase_representable 0.1.4 → 0.2.0
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/.rspec +1 -0
- data/.rubocop_todo.yml +17 -0
- data/lib/wikibase_representable/model/{alias_group_list.rb → alias_group_hash.rb} +2 -2
- data/lib/wikibase_representable/model/data_value.rb +1 -1
- data/lib/wikibase_representable/model/entity_id.rb +1 -1
- data/lib/wikibase_representable/model/entity_id_value.rb +4 -4
- data/lib/wikibase_representable/model/item.rb +18 -22
- data/lib/wikibase_representable/model/property.rb +9 -25
- data/lib/wikibase_representable/model/property_value_snak.rb +1 -1
- data/lib/wikibase_representable/model/site_link.rb +1 -1
- data/lib/wikibase_representable/model/{site_link_list.rb → site_link_hash.rb} +1 -1
- data/lib/wikibase_representable/model/{snak_list.rb → snak_hash.rb} +2 -2
- data/lib/wikibase_representable/model/statement.rb +3 -3
- data/lib/wikibase_representable/model/{statement_list.rb → statement_hash.rb} +2 -2
- data/lib/wikibase_representable/model/term.rb +1 -1
- data/lib/wikibase_representable/model/{term_list.rb → term_hash.rb} +2 -2
- data/lib/wikibase_representable/model/time.rb +1 -1
- data/lib/wikibase_representable/model/time_value.rb +7 -7
- data/lib/wikibase_representable/model.rb +5 -5
- data/lib/wikibase_representable/representers/{alias_group_list_representer.rb → alias_group_hash_representer.rb} +1 -1
- data/lib/wikibase_representable/representers/item_representer.rb +16 -17
- data/lib/wikibase_representable/representers/property_representer.rb +13 -13
- data/lib/wikibase_representable/representers/{site_link_list_representer.rb → site_link_hash_representer.rb} +1 -1
- data/lib/wikibase_representable/representers/{snak_list_representer.rb → snak_hash_representer.rb} +2 -2
- data/lib/wikibase_representable/representers/{statement_list_representer.rb → statement_hash_representer.rb} +1 -1
- data/lib/wikibase_representable/representers/statement_representer.rb +3 -3
- data/lib/wikibase_representable/representers/{term_list_representer.rb → term_hash_representer.rb} +2 -2
- data/lib/wikibase_representable/representers.rb +5 -5
- data/lib/wikibase_representable/version.rb +1 -1
- metadata +41 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0172a6186013fc4a2c5584eff040ca1c0ef7f774dac7934c5539f8f646227a3
|
4
|
+
data.tar.gz: 83e494bc775b64224172092b50a903d3b128f462cab6b945abdadd5b733e209b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ad5a4d89f31b22a5ad54b7370e7c41689c3fa71d657351e6bc21ab876de2e93408a0af33fefa95a23ce2de63e1e935f5328da2dd36d1316b1275a5de4ccbf3f
|
7
|
+
data.tar.gz: b7b25e41ec60dca76a97e1b34695496a36c97921120c19c6b30c6b651b1865d5ea1cd63a5c7c3b40792d02996f0c63d06550b01e4d63903399296b670c2e5545
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/.rubocop_todo.yml
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2025-01-18 04:14:35 UTC using RuboCop version 1.69.2.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 13
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
11
|
+
# Configuration parameters: EnforceForPrefixed.
|
12
|
+
Rails/Delegate:
|
13
|
+
Exclude:
|
14
|
+
- 'lib/wikibase_representable/model/entity_id_value.rb'
|
15
|
+
- 'lib/wikibase_representable/model/item.rb'
|
16
|
+
- 'lib/wikibase_representable/model/statement.rb'
|
17
|
+
- 'lib/wikibase_representable/model/time_value.rb'
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
module WikibaseRepresentable
|
4
4
|
module Model
|
5
|
-
#
|
6
|
-
class
|
5
|
+
# Hash of alias lists keyed by language code.
|
6
|
+
class AliasGroupHash < Hash
|
7
7
|
def aliases_for_language(language_code)
|
8
8
|
fetch(language_code, nil)
|
9
9
|
end
|
@@ -13,19 +13,19 @@ module WikibaseRepresentable
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def id
|
16
|
-
|
16
|
+
value.id
|
17
17
|
end
|
18
18
|
|
19
19
|
def entity_type
|
20
|
-
|
20
|
+
value.entity_type
|
21
21
|
end
|
22
22
|
|
23
23
|
def numeric_id
|
24
|
-
|
24
|
+
value.numeric_id
|
25
25
|
end
|
26
26
|
|
27
27
|
def state
|
28
|
-
[
|
28
|
+
[type, value]
|
29
29
|
end
|
30
30
|
|
31
31
|
def ==(other)
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'wikibase_representable/model/
|
4
|
-
require 'wikibase_representable/model/
|
5
|
-
require 'wikibase_representable/model/
|
6
|
-
require 'wikibase_representable/model/
|
3
|
+
require 'wikibase_representable/model/alias_group_hash'
|
4
|
+
require 'wikibase_representable/model/site_link_hash'
|
5
|
+
require 'wikibase_representable/model/statement_hash'
|
6
|
+
require 'wikibase_representable/model/term_hash'
|
7
7
|
require 'wikibase_representable/model/term'
|
8
8
|
|
9
9
|
module WikibaseRepresentable
|
@@ -13,48 +13,44 @@ module WikibaseRepresentable
|
|
13
13
|
class Item
|
14
14
|
ENTITY_TYPE = 'item'
|
15
15
|
|
16
|
-
attr_accessor :type, :id, :
|
16
|
+
attr_accessor :type, :id, :labels_hash, :descriptions_hash, :alias_groups_hash, :site_links_hash, :statements_hash
|
17
17
|
|
18
18
|
def initialize(**kwargs)
|
19
19
|
@type = ENTITY_TYPE
|
20
20
|
@id = kwargs[:id]
|
21
|
-
@
|
22
|
-
@
|
23
|
-
@
|
24
|
-
@
|
25
|
-
@
|
21
|
+
@labels_hash = kwargs[:labels_hash] || TermHash.new
|
22
|
+
@descriptions_hash = kwargs[:descriptions_hash] || TermHash.new
|
23
|
+
@alias_groups_hash = kwargs[:alias_groups_hash] || AliasGroupHash.new
|
24
|
+
@site_links_hash = kwargs[:site_links_hash] || SiteLinkHash.new
|
25
|
+
@statements_hash = kwargs[:statements_hash] || StatementHash.new
|
26
26
|
end
|
27
27
|
|
28
28
|
def label(language_code)
|
29
|
-
|
29
|
+
labels_hash.value_for_language(language_code)
|
30
30
|
end
|
31
31
|
|
32
32
|
def aliases_for_language(language_code)
|
33
|
-
|
33
|
+
alias_groups_hash.aliases_for_language(language_code)
|
34
34
|
end
|
35
35
|
|
36
36
|
def statements_by_property_id(property_id)
|
37
|
-
|
37
|
+
statements_hash.statements_by_property_id(property_id)
|
38
38
|
end
|
39
39
|
|
40
40
|
def statements_by_property_id?(property_id)
|
41
|
-
|
41
|
+
statements_hash.statements_by_property_id?(property_id)
|
42
42
|
end
|
43
43
|
|
44
44
|
def site_link(site_id)
|
45
|
-
|
45
|
+
site_links_hash.link_for_site(site_id)
|
46
46
|
end
|
47
47
|
|
48
48
|
def link_to_site?(site_id)
|
49
|
-
|
50
|
-
end
|
51
|
-
|
52
|
-
def empty?
|
53
|
-
@labels.empty? && @descriptions.empty? && @alias_groups.empty? && @site_links.empty? && @statements.empty?
|
49
|
+
site_links_hash.link_for_site?(site_id)
|
54
50
|
end
|
55
51
|
|
56
52
|
def state
|
57
|
-
[
|
53
|
+
[type, id, labels_hash, descriptions_hash, alias_groups_hash, site_links_hash, statements_hash]
|
58
54
|
end
|
59
55
|
|
60
56
|
def ==(other)
|
@@ -65,7 +61,7 @@ module WikibaseRepresentable
|
|
65
61
|
self == other
|
66
62
|
end
|
67
63
|
|
68
|
-
alias
|
64
|
+
alias claims_hash statements_hash
|
69
65
|
alias claims_by_property_id statements_by_property_id
|
70
66
|
alias claims_by_property_id? statements_by_property_id?
|
71
67
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'wikibase_representable/model/
|
4
|
-
require 'wikibase_representable/model/
|
5
|
-
require 'wikibase_representable/model/
|
3
|
+
require 'wikibase_representable/model/alias_group_hash'
|
4
|
+
require 'wikibase_representable/model/statement_hash'
|
5
|
+
require 'wikibase_representable/model/term_hash'
|
6
6
|
require 'wikibase_representable/model/term'
|
7
7
|
|
8
8
|
module WikibaseRepresentable
|
@@ -11,36 +11,20 @@ module WikibaseRepresentable
|
|
11
11
|
class Property
|
12
12
|
ENTITY_TYPE = 'property'
|
13
13
|
|
14
|
-
attr_accessor :type, :id, :data_type, :
|
14
|
+
attr_accessor :type, :id, :data_type, :labels_hash, :descriptions_hash, :alias_groups_hash, :statements_hash
|
15
15
|
|
16
16
|
def initialize(**kwargs)
|
17
17
|
@type = ENTITY_TYPE
|
18
18
|
@data_type = kwargs[:data_type]
|
19
19
|
@id = kwargs[:id]
|
20
|
-
@
|
21
|
-
@
|
22
|
-
@
|
23
|
-
@
|
24
|
-
end
|
25
|
-
|
26
|
-
def label(language_code, value)
|
27
|
-
@labels.term(Term.new(language_code, value))
|
28
|
-
end
|
29
|
-
|
30
|
-
def description(language_code, value)
|
31
|
-
@descriptions.term(Term.new(language_code, value))
|
32
|
-
end
|
33
|
-
|
34
|
-
def aliases(language_code, aliases)
|
35
|
-
@alias_groups.aliases_for_language(language_code, aliases)
|
36
|
-
end
|
37
|
-
|
38
|
-
def empty?
|
39
|
-
@labels.empty? && @descriptions.empty? && @alias_groups.empty? && @statements.empty?
|
20
|
+
@labels_hash = kwargs[:labels_hash] || TermHash.new
|
21
|
+
@descriptions_hash = kwargs[:descriptions_hash] || TermHash.new
|
22
|
+
@alias_groups_hash = kwargs[:alias_groups_hash] || AliasGroupHash.new
|
23
|
+
@statements_hash = kwargs[:statements_hash] || StatementHash.new
|
40
24
|
end
|
41
25
|
|
42
26
|
def state
|
43
|
-
[
|
27
|
+
[type, id, data_type, labels_hash, descriptions_hash, alias_groups_hash, statements_hash]
|
44
28
|
end
|
45
29
|
|
46
30
|
def ==(other)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'wikibase_representable/model/
|
3
|
+
require 'wikibase_representable/model/snak_hash'
|
4
4
|
|
5
5
|
module WikibaseRepresentable
|
6
6
|
module Model
|
@@ -35,11 +35,11 @@ module WikibaseRepresentable
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def property_id
|
38
|
-
|
38
|
+
main_snak.property_id
|
39
39
|
end
|
40
40
|
|
41
41
|
def state
|
42
|
-
[
|
42
|
+
[main_snak, type, qualifiers, qualifiers_order, guid, rank]
|
43
43
|
end
|
44
44
|
|
45
45
|
def ==(other)
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
module WikibaseRepresentable
|
4
4
|
module Model
|
5
|
-
#
|
6
|
-
class
|
5
|
+
# Hash of Statement lists keyed by property id.
|
6
|
+
class StatementHash < Hash
|
7
7
|
def statements_by_property_id(property_id)
|
8
8
|
fetch(property_id, nil)
|
9
9
|
end
|
@@ -4,8 +4,8 @@ require 'wikibase_representable/model/term'
|
|
4
4
|
|
5
5
|
module WikibaseRepresentable
|
6
6
|
module Model
|
7
|
-
#
|
8
|
-
class
|
7
|
+
# Hash of Term objects keyed by language code.
|
8
|
+
class TermHash < Hash
|
9
9
|
def term_for_language(language_code)
|
10
10
|
fetch(language_code, nil)
|
11
11
|
end
|
@@ -13,31 +13,31 @@ module WikibaseRepresentable
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def time
|
16
|
-
|
16
|
+
value.time
|
17
17
|
end
|
18
18
|
|
19
19
|
def time_zone
|
20
|
-
|
20
|
+
value.time_zone
|
21
21
|
end
|
22
22
|
|
23
23
|
def before
|
24
|
-
|
24
|
+
value.before
|
25
25
|
end
|
26
26
|
|
27
27
|
def after
|
28
|
-
|
28
|
+
value.after
|
29
29
|
end
|
30
30
|
|
31
31
|
def precision
|
32
|
-
|
32
|
+
value.precision
|
33
33
|
end
|
34
34
|
|
35
35
|
def calendar_model
|
36
|
-
|
36
|
+
value.calendar_model
|
37
37
|
end
|
38
38
|
|
39
39
|
def state
|
40
|
-
[
|
40
|
+
[type, value]
|
41
41
|
end
|
42
42
|
|
43
43
|
def ==(other)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'wikibase_representable/model/snak_data_value_helper'
|
4
4
|
require 'wikibase_representable/model/statement_data_value_helper'
|
5
5
|
|
6
|
-
require 'wikibase_representable/model/
|
6
|
+
require 'wikibase_representable/model/alias_group_hash'
|
7
7
|
require 'wikibase_representable/model/data_value'
|
8
8
|
require 'wikibase_representable/model/entity_id'
|
9
9
|
require 'wikibase_representable/model/entity_id_value'
|
@@ -11,11 +11,11 @@ require 'wikibase_representable/model/item'
|
|
11
11
|
require 'wikibase_representable/model/property'
|
12
12
|
require 'wikibase_representable/model/property_value_snak'
|
13
13
|
require 'wikibase_representable/model/site_link'
|
14
|
-
require 'wikibase_representable/model/
|
15
|
-
require 'wikibase_representable/model/
|
14
|
+
require 'wikibase_representable/model/site_link_hash'
|
15
|
+
require 'wikibase_representable/model/snak_hash'
|
16
16
|
require 'wikibase_representable/model/statement'
|
17
|
-
require 'wikibase_representable/model/
|
17
|
+
require 'wikibase_representable/model/statement_hash'
|
18
18
|
require 'wikibase_representable/model/term'
|
19
|
-
require 'wikibase_representable/model/
|
19
|
+
require 'wikibase_representable/model/term_hash'
|
20
20
|
require 'wikibase_representable/model/time_value'
|
21
21
|
require 'wikibase_representable/model/time'
|
@@ -6,7 +6,7 @@ require 'wikibase_representable/representers/term_representer'
|
|
6
6
|
module WikibaseRepresentable
|
7
7
|
module Representers
|
8
8
|
# Representer for a hash of language_codes => term arrays
|
9
|
-
class
|
9
|
+
class AliasGroupHashRepresenter < Representable::Decorator
|
10
10
|
include Representable::JSON::Hash
|
11
11
|
|
12
12
|
values decorator: TermRepresenter.for_collection, instance: ->(_fragment) { [] }
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
require 'representable/json'
|
4
4
|
require 'wikibase_representable/model'
|
5
|
-
require 'wikibase_representable/representers/
|
6
|
-
require 'wikibase_representable/representers/
|
7
|
-
require 'wikibase_representable/representers/
|
8
|
-
require 'wikibase_representable/representers/
|
5
|
+
require 'wikibase_representable/representers/alias_group_hash_representer'
|
6
|
+
require 'wikibase_representable/representers/site_link_hash_representer'
|
7
|
+
require 'wikibase_representable/representers/statement_hash_representer'
|
8
|
+
require 'wikibase_representable/representers/term_hash_representer'
|
9
9
|
|
10
10
|
module WikibaseRepresentable
|
11
11
|
module Representers
|
@@ -16,19 +16,18 @@ module WikibaseRepresentable
|
|
16
16
|
|
17
17
|
property :type
|
18
18
|
property :id
|
19
|
-
property :
|
20
|
-
|
21
|
-
property :
|
22
|
-
|
23
|
-
property :
|
24
|
-
|
25
|
-
|
26
|
-
property :
|
27
|
-
|
28
|
-
|
29
|
-
property :
|
30
|
-
|
31
|
-
class: SiteLinkList
|
19
|
+
property :labels_hash, decorator: TermHashRepresenter,
|
20
|
+
class: TermHash
|
21
|
+
property :descriptions_hash, decorator: TermHashRepresenter,
|
22
|
+
class: TermHash
|
23
|
+
property :alias_groups_hash, as: 'aliases_hash',
|
24
|
+
decorator: AliasGroupHashRepresenter,
|
25
|
+
class: AliasGroupHash
|
26
|
+
property :statements_hash, as: 'claims_hash',
|
27
|
+
decorator: StatementHashRepresenter,
|
28
|
+
class: StatementHash
|
29
|
+
property :site_links_hash, decorator: SiteLinkHashRepresenter,
|
30
|
+
class: SiteLinkHash
|
32
31
|
end
|
33
32
|
end
|
34
33
|
end
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
require 'representable/json'
|
4
4
|
require 'wikibase_representable/model'
|
5
|
-
require 'wikibase_representable/representers/
|
6
|
-
require 'wikibase_representable/representers/
|
7
|
-
require 'wikibase_representable/representers/
|
5
|
+
require 'wikibase_representable/representers/alias_group_hash_representer'
|
6
|
+
require 'wikibase_representable/representers/statement_hash_representer'
|
7
|
+
require 'wikibase_representable/representers/term_hash_representer'
|
8
8
|
|
9
9
|
module WikibaseRepresentable
|
10
10
|
module Representers
|
@@ -16,16 +16,16 @@ module WikibaseRepresentable
|
|
16
16
|
property :type
|
17
17
|
property :data_type, as: 'datatype'
|
18
18
|
property :id
|
19
|
-
property :
|
20
|
-
|
21
|
-
property :
|
22
|
-
|
23
|
-
property :
|
24
|
-
|
25
|
-
|
26
|
-
property :
|
27
|
-
|
28
|
-
|
19
|
+
property :labels_hash, decorator: TermHashRepresenter,
|
20
|
+
class: TermHash
|
21
|
+
property :descriptions_hash, decorator: TermHashRepresenter,
|
22
|
+
class: TermHash
|
23
|
+
property :alias_groups_hash, as: 'aliases_hash',
|
24
|
+
decorator: AliasGroupHashRepresenter,
|
25
|
+
class: AliasGroupHash
|
26
|
+
property :statements_hash, as: 'claims_hash',
|
27
|
+
decorator: StatementHashRepresenter,
|
28
|
+
class: StatementHash
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
@@ -7,7 +7,7 @@ require 'wikibase_representable/representers/site_link_representer'
|
|
7
7
|
module WikibaseRepresentable
|
8
8
|
module Representers
|
9
9
|
# Representer for a hash of (siteid => sitelink)
|
10
|
-
class
|
10
|
+
class SiteLinkHashRepresenter < Representable::Decorator
|
11
11
|
include Representable::JSON::Hash
|
12
12
|
include WikibaseRepresentable::Model
|
13
13
|
|
data/lib/wikibase_representable/representers/{snak_list_representer.rb → snak_hash_representer.rb}
RENAMED
@@ -5,8 +5,8 @@ require 'wikibase_representable/representers/property_value_snak_representer'
|
|
5
5
|
|
6
6
|
module WikibaseRepresentable
|
7
7
|
module Representers
|
8
|
-
# Representer for a
|
9
|
-
class
|
8
|
+
# Representer for a hash of snak lists keyed by property ID.
|
9
|
+
class SnakHashRepresenter < Representable::Decorator
|
10
10
|
include Representable::JSON::Hash
|
11
11
|
|
12
12
|
values decorator: PropertyValueSnakRepresenter.for_collection, instance: ->(_fragment) { [] }
|
@@ -6,7 +6,7 @@ require 'wikibase_representable/representers/statement_representer'
|
|
6
6
|
module WikibaseRepresentable
|
7
7
|
module Representers
|
8
8
|
# Representer for a hash of property IDs => statement arrays.
|
9
|
-
class
|
9
|
+
class StatementHashRepresenter < Representable::Decorator
|
10
10
|
include Representable::JSON::Hash
|
11
11
|
|
12
12
|
values decorator: StatementRepresenter.for_collection, instance: ->(_fragment) { [] }
|
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'representable/json'
|
4
4
|
require 'wikibase_representable/model'
|
5
5
|
require 'wikibase_representable/representers/property_value_snak_representer'
|
6
|
-
require 'wikibase_representable/representers/
|
6
|
+
require 'wikibase_representable/representers/snak_hash_representer'
|
7
7
|
|
8
8
|
module WikibaseRepresentable
|
9
9
|
module Representers
|
@@ -16,8 +16,8 @@ module WikibaseRepresentable
|
|
16
16
|
decorator: PropertyValueSnakRepresenter,
|
17
17
|
class: PropertyValueSnak
|
18
18
|
property :type
|
19
|
-
property :qualifiers, decorator:
|
20
|
-
class:
|
19
|
+
property :qualifiers, decorator: SnakHashRepresenter,
|
20
|
+
class: SnakHash
|
21
21
|
property :qualifiers_order, as: 'qualifiers-order'
|
22
22
|
property :guid, as: 'id'
|
23
23
|
property :rank
|
data/lib/wikibase_representable/representers/{term_list_representer.rb → term_hash_representer.rb}
RENAMED
@@ -6,8 +6,8 @@ require 'wikibase_representable/representers/term_representer'
|
|
6
6
|
|
7
7
|
module WikibaseRepresentable
|
8
8
|
module Representers
|
9
|
-
# Representer for term
|
10
|
-
class
|
9
|
+
# Representer for term hashes
|
10
|
+
class TermHashRepresenter < Representable::Decorator
|
11
11
|
include Representable::JSON::Hash
|
12
12
|
include WikibaseRepresentable::Model
|
13
13
|
|
@@ -1,18 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'wikibase_representable/representers/
|
3
|
+
require 'wikibase_representable/representers/alias_group_hash_representer'
|
4
4
|
require 'wikibase_representable/representers/data_value_representer'
|
5
5
|
require 'wikibase_representable/representers/entity_id_value_representer'
|
6
6
|
require 'wikibase_representable/representers/entity_id_representer'
|
7
7
|
require 'wikibase_representable/representers/item_representer'
|
8
8
|
require 'wikibase_representable/representers/property_value_snak_representer'
|
9
9
|
require 'wikibase_representable/representers/property_representer'
|
10
|
-
require 'wikibase_representable/representers/
|
10
|
+
require 'wikibase_representable/representers/site_link_hash_representer'
|
11
11
|
require 'wikibase_representable/representers/site_link_representer'
|
12
|
-
require 'wikibase_representable/representers/
|
13
|
-
require 'wikibase_representable/representers/
|
12
|
+
require 'wikibase_representable/representers/snak_hash_representer'
|
13
|
+
require 'wikibase_representable/representers/statement_hash_representer'
|
14
14
|
require 'wikibase_representable/representers/statement_representer'
|
15
|
-
require 'wikibase_representable/representers/
|
15
|
+
require 'wikibase_representable/representers/term_hash_representer'
|
16
16
|
require 'wikibase_representable/representers/term_representer'
|
17
17
|
require 'wikibase_representable/representers/time_value_representer'
|
18
18
|
require 'wikibase_representable/representers/time_representer'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wikibase_representable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Holloway
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-02-09 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: multi_json
|
@@ -65,6 +65,20 @@ dependencies:
|
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '3.4'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: pry
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 0.15.2
|
75
|
+
type: :development
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 0.15.2
|
68
82
|
- !ruby/object:Gem::Dependency
|
69
83
|
name: rake
|
70
84
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,6 +107,20 @@ dependencies:
|
|
93
107
|
- - "~>"
|
94
108
|
- !ruby/object:Gem::Version
|
95
109
|
version: '3.13'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: simplecov
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: 0.22.0
|
117
|
+
type: :development
|
118
|
+
prerelease: false
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: 0.22.0
|
96
124
|
- !ruby/object:Gem::Dependency
|
97
125
|
name: upennlib-rubocop
|
98
126
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,6 +143,7 @@ executables: []
|
|
115
143
|
extensions: []
|
116
144
|
extra_rdoc_files: []
|
117
145
|
files:
|
146
|
+
- ".rspec"
|
118
147
|
- ".rubocop.yml"
|
119
148
|
- ".rubocop_todo.yml"
|
120
149
|
- LICENSE.txt
|
@@ -122,7 +151,7 @@ files:
|
|
122
151
|
- Rakefile
|
123
152
|
- lib/wikibase_representable.rb
|
124
153
|
- lib/wikibase_representable/model.rb
|
125
|
-
- lib/wikibase_representable/model/
|
154
|
+
- lib/wikibase_representable/model/alias_group_hash.rb
|
126
155
|
- lib/wikibase_representable/model/data_value.rb
|
127
156
|
- lib/wikibase_representable/model/entity_id.rb
|
128
157
|
- lib/wikibase_representable/model/entity_id_value.rb
|
@@ -130,30 +159,30 @@ files:
|
|
130
159
|
- lib/wikibase_representable/model/property.rb
|
131
160
|
- lib/wikibase_representable/model/property_value_snak.rb
|
132
161
|
- lib/wikibase_representable/model/site_link.rb
|
133
|
-
- lib/wikibase_representable/model/
|
162
|
+
- lib/wikibase_representable/model/site_link_hash.rb
|
134
163
|
- lib/wikibase_representable/model/snak_data_value_helper.rb
|
135
|
-
- lib/wikibase_representable/model/
|
164
|
+
- lib/wikibase_representable/model/snak_hash.rb
|
136
165
|
- lib/wikibase_representable/model/statement.rb
|
137
166
|
- lib/wikibase_representable/model/statement_data_value_helper.rb
|
138
|
-
- lib/wikibase_representable/model/
|
167
|
+
- lib/wikibase_representable/model/statement_hash.rb
|
139
168
|
- lib/wikibase_representable/model/term.rb
|
140
|
-
- lib/wikibase_representable/model/
|
169
|
+
- lib/wikibase_representable/model/term_hash.rb
|
141
170
|
- lib/wikibase_representable/model/time.rb
|
142
171
|
- lib/wikibase_representable/model/time_value.rb
|
143
172
|
- lib/wikibase_representable/representers.rb
|
144
|
-
- lib/wikibase_representable/representers/
|
173
|
+
- lib/wikibase_representable/representers/alias_group_hash_representer.rb
|
145
174
|
- lib/wikibase_representable/representers/data_value_representer.rb
|
146
175
|
- lib/wikibase_representable/representers/entity_id_representer.rb
|
147
176
|
- lib/wikibase_representable/representers/entity_id_value_representer.rb
|
148
177
|
- lib/wikibase_representable/representers/item_representer.rb
|
149
178
|
- lib/wikibase_representable/representers/property_representer.rb
|
150
179
|
- lib/wikibase_representable/representers/property_value_snak_representer.rb
|
151
|
-
- lib/wikibase_representable/representers/
|
180
|
+
- lib/wikibase_representable/representers/site_link_hash_representer.rb
|
152
181
|
- lib/wikibase_representable/representers/site_link_representer.rb
|
153
|
-
- lib/wikibase_representable/representers/
|
154
|
-
- lib/wikibase_representable/representers/
|
182
|
+
- lib/wikibase_representable/representers/snak_hash_representer.rb
|
183
|
+
- lib/wikibase_representable/representers/statement_hash_representer.rb
|
155
184
|
- lib/wikibase_representable/representers/statement_representer.rb
|
156
|
-
- lib/wikibase_representable/representers/
|
185
|
+
- lib/wikibase_representable/representers/term_hash_representer.rb
|
157
186
|
- lib/wikibase_representable/representers/term_representer.rb
|
158
187
|
- lib/wikibase_representable/representers/time_representer.rb
|
159
188
|
- lib/wikibase_representable/representers/time_value_representer.rb
|