enju_question 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +36 -0
  4. data/app/controllers/answers_controller.rb +140 -0
  5. data/app/controllers/questions_controller.rb +171 -0
  6. data/app/models/answer.rb +59 -0
  7. data/app/models/answer_has_item.rb +20 -0
  8. data/app/models/question.rb +87 -0
  9. data/app/models/question_sweeper.rb +17 -0
  10. data/app/views/answers/_form.html.erb +33 -0
  11. data/app/views/answers/edit.html.erb +13 -0
  12. data/app/views/answers/index.atom.builder +16 -0
  13. data/app/views/answers/index.html.erb +44 -0
  14. data/app/views/answers/index.rss.builder +31 -0
  15. data/app/views/answers/new.html.erb +14 -0
  16. data/app/views/answers/new.mobile.erb +35 -0
  17. data/app/views/answers/show.html.erb +54 -0
  18. data/app/views/questions/_crd.html.erb +24 -0
  19. data/app/views/questions/_index.html.erb +22 -0
  20. data/app/views/questions/_index_user.html.erb +18 -0
  21. data/app/views/questions/_list.html.erb +69 -0
  22. data/app/views/questions/_solved_facet.html.erb +21 -0
  23. data/app/views/questions/edit.html.erb +44 -0
  24. data/app/views/questions/index.atom.builder +16 -0
  25. data/app/views/questions/index.html.erb +5 -0
  26. data/app/views/questions/index.js.erb +2 -0
  27. data/app/views/questions/index.mobile.erb +21 -0
  28. data/app/views/questions/index.rss.builder +41 -0
  29. data/app/views/questions/index_crd.xml.builder +36 -0
  30. data/app/views/questions/new.html.erb +35 -0
  31. data/app/views/questions/show.html.erb +62 -0
  32. data/app/views/questions/show.mobile.erb +46 -0
  33. data/app/views/questions/show_crd.xml.builder +34 -0
  34. data/config/routes.rb +10 -0
  35. data/db/migrate/098_create_questions.rb +21 -0
  36. data/db/migrate/099_create_answers.rb +21 -0
  37. data/db/migrate/20100217054028_create_answer_has_items.rb +17 -0
  38. data/lib/enju_question/engine.rb +4 -0
  39. data/lib/enju_question/version.rb +3 -0
  40. data/lib/enju_question.rb +4 -0
  41. data/lib/tasks/enju_question_tasks.rake +4 -0
  42. data/spec/cassette_library/enju_ndl/crd.yml +440 -0
  43. data/spec/controllers/answers_controller_spec.rb +486 -0
  44. data/spec/controllers/questions_controller_spec.rb +559 -0
  45. data/spec/dummy/Rakefile +7 -0
  46. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  47. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  48. data/spec/dummy/app/controllers/application_controller.rb +106 -0
  49. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  50. data/spec/dummy/app/models/ability.rb +42 -0
  51. data/spec/dummy/app/models/item.rb +5 -0
  52. data/spec/dummy/app/models/role.rb +8 -0
  53. data/spec/dummy/app/models/user.rb +29 -0
  54. data/spec/dummy/app/models/user_group.rb +2 -0
  55. data/spec/dummy/app/models/user_has_role.rb +4 -0
  56. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  57. data/spec/dummy/app/views/page/403.html.erb +9 -0
  58. data/spec/dummy/app/views/page/403.mobile.erb +5 -0
  59. data/spec/dummy/app/views/page/403.xml.erb +4 -0
  60. data/spec/dummy/app/views/page/404.html.erb +9 -0
  61. data/spec/dummy/app/views/page/404.mobile.erb +5 -0
  62. data/spec/dummy/app/views/page/404.xml.erb +4 -0
  63. data/spec/dummy/config/application.rb +46 -0
  64. data/spec/dummy/config/boot.rb +10 -0
  65. data/spec/dummy/config/database.yml +25 -0
  66. data/spec/dummy/config/environment.rb +5 -0
  67. data/spec/dummy/config/environments/development.rb +30 -0
  68. data/spec/dummy/config/environments/production.rb +60 -0
  69. data/spec/dummy/config/environments/test.rb +39 -0
  70. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  71. data/spec/dummy/config/initializers/devise.rb +209 -0
  72. data/spec/dummy/config/initializers/inflections.rb +10 -0
  73. data/spec/dummy/config/initializers/mime_types.rb +6 -0
  74. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  75. data/spec/dummy/config/initializers/session_store.rb +8 -0
  76. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  77. data/spec/dummy/config/locales/en.yml +5 -0
  78. data/spec/dummy/config/routes.rb +60 -0
  79. data/spec/dummy/config.ru +4 -0
  80. data/spec/dummy/db/development.sqlite3 +0 -0
  81. data/spec/dummy/db/migrate/006_create_items.rb +36 -0
  82. data/spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb +30 -0
  83. data/spec/dummy/db/migrate/20111201121636_create_languages.rb +16 -0
  84. data/spec/dummy/db/migrate/20111201121844_create_roles.rb +12 -0
  85. data/spec/dummy/db/migrate/20111201155456_create_users.rb +13 -0
  86. data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +31 -0
  87. data/spec/dummy/db/migrate/20111201163342_create_user_groups.rb +12 -0
  88. data/spec/dummy/db/migrate/20111201163718_create_user_has_roles.rb +10 -0
  89. data/spec/dummy/db/schema.rb +168 -0
  90. data/spec/dummy/db/test.sqlite3 +0 -0
  91. data/spec/dummy/lib/expire_editable_fragment.rb +62 -0
  92. data/spec/dummy/log/development.log +2 -0
  93. data/spec/dummy/log/sunspot-solr-test.log +222 -0
  94. data/spec/dummy/log/test.log +77918 -0
  95. data/spec/dummy/public/404.html +26 -0
  96. data/spec/dummy/public/422.html +26 -0
  97. data/spec/dummy/public/500.html +26 -0
  98. data/spec/dummy/public/favicon.ico +0 -0
  99. data/spec/dummy/script/rails +6 -0
  100. data/spec/dummy/solr/conf/admin-extra.html +31 -0
  101. data/spec/dummy/solr/conf/elevate.xml +36 -0
  102. data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  103. data/spec/dummy/solr/conf/protwords.txt +21 -0
  104. data/spec/dummy/solr/conf/schema.xml +238 -0
  105. data/spec/dummy/solr/conf/scripts.conf +24 -0
  106. data/spec/dummy/solr/conf/solrconfig.xml +934 -0
  107. data/spec/dummy/solr/conf/spellings.txt +2 -0
  108. data/spec/dummy/solr/conf/stopwords.txt +58 -0
  109. data/spec/dummy/solr/conf/synonyms.txt +31 -0
  110. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  111. data/spec/dummy/solr/data/test/index/segments_1 +0 -0
  112. data/spec/dummy/solr/data/test/spellchecker/segments.gen +0 -0
  113. data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
  114. data/spec/factories/answer.rb +7 -0
  115. data/spec/factories/question.rb +6 -0
  116. data/spec/factories/user.rb +34 -0
  117. data/spec/fixtures/answer_has_items.yml +26 -0
  118. data/spec/fixtures/answers.yml +61 -0
  119. data/spec/fixtures/questions.yml +61 -0
  120. data/spec/fixtures/roles.yml +21 -0
  121. data/spec/fixtures/user_groups.yml +25 -0
  122. data/spec/fixtures/user_has_roles.yml +41 -0
  123. data/spec/fixtures/users.yml +69 -0
  124. data/spec/models/answer_has_item_spec.rb +20 -0
  125. data/spec/models/answer_spec.rb +25 -0
  126. data/spec/spec_helper.rb +48 -0
  127. data/spec/support/controller_macros.rb +48 -0
  128. data/spec/support/devise.rb +4 -0
  129. data/spec/support/vcr.rb +6 -0
  130. metadata +306 -0
