enju_trunk_subject 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (280) hide show
  1. checksums.yaml +15 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +36 -0
  5. data/app/controllers/classification_types_controller.rb +13 -0
  6. data/app/controllers/classifications_controller.rb +114 -0
  7. data/app/controllers/subject_has_classifications_controller.rb +97 -0
  8. data/app/controllers/subject_heading_type_has_subjects_controller.rb +80 -0
  9. data/app/controllers/subject_heading_types_controller.rb +13 -0
  10. data/app/controllers/subject_types_controller.rb +13 -0
  11. data/app/controllers/subjects_controller.rb +216 -0
  12. data/app/controllers/work_has_subjects_controller.rb +107 -0
  13. data/app/models/classification.rb +89 -0
  14. data/app/models/classification_type.rb +20 -0
  15. data/app/models/enju_subject/ability.rb +55 -0
  16. data/app/models/subject.rb +100 -0
  17. data/app/models/subject_has_classification.rb +37 -0
  18. data/app/models/subject_heading_type.rb +21 -0
  19. data/app/models/subject_heading_type_has_subject.rb +22 -0
  20. data/app/models/subject_type.rb +20 -0
  21. data/app/models/work_has_subject.rb +35 -0
  22. data/app/views/classification_types/_form.html.erb +19 -0
  23. data/app/views/classification_types/edit.html.erb +13 -0
  24. data/app/views/classification_types/index.html.erb +45 -0
  25. data/app/views/classification_types/new.html.erb +12 -0
  26. data/app/views/classification_types/show.html.erb +30 -0
  27. data/app/views/classifications/_form.html.erb +27 -0
  28. data/app/views/classifications/edit.html.erb +13 -0
  29. data/app/views/classifications/index.html.erb +54 -0
  30. data/app/views/classifications/new.html.erb +12 -0
  31. data/app/views/classifications/show.html.erb +34 -0
  32. data/app/views/manifestations/_classification_detail.html.erb +14 -0
  33. data/app/views/manifestations/_subject_detail.html.erb +14 -0
  34. data/app/views/manifestations/_subject_facet.html.erb +18 -0
  35. data/app/views/manifestations/_subject_form.html.erb +21 -0
  36. data/app/views/subject_has_classifications/edit.html.erb +30 -0
  37. data/app/views/subject_has_classifications/index.html.erb +38 -0
  38. data/app/views/subject_has_classifications/new.html.erb +32 -0
  39. data/app/views/subject_has_classifications/show.html.erb +22 -0
  40. data/app/views/subject_heading_type_has_subjects/edit.html.erb +28 -0
  41. data/app/views/subject_heading_type_has_subjects/index.html.erb +30 -0
  42. data/app/views/subject_heading_type_has_subjects/new.html.erb +27 -0
  43. data/app/views/subject_heading_type_has_subjects/show.html.erb +23 -0
  44. data/app/views/subject_heading_types/_form.html.erb +19 -0
  45. data/app/views/subject_heading_types/edit.html.erb +13 -0
  46. data/app/views/subject_heading_types/index.html.erb +43 -0
  47. data/app/views/subject_heading_types/new.html.erb +12 -0
  48. data/app/views/subject_heading_types/show.html.erb +27 -0
  49. data/app/views/subject_types/_form.html.erb +19 -0
  50. data/app/views/subject_types/edit.html.erb +13 -0
  51. data/app/views/subject_types/index.html.erb +43 -0
  52. data/app/views/subject_types/new.html.erb +12 -0
  53. data/app/views/subject_types/show.html.erb +29 -0
  54. data/app/views/subjects/_form.html.erb +42 -0
  55. data/app/views/subjects/_index.html.erb +48 -0
  56. data/app/views/subjects/_index_classification.html.erb +57 -0
  57. data/app/views/subjects/_index_work.html.erb +60 -0
  58. data/app/views/subjects/_show_work_list.html.erb +15 -0
  59. data/app/views/subjects/edit.html.erb +13 -0
  60. data/app/views/subjects/index.atom.builder +10 -0
  61. data/app/views/subjects/index.html.erb +7 -0
  62. data/app/views/subjects/index.rss.builder +29 -0
  63. data/app/views/subjects/new.html.erb +12 -0
  64. data/app/views/subjects/show.html.erb +69 -0
  65. data/app/views/subjects/show.js.erb +1 -0
  66. data/app/views/work_has_subjects/_form.html.erb +24 -0
  67. data/app/views/work_has_subjects/edit.html.erb +29 -0
  68. data/app/views/work_has_subjects/index.html.erb +31 -0
  69. data/app/views/work_has_subjects/new.html.erb +42 -0
  70. data/app/views/work_has_subjects/show.html.erb +25 -0
  71. data/config/locales/translation_en.yml +35 -0
  72. data/config/locales/translation_ja.yml +39 -0
  73. data/config/routes.rb +7 -0
  74. data/db/fixtures/classification_types.yml +7 -0
  75. data/db/fixtures/subject_types.yml +28 -0
  76. data/db/migrate/029_create_subjects.rb +28 -0
  77. data/db/migrate/142_create_classifications.rb +19 -0
  78. data/db/migrate/144_create_classification_types.rb +16 -0
  79. data/db/migrate/145_create_subject_heading_types.rb +16 -0
  80. data/db/migrate/146_create_subject_types.rb +16 -0
  81. data/db/migrate/20110913120629_add_lft_and_rgt_to_classification.rb +11 -0
  82. data/db/migrate/20140427142354_add_classifiation_identifier_to_classification.rb +6 -0
  83. data/lib/enju_subject.rb +33 -0
  84. data/lib/enju_subject/engine.rb +8 -0
  85. data/lib/enju_subject/manifestation.rb +31 -0
  86. data/lib/enju_subject/master_model.rb +41 -0
  87. data/lib/enju_subject/version.rb +3 -0
  88. data/lib/generators/enju_subject/setup/USAGE +8 -0
  89. data/lib/generators/enju_subject/setup/setup_generator.rb +10 -0
  90. data/lib/generators/enju_subject/setup/templates/db/fixtures/classification_types.yml +13 -0
  91. data/lib/generators/enju_subject/setup/templates/db/fixtures/subject_heading_types.yml +39 -0
  92. data/lib/generators/enju_subject/setup/templates/db/fixtures/subject_types.yml +28 -0
  93. data/lib/tasks/enju_subject_tasks.rake +19 -0
  94. data/spec/controllers/classification_types_controller_spec.rb +445 -0
  95. data/spec/controllers/classifications_controller_spec.rb +441 -0
  96. data/spec/controllers/subject_heading_types_controller_spec.rb +445 -0
  97. data/spec/controllers/subject_types_controller_spec.rb +447 -0
  98. data/spec/controllers/subjects_controller_spec.rb +437 -0
  99. data/spec/dummy/Rakefile +7 -0
  100. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  101. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  102. data/spec/dummy/app/controllers/application_controller.rb +47 -0
  103. data/spec/dummy/app/helpers/application_helper.rb +21 -0
  104. data/spec/dummy/app/models/ability.rb +59 -0
  105. data/spec/dummy/app/models/setting.rb +4 -0
  106. data/spec/dummy/app/models/user.rb +43 -0
  107. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  108. data/spec/dummy/config.ru +4 -0
  109. data/spec/dummy/config/application.rb +46 -0
  110. data/spec/dummy/config/application.yml +38 -0
  111. data/spec/dummy/config/boot.rb +10 -0
  112. data/spec/dummy/config/database.yml +25 -0
  113. data/spec/dummy/config/environment.rb +5 -0
  114. data/spec/dummy/config/environments/development.rb +30 -0
  115. data/spec/dummy/config/environments/production.rb +60 -0
  116. data/spec/dummy/config/environments/test.rb +39 -0
  117. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  118. data/spec/dummy/config/initializers/devise.rb +207 -0
  119. data/spec/dummy/config/initializers/inflections.rb +10 -0
  120. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  121. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  122. data/spec/dummy/config/initializers/session_store.rb +8 -0
  123. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  124. data/spec/dummy/config/locales/devise.en.yml +57 -0
  125. data/spec/dummy/config/locales/en.yml +18 -0
  126. data/spec/dummy/config/locales/ja.yml +18 -0
  127. data/spec/dummy/config/routes.rb +60 -0
  128. data/spec/dummy/db/fixtures/roles.yml +25 -0
  129. data/spec/dummy/db/migrate/001_create_agents.rb +53 -0
  130. data/spec/dummy/db/migrate/005_create_manifestations.rb +56 -0
  131. data/spec/dummy/db/migrate/006_create_items.rb +24 -0
  132. data/spec/dummy/db/migrate/012_create_owns.rb +12 -0
  133. data/spec/dummy/db/migrate/015_create_creates.rb +12 -0
  134. data/spec/dummy/db/migrate/047_create_produces.rb +12 -0
  135. data/spec/dummy/db/migrate/059_create_libraries.rb +28 -0
  136. data/spec/dummy/db/migrate/069_create_shelves.rb +15 -0
  137. data/spec/dummy/db/migrate/073_create_carrier_types.rb +11 -0
  138. data/spec/dummy/db/migrate/077_create_user_groups.rb +12 -0
  139. data/spec/dummy/db/migrate/080_create_library_groups.rb +18 -0
  140. data/spec/dummy/db/migrate/112_create_frequencies.rb +12 -0
  141. data/spec/dummy/db/migrate/117_create_form_of_works.rb +12 -0
  142. data/spec/dummy/db/migrate/120_create_baskets.rb +12 -0
  143. data/spec/dummy/db/migrate/124_create_bookstores.rb +17 -0
  144. data/spec/dummy/db/migrate/125_create_donates.rb +12 -0
  145. data/spec/dummy/db/migrate/130_create_request_status_types.rb +12 -0
  146. data/spec/dummy/db/migrate/131_create_request_types.rb +12 -0
  147. data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +13 -0
  148. data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +13 -0
  149. data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +12 -0
  150. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +17 -0
  151. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +14 -0
  152. data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +17 -0
  153. data/spec/dummy/db/migrate/20081025083323_create_countries.rb +28 -0
  154. data/spec/dummy/db/migrate/20081025083905_create_languages.rb +23 -0
  155. data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +15 -0
  156. data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +22 -0
  157. data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +22 -0
  158. data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +15 -0
  159. data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +15 -0
  160. data/spec/dummy/db/migrate/20090719201843_create_extents.rb +12 -0
  161. data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +12 -0
  162. data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +12 -0
  163. data/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +12 -0
  164. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +27 -0
  165. data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +12 -0
  166. data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
  167. data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +13 -0
  168. data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +15 -0
  169. data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +9 -0
  170. data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +13 -0
  171. data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +10 -0
  172. data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +13 -0
  173. data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +13 -0
  174. data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +12 -0
  175. data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +11 -0
  176. data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +15 -0
  177. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +12 -0
  178. data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +9 -0
  179. data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +9 -0
  180. data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +9 -0
  181. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +11 -0
  182. data/spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb +9 -0
  183. data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +9 -0
  184. data/spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.rb +9 -0
  185. data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +9 -0
  186. data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +11 -0
  187. data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +9 -0
  188. data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +12 -0
  189. data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +13 -0
  190. data/spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb +13 -0
  191. data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +13 -0
  192. data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +13 -0
  193. data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +10 -0
  194. data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +9 -0
  195. data/spec/dummy/db/migrate/20111009183423_add_ndc_to_manifestation.rb +9 -0
  196. data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +12 -0
  197. data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +12 -0
  198. data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +12 -0
  199. data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +7 -0
  200. data/spec/dummy/db/migrate/20111201121844_create_roles.rb +12 -0
  201. data/spec/dummy/db/migrate/20111201155456_create_users.rb +8 -0
  202. data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +49 -0
  203. data/spec/dummy/db/migrate/20111201163718_create_user_has_roles.rb +10 -0
  204. data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +5 -0
  205. data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +6 -0
  206. data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +12 -0
  207. data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +6 -0
  208. data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +6 -0
  209. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
  210. data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +5 -0
  211. data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +5 -0
  212. data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +5 -0
  213. data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +5 -0
  214. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +5 -0
  215. data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +5 -0
  216. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +5 -0
  217. data/spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +9 -0
  218. data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +5 -0
  219. data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +5 -0
  220. data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +5 -0
  221. data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +6 -0
  222. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +5 -0
  223. data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +26 -0
  224. data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +5 -0
  225. data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +7 -0
  226. data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +5 -0
  227. data/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +12 -0
  228. data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +15 -0
  229. data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +5 -0
  230. data/spec/dummy/db/schema.rb +901 -0
  231. data/spec/dummy/db/seeds.rb +32 -0
  232. data/spec/dummy/public/404.html +26 -0
  233. data/spec/dummy/public/422.html +26 -0
  234. data/spec/dummy/public/500.html +26 -0
  235. data/spec/dummy/public/favicon.ico +0 -0
  236. data/spec/dummy/script/rails +6 -0
  237. data/spec/dummy/spec/fixtures/subjects.yml +72 -0
  238. data/spec/dummy/test/fixtures/user_groups.yml +13 -0
  239. data/spec/dummy/test/fixtures/user_has_roles.yml +9 -0
  240. data/spec/dummy/test/fixtures/users.yml +11 -0
  241. data/spec/dummy/test/unit/user_group_test.rb +7 -0
  242. data/spec/dummy/test/unit/user_has_role_test.rb +7 -0
  243. data/spec/dummy/test/unit/user_test.rb +7 -0
  244. data/spec/factories/classification.rb +6 -0
  245. data/spec/factories/classification_type.rb +5 -0
  246. data/spec/factories/manifestation.rb +6 -0
  247. data/spec/factories/subject.rb +7 -0
  248. data/spec/factories/subject_heading_type.rb +5 -0
  249. data/spec/factories/subject_heading_type_has_subject.rb +6 -0
  250. data/spec/factories/subject_type.rb +5 -0
  251. data/spec/factories/user.rb +34 -0
  252. data/spec/fixtures/agent_types.yml +35 -0
  253. data/spec/fixtures/agents.yml +143 -0
  254. data/spec/fixtures/carrier_types.yml +51 -0
  255. data/spec/fixtures/classification_types.yml +188 -0
  256. data/spec/fixtures/classifications.yml +118 -0
  257. data/spec/fixtures/languages.yml +1901 -0
  258. data/spec/fixtures/library_groups.yml +33 -0
  259. data/spec/fixtures/manifestations.yml +22 -0
  260. data/spec/fixtures/roles.yml +21 -0
  261. data/spec/fixtures/shtsv.tsv +3 -0
  262. data/spec/fixtures/subject_heading_types.yml +39 -0
  263. data/spec/fixtures/subject_types.yml +42 -0
  264. data/spec/fixtures/subjects.yml +80 -0
  265. data/spec/fixtures/user_groups.yml +25 -0
  266. data/spec/fixtures/user_has_roles.yml +41 -0
  267. data/spec/fixtures/users.yml +69 -0
  268. data/spec/models/classification_spec.rb +46 -0
  269. data/spec/models/classification_type_spec.rb +21 -0
  270. data/spec/models/subject_heading_type_spec.rb +21 -0
  271. data/spec/models/subject_spec.rb +33 -0
  272. data/spec/models/subject_type_spec.rb +21 -0
  273. data/spec/requests/subjects_spec.rb +9 -0
  274. data/spec/routing/subject_heading_types_routing_spec.rb +35 -0
  275. data/spec/routing/subject_types_routing_spec.rb +35 -0
  276. data/spec/routing/subjects_routing_spec.rb +35 -0
  277. data/spec/spec_helper.rb +45 -0
  278. data/spec/support/controller_macros.rb +48 -0
  279. data/spec/support/devise.rb +3 -0
  280. metadata +675 -0
