mongoid_nested_set 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,44 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rspec'
4
+ require 'rr'
5
+ require 'mongoid'
6
+ require 'mongoid_nested_set'
7
+ require 'remarkable/mongoid'
8
+ require 'database_cleaner'
9
+
10
+ module Mongoid::Acts::NestedSet::Matchers
11
+ end
12
+
13
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
14
+ Dir["#{File.dirname(__FILE__)}/models/*.rb"].each {|file| require file }
15
+ Dir["#{File.dirname(__FILE__)}/matchers/*.rb"].each {|file| require file }
16
+
17
+ Mongoid.configure do |config|
18
+ name = "mongoid_nested_set_test"
19
+ host = "localhost"
20
+ config.allow_dynamic_fields = false
21
+ #config.master = Mongo::Connection.new(host, nil, :logger => Logger.new($stdout)).db(name)
22
+ config.master = Mongo::Connection.new.db(name)
23
+ # config.slaves = [
24
+ # Mongo::Connection.new(host, 27018, :slave_ok => true).db(name)
25
+ # ]
26
+ end
27
+
28
+ RSpec.configure do |config|
29
+ config.mock_with RR::Adapters::Rspec
30
+ config.include(Mongoid::Acts::NestedSet::Matchers)
31
+
32
+ config.before(:suite) do
33
+ DatabaseCleaner.strategy = :truncation
34
+ DatabaseCleaner.orm = "mongoid"
35
+ end
36
+
37
+ config.before(:each) do
38
+ DatabaseCleaner.start
39
+ end
40
+
41
+ config.after(:each) do
42
+ DatabaseCleaner.clean
43
+ end
44
+ end
metadata ADDED
@@ -0,0 +1,196 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mongoid_nested_set
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 0
9
+ version: 0.1.0
10
+ platform: ruby
11
+ authors:
12
+ - Brandon Turner
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-12-17 00:00:00 -06:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: mongoid
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 2
29
+ - 0
30
+ - 0
31
+ - beta
32
+ - 20
33
+ version: 2.0.0.beta.20
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: bundler
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ segments:
45
+ - 1
46
+ - 0
47
+ - 0
48
+ version: 1.0.0
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: jeweler
54
+ requirement: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ~>
58
+ - !ruby/object:Gem::Version
59
+ segments:
60
+ - 1
61
+ - 5
62
+ - 1
63
+ version: 1.5.1
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: *id003
67
+ - !ruby/object:Gem::Dependency
68
+ name: rcov
69
+ requirement: &id004 !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ segments:
75
+ - 0
76
+ version: "0"
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *id004
80
+ - !ruby/object:Gem::Dependency
81
+ name: rspec-core
82
+ requirement: &id005 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ segments:
88
+ - 0
89
+ version: "0"
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: *id005
93
+ - !ruby/object:Gem::Dependency
94
+ name: mongoid
95
+ requirement: &id006 !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ segments:
101
+ - 2
102
+ - 0
103
+ - 0
104
+ - beta
105
+ - 20
106
+ version: 2.0.0.beta.20
107
+ type: :runtime
108
+ prerelease: false
109
+ version_requirements: *id006
110
+ description: Fully featured tree implementation for Mongoid using the nested set model
111
+ email: bturner@bltweb.net
112
+ executables: []
113
+
114
+ extensions: []
115
+
116
+ extra_rdoc_files:
117
+ - LICENSE.txt
118
+ - README.markdown
119
+ files:
120
+ - .document
121
+ - .rspec
122
+ - Gemfile
123
+ - Gemfile.lock
124
+ - LICENSE.txt
125
+ - README.markdown
126
+ - Rakefile
127
+ - VERSION
128
+ - lib/mongoid_nested_set.rb
129
+ - lib/mongoid_nested_set/base.rb
130
+ - lib/mongoid_nested_set/document.rb
131
+ - lib/mongoid_nested_set/fields.rb
132
+ - lib/mongoid_nested_set/outline_number.rb
133
+ - lib/mongoid_nested_set/rebuild.rb
134
+ - lib/mongoid_nested_set/relations.rb
135
+ - lib/mongoid_nested_set/remove_order_by.rb
136
+ - lib/mongoid_nested_set/update.rb
137
+ - lib/mongoid_nested_set/validation.rb
138
+ - mongoid_nested_set.gemspec
139
+ - spec/matchers/nestedset_pos.rb
140
+ - spec/models/circle_node.rb
141
+ - spec/models/node.rb
142
+ - spec/models/node_without_nested_set.rb
143
+ - spec/models/numbering_node.rb
144
+ - spec/models/renamed_fields.rb
145
+ - spec/models/shape_node.rb
146
+ - spec/models/square_node.rb
147
+ - spec/models/test_document.rb
148
+ - spec/models/unscoped_node.rb
149
+ - spec/mongoid_nested_set_spec.rb
150
+ - spec/spec_helper.rb
151
+ has_rdoc: true
152
+ homepage: http://github.com/thinkwell/mongoid_nested_set
153
+ licenses:
154
+ - MIT
155
+ post_install_message:
156
+ rdoc_options: []
157
+
158
+ require_paths:
159
+ - lib
160
+ required_ruby_version: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ hash: -2855635086665803402
166
+ segments:
167
+ - 0
168
+ version: "0"
169
+ required_rubygems_version: !ruby/object:Gem::Requirement
170
+ none: false
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ segments:
175
+ - 0
176
+ version: "0"
177
+ requirements: []
178
+
179
+ rubyforge_project:
180
+ rubygems_version: 1.3.7
181
+ signing_key:
182
+ specification_version: 3
183
+ summary: Nested set based tree implementation for Mongoid
184
+ test_files:
185
+ - spec/matchers/nestedset_pos.rb
186
+ - spec/models/circle_node.rb
187
+ - spec/models/node.rb
188
+ - spec/models/node_without_nested_set.rb
189
+ - spec/models/numbering_node.rb
190
+ - spec/models/renamed_fields.rb
191
+ - spec/models/shape_node.rb
192
+ - spec/models/square_node.rb
193
+ - spec/models/test_document.rb
194
+ - spec/models/unscoped_node.rb
195
+ - spec/mongoid_nested_set_spec.rb
196
+ - spec/spec_helper.rb