enju_event 0.1.17.pre23 → 0.1.17.pre24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +8 -1
  3. data/app/controllers/event_categories_controller.rb +7 -2
  4. data/app/controllers/event_export_files_controller.rb +7 -2
  5. data/app/controllers/event_import_files_controller.rb +12 -4
  6. data/app/controllers/event_import_results_controller.rb +7 -0
  7. data/app/controllers/events_controller.rb +9 -3
  8. data/app/controllers/participates_controller.rb +7 -2
  9. data/app/models/event.rb +0 -3
  10. data/app/models/event_category.rb +0 -1
  11. data/app/models/event_export_file.rb +13 -3
  12. data/app/models/event_export_file_transition.rb +1 -1
  13. data/app/models/event_import_file.rb +8 -6
  14. data/app/models/event_import_file_transition.rb +1 -1
  15. data/app/models/event_import_result.rb +0 -1
  16. data/app/models/participate.rb +0 -1
  17. data/app/views/event_export_files/index.html.erb +2 -2
  18. data/app/views/event_export_files/show.html.erb +1 -1
  19. data/app/views/event_import_files/index.html.erb +1 -1
  20. data/app/views/event_import_files/show.html.erb +1 -1
  21. data/db/migrate/20140523171309_create_event_import_file_transitions.rb +5 -1
  22. data/db/migrate/20140812153137_create_event_export_file_transitions.rb +5 -1
  23. data/lib/enju_event/engine.rb +0 -2
  24. data/lib/enju_event/version.rb +1 -1
  25. data/spec/controllers/event_export_files_controller_spec.rb +5 -5
  26. data/spec/controllers/event_import_files_controller_spec.rb +1 -1
  27. data/spec/dummy/app/models/user.rb +0 -1
  28. data/spec/dummy/bin/bundle +3 -0
  29. data/spec/dummy/bin/rails +4 -0
  30. data/spec/dummy/bin/rake +4 -0
  31. data/spec/dummy/bin/setup +29 -0
  32. data/spec/dummy/config/database.yml +23 -18
  33. data/spec/dummy/config/environments/test.rb +1 -1
  34. data/spec/dummy/db/migrate/035_create_reserves.rb +0 -1
  35. data/spec/dummy/db/migrate/133_create_agent_merges.rb +15 -0
  36. data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +13 -0
  37. data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +18 -0
  38. data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +5 -1
  39. data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +5 -1
  40. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +5 -1
  41. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +5 -1
  42. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +5 -1
  43. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +5 -1
  44. data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +5 -1
  45. data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +5 -1
  46. data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +5 -1
  47. data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +5 -1
  48. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +5 -1
  49. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +5 -1
  50. data/spec/dummy/db/migrate/{20140810061942_add_user_id_to_stat.rb → 20140810061942_add_user_id_to_user_checkout_stat.rb} +1 -1
  51. data/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +5 -0
  52. data/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +5 -0
  53. data/spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb +6 -0
  54. data/spec/dummy/db/schema.rb +645 -615
  55. data/spec/fixtures/events.yml +20 -45
  56. data/spec/fixtures/users.yml +1 -1
  57. data/spec/spec_helper.rb +2 -0
  58. metadata +57 -212
  59. data/app/controllers/calendar_controller.rb +0 -35
  60. data/spec/dummy/db/development.sqlite3 +0 -0
  61. data/spec/dummy/db/migrate/20130303104849_add_state_index_to_reserve.rb +0 -5
  62. data/spec/dummy/db/test.sqlite3 +0 -0
  63. data/spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_destroy_file.tsv +0 -4
  64. data/spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import51.txt +0 -3
  65. data/spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample1.tsv +0 -7
  66. data/spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample2.tsv +0 -7
  67. data/spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_update_file.tsv +0 -4
  68. data/spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/invalid_file.tsv +0 -3
  69. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140818-66894-1um2gwb.txt +0 -9
  70. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140818-67059-j0f46.txt +0 -9
  71. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140915-67461-178vmkf.txt +0 -9
  72. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140916-27270-1dm2llo.txt +0 -9
  73. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140921-56213-1l5hypx.txt +0 -9
  74. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140921-58265-o3c737.txt +0 -9
  75. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140921-58363-1tipiu.txt +0 -9
  76. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140921-58460-38jub0.txt +0 -9
  77. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140921-58528-ca3k3q.txt +0 -9
  78. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140921-58630-1m4isxz.txt +0 -9
  79. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140921-58934-19ikk0v.txt +0 -9
  80. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140921-59012-10in1j8.txt +0 -9
  81. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140921-59315-15pzw3y.txt +0 -9
  82. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140922-86319-oo60ty.txt +0 -9
  83. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20140927-1698-10wfq6m.txt +0 -9
  84. data/spec/dummy/public/system/event_export_files/event_exports/000/000/004/original/event_export_file_20141003-88157-4ti9t5.txt +0 -9
  85. data/spec/dummy/script/rails +0 -6
  86. data/spec/dummy/solr/conf/admin-extra.html +0 -31
  87. data/spec/dummy/solr/conf/elevate.xml +0 -36
  88. data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +0 -246
  89. data/spec/dummy/solr/conf/protwords.txt +0 -21
  90. data/spec/dummy/solr/conf/schema.xml +0 -255
  91. data/spec/dummy/solr/conf/scripts.conf +0 -24
  92. data/spec/dummy/solr/conf/solrconfig.xml +0 -667
  93. data/spec/dummy/solr/conf/spellings.txt +0 -2
  94. data/spec/dummy/solr/conf/stopwords.txt +0 -58
  95. data/spec/dummy/solr/conf/synonyms.txt +0 -31
  96. data/spec/dummy/solr/default/data/index/_1pd.fdt +0 -0
  97. data/spec/dummy/solr/default/data/index/_1pd.fdx +0 -0
  98. data/spec/dummy/solr/default/data/index/_1pd.fnm +0 -0
  99. data/spec/dummy/solr/default/data/index/_1pd.nvd +0 -0
  100. data/spec/dummy/solr/default/data/index/_1pd.nvm +0 -0
  101. data/spec/dummy/solr/default/data/index/_1pd.si +0 -0
  102. data/spec/dummy/solr/default/data/index/_1pd_Lucene41_0.doc +0 -0
  103. data/spec/dummy/solr/default/data/index/_1pd_Lucene41_0.pos +0 -0
  104. data/spec/dummy/solr/default/data/index/_1pd_Lucene41_0.tim +0 -0
  105. data/spec/dummy/solr/default/data/index/_1pd_Lucene41_0.tip +0 -0
  106. data/spec/dummy/solr/default/data/index/_1pe.fdt +0 -0
  107. data/spec/dummy/solr/default/data/index/_1pe.fdx +0 -0
  108. data/spec/dummy/solr/default/data/index/_1pe.fnm +0 -0
  109. data/spec/dummy/solr/default/data/index/_1pe.nvd +0 -0
  110. data/spec/dummy/solr/default/data/index/_1pe.nvm +0 -0
  111. data/spec/dummy/solr/default/data/index/_1pe.si +0 -0
  112. data/spec/dummy/solr/default/data/index/_1pe_Lucene41_0.doc +0 -0
  113. data/spec/dummy/solr/default/data/index/_1pe_Lucene41_0.pos +0 -0
  114. data/spec/dummy/solr/default/data/index/_1pe_Lucene41_0.tim +0 -0
  115. data/spec/dummy/solr/default/data/index/_1pe_Lucene41_0.tip +0 -0
  116. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  117. data/spec/dummy/solr/default/data/index/segments_2g6 +0 -0
  118. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000003163 +0 -0
  119. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000003164 +0 -0
  120. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000003165 +0 -0
  121. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000003166 +0 -0
  122. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000003167 +0 -0
  123. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000003168 +0 -0
  124. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000003169 +0 -0
  125. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000003170 +0 -0
  126. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000003171 +0 -0
  127. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000003172 +0 -0
  128. data/spec/dummy/solr/development/data/index/segments.gen +0 -0
  129. data/spec/dummy/solr/development/data/index/segments_1 +0 -0
  130. data/spec/dummy/solr/solr.xml +0 -8
  131. data/spec/dummy/solr/test/data/index/_a.fdt +0 -0
  132. data/spec/dummy/solr/test/data/index/_a.fdx +0 -0
  133. data/spec/dummy/solr/test/data/index/_a.fnm +0 -0
  134. data/spec/dummy/solr/test/data/index/_a.nvd +0 -0
  135. data/spec/dummy/solr/test/data/index/_a.nvm +0 -0
  136. data/spec/dummy/solr/test/data/index/_a.si +0 -0
  137. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.doc +0 -0
  138. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.pos +0 -0
  139. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.tim +0 -0
  140. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.tip +0 -0
  141. data/spec/dummy/solr/test/data/index/segments.gen +0 -0
  142. data/spec/dummy/solr/test/data/index/segments_n +0 -0
  143. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000013 +0 -0
  144. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000014 +0 -0
  145. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000015 +0 -0
  146. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000016 +0 -0
  147. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000017 +0 -0
  148. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000018 +0 -0
  149. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000019 +0 -0
  150. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000020 +0 -0
  151. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000021 +0 -0
  152. data/spec/dummy/tmp/cache/stdout +0 -479
  153. data/spec/dummy/tmp/pids/redis-test.pid +0 -1