@@ -0,0 +1,32 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
7
+ # Mayor.create(:name => 'Daley', :city => cities.first)
8
+
9
+ # Change the following
10
+ username = 'admin'
11
+ email = 'admin@example.jp'
12
+ password = 'adminpassword'
13
+
14
+ # Don't edit!
15
+ require 'active_record/fixtures'
16
+
17
+ unless solr = Sunspot.commit rescue nil
18
+ raise "Solr is not running."
19
+ end
20
+
21
+ Dir.glob(Rails.root.to_s + '/db/fixtures/*.yml').each do |file|
22
+ ActiveRecord::Fixtures.create_fixtures('spec/dummy/db/fixtures', File.basename(file, '.*'))
23
+ end
24
+
25
+ user = User.new
26
+ user.username = username
27
+ user.email = email
28
+ user.password = password
29
+ user.password_confirmation = password
30
+ user.role = Role.find_by_name('Administrator')
31
+ user.save!
32
+ puts 'Administrator account created.'
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ <p>We've been notified about this issue and we'll take a look at it shortly.</p>
24
+ </div>
25
+ </body>
26
+ </html>
File without changes
@@ -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'
@@ -0,0 +1,72 @@
1
+ ---
2
+ subject_00001:
3
+ updated_at: 2008-03-02 03:19:58.534251 +09:00
4
+ term: next-l
5
+ scope_note:
6
+ subject_type_id: 1
7
+ term_transcription: next-l
8
+ id: 1
9
+ note:
10
+ parent_id:
11
+ created_at: 2008-03-01 17:53:06.118389 +09:00
12
+ subject_00002:
13
+ updated_at: 2008-03-02 03:19:57.946759 +09:00
14
+ term: test2
15
+ scope_note:
16
+ subject_type_id: 1
17
+ term_transcription: test2
18
+ id: 2
19
+ note:
20
+ parent_id:
21
+ created_at: 2008-03-01 17:50:34.658349 +09:00
22
+ subject_00003:
23
+ updated_at: 2008-03-02 03:19:58.048475 +09:00
24
+ term: test3
25
+ scope_note:
26
+ subject_type_id: 1
27
+ term_transcription: test3
28
+ id: 3
29
+ note:
30
+ parent_id:
31
+ created_at: 2008-03-01 17:51:39.448430 +09:00
32
+ subject_00004:
33
+ updated_at: 2008-03-02 03:19:58.048475 +09:00
34
+ term: test4
35
+ scope_note:
36
+ subject_type_id: 1
37
+ term_transcription: test4
38
+ id: 4
39
+ note:
40
+ parent_id:
41
+ created_at: 2008-03-01 17:51:39.448430 +09:00
42
+ subject_00005:
43
+ updated_at: 2008-03-02 03:19:58.048475 +09:00
44
+ term: test5
45
+ scope_note:
46
+ subject_type_id: 1
47
+ term_transcription: test5
48
+ id: 5
49
+ note:
50
+ parent_id:
51
+ created_at: 2008-03-01 17:51:39.448430 +09:00
52
+
53
+ # == Schema Information
54
+ #
55
+ # Table name: subjects
56
+ #
57
+ # id :integer not null, primary key
58
+ # parent_id :integer
59
+ # use_term_id :integer
60
+ # term :string(255)
61
+ # term_transcription :text
62
+ # subject_type_id :integer not null
63
+ # scope_note :text
64
+ # note :text
65
+ # required_role_id :integer default(1), not null
66
+ # work_has_subjects_count :integer default(0), not null
67
+ # lock_version :integer default(0), not null
68
+ # created_at :datetime
69
+ # updated_at :datetime
70
+ # deleted_at :datetime
71
+ #
72
+
@@ -0,0 +1,13 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ name: MyString
5
+ display_name: MyText
6
+ note: MyText
7
+ position: 1
8
+
9
+ two:
10
+ name: MyString
11
+ display_name: MyText
12
+ note: MyText
13
+ position: 1
@@ -0,0 +1,9 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ user_id: 1
5
+ role_id: 1
6
+
7
+ two:
8
+ user_id: 1
9
+ role_id: 1
@@ -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
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class UserGroupTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class UserHasRoleTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class UserTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,6 @@
1
+ FactoryGirl.define do
2
+ factory :classification do |f|
3
+ f.sequence(:category){|n| "classification_#{n}"}
4
+ f.classification_type_id{FactoryGirl.create(:classification_type).id}
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ FactoryGirl.define do
2
+ factory :classification_type do |f|
3
+ f.sequence(:name){|n| "classification_type_#{n}"}
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ FactoryGirl.define do
2
+ factory :manifestation do |f|
3
+ f.sequence(:original_title){|n| "manifestation_title_#{n}"}
4
+ f.carrier_type_id{CarrierType.find(1).id}
5
+ end
6
+ end
@@ -0,0 +1,7 @@
1
+ FactoryGirl.define do
2
+ factory :subject do |f|
3
+ f.sequence(:term){|n| "subject_#{n}"}
4
+ f.subject_heading_type_id{FactoryGirl.create(:subject_heading_type).id}
5
+ f.subject_type_id{FactoryGirl.create(:subject_type).id}
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ FactoryGirl.define do
2
+ factory :subject_heading_type do |f|
3
+ f.sequence(:name){|n| "subject_heading_type_#{n}"}
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ FactoryGirl.define do
2
+ factory :subject_heading_type_has_subject do |f|
3
+ f.subject_heading_type_id{FactoryGirl.create(:subject_heading_type).id}
4
+ f.subject_id{FactoryGirl.create(:subject).id}
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ FactoryGirl.define do
2
+ factory :subject_type do |f|
3
+ f.sequence(:name){|n| "subject_type_#{n}"}
4
+ end
5
+ end
@@ -0,0 +1,34 @@
1
+ FactoryGirl.define do
2
+ factory :admin, :class => User do |f|
3
+ f.sequence(:username){|n| "admin_#{n}"}
4
+ f.sequence(:email){|n| "admin_#{n}@example.jp"}
5
+ f.role {Role.find_by_name('Administrator')}
6
+ f.password 'adminpassword'
7
+ f.password_confirmation 'adminpassword'
8
+ f.user_group {UserGroup.first}
9
+ f.required_role {Role.find_by_name('User')}
10
+ end
11
+
12
+ factory :librarian, :class => User do |f|
13
+ f.sequence(:username){|n| "librarian_#{n}"}
14
+ f.sequence(:email){|n| "librarian_#{n}@example.jp"}
15
+ f.role {Role.find_by_name('Librarian')}
16
+ f.password 'librarianpassword'
17
+ f.password_confirmation 'librarianpassword'
18
+ f.user_group {UserGroup.first}
19
+ f.required_role {Role.find_by_name('User')}
20
+ end
21
+
22
+ factory :user, :class => User do |f|
23
+ f.sequence(:username){|n| "user_#{n}"}
24
+ f.sequence(:email){|n| "user_#{n}@example.jp"}
25
+ f.role {Role.find_by_name('User')}
26
+ f.password 'userpassword'
27
+ f.password_confirmation 'userpassword'
28
+ f.user_group {UserGroup.first}
29
+ f.required_role {Role.find_by_name('User')}
30
+ end
31
+
32
+ factory :invalid_user, :class => User do |f|
33
+ end
34
+ end
@@ -0,0 +1,35 @@
1
+ ---
2
+ agent_type_00001:
3
+ id: 1
4
+ name: Person
5
+ display_name: Person
6
+ note:
7
+ position: 1
8
+
9
+ agent_type_00002:
10
+ id: 2
11
+ name: CorporateBody
12
+ display_name: CorporateBody
13
+ note:
14
+ position: 2
15
+
16
+ agent_type_00003:
17
+ id: 3
18
+ name: Conference
19
+ display_name: Conference
20
+ note:
21
+ position: 3
22
+
23
+ # == Schema Information
24
+ #
25
+ # Table name: agent_types
26
+ #
27
+ # id :integer not null, primary key
28
+ # name :string(255) not null
29
+ # display_name :text
30
+ # note :text
31
+ # position :integer
32
+ # created_at :datetime
33
+ # updated_at :datetime
34
+ #
35
+
@@ -0,0 +1,143 @@
1
+ ---
2
+ agent_00001:
3
+ full_name: Administrator
4
+ updated_at: 2007-11-21 22:01:56.137409 +09:00
5
+ id: 1
6
+ language_id: 1
7
+ agent_type_id: 1
8
+ required_role_id: 1
9
+ created_at: 2007-11-19 17:06:06.507237 +09:00
10
+ user_id: 1
11
+ agent_00002:
12
+ full_name: Librarian1
13
+ updated_at: 2007-11-21 22:02:10.359793 +09:00
14
+ id: 2
15
+ language_id: 1
16
+ agent_type_id: 1
17
+ required_role_id: 4
18
+ created_at: 2007-11-19 17:06:07.724517 +09:00
19
+ user_id: 2
20
+ agent_00003:
21
+ full_name: Kosuke Tanabe
22
+ updated_at: 2007-12-04 16:25:01.523618 +09:00
23
+ id: 3
24
+ language_id: 1
25
+ agent_type_id: 1
26
+ required_role_id: 3
27
+ created_at: 2007-12-04 16:25:01.523618 +09:00
28
+ user_id: 3
29
+ agent_00004:
30
+ full_name: Librarian2
31
+ updated_at: 2007-12-04 16:25:01.785027 +09:00
32
+ id: 4
33
+ language_id: 1
34
+ agent_type_id: 1
35
+ required_role_id: 1
36
+ created_at: 2007-12-04 16:25:01.785027 +09:00
37
+ user_id: 4
38
+ agent_00005:
39
+ full_name: User2
40
+ updated_at: 2007-11-21 22:02:35.579396 +09:00
41
+ id: 5
42
+ language_id: 1
43
+ agent_type_id: 1
44
+ required_role_id: 2
45
+ created_at: 2007-11-19 17:24:50.153417 +09:00
46
+ user_id: 5
47
+ agent_00006:
48
+ full_name: New agent 1
49
+ updated_at: 2007-11-21 22:02:35.579396 +09:00
50
+ id: 6
51
+ language_id: 1
52
+ agent_type_id: 1
53
+ required_role_id: 1
54
+ created_at: 2007-11-19 17:24:50.153417 +09:00
55
+ agent_00007:
56
+ full_name: New agent 2
57
+ updated_at: 2007-11-21 22:02:35.579396 +09:00
58
+ id: 7
59
+ language_id: 1
60
+ agent_type_id: 1
61
+ required_role_id: 1
62
+ created_at: 2007-11-19 17:24:50.153417 +09:00
63
+ agent_00008:
64
+ full_name: New agent 3
65
+ updated_at: 2007-11-21 22:02:35.579396 +09:00
66
+ id: 8
67
+ language_id: 1
68
+ agent_type_id: 1
69
+ required_role_id: 1
70
+ created_at: 2007-11-19 17:24:50.153417 +09:00
71
+ agent_00009:
72
+ full_name: New agent 4
73
+ updated_at: 2007-11-21 22:02:35.579396 +09:00
74
+ id: 9
75
+ language_id: 1
76
+ agent_type_id: 1
77
+ required_role_id: 1
78
+ created_at: 2007-11-19 17:24:50.153417 +09:00
79
+ agent_00010:
80
+ full_name: New agent 5
81
+ updated_at: 2007-11-21 22:02:35.579396 +09:00
82
+ id: 10
83
+ language_id: 1
84
+ agent_type_id: 1
85
+ required_role_id: 1
86
+ created_at: 2007-11-19 17:24:50.153417 +09:00
87
+ agent_00011:
88
+ full_name: User3
89
+ updated_at: 2007-11-21 22:02:35.579396 +09:00
90
+ id: 11
91
+ language_id: 1
92
+ agent_type_id: 1
93
+ required_role_id: 1
94
+ created_at: 2007-11-19 17:24:50.153417 +09:00
95
+ user_id: 6
96
+ agent_00101:
97
+ full_name: テスト正式名称
98
+ updated_at: 2010-03-03 17:00:00.579396 +09:00
99
+ id: 101
100
+ language_id: 1
101
+ agent_type_id: 1
102
+ required_role_id: 1
103
+ created_at: 2010-03-03 17:00:00.579396 +09:00
104
+ agent_00102:
105
+ full_name: 出版社テスト
106
+ updated_at: 2010-03-03 17:00:00.579396 +09:00
107
+ id: 102
108
+ language_id: 1
109
+ agent_type_id: 1
110
+ required_role_id: 1
111
+ created_at: 2010-03-03 17:00:00.579396 +09:00
112
+ agent_00103:
113
+ full_name: 作者ダミー
114
+ updated_at: 2010-03-16 19:00:00.579396 +09:00
115
+ id: 103
116
+ language_id: 1
117
+ agent_type_id: 1
118
+ required_role_id: 1
119
+ created_at: 2010-03-16 19:00:00.579396 +09:00
120
+ agent_00104:
121
+ full_name: 試験用会社
122
+ updated_at: 2010-03-16 19:00:00.579396 +09:00
123
+ id: 104
124
+ language_id: 1
125
+ agent_type_id: 1
126
+ required_role_id: 1
127
+ created_at: 2010-03-16 19:00:00.579396 +09:00
128
+ agent_00201:
129
+ full_name: オーム社
130
+ updated_at: 2010-03-15 17:00:00.579396 +09:00
131
+ id: 201
132
+ language_id: 1
133
+ agent_type_id: 1
134
+ required_role_id: 1
135
+ created_at: 2010-03-15 17:00:00.579396 +09:00
136
+ agent_00202:
137
+ full_name: Ruby社
138
+ updated_at: 2010-03-15 17:00:00.579396 +09:00
139
+ id: 202
140
+ language_id: 1
141
+ agent_type_id: 1
142
+ required_role_id: 1
143
+ created_at: 2010-03-15 17:00:00.579396 +09:00