tophold_engine 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/article.rb +3 -5
- data/app/models/comment.rb +1 -1
- data/app/models/topic.rb +1 -1
- data/app/models/user.rb +1 -1
- data/app/models/user_document.rb +1 -1
- data/lib/tophold_engine/engine.rb +2 -4
- data/lib/tophold_engine/version.rb +1 -1
- data/tophold_engine.gemspec +0 -4
- metadata +1 -39
data/app/models/article.rb
CHANGED
@@ -7,12 +7,10 @@ class Article
|
|
7
7
|
|
8
8
|
field :content, type: String
|
9
9
|
|
10
|
-
|
10
|
+
embeds_many :tags, as: :taggable
|
11
11
|
|
12
|
-
embeds_many :
|
12
|
+
embeds_many :comments, as: :commentable
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
has_many :article_scores, dependent: delete
|
14
|
+
has_many :article_scores, dependent: :delete
|
17
15
|
|
18
16
|
end
|
data/app/models/comment.rb
CHANGED
@@ -7,7 +7,7 @@ class Comment
|
|
7
7
|
|
8
8
|
embedded_in :sub_topic, polymorphic: true
|
9
9
|
|
10
|
-
embeds_many :replies, class_name: "Comment",
|
10
|
+
embeds_many :replies, class_name: "Comment", inverse_of: :parent
|
11
11
|
|
12
12
|
embedded_in :parent, class_name: "Comment", inverse_of: :replies
|
13
13
|
|
data/app/models/topic.rb
CHANGED
data/app/models/user.rb
CHANGED
data/app/models/user_document.rb
CHANGED
@@ -1,11 +1,9 @@
|
|
1
|
-
require 'serve_gridfs_image'
|
2
|
-
|
3
1
|
module TopholdEngine
|
4
2
|
|
5
3
|
class Engine < Rails::Engine
|
6
4
|
|
7
5
|
initializer "tophold_rack.load_app_instance_data" do |app|
|
8
|
-
|
6
|
+
TopholdEngine.setup do |config|
|
9
7
|
config.app_root = app.root
|
10
8
|
end
|
11
9
|
end
|
@@ -15,7 +13,7 @@ module TopholdEngine
|
|
15
13
|
# end
|
16
14
|
|
17
15
|
rake_tasks do
|
18
|
-
require 'resque/tasks'
|
16
|
+
#require 'resque/tasks'
|
19
17
|
end
|
20
18
|
|
21
19
|
end
|
data/tophold_engine.gemspec
CHANGED
@@ -17,14 +17,10 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
|
-
gem.add_dependency "rails", ">= 3.2.12"
|
21
|
-
|
22
20
|
gem.add_dependency "mysql2", ">= 0.3.11"
|
23
21
|
|
24
22
|
gem.add_dependency "configatron", ">= 2.10.0"
|
25
23
|
|
26
24
|
gem.add_dependency "mongoid"
|
27
25
|
|
28
|
-
gem.add_dependency "resque"
|
29
|
-
|
30
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tophold_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,22 +11,6 @@ bindir: bin
|
|
11
11
|
cert_chain: []
|
12
12
|
date: 2013-03-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: rails
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 3.2.12
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 3.2.12
|
30
14
|
- !ruby/object:Gem::Dependency
|
31
15
|
name: mysql2
|
32
16
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,22 +59,6 @@ dependencies:
|
|
75
59
|
- - ! '>='
|
76
60
|
- !ruby/object:Gem::Version
|
77
61
|
version: '0'
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: resque
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
|
-
requirements:
|
83
|
-
- - ! '>='
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '0'
|
86
|
-
type: :runtime
|
87
|
-
prerelease: false
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ! '>='
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '0'
|
94
62
|
description: tophold models engine
|
95
63
|
email:
|
96
64
|
- tim.rubist@gmail.com
|
@@ -131,18 +99,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
99
|
- - ! '>='
|
132
100
|
- !ruby/object:Gem::Version
|
133
101
|
version: '0'
|
134
|
-
segments:
|
135
|
-
- 0
|
136
|
-
hash: 3539811113605173694
|
137
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
103
|
none: false
|
139
104
|
requirements:
|
140
105
|
- - ! '>='
|
141
106
|
- !ruby/object:Gem::Version
|
142
107
|
version: '0'
|
143
|
-
segments:
|
144
|
-
- 0
|
145
|
-
hash: 3539811113605173694
|
146
108
|
requirements: []
|
147
109
|
rubyforge_project:
|
148
110
|
rubygems_version: 1.8.24
|