@@ -0,0 +1,18 @@
1
+ class CreateReserveTransitions < ActiveRecord::Migration
2
+ def change
3
+ create_table :reserve_transitions do |t|
4
+ t.string :to_state
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
10
+ t.integer :sort_key
11
+ t.integer :reserve_id
12
+ t.timestamps
13
+ end
14
+
15
+ add_index :reserve_transitions, :reserve_id
16
+ add_index :reserve_transitions, [:sort_key, :reserve_id], unique: true
17
+ end
18
+ end
@@ -2,7 +2,11 @@ class CreateMessageTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :message_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :message_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateMessageRequestTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :message_request_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :message_request_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateResourceImportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :resource_import_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :resource_import_file_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateImportRequestTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :import_request_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :import_request_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateAgentImportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :agent_import_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :agent_import_file_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateUserImportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_import_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :user_import_file_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateUserCheckoutStatTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_checkout_stat_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :user_checkout_stat_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateUserReserveStatTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_reserve_stat_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :user_reserve_stat_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateManifestationCheckoutStatTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :manifestation_checkout_stat_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :manifestation_checkout_stat_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateManifestationReserveStatTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :manifestation_reserve_stat_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :manifestation_reserve_stat_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateResourceExportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :resource_export_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :resource_export_file_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateUserExportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_export_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :user_export_file_id
8
12
  t.timestamps
@@ -1,4 +1,4 @@
1
- class AddUserIdToStat < ActiveRecord::Migration
1
+ class AddUserIdToUserCheckoutStat < ActiveRecord::Migration
2
2
  def change
3
3
  add_column :user_checkout_stats, :user_id, :integer
4
4
  add_column :user_reserve_stats, :user_id, :integer
@@ -0,0 +1,5 @@
1
+ class AddFullNameTranscriptionToProfile < ActiveRecord::Migration
2
+ def change
3
+ add_column :profiles, :full_name_transcription, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddDateOfBirthToProfile < ActiveRecord::Migration
2
+ def change
3
+ add_column :profiles, :date_of_birth, :datetime
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddShelfIdToCheckout < ActiveRecord::Migration
2
+ def change
3
+ add_column :checkouts, :shelf_id, :integer
4
+ add_index :checkouts, :shelf_id
5
+ end
6
+ end