metadata ADDED
@@ -0,0 +1,306 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: enju_question
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Kosuke Tanabe
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-12-15 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &70196837619200 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.1.3
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70196837619200
25
+ - !ruby/object:Gem::Dependency
26
+ name: simple_form
27
+ requirement: &70196837618780 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70196837618780
36
+ - !ruby/object:Gem::Dependency
37
+ name: sqlite3
38
+ requirement: &70196837618320 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *70196837618320
47
+ - !ruby/object:Gem::Dependency
48
+ name: rspec-rails
49
+ requirement: &70196832768480 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70196832768480
58
+ description: Question and answer management for Next-L Enju
59
+ email:
60
+ - tanabe@mwr.mediacom.keio.ac.jp
61
+ executables: []
62
+ extensions: []
63
+ extra_rdoc_files: []
64
+ files:
65
+ - app/controllers/answers_controller.rb
66
+ - app/controllers/questions_controller.rb
67
+ - app/models/answer.rb
68
+ - app/models/answer_has_item.rb
69
+ - app/models/question.rb
70
+ - app/models/question_sweeper.rb
71
+ - app/views/answers/_form.html.erb
72
+ - app/views/answers/edit.html.erb
73
+ - app/views/answers/index.atom.builder
74
+ - app/views/answers/index.html.erb
75
+ - app/views/answers/index.rss.builder
76
+ - app/views/answers/new.html.erb
77
+ - app/views/answers/new.mobile.erb
78
+ - app/views/answers/show.html.erb
79
+ - app/views/questions/_crd.html.erb
80
+ - app/views/questions/_index.html.erb
81
+ - app/views/questions/_index_user.html.erb
82
+ - app/views/questions/_list.html.erb
83
+ - app/views/questions/_solved_facet.html.erb
84
+ - app/views/questions/edit.html.erb
85
+ - app/views/questions/index.atom.builder
86
+ - app/views/questions/index.html.erb
87
+ - app/views/questions/index.js.erb
88
+ - app/views/questions/index.mobile.erb
89
+ - app/views/questions/index.rss.builder
90
+ - app/views/questions/index_crd.xml.builder
91
+ - app/views/questions/new.html.erb
92
+ - app/views/questions/show.html.erb
93
+ - app/views/questions/show.mobile.erb
94
+ - app/views/questions/show_crd.xml.builder
95
+ - config/routes.rb
96
+ - db/migrate/098_create_questions.rb
97
+ - db/migrate/099_create_answers.rb
98
+ - db/migrate/20100217054028_create_answer_has_items.rb
99
+ - lib/enju_question/engine.rb
100
+ - lib/enju_question/version.rb
101
+ - lib/enju_question.rb
102
+ - lib/tasks/enju_question_tasks.rake
103
+ - MIT-LICENSE
104
+ - Rakefile
105
+ - README.rdoc
106
+ - spec/cassette_library/enju_ndl/crd.yml
107
+ - spec/controllers/answers_controller_spec.rb
108
+ - spec/controllers/questions_controller_spec.rb
109
+ - spec/dummy/app/assets/javascripts/application.js
110
+ - spec/dummy/app/assets/stylesheets/application.css
111
+ - spec/dummy/app/controllers/application_controller.rb
112
+ - spec/dummy/app/helpers/application_helper.rb
113
+ - spec/dummy/app/models/ability.rb
114
+ - spec/dummy/app/models/item.rb
115
+ - spec/dummy/app/models/role.rb
116
+ - spec/dummy/app/models/user.rb
117
+ - spec/dummy/app/models/user_group.rb
118
+ - spec/dummy/app/models/user_has_role.rb
119
+ - spec/dummy/app/views/layouts/application.html.erb
120
+ - spec/dummy/app/views/page/403.html.erb
121
+ - spec/dummy/app/views/page/403.mobile.erb
122
+ - spec/dummy/app/views/page/403.xml.erb
123
+ - spec/dummy/app/views/page/404.html.erb
124
+ - spec/dummy/app/views/page/404.mobile.erb
125
+ - spec/dummy/app/views/page/404.xml.erb
126
+ - spec/dummy/config/application.rb
127
+ - spec/dummy/config/boot.rb
128
+ - spec/dummy/config/database.yml
129
+ - spec/dummy/config/environment.rb
130
+ - spec/dummy/config/environments/development.rb
131
+ - spec/dummy/config/environments/production.rb
132
+ - spec/dummy/config/environments/test.rb
133
+ - spec/dummy/config/initializers/backtrace_silencers.rb
134
+ - spec/dummy/config/initializers/devise.rb
135
+ - spec/dummy/config/initializers/inflections.rb
136
+ - spec/dummy/config/initializers/mime_types.rb
137
+ - spec/dummy/config/initializers/secret_token.rb
138
+ - spec/dummy/config/initializers/session_store.rb
139
+ - spec/dummy/config/initializers/wrap_parameters.rb
140
+ - spec/dummy/config/locales/en.yml
141
+ - spec/dummy/config/routes.rb
142
+ - spec/dummy/config.ru
143
+ - spec/dummy/db/development.sqlite3
144
+ - spec/dummy/db/migrate/006_create_items.rb
145
+ - spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb
146
+ - spec/dummy/db/migrate/20111201121636_create_languages.rb
147
+ - spec/dummy/db/migrate/20111201121844_create_roles.rb
148
+ - spec/dummy/db/migrate/20111201155456_create_users.rb
149
+ - spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb
150
+ - spec/dummy/db/migrate/20111201163342_create_user_groups.rb
151
+ - spec/dummy/db/migrate/20111201163718_create_user_has_roles.rb
152
+ - spec/dummy/db/schema.rb
153
+ - spec/dummy/db/test.sqlite3
154
+ - spec/dummy/lib/expire_editable_fragment.rb
155
+ - spec/dummy/log/development.log
156
+ - spec/dummy/log/sunspot-solr-test.log
157
+ - spec/dummy/log/test.log
158
+ - spec/dummy/public/404.html
159
+ - spec/dummy/public/422.html
160
+ - spec/dummy/public/500.html
161
+ - spec/dummy/public/favicon.ico
162
+ - spec/dummy/Rakefile
163
+ - spec/dummy/script/rails
164
+ - spec/dummy/solr/conf/admin-extra.html
165
+ - spec/dummy/solr/conf/elevate.xml
166
+ - spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt
167
+ - spec/dummy/solr/conf/protwords.txt
168
+ - spec/dummy/solr/conf/schema.xml
169
+ - spec/dummy/solr/conf/scripts.conf
170
+ - spec/dummy/solr/conf/solrconfig.xml
171
+ - spec/dummy/solr/conf/spellings.txt
172
+ - spec/dummy/solr/conf/stopwords.txt
173
+ - spec/dummy/solr/conf/synonyms.txt
174
+ - spec/dummy/solr/data/test/index/segments.gen
175
+ - spec/dummy/solr/data/test/index/segments_1
176
+ - spec/dummy/solr/data/test/spellchecker/segments.gen
177
+ - spec/dummy/solr/data/test/spellchecker/segments_1
178
+ - spec/factories/answer.rb
179
+ - spec/factories/question.rb
180
+ - spec/factories/user.rb
181
+ - spec/fixtures/answer_has_items.yml
182
+ - spec/fixtures/answers.yml
183
+ - spec/fixtures/questions.yml
184
+ - spec/fixtures/roles.yml
185
+ - spec/fixtures/user_groups.yml
186
+ - spec/fixtures/user_has_roles.yml
187
+ - spec/fixtures/users.yml
188
+ - spec/models/answer_has_item_spec.rb
189
+ - spec/models/answer_spec.rb
190
+ - spec/spec_helper.rb
191
+ - spec/support/controller_macros.rb
192
+ - spec/support/devise.rb
193
+ - spec/support/vcr.rb
194
+ homepage: https://github.com/nabeta/enju_question.git
195
+ licenses: []
196
+ post_install_message:
197
+ rdoc_options: []
198
+ require_paths:
199
+ - lib
200
+ required_ruby_version: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
206
+ required_rubygems_version: !ruby/object:Gem::Requirement
207
+ none: false
208
+ requirements:
209
+ - - ! '>='
210
+ - !ruby/object:Gem::Version
211
+ version: '0'
212
+ requirements: []
213
+ rubyforge_project:
214
+ rubygems_version: 1.8.11
215
+ signing_key:
216
+ specification_version: 3
217
+ summary: enju_queestion plugin
218
+ test_files:
219
+ - spec/cassette_library/enju_ndl/crd.yml
220
+ - spec/controllers/answers_controller_spec.rb
221
+ - spec/controllers/questions_controller_spec.rb
222
+ - spec/dummy/app/assets/javascripts/application.js
223
+ - spec/dummy/app/assets/stylesheets/application.css
224
+ - spec/dummy/app/controllers/application_controller.rb
225
+ - spec/dummy/app/helpers/application_helper.rb
226
+ - spec/dummy/app/models/ability.rb
227
+ - spec/dummy/app/models/item.rb
228
+ - spec/dummy/app/models/role.rb
229
+ - spec/dummy/app/models/user.rb
230
+ - spec/dummy/app/models/user_group.rb
231
+ - spec/dummy/app/models/user_has_role.rb
232
+ - spec/dummy/app/views/layouts/application.html.erb
233
+ - spec/dummy/app/views/page/403.html.erb
234
+ - spec/dummy/app/views/page/403.mobile.erb
235
+ - spec/dummy/app/views/page/403.xml.erb
236
+ - spec/dummy/app/views/page/404.html.erb
237
+ - spec/dummy/app/views/page/404.mobile.erb
238
+ - spec/dummy/app/views/page/404.xml.erb
239
+ - spec/dummy/config/application.rb
240
+ - spec/dummy/config/boot.rb
241
+ - spec/dummy/config/database.yml
242
+ - spec/dummy/config/environment.rb
243
+ - spec/dummy/config/environments/development.rb
244
+ - spec/dummy/config/environments/production.rb
245
+ - spec/dummy/config/environments/test.rb
246
+ - spec/dummy/config/initializers/backtrace_silencers.rb
247
+ - spec/dummy/config/initializers/devise.rb
248
+ - spec/dummy/config/initializers/inflections.rb
249
+ - spec/dummy/config/initializers/mime_types.rb
250
+ - spec/dummy/config/initializers/secret_token.rb
251
+ - spec/dummy/config/initializers/session_store.rb
252
+ - spec/dummy/config/initializers/wrap_parameters.rb
253
+ - spec/dummy/config/locales/en.yml
254
+ - spec/dummy/config/routes.rb
255
+ - spec/dummy/config.ru
256
+ - spec/dummy/db/development.sqlite3
257
+ - spec/dummy/db/migrate/006_create_items.rb
258
+ - spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb
259
+ - spec/dummy/db/migrate/20111201121636_create_languages.rb
260
+ - spec/dummy/db/migrate/20111201121844_create_roles.rb
261
+ - spec/dummy/db/migrate/20111201155456_create_users.rb
262
+ - spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb
263
+ - spec/dummy/db/migrate/20111201163342_create_user_groups.rb
264
+ - spec/dummy/db/migrate/20111201163718_create_user_has_roles.rb
265
+ - spec/dummy/db/schema.rb
266
+ - spec/dummy/db/test.sqlite3
267
+ - spec/dummy/lib/expire_editable_fragment.rb
268
+ - spec/dummy/log/development.log
269
+ - spec/dummy/log/sunspot-solr-test.log
270
+ - spec/dummy/log/test.log
271
+ - spec/dummy/public/404.html
272
+ - spec/dummy/public/422.html
273
+ - spec/dummy/public/500.html
274
+ - spec/dummy/public/favicon.ico
275
+ - spec/dummy/Rakefile
276
+ - spec/dummy/script/rails
277
+ - spec/dummy/solr/conf/admin-extra.html
278
+ - spec/dummy/solr/conf/elevate.xml
279
+ - spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt
280
+ - spec/dummy/solr/conf/protwords.txt
281
+ - spec/dummy/solr/conf/schema.xml
282
+ - spec/dummy/solr/conf/scripts.conf
283
+ - spec/dummy/solr/conf/solrconfig.xml
284
+ - spec/dummy/solr/conf/spellings.txt
285
+ - spec/dummy/solr/conf/stopwords.txt
286
+ - spec/dummy/solr/conf/synonyms.txt
287
+ - spec/dummy/solr/data/test/index/segments.gen
288
+ - spec/dummy/solr/data/test/index/segments_1
289
+ - spec/dummy/solr/data/test/spellchecker/segments.gen
290
+ - spec/dummy/solr/data/test/spellchecker/segments_1
291
+ - spec/factories/answer.rb
292
+ - spec/factories/question.rb
293
+ - spec/factories/user.rb
294
+ - spec/fixtures/answer_has_items.yml
295
+ - spec/fixtures/answers.yml
296
+ - spec/fixtures/questions.yml
297
+ - spec/fixtures/roles.yml
298
+ - spec/fixtures/user_groups.yml
299
+ - spec/fixtures/user_has_roles.yml
300
+ - spec/fixtures/users.yml
301
+ - spec/models/answer_has_item_spec.rb
302
+ - spec/models/answer_spec.rb
303
+ - spec/spec_helper.rb
304
+ - spec/support/controller_macros.rb
305
+ - spec/support/devise.rb
306
+ - spec/support/vcr.rb