dhole 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dhole.rb +2 -0
- data/lib/dhole/category.rb +18 -0
- data/lib/dhole/categorylink.rb +7 -0
- data/lib/dhole/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea3e26a872bf3ce473226958865031e61b0ff641
|
4
|
+
data.tar.gz: cb07c43af5be8e7c40df298306ead5f4ba5d2eae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94d54aa01271f823c4d56b15a2dabcd2b40f3f47cbcaa5a3781b8ca500207b6878665e86442c086f2863b0b6360af1a73c712082f43b550b394af1d1108750ae
|
7
|
+
data.tar.gz: a2e11c56c6e24f2d681773cc9bf45f03c7bbbd8f96b869b73f22be3cebb5e2f6f5a7592f73b5727f0f7756fab95eae9e4cf5eb344f30c6adef50bacee1aef575
|
data/lib/dhole.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
module Dhole
|
2
|
+
class Category < ActiveRecord::Base
|
3
|
+
self.table_name = 'category'
|
4
|
+
self.primary_key = 'cat_id'
|
5
|
+
# cat_files, cat_title
|
6
|
+
|
7
|
+
def members
|
8
|
+
CategoryLink.where(cl_to: cat_title) || []
|
9
|
+
end
|
10
|
+
def member_pages
|
11
|
+
members.select{|cl| cl.cl_type == 'page'}.map {|cl| Page.find(cl.cl_from)}
|
12
|
+
end
|
13
|
+
# return only members of specified type ('file','page', 'subcat')
|
14
|
+
def members_by_type(mtype)
|
15
|
+
# TBD
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/dhole/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Asaf Bartov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,6 +80,8 @@ files:
|
|
80
80
|
- Rakefile
|
81
81
|
- dhole.gemspec
|
82
82
|
- lib/dhole.rb
|
83
|
+
- lib/dhole/category.rb
|
84
|
+
- lib/dhole/categorylink.rb
|
83
85
|
- lib/dhole/globalimagelink.rb
|
84
86
|
- lib/dhole/image.rb
|
85
87
|
- lib/dhole/imagelink.rb
|