enju_event 0.3.5 → 0.4.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/Rakefile +1 -1
  4. data/app/controllers/event_import_files_controller.rb +0 -1
  5. data/app/controllers/event_import_results_controller.rb +4 -4
  6. data/app/controllers/events_controller.rb +1 -1
  7. data/app/controllers/places_controller.rb +1 -1
  8. data/app/models/event.rb +37 -49
  9. data/app/models/event_category.rb +9 -7
  10. data/app/models/event_export_file.rb +9 -12
  11. data/app/models/event_import_file.rb +9 -5
  12. data/app/models/event_import_result.rb +1 -6
  13. data/app/views/event_categories/_form.html.erb +1 -1
  14. data/app/views/event_categories/index.html.erb +1 -1
  15. data/app/views/event_categories/show.html.erb +1 -1
  16. data/app/views/event_import_files/new.html.erb +2 -2
  17. data/app/views/event_import_files/show.html.erb +74 -70
  18. data/app/views/event_import_results/index.html.erb +12 -1
  19. data/app/views/event_import_results/index.txt.erb +3 -0
  20. data/app/views/events/_form.html.erb +2 -2
  21. data/app/views/events/index.atom.builder +2 -2
  22. data/app/views/events/index.html+phone.erb +2 -2
  23. data/app/views/events/index.html.erb +5 -5
  24. data/app/views/events/index.ics.erb +1 -1
  25. data/app/views/events/index.json.jbuilder +1 -1
  26. data/app/views/events/index.rss.builder +2 -2
  27. data/app/views/events/index.txt.erb +4 -0
  28. data/app/views/events/show.html+phone.erb +3 -3
  29. data/app/views/events/show.html.erb +3 -3
  30. data/app/views/layouts/calendar.html.erb +4 -4
  31. data/app/views/participates/index.html.erb +1 -1
  32. data/app/views/participates/show.html.erb +1 -1
  33. data/app/views/picture_files/_index_event.html.erb +1 -1
  34. data/config/locales/translation_en.yml +0 -1
  35. data/config/locales/translation_ja.yml +0 -1
  36. data/db/migrate/20190630153136_add_display_name_translations_to_event.rb +6 -0
  37. data/lib/enju_event/engine.rb +1 -0
  38. data/lib/enju_event/version.rb +1 -1
  39. data/lib/generators/enju_event/setup/setup_generator.rb +3 -3
  40. data/lib/generators/enju_event/setup/templates/db/fixtures/event_categories.yml +35 -6
  41. data/spec/controllers/event_import_results_controller_spec.rb +2 -2
  42. data/spec/controllers/events_controller_spec.rb +2 -2
  43. data/spec/dummy/bin/bundle +1 -1
  44. data/spec/dummy/bin/setup +1 -3
  45. data/spec/dummy/bin/update +4 -2
  46. data/spec/dummy/bin/yarn +3 -3
  47. data/spec/dummy/config/database.yml +70 -9
  48. data/spec/dummy/config/initializers/assets.rb +1 -1
  49. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  50. data/spec/dummy/db/migrate/154_create_messages.rb +4 -8
  51. data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +3 -3
  52. data/spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +1 -1
  53. data/spec/dummy/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +1 -1
  54. data/spec/dummy/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
  55. data/spec/dummy/db/migrate/{20181026064038_add_login_banner_to_library_group.rb → 20190630115523_add_login_banner_translations_to_library_group.rb} +1 -1
  56. data/spec/dummy/db/migrate/20190630151446_add_display_name_translations_to_role.rb +5 -0
  57. data/spec/dummy/db/migrate/20190712163038_add_display_name_translations_to_carrier_type.rb +21 -0
  58. data/spec/dummy/db/migrate/20190713114940_add_profile_id_to_user.rb +5 -0
  59. data/spec/dummy/db/migrate/20190713115451_add_full_name_translations_to_profile.rb +5 -0
  60. data/spec/dummy/db/schema.rb +148 -266
  61. data/spec/dummy/db/test.sqlite3 +0 -0
  62. data/spec/factories/event_category.rb +4 -2
  63. data/spec/factories/library.rb +2 -0
  64. data/spec/fixtures/agent_types.yml +11 -11
  65. data/spec/fixtures/event_categories.yml +14 -13
  66. data/spec/fixtures/event_export_files.yml +1 -1
  67. data/spec/fixtures/events.yml +22 -29
  68. data/spec/fixtures/libraries.yml +30 -32
  69. data/spec/fixtures/library_groups.yml +44 -20
  70. data/spec/fixtures/shelves.yml +16 -15
  71. data/spec/models/event_category_spec.rb +8 -7
  72. data/spec/models/event_export_file_spec.rb +1 -1
  73. data/spec/models/event_spec.rb +14 -13
  74. data/spec/rails_helper.rb +5 -1
  75. data/spec/system/events_spec.rb +0 -5
  76. metadata +256 -389
  77. data/app/views/event_import_files/_results.html.erb +0 -26
  78. data/app/views/event_import_results/index.text.ruby +0 -5
  79. data/app/views/events/index.text.ruby +0 -7
  80. data/app/views/layouts/mailer.html.erb +0 -13
  81. data/app/views/layouts/mailer.text.erb +0 -1
  82. data/config/brakeman.ignore +0 -66
  83. data/spec/dummy/app/assets/config/manifest.js +0 -5
  84. data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +0 -13
  85. data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +0 -21
  86. data/spec/dummy/db/migrate/20091202124834_create_versions.rb +0 -18
  87. data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +0 -13
  88. data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +0 -6
  89. data/spec/dummy/db/migrate/20150421023923_create_identities.rb +0 -14
  90. data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +0 -5
  91. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +0 -18
  92. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +0 -22
  93. data/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb +0 -11
  94. data/spec/dummy/db/migrate/20181030072731_add_not_null_to_position_on_carrier_type.rb +0 -14
  95. data/spec/dummy/db/migrate/20181030074920_add_not_null_to_position_on_library.rb +0 -14
  96. data/spec/dummy/db/migrate/20190208135957_create_active_storage_tables.active_storage.rb +0 -27
  97. data/spec/dummy/db/migrate/20190311154610_create_periodicals.rb +0 -10
  98. data/spec/dummy/db/migrate/20190314151124_add_full_name_translations_to_create.rb +0 -7
  99. data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +0 -5
  100. data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +0 -5
  101. data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +0 -12
  102. data/spec/dummy/db/migrate/20200425072340_create_manifestation_custom_properties.rb +0 -12
  103. data/spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb +0 -12
  104. data/spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb +0 -12
  105. data/spec/dummy/db/migrate/20200425074822_create_item_custom_values.rb +0 -12
  106. data/spec/mailers/event_export_spec.rb +0 -5
  107. data/spec/mailers/event_import_spec.rb +0 -5
  108. data/spec/mailers/previews/event_export_preview.rb +0 -4
  109. data/spec/mailers/previews/event_import_preview.rb +0 -4
  110. data/spec/system/event_import_results_spec.rb +0 -17
  111. data/spec/views/event_import_results/index.text.ruby_spec.rb +0 -22
