enju_event 0.1.17.pre17 → 0.1.17.pre18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/event_import_files_controller.rb +7 -2
  3. data/app/controllers/event_import_results_controller.rb +1 -1
  4. data/app/models/event.rb +11 -13
  5. data/app/models/event_import_file.rb +52 -73
  6. data/app/models/event_import_file_state_machine.rb +19 -0
  7. data/app/models/event_import_file_transition.rb +20 -0
  8. data/app/views/calendar/index.html.erb +2 -2
  9. data/app/views/event_categories/edit.html.erb +2 -2
  10. data/app/views/event_categories/index.html.erb +2 -2
  11. data/app/views/event_categories/new.html.erb +2 -2
  12. data/app/views/event_categories/show.html.erb +2 -2
  13. data/app/views/event_import_files/edit.html.erb +2 -2
  14. data/app/views/event_import_files/index.html.erb +4 -4
  15. data/app/views/event_import_files/new.html.erb +17 -4
  16. data/app/views/event_import_files/show.html.erb +13 -3
  17. data/app/views/event_import_results/index.html.erb +6 -6
  18. data/app/views/event_import_results/{index.csv.erb → index.tsv.erb} +0 -0
  19. data/app/views/event_import_results/show.html.erb +2 -2
  20. data/app/views/events/edit.html.erb +2 -2
  21. data/app/views/events/index.html.erb +2 -2
  22. data/app/views/events/new.html.erb +2 -2
  23. data/app/views/events/show.html.erb +8 -3
  24. data/app/views/participates/edit.html.erb +2 -2
  25. data/app/views/participates/index.html.erb +2 -2
  26. data/app/views/participates/new.html.erb +2 -2
  27. data/app/views/participates/show.html.erb +2 -2
  28. data/app/workers/event_import_file_queue.rb +7 -0
  29. data/config/locales/translation_en.yml +1 -0
  30. data/config/locales/translation_ja.yml +1 -0
  31. data/db/migrate/20081028093607_create_event_import_files.rb +0 -2
  32. data/db/migrate/20140523171309_create_event_import_file_transitions.rb +14 -0
  33. data/db/migrate/20140628071719_add_user_encoding_to_event_import_file.rb +5 -0
  34. data/lib/enju_event/engine.rb +1 -1
  35. data/lib/enju_event/version.rb +1 -1
  36. data/spec/dummy/db/migrate/005_create_manifestations.rb +0 -12
  37. data/spec/dummy/db/migrate/006_create_items.rb +2 -2
  38. data/spec/dummy/db/migrate/029_create_subjects.rb +27 -0
  39. data/spec/dummy/db/migrate/032_create_checkins.rb +17 -0
  40. data/spec/dummy/db/migrate/033_create_checkouts.rb +25 -0
  41. data/spec/dummy/db/migrate/035_create_reserves.rb +27 -0
  42. data/spec/dummy/db/migrate/059_create_libraries.rb +1 -7
  43. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -5
  44. data/spec/dummy/db/migrate/{20111201163342_create_user_groups.rb → 077_create_user_groups.rb} +2 -2
  45. data/spec/dummy/db/migrate/080_create_library_groups.rb +2 -9
  46. data/spec/dummy/db/migrate/120_create_baskets.rb +12 -0
  47. data/spec/dummy/db/migrate/121_create_checked_items.rb +17 -0
  48. data/spec/dummy/db/migrate/124_create_bookstores.rb +17 -0
  49. data/spec/dummy/db/migrate/127_create_use_restrictions.rb +16 -0
  50. data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +16 -0
  51. data/spec/dummy/db/migrate/130_create_request_status_types.rb +12 -0
  52. data/spec/dummy/db/migrate/131_create_request_types.rb +12 -0
  53. data/spec/dummy/db/migrate/132_create_circulation_statuses.rb +16 -0
  54. data/spec/dummy/db/migrate/142_create_classifications.rb +19 -0
  55. data/spec/dummy/db/migrate/143_create_subject_has_classifications.rb +16 -0
  56. data/spec/dummy/db/migrate/144_create_classification_types.rb +16 -0
  57. data/spec/dummy/db/migrate/145_create_subject_heading_types.rb +16 -0
  58. data/spec/dummy/db/migrate/146_create_subject_types.rb +16 -0
  59. data/spec/dummy/db/migrate/149_create_message_templates.rb +18 -0
  60. data/spec/dummy/db/migrate/154_create_messages.rb +24 -0
  61. data/spec/dummy/db/migrate/20080606052544_create_work_has_subjects.rb +18 -0
  62. data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +20 -0
  63. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +17 -0
  64. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +14 -0
  65. data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +17 -0
  66. data/spec/dummy/db/migrate/20081030023412_create_checkout_types.rb +17 -0
  67. data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +25 -0
  68. data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +18 -0
  69. data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +17 -0
  70. data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +16 -0
  71. data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +16 -0
  72. data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +17 -0
  73. data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +17 -0
  74. data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +16 -0
  75. data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +16 -0
  76. data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +17 -0
  77. data/spec/dummy/db/migrate/20090208044541_create_subject_heading_type_has_subjects.rb +16 -0
  78. data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +27 -0
  79. data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +21 -0
  80. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
  81. data/spec/dummy/db/migrate/20110301134521_add_expire_date_to_reserve.rb +9 -0
  82. data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +11 -0
  83. data/spec/dummy/db/migrate/20110328130826_add_current_checkout_count_to_user_group_has_checkout_type.rb +9 -0
  84. data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +9 -0
  85. data/spec/dummy/db/migrate/20110621093332_remove_expire_date_from_reserve.rb +9 -0
  86. data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +13 -0
  87. data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +11 -0
  88. data/spec/dummy/db/migrate/20110913120629_add_lft_and_rgt_to_classification.rb +11 -0
  89. data/spec/dummy/db/migrate/20111201155456_devise_create_users.rb +42 -0
  90. data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +5 -0
  91. data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +6 -0
  92. data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +6 -0
  93. data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +12 -0
  94. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
  95. data/spec/dummy/db/migrate/20120406020752_add_url_to_subject.rb +5 -0
  96. data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +5 -0
  97. data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +5 -0
  98. data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +6 -0
  99. data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +26 -0
  100. data/spec/dummy/db/migrate/20130303104849_add_state_index_to_reserve.rb +5 -0
  101. data/spec/dummy/db/migrate/20130303124821_add_retained_at_to_reserve.rb +5 -0
  102. data/spec/dummy/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +5 -0
  103. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +6 -0
  104. data/spec/dummy/db/migrate/20130416054135_add_circulation_status_id_to_item.rb +8 -0
  105. data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +5 -0
  106. data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +7 -0
  107. data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +5 -0
  108. data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +6 -0
  109. data/spec/dummy/db/migrate/20130504133816_add_manifestation_id_to_subject.rb +6 -0
  110. data/spec/dummy/db/migrate/20130504143515_add_manifestation_id_to_classification.rb +6 -0
  111. data/spec/dummy/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb +5 -0
  112. data/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +12 -0
  113. data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +15 -0
  114. data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +5 -0
  115. data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +5 -0
  116. data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +5 -0
  117. data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +11 -0
  118. data/spec/dummy/db/schema.rb +613 -92
  119. data/spec/dummy/db/test.sqlite3 +0 -0
  120. data/spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample1.tsv +7 -7
  121. data/spec/dummy/solr/default/data/index/_b2.fdt +0 -0
  122. data/spec/dummy/solr/default/data/index/{_14y.fdx → _b2.fdx} +0 -0
  123. data/spec/dummy/solr/default/data/index/{_14y.fnm → _b2.fnm} +0 -0
  124. data/spec/dummy/solr/default/data/index/{_14y.nvd → _b2.nvd} +0 -0
  125. data/spec/dummy/solr/default/data/index/{_14y.nvm → _b2.nvm} +0 -0
  126. data/spec/dummy/solr/default/data/index/{_14y.si → _b2.si} +0 -0
  127. data/spec/dummy/solr/default/data/index/{_14y_Lucene41_0.doc → _b2_Lucene41_0.doc} +0 -0
  128. data/spec/dummy/solr/default/data/index/{_14y_Lucene41_0.pos → _b2_Lucene41_0.pos} +0 -0
  129. data/spec/dummy/solr/default/data/index/{_14y_Lucene41_0.tim → _b2_Lucene41_0.tim} +0 -0
  130. data/spec/dummy/solr/default/data/index/{_14y_Lucene41_0.tip → _b2_Lucene41_0.tip} +0 -0
  131. data/spec/dummy/solr/default/data/index/_b3.fdt +0 -0
  132. data/spec/dummy/solr/default/data/index/{_14z.fdx → _b3.fdx} +0 -0
  133. data/spec/dummy/solr/default/data/index/{_14z.fnm → _b3.fnm} +0 -0
  134. data/spec/dummy/solr/default/data/index/{_14z.nvd → _b3.nvd} +0 -0
  135. data/spec/dummy/solr/default/data/index/{_14z.nvm → _b3.nvm} +0 -0
  136. data/spec/dummy/solr/default/data/index/{_14z.si → _b3.si} +0 -0
  137. data/spec/dummy/solr/default/data/index/{_14z_Lucene41_0.doc → _b3_Lucene41_0.doc} +0 -0
  138. data/spec/dummy/solr/default/data/index/_b3_Lucene41_0.pos +0 -0
  139. data/spec/dummy/solr/default/data/index/_b3_Lucene41_0.tim +0 -0
  140. data/spec/dummy/solr/default/data/index/_b3_Lucene41_0.tip +0 -0
  141. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  142. data/spec/dummy/solr/default/data/index/segments_ht +0 -0
  143. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000630 +0 -0
  144. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000631 +0 -0
  145. data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000002010 → tlog.0000000000000000632} +0 -0
  146. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000633 +0 -0
  147. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000634 +0 -0
  148. data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000002013 → tlog.0000000000000000635} +0 -0
  149. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000636 +0 -0
  150. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000637 +0 -0
  151. data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000002016 → tlog.0000000000000000638} +0 -0
  152. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000639 +0 -0
  153. data/spec/dummy/solr/test/data/index/segments.gen +0 -0
  154. data/spec/dummy/solr/test/data/index/segments_1 +0 -0
  155. data/spec/fixtures/event_import_files.yml +1 -4
  156. data/spec/fixtures/libraries.yml +0 -5
  157. data/spec/models/event_import_file_spec.rb +14 -6
  158. data/spec/models/event_spec.rb +1 -1
  159. data/spec/spec_helper.rb +3 -0
  160. data/spec/support/resque.rb +32 -0
  161. metadata +271 -140
  162. data/spec/dummy/db/development.sqlite3 +0 -0
  163. data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb +0 -9
  164. data/spec/dummy/db/migrate/20100527113752_create_delayed_jobs.rb +0 -21
  165. data/spec/dummy/db/migrate/20110115022329_add_position_to_library_group.rb +0 -9
  166. data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +0 -9
  167. data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +0 -12
  168. data/spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb +0 -11
  169. data/spec/dummy/db/migrate/20111201155456_create_users.rb +0 -14
  170. data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +0 -52
  171. data/spec/dummy/solr/default/data/index/_14y.fdt +0 -0
  172. data/spec/dummy/solr/default/data/index/_14z.fdt +0 -0
  173. data/spec/dummy/solr/default/data/index/_14z_Lucene41_0.pos +0 -0
  174. data/spec/dummy/solr/default/data/index/_14z_Lucene41_0.tim +0 -0
  175. data/spec/dummy/solr/default/data/index/_14z_Lucene41_0.tip +0 -0
  176. data/spec/dummy/solr/default/data/index/segments_1k3 +0 -0
  177. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002008 +0 -0
  178. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002009 +0 -0
  179. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002011 +0 -0
  180. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002012 +0 -0
  181. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002014 +0 -0
  182. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002015 +0 -0
  183. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002017 +0 -0
  184. data/spec/dummy/solr/test/data/index/_a.fdt +0 -0
  185. data/spec/dummy/solr/test/data/index/_a.fdx +0 -0
  186. data/spec/dummy/solr/test/data/index/_a.fnm +0 -0
  187. data/spec/dummy/solr/test/data/index/_a.nvd +0 -0
  188. data/spec/dummy/solr/test/data/index/_a.nvm +0 -0
  189. data/spec/dummy/solr/test/data/index/_a.si +0 -0
  190. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.doc +0 -0
  191. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.pos +0 -0
  192. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.tim +0 -0
  193. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.tip +0 -0
  194. data/spec/dummy/solr/test/data/index/segments_n +0 -0
  195. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000013 +0 -0
  196. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000014 +0 -0
  197. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000015 +0 -0
  198. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000016 +0 -0
  199. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000017 +0 -0
  200. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000018 +0 -0
  201. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000019 +0 -0
  202. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000020 +0 -0
  203. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000021 +0 -0
