easy_mongoid_tag 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. data/.gitignore +18 -0
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +89 -0
  4. data/Guardfile +22 -0
  5. data/LICENSE +191 -0
  6. data/README.textile +34 -0
  7. data/easy_mongoid_tag.gemspec +29 -0
  8. data/lib/easy_mongoid_tag.rb +5 -0
  9. data/lib/easy_mongoid_tag/tag.rb +151 -0
  10. data/lib/easy_mongoid_tag/version.rb +4 -0
  11. data/lib/mongoid_extensions/extension_field.rb +14 -0
  12. data/prototype/book.rb +119 -0
  13. data/prototype/mongodb.yml +6 -0
  14. data/spec/function_spec.rb +43 -0
  15. data/spec/mongodb.yml +6 -0
  16. data/spec/spec_helper.rb +54 -0
  17. data/spec/tag_spec.rb +98 -0
  18. data/test/read_book/.gitignore +15 -0
  19. data/test/read_book/Gemfile +39 -0
  20. data/test/read_book/Gemfile.lock +119 -0
  21. data/test/read_book/README.rdoc +261 -0
  22. data/test/read_book/Rakefile +7 -0
  23. data/test/read_book/app/assets/images/rails.png +0 -0
  24. data/test/read_book/app/assets/javascripts/application.js +15 -0
  25. data/test/read_book/app/assets/stylesheets/application.css +13 -0
  26. data/test/read_book/app/controllers/application_controller.rb +3 -0
  27. data/test/read_book/app/helpers/application_helper.rb +2 -0
  28. data/test/read_book/app/mailers/.gitkeep +0 -0
  29. data/test/read_book/app/models/.gitkeep +0 -0
  30. data/test/read_book/app/models/book.rb +11 -0
  31. data/test/read_book/app/views/layouts/application.html.erb +14 -0
  32. data/test/read_book/config.ru +4 -0
  33. data/test/read_book/config/application.rb +68 -0
  34. data/test/read_book/config/boot.rb +6 -0
  35. data/test/read_book/config/environment.rb +5 -0
  36. data/test/read_book/config/environments/development.rb +31 -0
  37. data/test/read_book/config/environments/production.rb +64 -0
  38. data/test/read_book/config/environments/test.rb +35 -0
  39. data/test/read_book/config/initializers/backtrace_silencers.rb +7 -0
  40. data/test/read_book/config/initializers/inflections.rb +15 -0
  41. data/test/read_book/config/initializers/mime_types.rb +5 -0
  42. data/test/read_book/config/initializers/secret_token.rb +7 -0
  43. data/test/read_book/config/initializers/session_store.rb +8 -0
  44. data/test/read_book/config/initializers/wrap_parameters.rb +10 -0
  45. data/test/read_book/config/locales/en.yml +5 -0
  46. data/test/read_book/config/mongoid.yml +80 -0
  47. data/test/read_book/config/routes.rb +58 -0
  48. data/test/read_book/db/seeds.rb +7 -0
  49. data/test/read_book/lib/assets/.gitkeep +0 -0
  50. data/test/read_book/lib/tasks/.gitkeep +0 -0
  51. data/test/read_book/log/.gitkeep +0 -0
  52. data/test/read_book/public/404.html +26 -0
  53. data/test/read_book/public/422.html +26 -0
  54. data/test/read_book/public/500.html +25 -0
  55. data/test/read_book/public/favicon.ico +0 -0
  56. data/test/read_book/public/index.html +241 -0
  57. data/test/read_book/public/robots.txt +5 -0
  58. data/test/read_book/script/rails +6 -0
  59. data/test/read_book/test/fixtures/.gitkeep +0 -0
  60. data/test/read_book/test/fixtures/books.yml +11 -0
  61. data/test/read_book/test/functional/.gitkeep +0 -0
  62. data/test/read_book/test/integration/.gitkeep +0 -0
  63. data/test/read_book/test/performance/browsing_test.rb +12 -0
  64. data/test/read_book/test/test_helper.rb +7 -0
  65. data/test/read_book/test/unit/.gitkeep +0 -0
  66. data/test/read_book/test/unit/book_test.rb +7 -0
  67. data/test/read_book/vendor/assets/javascripts/.gitkeep +0 -0
  68. data/test/read_book/vendor/assets/stylesheets/.gitkeep +0 -0
  69. data/test/read_book/vendor/plugins/.gitkeep +0 -0
  70. metadata +282 -0
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
File without changes
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ # This model initially had no columns defined. If you add columns to the
4
+ # model remove the '{}' from the fixture names and add the columns immediately
5
+ # below each fixture, per the syntax in the comments below
6
+ #
7
+ one: {}
8
+ # column: value
9
+ #
10
+ two: {}
11
+ # column: value
File without changes
File without changes
@@ -0,0 +1,12 @@
1
+ require 'test_helper'
2
+ require 'rails/performance_test_help'
3
+
4
+ class BrowsingTest < ActionDispatch::PerformanceTest
5
+ # Refer to the documentation for all available options
6
+ # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
7
+ # :output => 'tmp/performance', :formats => [:flat] }
8
+
9
+ def test_homepage
10
+ get '/'
11
+ end
12
+ end
@@ -0,0 +1,7 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+ require File.expand_path('../../config/environment', __FILE__)
3
+ require 'rails/test_help'
4
+
5
+ class ActiveSupport::TestCase
6
+ # Add more helper methods to be used by all tests here...
7
+ end
File without changes
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class BookTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
File without changes
File without changes
File without changes
metadata ADDED
@@ -0,0 +1,282 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: easy_mongoid_tag
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Wade Xing
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-09-05 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: mongoid
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.1.0
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.1.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 2.14.1
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 2.14.1
46
+ - !ruby/object:Gem::Dependency
47
+ name: mongoid-rspec
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 1.9.0
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.9.0
62
+ - !ruby/object:Gem::Dependency
63
+ name: guard
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 1.8.0
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 1.8.0
78
+ - !ruby/object:Gem::Dependency
79
+ name: guard-rspec
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: 3.0.0
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 3.0.0
94
+ - !ruby/object:Gem::Dependency
95
+ name: guard-spork
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: 1.5.1
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 1.5.1
110
+ - !ruby/object:Gem::Dependency
111
+ name: terminal-notifier-guard
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 1.5.3
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 1.5.3
126
+ description: 实现实体和标签间的N2N关系,对基于tag查询实体的单向优化
127
+ email:
128
+ - iamxingxing@gmail.com
129
+ executables: []
130
+ extensions: []
131
+ extra_rdoc_files: []
132
+ files:
133
+ - .gitignore
134
+ - Gemfile
135
+ - Gemfile.lock
136
+ - Guardfile
137
+ - LICENSE
138
+ - README.textile
139
+ - easy_mongoid_tag.gemspec
140
+ - lib/easy_mongoid_tag.rb
141
+ - lib/easy_mongoid_tag/tag.rb
142
+ - lib/easy_mongoid_tag/version.rb
143
+ - lib/mongoid_extensions/extension_field.rb
144
+ - prototype/book.rb
145
+ - prototype/mongodb.yml
146
+ - spec/function_spec.rb
147
+ - spec/mongodb.yml
148
+ - spec/spec_helper.rb
149
+ - spec/tag_spec.rb
150
+ - test/read_book/.gitignore
151
+ - test/read_book/Gemfile
152
+ - test/read_book/Gemfile.lock
153
+ - test/read_book/README.rdoc
154
+ - test/read_book/Rakefile
155
+ - test/read_book/app/assets/images/rails.png
156
+ - test/read_book/app/assets/javascripts/application.js
157
+ - test/read_book/app/assets/stylesheets/application.css
158
+ - test/read_book/app/controllers/application_controller.rb
159
+ - test/read_book/app/helpers/application_helper.rb
160
+ - test/read_book/app/mailers/.gitkeep
161
+ - test/read_book/app/models/.gitkeep
162
+ - test/read_book/app/models/book.rb
163
+ - test/read_book/app/views/layouts/application.html.erb
164
+ - test/read_book/config.ru
165
+ - test/read_book/config/application.rb
166
+ - test/read_book/config/boot.rb
167
+ - test/read_book/config/environment.rb
168
+ - test/read_book/config/environments/development.rb
169
+ - test/read_book/config/environments/production.rb
170
+ - test/read_book/config/environments/test.rb
171
+ - test/read_book/config/initializers/backtrace_silencers.rb
172
+ - test/read_book/config/initializers/inflections.rb
173
+ - test/read_book/config/initializers/mime_types.rb
174
+ - test/read_book/config/initializers/secret_token.rb
175
+ - test/read_book/config/initializers/session_store.rb
176
+ - test/read_book/config/initializers/wrap_parameters.rb
177
+ - test/read_book/config/locales/en.yml
178
+ - test/read_book/config/mongoid.yml
179
+ - test/read_book/config/routes.rb
180
+ - test/read_book/db/seeds.rb
181
+ - test/read_book/lib/assets/.gitkeep
182
+ - test/read_book/lib/tasks/.gitkeep
183
+ - test/read_book/log/.gitkeep
184
+ - test/read_book/public/404.html
185
+ - test/read_book/public/422.html
186
+ - test/read_book/public/500.html
187
+ - test/read_book/public/favicon.ico
188
+ - test/read_book/public/index.html
189
+ - test/read_book/public/robots.txt
190
+ - test/read_book/script/rails
191
+ - test/read_book/test/fixtures/.gitkeep
192
+ - test/read_book/test/fixtures/books.yml
193
+ - test/read_book/test/functional/.gitkeep
194
+ - test/read_book/test/integration/.gitkeep
195
+ - test/read_book/test/performance/browsing_test.rb
196
+ - test/read_book/test/test_helper.rb
197
+ - test/read_book/test/unit/.gitkeep
198
+ - test/read_book/test/unit/book_test.rb
199
+ - test/read_book/vendor/assets/javascripts/.gitkeep
200
+ - test/read_book/vendor/assets/stylesheets/.gitkeep
201
+ - test/read_book/vendor/plugins/.gitkeep
202
+ homepage: https://github.com/xingxing/easy_mongoid_tag
203
+ licenses: []
204
+ post_install_message:
205
+ rdoc_options: []
206
+ require_paths:
207
+ - lib
208
+ required_ruby_version: !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ! '>='
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
214
+ required_rubygems_version: !ruby/object:Gem::Requirement
215
+ none: false
216
+ requirements:
217
+ - - ! '>='
218
+ - !ruby/object:Gem::Version
219
+ version: '0'
220
+ requirements: []
221
+ rubyforge_project:
222
+ rubygems_version: 1.8.25
223
+ signing_key:
224
+ specification_version: 3
225
+ summary: 粗糙的mongid tag
226
+ test_files:
227
+ - spec/function_spec.rb
228
+ - spec/mongodb.yml
229
+ - spec/spec_helper.rb
230
+ - spec/tag_spec.rb
231
+ - test/read_book/.gitignore
232
+ - test/read_book/Gemfile
233
+ - test/read_book/Gemfile.lock
234
+ - test/read_book/README.rdoc
235
+ - test/read_book/Rakefile
236
+ - test/read_book/app/assets/images/rails.png
237
+ - test/read_book/app/assets/javascripts/application.js
238
+ - test/read_book/app/assets/stylesheets/application.css
239
+ - test/read_book/app/controllers/application_controller.rb
240
+ - test/read_book/app/helpers/application_helper.rb
241
+ - test/read_book/app/mailers/.gitkeep
242
+ - test/read_book/app/models/.gitkeep
243
+ - test/read_book/app/models/book.rb
244
+ - test/read_book/app/views/layouts/application.html.erb
245
+ - test/read_book/config.ru
246
+ - test/read_book/config/application.rb
247
+ - test/read_book/config/boot.rb
248
+ - test/read_book/config/environment.rb
249
+ - test/read_book/config/environments/development.rb
250
+ - test/read_book/config/environments/production.rb
251
+ - test/read_book/config/environments/test.rb
252
+ - test/read_book/config/initializers/backtrace_silencers.rb
253
+ - test/read_book/config/initializers/inflections.rb
254
+ - test/read_book/config/initializers/mime_types.rb
255
+ - test/read_book/config/initializers/secret_token.rb
256
+ - test/read_book/config/initializers/session_store.rb
257
+ - test/read_book/config/initializers/wrap_parameters.rb
258
+ - test/read_book/config/locales/en.yml
259
+ - test/read_book/config/mongoid.yml
260
+ - test/read_book/config/routes.rb
261
+ - test/read_book/db/seeds.rb
262
+ - test/read_book/lib/assets/.gitkeep
263
+ - test/read_book/lib/tasks/.gitkeep
264
+ - test/read_book/log/.gitkeep
265
+ - test/read_book/public/404.html
266
+ - test/read_book/public/422.html
267
+ - test/read_book/public/500.html
268
+ - test/read_book/public/favicon.ico
269
+ - test/read_book/public/index.html
270
+ - test/read_book/public/robots.txt
271
+ - test/read_book/script/rails
272
+ - test/read_book/test/fixtures/.gitkeep
273
+ - test/read_book/test/fixtures/books.yml
274
+ - test/read_book/test/functional/.gitkeep
275
+ - test/read_book/test/integration/.gitkeep
276
+ - test/read_book/test/performance/browsing_test.rb
277
+ - test/read_book/test/test_helper.rb
278
+ - test/read_book/test/unit/.gitkeep
279
+ - test/read_book/test/unit/book_test.rb
280
+ - test/read_book/vendor/assets/javascripts/.gitkeep
281
+ - test/read_book/vendor/assets/stylesheets/.gitkeep
282
+ - test/read_book/vendor/plugins/.gitkeep