dhole 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dhole.gemspec +1 -0
- data/lib/dhole/globalimagelink.rb +2 -1
- data/lib/dhole/image.rb +2 -1
- data/lib/dhole/page.rb +1 -0
- data/lib/dhole/revision.rb +1 -0
- data/lib/dhole/text.rb +1 -0
- data/lib/dhole/version.rb +1 -1
- metadata +25 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75d4063a1ac95ea0d0e709389eacbff99a6dcbb1
|
4
|
+
data.tar.gz: 706e0dbdb55c6268e2d1f641f75fb6b904973107
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a6f4177fae1b8f22efd068661f190ae6f683476b168e3a53a35d075ca088eb47198a49cb78be5b1e4aa72e772e28874c15a2c3dd5d195febf0f9c2d30dbc7d5
|
7
|
+
data.tar.gz: 8dce7597f898b269e5f9c470c61a28831f8bed0d9a904020d37df42a463d8335b5447fea8b48110c3c87af8c33f82675a63daa637925958d2494490a7b7e36bf
|
data/dhole.gemspec
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
module Dhole
|
2
2
|
class GlobalImageLink < ActiveRecord::Base
|
3
3
|
self.table_name = 'globalimagelinks'
|
4
|
-
|
4
|
+
self.primary_keys = 'gil_to', 'gil_wiki', 'gil_page'
|
5
|
+
#belongs_to :linking_page, class_name: 'Page', foreign_key: 'gil_from'
|
5
6
|
#belongs_to :linked_image, class_name: 'Image', foreign_key: 'gil_to' # TODO: replace this with an actual lookup, as this doesn't resolve to an ID, of course
|
6
7
|
end
|
7
8
|
end
|
data/lib/dhole/image.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module Dhole
|
2
2
|
class Image < ActiveRecord::Base
|
3
3
|
self.table_name = 'image'
|
4
|
+
self.primary_key = 'img_name'
|
4
5
|
#has_many :localimagelinks, class_name: 'ImageLink'
|
5
6
|
#has_many :localusages, through: :image_links, class_name: 'Page'
|
6
7
|
|
@@ -10,7 +11,7 @@ module Dhole
|
|
10
11
|
ImageLink.where(il_to: img_name).pluck(:il_from)
|
11
12
|
end
|
12
13
|
def global_usage
|
13
|
-
GlobalImageLink.where(gil_to: img_name).pluck(:
|
14
|
+
GlobalImageLink.where(gil_to: img_name, gil_namespace_id: '0').pluck(:gil_wiki, :gil_page)
|
14
15
|
end
|
15
16
|
end
|
16
17
|
end
|
data/lib/dhole/page.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module Dhole
|
2
2
|
class Page < ActiveRecord::Base
|
3
3
|
self.table_name = 'page'
|
4
|
+
self.primary_key = 'page_id'
|
4
5
|
has_many :categories
|
5
6
|
has_many :langlinks, class_name: 'LangLink', foreign_key: 'll_from'
|
6
7
|
has_many :imagelinks, class_name: 'ImageLink', foreign_key: 'il_from'
|
data/lib/dhole/revision.rb
CHANGED
data/lib/dhole/text.rb
CHANGED
data/lib/dhole/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dhole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Asaf Bartov
|
@@ -14,42 +14,56 @@ dependencies:
|
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.7'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: activerecord
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: composite_primary_keys
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
description: ActiveRecord mapping of main Mediawiki entities and relationships
|
@@ -59,7 +73,7 @@ executables: []
|
|
59
73
|
extensions: []
|
60
74
|
extra_rdoc_files: []
|
61
75
|
files:
|
62
|
-
- .gitignore
|
76
|
+
- ".gitignore"
|
63
77
|
- Gemfile
|
64
78
|
- LICENSE.txt
|
65
79
|
- README.md
|
@@ -84,17 +98,17 @@ require_paths:
|
|
84
98
|
- lib
|
85
99
|
required_ruby_version: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- -
|
101
|
+
- - ">="
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: '0'
|
90
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
105
|
requirements:
|
92
|
-
- -
|
106
|
+
- - ">="
|
93
107
|
- !ruby/object:Gem::Version
|
94
108
|
version: '0'
|
95
109
|
requirements: []
|
96
110
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.4.
|
111
|
+
rubygems_version: 2.4.3
|
98
112
|
signing_key:
|
99
113
|
specification_version: 4
|
100
114
|
summary: Mediawiki Object-Relational Mapping
|