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.
@@ -7,12 +7,10 @@ class Article
7
7
 
8
8
  field :content, type: String
9
9
 
10
- attr_protected: _id
10
+ embeds_many :tags, as: :taggable
11
11
 
12
- embeds_many :tags, as: taggable
12
+ embeds_many :comments, as: :commentable
13
13
 
14
- embeds_many :comments, as: commentable
15
-
16
- has_many :article_scores, dependent: delete
14
+ has_many :article_scores, dependent: :delete
17
15
 
18
16
  end
@@ -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", inverseof: :parent
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
@@ -7,7 +7,7 @@ class Topic
7
7
 
8
8
  field :content, type: String
9
9
 
10
- embeds_many :tags, as: taggable
10
+ embeds_many :tags, as: :taggable
11
11
 
12
12
  has_many :sub_topics
13
13
 
data/app/models/user.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #encoding: utf-8
2
2
  class User < ActiveRecord::Base
3
3
 
4
- has_one :user_document
4
+ has_one :user_document, :class_name => "UserDocument"
5
5
 
6
6
  end
@@ -5,7 +5,7 @@ class UserDocument
5
5
 
6
6
  has_many :article_scores
7
7
 
8
- belongs_to :user
8
+ belongs_to :user, class_name: "User"
9
9
 
10
10
  index({user_id: 1}, {unique: true, background: true})
11
11
 
@@ -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
- TopholdRack.setup do |config|
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
@@ -1,3 +1,3 @@
1
1
  module TopholdEngine
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -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.1
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