File without changes
@@ -1,9 +0,0 @@
1
- class AddAllowBookmarkExternalUrlToLibraryGroup < ActiveRecord::Migration
2
- def self.up
3
- add_column :library_groups, :allow_bookmark_external_url, :boolean, :null => false, :default => false
4
- end
5
-
6
- def self.down
7
- remove_column :library_groups, :allow_bookmark_external_url
8
- end
9
- end
@@ -1,21 +0,0 @@
1
- class CreateDelayedJobs < ActiveRecord::Migration
2
- def self.up
3
- create_table :delayed_jobs, :force => true do |table|
4
- table.integer :priority, :default => 0 # Allows some jobs to jump to the front of the queue
5
- table.integer :attempts, :default => 0 # Provides for retries, but still fail eventually.
6
- table.text :handler # YAML-encoded string of the object that will do work
7
- table.text :last_error # reason for last failure (See Note below)
8
- table.datetime :run_at # When to run. Could be Time.zone.now for immediately, or sometime in the future.
9
- table.datetime :locked_at # Set when a client is working on this object
10
- table.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead)
11
- table.string :locked_by # Who is working on this object (if locked)
12
- table.timestamps
13
- end
14
-
15
- add_index :delayed_jobs, [:priority, :run_at], :name => 'delayed_jobs_priority'
16
- end
17
-
18
- def self.down
19
- drop_table :delayed_jobs
20
- end
21
- end
@@ -1,9 +0,0 @@
1
- class AddPositionToLibraryGroup < ActiveRecord::Migration
2
- def self.up
3
- add_column :library_groups, :position, :integer
4
- end
5
-
6
- def self.down
7
- remove_column :library_groups, :position
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class CreateSeriesStatementMergeLists < ActiveRecord::Migration
2
- def change
3
- create_table :series_statement_merge_lists do |t|
4
- t.string :title
5
-
6
- t.timestamps
7
- end
8
- end
9
- end
@@ -1,12 +0,0 @@
1
- class CreateSeriesStatementMerges < ActiveRecord::Migration
2
- def change
3
- create_table :series_statement_merges do |t|
4
- t.integer :series_statement_id, :null => false
5
- t.integer :series_statement_merge_list_id, :null => false
6
-
7
- t.timestamps
8
- end
9
- add_index :series_statement_merges, :series_statement_id
10
- add_index :series_statement_merges, :series_statement_merge_list_id
11
- end
12
- end
@@ -1,11 +0,0 @@
1
- class RemoveDsblFromLibraryGroup < ActiveRecord::Migration
2
- def up
3
- remove_column :library_groups, :use_dsbl
4
- remove_column :library_groups, :dsbl_list
5
- end
6
-
7
- def down
8
- add_column :library_groups, :dsbl_list, :text
9
- add_column :library_groups, :use_dsbl, :boolean
10
- end
11
- end
@@ -1,14 +0,0 @@
1
- class CreateUsers < ActiveRecord::Migration
2
- def change
3
- create_table :users do |t|
4
- t.integer :user_group_id
5
- t.integer :required_role_id
6
- t.string :username
7
- t.text :note
8
- t.string :locale
9
- t.string :user_number
10
-
11
- t.timestamps
12
- end
13
- end
14
- end
@@ -1,52 +0,0 @@
1
- class AddDeviseToUsers < ActiveRecord::Migration
2
- def self.up
3
- change_table(:users) do |t|
4
- ## Database authenticatable
5
- t.string :email, :null => false, :default => ""
6
- t.string :encrypted_password, :null => false, :default => ""
7
-
8
- ## Recoverable
9
- t.string :reset_password_token
10
- t.datetime :reset_password_sent_at
11
-
12
- ## Rememberable
13
- t.datetime :remember_created_at
14
-
15
- ## Trackable
16
- t.integer :sign_in_count, :default => 0
17
- t.datetime :current_sign_in_at
18
- t.datetime :last_sign_in_at
19
- t.string :current_sign_in_ip
20
- t.string :last_sign_in_ip
21
-
22
- ## Encryptable
23
- t.string :password_salt
24
-
25
- ## Confirmable
26
- t.string :confirmation_token
27
- t.datetime :confirmed_at
28
- t.datetime :confirmation_sent_at
29
- t.string :unconfirmed_email # Only if using reconfirmable
30
-
31
- ## Lockable
32
- t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
33
- t.string :unlock_token # Only if unlock strategy is :email or :both
34
- t.datetime :locked_at
35
-
36
- # Token authenticatable
37
- t.string :authentication_token
38
- end
39
-
40
- add_index :users, :email #, :unique => true
41
- add_index :users, :reset_password_token, :unique => true
42
- # add_index :users, :confirmation_token, :unique => true
43
- # add_index :users, :unlock_token, :unique => true
44
- # add_index :users, :authentication_token, :unique => true
45
- end
46
-
47
- def self.down
48
- # By default, we don't want to make any assumption about how to roll back a migration when your
49
- # model already existed. Please edit below which fields you would like to remove in this migration.
50
- raise ActiveRecord::IrreversibleMigration
51
- end
52
- end
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file