@@ -1,26 +0,0 @@
1
- <h2><%= t('activerecord.models.event_import_result') %></h2>
2
- <p>
3
- <%= link_to((image_tag 'icons/page_white_excel.png', size: '16x16', class: 'enju_icon', alt: 'TSV'), event_import_results_path(event_import_file_id: @event_import_file.id, format: :txt, locale: @locale.to_s)) -%>
4
- (<%= link_to 'TSV', event_import_results_path(event_import_file_id: @event_import_file.id, format: :txt, locale: @locale.to_s) -%>)
5
- </p>
6
-
7
- <table class="table table-striped index">
8
- <tr>
9
- <th><%= t('activerecord.attributes.event_import_result.lineno') %></th>
10
- <th><%= t('activerecord.attributes.event_import_result.body') %></th>
11
- <th><%= t('activerecord.models.event') %></th>
12
- <th></th>
13
- </tr>
14
- <% @event_import_results.each_with_index do |event_import_result, idx| %>
15
- <tr class="line<%= cycle("0", "1") -%>">
16
- <td><%= @event_import_results.offset_value + idx + 1 %></td>
17
- <td><%= event_import_result.body.inspect %></td>
18
- <td><%= link_to event_import_result.event.display_name, event_import_result.event if event_import_result.event %></td>
19
- <td>
20
- <%= link_to t('page.show'), event_import_result %>
21
- <%= link_to t('page.destroy'), event_import_result, data: {confirm: t('page.are_you_sure')}, method: :delete %>
22
- </td>
23
- </tr>
24
- <% end %>
25
- </table>
26
- <%= paginate(@event_import_results) %>
@@ -1,5 +0,0 @@
1
- CSV.generate(col_sep: "\t", row_sep: "\r\n") do |csv|
2
- @event_import_results.each do |result|
3
- csv << result.body.split("\t")
4
- end
5
- end
@@ -1,7 +0,0 @@
1
- Event.csv_header(
2
- role: current_user_role_name
3
- ).to_csv(col_sep: "\t") + @events.map{|event|
4
- event.to_hash(
5
- role: current_user_role_name
6
- ).values.to_csv(col_sep: "\t")
7
- }.join
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
- <style>
6
- /* Email styles need to be inline */
7
- </style>
8
- </head>
9
-
10
- <body>
11
- <%= yield %>
12
- </body>
13
- </html>
@@ -1 +0,0 @@
1
- <%= yield %>
@@ -1,66 +0,0 @@
1
- {
2
- "ignored_warnings": [
3
- {
4
- "warning_type": "File Access",
5
- "warning_code": 16,
6
- "fingerprint": "0cc99b4df61bb345104e86e3061a1d3e8f23a8385c02a3f65a31701d5dd6e6a6",
7
- "check_name": "SendFile",
8
- "message": "Model attribute used in file name",
9
- "file": "app/controllers/event_import_files_controller.rb",
10
- "line": 34,
11
- "link": "https://brakemanscanner.org/docs/warning_types/file_access/",
12
- "code": "send_file(EventImportFile.find(params[:id]).event_import.path, :filename => EventImportFile.find(params[:id]).event_import_file_name, :type => \"application/octet-stream\")",
13
- "render_path": null,
14
- "location": {
15
- "type": "method",
16
- "class": "EventImportFilesController",
17
- "method": "show"
18
- },
19
- "user_input": "EventImportFile.find(params[:id]).event_import.path",
20
- "confidence": "Medium",
21
- "note": ""
22
- },
23
- {
24
- "warning_type": "File Access",
25
- "warning_code": 16,
26
- "fingerprint": "43e943cb9bc901967fc76b8120d84c754d5872e0a955b507ef00d8f613342c86",
27
- "check_name": "SendFile",
28
- "message": "Model attribute used in file name",
29
- "file": "app/controllers/event_export_files_controller.rb",
30
- "line": 33,
31
- "link": "https://brakemanscanner.org/docs/warning_types/file_access/",
32
- "code": "send_file(EventExportFile.find(params[:id]).event_export.path, :filename => EventExportFile.find(params[:id]).event_export_file_name, :type => \"application/octet-stream\")",
33
- "render_path": null,
34
- "location": {
35
- "type": "method",
36
- "class": "EventExportFilesController",
37
- "method": "show"
38
- },
39
- "user_input": "EventExportFile.find(params[:id]).event_export.path",
40
- "confidence": "Medium",
41
- "note": ""
42
- },
43
- {
44
- "warning_type": "Redirect",
45
- "warning_code": 18,
46
- "fingerprint": "e304fcb4b88a6522a29c32c654cee5d0a59c5fcce2e0a9a8862768c237a8e72a",
47
- "check_name": "Redirect",
48
- "message": "Possible unprotected redirect",
49
- "file": "app/controllers/event_import_files_controller.rb",
50
- "line": 32,
51
- "link": "https://brakemanscanner.org/docs/warning_types/redirect/",
52
- "code": "redirect_to(EventImportFile.find(params[:id]).event_import.expiring_url(10))",
53
- "render_path": null,
54
- "location": {
55
- "type": "method",
56
- "class": "EventImportFilesController",
57
- "method": "show"
58
- },
59
- "user_input": "EventImportFile.find(params[:id]).event_import.expiring_url(10)",
60
- "confidence": "High",
61
- "note": ""
62
- }
63
- ],
64
- "updated": "2020-04-29 03:31:48 +0900",
65
- "brakeman_version": "4.8.1"
66
- }
@@ -1,5 +0,0 @@
1
- //= link_tree ../images
2
- //= link_directory ../javascripts .js
3
- //= link_directory ../stylesheets .css
4
- //= link icons/feed.png
5
- //= link icons/page_white_excel.png
@@ -1,13 +0,0 @@
1
- class CreateExemplifies < ActiveRecord::Migration[4.2]
2
- def change
3
- create_table :exemplifies do |t|
4
- t.integer :manifestation_id, null: false
5
- t.integer :item_id, null: false
6
- t.integer :position
7
-
8
- t.timestamps
9
- end
10
- add_index :exemplifies, :manifestation_id
11
- add_index :exemplifies, :item_id, unique: true
12
- end
13
- end
@@ -1,21 +0,0 @@
1
- class CreateLendingPolicies < ActiveRecord::Migration[4.2]
2
- def self.up
3
- create_table :lending_policies do |t|
4
- t.integer :item_id, null: false
5
- t.integer :user_group_id, null: false
6
- t.integer :loan_period, default: 0, null: false
7
- t.datetime :fixed_due_date
8
- t.integer :renewal, default: 0, null: false
9
- t.integer :fine, default: 0, null: false
10
- t.text :note
11
- t.integer :position
12
-
13
- t.timestamps
14
- end
15
- add_index :lending_policies, [:item_id, :user_group_id], unique: true
16
- end
17
-
18
- def self.down
19
- drop_table :lending_policies
20
- end
21
- end
@@ -1,18 +0,0 @@
1
- class CreateVersions < ActiveRecord::Migration[4.2]
2
- def self.up
3
- create_table :versions do |t|
4
- t.string :item_type, null: false
5
- t.integer :item_id, null: false
6
- t.string :event, null: false
7
- t.string :whodunnit
8
- t.text :object
9
- t.datetime :created_at
10
- end
11
- add_index :versions, [:item_type, :item_id]
12
- end
13
-
14
- def self.down
15
- remove_index :versions, [:item_type, :item_id]
16
- drop_table :versions
17
- end
18
- end
@@ -1,13 +0,0 @@
1
- class AddNumberOfDayToNotifyOverdueToUserGroup < ActiveRecord::Migration[4.2]
2
- def self.up
3
- add_column :user_groups, :number_of_day_to_notify_overdue, :integer, default: 1, null: false
4
- add_column :user_groups, :number_of_day_to_notify_due_date, :integer, default: 7, null: false
5
- add_column :user_groups, :number_of_time_to_notify_overdue, :integer, default: 3, null: false
6
- end
7
-
8
- def self.down
9
- remove_column :user_groups, :number_of_time_to_notify_overdue
10
- remove_column :user_groups, :number_of_day_to_notify_due_date
11
- remove_column :user_groups, :number_of_day_to_notify_overdue
12
- end
13
- end
@@ -1,6 +0,0 @@
1
- class AddDoiToManifestation < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :manifestations, :doi, :string
4
- add_index :manifestations, :doi
5
- end
6
- end
@@ -1,14 +0,0 @@
1
- class CreateIdentities < ActiveRecord::Migration[4.2]
2
- def change
3
- create_table :identities do |t|
4
- t.string :name
5
- t.string :email
6
- t.string :password_digest
7
- t.references :profile, index: true
8
-
9
- t.timestamps null: false
10
- end
11
- add_index :identities, :name
12
- add_index :identities, :email
13
- end
14
- end
@@ -1,5 +0,0 @@
1
- class AddProviderToIdentity < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :identities, :provider, :string
4
- end
5
- end
@@ -1,18 +0,0 @@
1
- # This migration comes from enju_library_engine (originally 20151213070943)
2
- class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[4.2]
3
- def up
4
- if defined?(Globalize)
5
- LibraryGroup.create_translation_table!({
6
- login_banner: :text
7
- }, {
8
- migrate_data: true
9
- })
10
- end
11
- end
12
-
13
- def down
14
- if defined?(Globalize)
15
- LibraryGroup.drop_translation_table! migrate_data: true
16
- end
17
- end
18
- end
@@ -1,22 +0,0 @@
1
- # This migration comes from enju_library_engine (originally 20151213072705)
2
- class AddFooterBannerToLibraryGroup < ActiveRecord::Migration[4.2]
3
- def up
4
- if defined?(Globalize)
5
- LibraryGroup.add_translation_fields! footer_banner: :text
6
- end
7
-
8
- if defined?(AwesomeHstoreTranslate)
9
- add_column :library_groups, :footer_banner, :hstore
10
- end
11
- end
12
-
13
- def down
14
- if defined?(Globalize)
15
- remove_column :library_group_translations, :footer_banner
16
- end
17
-
18
- if defined?(AwesomeHstoreTranslate)
19
- remove_column :library_groups, :footer_banner
20
- end
21
- end
22
- end
@@ -1,11 +0,0 @@
1
- class CreateIsbnRecords < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :isbn_records, class: 'ISBN' do |t|
4
- t.string :body, index: {unique: true}, null: false
5
- t.string :isbn_type
6
- t.string :source
7
-
8
- t.timestamps
9
- end
10
- end
11
- end
@@ -1,14 +0,0 @@
1
- class AddNotNullToPositionOnCarrierType < ActiveRecord::Migration[5.2]
2
- def change
3
- change_column :carrier_types, :position, :integer, null: false, default: 1
4
- change_column :content_types, :position, :integer, null: false, default: 1
5
- change_column :frequencies, :position, :integer, null: false, default: 1
6
- change_column :licenses, :position, :integer, null: false, default: 1
7
- change_column :creates, :position, :integer, null: false, default: 1
8
- change_column :realizes, :position, :integer, null: false, default: 1
9
- change_column :produces, :position, :integer, null: false, default: 1
10
- change_column :owns, :position, :integer, null: false, default: 1
11
- change_column :form_of_works, :position, :integer, null: false, default: 1
12
- change_column :agent_types, :position, :integer, null: false, default: 1
13
- end
14
- end
@@ -1,14 +0,0 @@
1
- class AddNotNullToPositionOnLibrary < ActiveRecord::Migration[5.2]
2
- def change
3
- change_column :libraries, :position, :integer, null: false, default: 1
4
- change_column :shelves, :position, :integer, null: false, default: 1
5
- change_column :library_groups, :position, :integer, null: false, default: 1
6
- change_column :user_groups, :position, :integer, null: false, default: 1
7
- change_column :bookstores, :position, :integer, null: false, default: 1
8
- change_column :budget_types, :position, :integer, null: false, default: 1
9
- change_column :colors, :position, :integer, null: false, default: 1
10
- change_column :request_types, :position, :integer, null: false, default: 1
11
- change_column :request_status_types, :position, :integer, null: false, default: 1
12
- change_column :search_engines, :position, :integer, null: false, default: 1
13
- end
14
- end
@@ -1,27 +0,0 @@
1
- # This migration comes from active_storage (originally 20170806125915)
2
- class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
3
- def change
4
- create_table :active_storage_blobs do |t|
5
- t.string :key, null: false
6
- t.string :filename, null: false
7
- t.string :content_type
8
- t.text :metadata
9
- t.bigint :byte_size, null: false
10
- t.string :checksum, null: false
11
- t.datetime :created_at, null: false
12
-
13
- t.index [ :key ], unique: true
14
- end
15
-
16
- create_table :active_storage_attachments do |t|
17
- t.string :name, null: false
18
- t.references :record, null: false, polymorphic: true, index: false
19
- t.references :blob, null: false
20
-
21
- t.datetime :created_at, null: false
22
-
23
- t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true
24
- t.foreign_key :active_storage_blobs, column: :blob_id
25
- end
26
- end
27
- end
@@ -1,10 +0,0 @@
1
- class CreatePeriodicals < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :periodicals do |t|
4
- t.text :original_title, null: false
5
- t.references :frequency, foreign_key: true, null: false
6
-
7
- t.timestamps
8
- end
9
- end
10
- end
@@ -1,7 +0,0 @@
1
- class AddFullNameTranslationsToCreate < ActiveRecord::Migration[5.2]
2
- def change
3
- add_column :creates, :full_name_translations, :jsonb, default: {}
4
- add_column :realizes, :full_name_translations, :jsonb, default: {}
5
- add_column :produces, :full_name_translations, :jsonb, default: {}
6
- end
7
- end
@@ -1,5 +0,0 @@
1
- class AddMemoToManifestation < ActiveRecord::Migration[5.2]
2
- def change
3
- add_column :manifestations, :memo, :text
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddMemoToItem < ActiveRecord::Migration[5.2]
2
- def change
3
- add_column :items, :memo, :text
4
- end
5
- end
@@ -1,12 +0,0 @@
1
- class CreateCustomProperties < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :custom_properties do |t|
4
- t.integer :resource_id, null: false
5
- t.string :resource_type, null: false
6
- t.text :label, null: false
7
- t.text :value
8
-
9
- t.timestamps
10
- end
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- class CreateManifestationCustomProperties < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :manifestation_custom_properties do |t|
4
- t.string :name, null: false, comment: 'ラベル名', index: {unique: true}
5
- t.text :display_name, null: false, comment: '表示名'
6
- t.text :note, comment: '備考'
7
- t.integer :position, default: 1, null: false
8
-
9
- t.timestamps
10
- end
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- class CreateItemCustomProperties < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :item_custom_properties do |t|
4
- t.string :name, null: false, comment: 'ラベル名', index: {unique: true}
5
- t.text :display_name, null: false, comment: '表示名'
6
- t.text :note, comment: '備考'
7
- t.integer :position, default: 1, null: false
8
-
9
- t.timestamps
10
- end
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- class CreateManifestationCustomValues < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :manifestation_custom_values do |t|
4
- t.references :manifestation_custom_property, null: false, foreign_key: true, index: {name: 'index_manifestation_custom_values_on_custom_property_id'}
5
- t.references :manifestation, null: false, foreign_key: true
6
- t.text :value
7
-
8
- t.timestamps
9
- end
10
- add_index :manifestation_custom_values, [:manifestation_custom_property_id, :manifestation_id], unique: true, name: 'index_manifestation_custom_values_on_property_manifestation'
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- class CreateItemCustomValues < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :item_custom_values do |t|
4
- t.references :item_custom_property, null: false, foreign_key: true, index: {name: 'index_item_custom_values_on_custom_property_id'}
5
- t.references :item, null: false, foreign_key: true
6
- t.text :value
7
-
8
- t.timestamps
9
- end
10
- add_index :item_custom_values, [:item_custom_property_id, :item_id], unique: true, name: 'index_item_custom_values_on_custom_item_property_and_item_id'
11
- end
12
- end
@@ -1,5 +0,0 @@
1
- require "rails_helper"
2
-
3
- RSpec.describe EventExportMailer, type: :mailer do
4
- pending "add some examples to (or delete) #{__FILE__}"
5
- end
@@ -1,5 +0,0 @@
1
- require "rails_helper"
2
-
3
- RSpec.describe EventImportMailer, type: :mailer do
4
- pending "add some examples to (or delete) #{__FILE__}"
5
- end
@@ -1,4 +0,0 @@
1
- # Preview all emails at http://localhost:3000/rails/mailers/event_export
2
- class EventExportPreview < ActionMailer::Preview
3
-
4
- end
@@ -1,4 +0,0 @@
1
- # Preview all emails at http://localhost:3000/rails/mailers/event_import
2
- class EventImportPreview < ActionMailer::Preview
3
-
4
- end
@@ -1,17 +0,0 @@
1
- require 'rails_helper'
2
-
3
- RSpec.describe 'EventImportResults', type: :system do
4
- include Devise::Test::IntegrationHelpers
5
- fixtures :all
6
-
7
- describe 'When logged in as Administrator' do
8
- before do
9
- sign_in users(:admin)
10
- end
11
-
12
- it 'should get event_import_results index' do
13
- visit event_import_results_path
14
- expect(page).not_to have_link 'TSV'
15
- end
16
- end
17
- end
@@ -1,22 +0,0 @@
1
- require 'rails_helper'
2
-
3
- describe "event_import_results/index.text.ruby" do
4
- fixtures :all
5
-
6
- before(:each) do
7
- file = EventImportFile.create!(
8
- event_import: File.new("#{Rails.root.to_s}/../../examples/event_import_file_sample1.tsv"),
9
- default_library_id: 3,
10
- default_event_category: EventCategory.find(3),
11
- user: users(:admin)
12
- )
13
- file.import_start
14
- assign(:event_import_file_id, file.id)
15
- assign(:event_import_results, EventImportFile.find(file.id).event_import_results)
16
- end
17
-
18
- it "renders a list of event_import_results" do
19
- render
20
- expect(CSV.parse(rendered, headers: true, col_sep: "\t").first['library']).to eq 'hachioji'
21
- end
22
- end