enju_message 0.3.4 → 0.4.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -3
- data/Rakefile +1 -1
- data/app/controllers/message_requests_controller.rb +2 -2
- data/app/models/message.rb +2 -2
- data/app/models/message_request.rb +3 -2
- data/app/models/message_request_transition.rb +2 -2
- data/app/models/message_template.rb +2 -2
- data/app/models/message_transition.rb +2 -2
- data/app/views/message_requests/edit.html.erb +3 -3
- data/app/views/message_requests/index.html.erb +2 -2
- data/app/views/message_requests/new.html.erb +1 -1
- data/app/views/message_requests/show.html.erb +2 -2
- data/db/migrate/149_create_message_templates.rb +8 -3
- data/db/migrate/154_create_messages.rb +8 -4
- data/db/migrate/20080819181903_create_message_requests.rb +7 -2
- data/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +7 -2
- data/db/migrate/20120125050502_add_depth_to_message.rb +2 -1
- data/db/migrate/20140518111006_create_message_transitions.rb +8 -3
- data/db/migrate/20140518135713_create_message_request_transitions.rb +8 -3
- data/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +1 -1
- data/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +1 -1
- data/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +1 -1
- data/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +1 -1
- data/lib/enju_message/version.rb +1 -1
- data/spec/controllers/messages_controller_spec.rb +1 -2
- data/spec/dummy/config/database.yml +70 -9
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/005_create_manifestations.rb +3 -3
- data/spec/dummy/db/migrate/113_create_events.rb +21 -0
- data/spec/dummy/db/migrate/114_create_event_categories.rb +16 -0
- data/spec/dummy/db/migrate/20081028093607_create_event_import_files.rb +23 -0
- data/spec/dummy/db/migrate/20090519203307_create_participates.rb +15 -0
- data/spec/dummy/db/migrate/20100925074639_create_event_import_results.rb +15 -0
- data/spec/dummy/db/migrate/20120413051535_add_event_import_fingerprint_to_event_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413170734_add_error_message_to_event_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120415060342_rename_event_import_file_imported_at_to_executed_at.rb +9 -0
- data/spec/dummy/db/migrate/20140523171309_create_event_import_file_transitions.rb +18 -0
- data/spec/dummy/db/migrate/20140628071719_add_user_encoding_to_event_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140720192418_add_default_library_id_to_event_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140812152348_create_event_export_files.rb +11 -0
- data/spec/dummy/db/migrate/20140812153137_create_event_export_file_transitions.rb +18 -0
- data/spec/dummy/db/migrate/20140814070854_add_default_event_category_id_to_event_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20151128142913_create_places.rb +14 -0
- data/spec/dummy/db/migrate/20151201163718_add_place_id_to_event.rb +5 -0
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +8 -0
- data/spec/dummy/db/migrate/20160703184258_add_most_recent_to_event_import_file_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160703184311_add_most_recent_to_event_export_file_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107164558_add_constraints_to_most_recent_for_event_import_file_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107164617_add_constraints_to_most_recent_for_event_export_file_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20181119170645_add_foreign_key_to_events_referencing_event_categories.rb +5 -0
- data/spec/dummy/db/migrate/20190102034126_create_doi_records.rb +13 -0
- data/spec/dummy/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
- data/spec/dummy/db/migrate/{20181026064038_add_login_banner_to_library_group.rb → 20190630115523_add_login_banner_translations_to_library_group.rb} +1 -1
- data/spec/dummy/db/migrate/20190630151446_add_display_name_translations_to_role.rb +5 -0
- data/spec/dummy/db/migrate/20190630153136_add_display_name_translations_to_event.rb +6 -0
- data/spec/dummy/db/migrate/20190712163038_add_display_name_translations_to_carrier_type.rb +21 -0
- data/spec/dummy/db/schema.rb +265 -133
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/fixtures/agents.yml +29 -30
- data/spec/fixtures/libraries.yml +28 -30
- data/spec/fixtures/library_groups.yml +36 -19
- data/spec/fixtures/message_request_transitions.yml +2 -2
- data/spec/fixtures/message_requests.yml +3 -2
- data/spec/fixtures/message_templates.yml +2 -2
- data/spec/fixtures/messages.yml +3 -3
- data/spec/fixtures/roles.yml +22 -5
- data/spec/fixtures/shelves.yml +45 -0
- data/spec/fixtures/user_groups.yml +23 -5
- data/spec/fixtures/users.yml +1 -1
- data/spec/models/message_request_spec.rb +13 -3
- data/spec/models/message_spec.rb +2 -2
- data/spec/models/message_template_spec.rb +2 -2
- data/spec/rails_helper.rb +5 -1
- metadata +276 -302
- data/spec/dummy/app/jobs/application_job.rb +0 -7
- data/spec/dummy/db/migrate/20150421023923_create_identities.rb +0 -14
- data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +0 -5
- data/spec/dummy/db/migrate/20170114174536_add_profile_id_to_user.rb +0 -5
- data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +0 -5
- data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +0 -5
- data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +0 -12
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateEventExportFileTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
def change
|
3
|
+
create_table :event_export_file_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 :event_export_file_id
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
|
15
|
+
add_index :event_export_file_transitions, :event_export_file_id, name: "index_event_export_file_transitions_on_file_id"
|
16
|
+
add_index :event_export_file_transitions, [:sort_key, :event_export_file_id], unique: true, name: "index_event_export_file_transitions_on_sort_key_and_file_id"
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreatePlaces < ActiveRecord::Migration[4.2]
|
2
|
+
def change
|
3
|
+
create_table :places do |t|
|
4
|
+
t.string :term
|
5
|
+
t.text :city
|
6
|
+
t.references :country, index: true
|
7
|
+
t.float :latitude
|
8
|
+
t.float :longitude
|
9
|
+
|
10
|
+
t.timestamps null: false
|
11
|
+
end
|
12
|
+
add_index :places, :term
|
13
|
+
end
|
14
|
+
end
|
@@ -8,11 +8,19 @@ class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[4.2]
|
|
8
8
|
migrate_data: true
|
9
9
|
})
|
10
10
|
end
|
11
|
+
|
12
|
+
if defined?(AwesomeHstoreTranslate)
|
13
|
+
add_column :library_groups, :login_banner, :hstore
|
14
|
+
end
|
11
15
|
end
|
12
16
|
|
13
17
|
def down
|
14
18
|
if defined?(Globalize)
|
15
19
|
LibraryGroup.drop_translation_table! migrate_data: true
|
16
20
|
end
|
21
|
+
|
22
|
+
if defined?(AwesomeHstoreTranslate)
|
23
|
+
remove_column :library_groups, :login_banner
|
24
|
+
end
|
17
25
|
end
|
18
26
|
end
|
@@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForAgentImportFileTransitions < ActiveRecord::Mi
|
|
2
2
|
disable_ddl_transaction!
|
3
3
|
|
4
4
|
def up
|
5
|
-
add_index :agent_import_file_transitions, [:agent_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_agent_import_file_transitions_parent_most_recent"
|
5
|
+
add_index :agent_import_file_transitions, [:agent_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_agent_import_file_transitions_parent_most_recent" # , algorithm: :concurrently
|
6
6
|
change_column_null :agent_import_file_transitions, :most_recent, false
|
7
7
|
end
|
8
8
|
|
@@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForResourceImportFileTransitions < ActiveRecord:
|
|
2
2
|
disable_ddl_transaction!
|
3
3
|
|
4
4
|
def up
|
5
|
-
add_index :resource_import_file_transitions, [:resource_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_import_file_transitions_parent_most_recent"
|
5
|
+
add_index :resource_import_file_transitions, [:resource_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_import_file_transitions_parent_most_recent" # , algorithm: :concurrently
|
6
6
|
change_column_null :resource_import_file_transitions, :most_recent, false
|
7
7
|
end
|
8
8
|
|
@@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForResourceExportFileTransitions < ActiveRecord:
|
|
2
2
|
disable_ddl_transaction!
|
3
3
|
|
4
4
|
def up
|
5
|
-
add_index :resource_export_file_transitions, [:resource_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_export_file_transitions_parent_most_recent"
|
5
|
+
add_index :resource_export_file_transitions, [:resource_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_export_file_transitions_parent_most_recent" # , algorithm: :concurrently
|
6
6
|
change_column_null :resource_export_file_transitions, :most_recent, false
|
7
7
|
end
|
8
8
|
|
@@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForImportRequestTransitions < ActiveRecord::Migr
|
|
2
2
|
disable_ddl_transaction!
|
3
3
|
|
4
4
|
def up
|
5
|
-
add_index :import_request_transitions, [:import_request_id, :most_recent], unique: true, where: "most_recent", name: "index_import_request_transitions_parent_most_recent"
|
5
|
+
add_index :import_request_transitions, [:import_request_id, :most_recent], unique: true, where: "most_recent", name: "index_import_request_transitions_parent_most_recent" # , algorithm: :concurrently
|
6
6
|
change_column_null :import_request_transitions, :most_recent, false
|
7
7
|
end
|
8
8
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForEventImportFileTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :event_import_file_transitions, [:event_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_event_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :event_import_file_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :event_import_file_transitions, name: "index_event_import_file_transitions_parent_most_recent"
|
11
|
+
change_column_null :event_import_file_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForEventExportFileTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :event_export_file_transitions, [:event_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_event_export_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :event_export_file_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :event_export_file_transitions, name: "index_event_export_file_transitions_parent_most_recent"
|
11
|
+
change_column_null :event_export_file_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateDoiRecords < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
create_table :doi_records do |t|
|
4
|
+
t.string :body, index: {unique: true}, null: false
|
5
|
+
t.string :display_body, null: false
|
6
|
+
t.string :source
|
7
|
+
t.jsonb :response, default: {}, null: false
|
8
|
+
t.references :manifestation, foreign_key: true, null: false
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class AddDisplayNameTranslationsToLibraryGroup < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
add_column :budget_types, :display_name_translations, :jsonb, default: {}, null: false
|
4
|
+
add_column :libraries, :display_name_translations, :jsonb, default: {}, null: false
|
5
|
+
add_column :library_groups, :display_name_translations, :jsonb, default: {}, null: false
|
6
|
+
add_column :request_status_types, :display_name_translations, :jsonb, default: {}, null: false
|
7
|
+
add_column :request_types, :display_name_translations, :jsonb, default: {}, null: false
|
8
|
+
add_column :search_engines, :display_name_translations, :jsonb, default: {}, null: false
|
9
|
+
add_column :shelves, :display_name_translations, :jsonb, default: {}, null: false
|
10
|
+
add_column :user_groups, :display_name_translations, :jsonb, default: {}, null: false
|
11
|
+
end
|
12
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class
|
1
|
+
class AddLoginBannerTranslationsToLibraryGroup < ActiveRecord::Migration[5.2]
|
2
2
|
def change
|
3
3
|
add_column :library_groups, :login_banner_translations, :jsonb, default: {}, null: false
|
4
4
|
add_column :library_groups, :footer_banner_translations, :jsonb, default: {}, null: false
|
@@ -0,0 +1,6 @@
|
|
1
|
+
class AddDisplayNameTranslationsToEvent < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
add_column :event_categories, :display_name_translations, :jsonb, default: {}, null: false
|
4
|
+
add_column :events, :display_name_translations, :jsonb, default: {}, null: false
|
5
|
+
end
|
6
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class AddDisplayNameTranslationsToCarrierType < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
[
|
4
|
+
:agent_relationship_types,
|
5
|
+
:agent_types,
|
6
|
+
:carrier_types,
|
7
|
+
:content_types,
|
8
|
+
:create_types,
|
9
|
+
:form_of_works,
|
10
|
+
:frequencies,
|
11
|
+
:languages,
|
12
|
+
:licenses,
|
13
|
+
:manifestation_relationship_types,
|
14
|
+
:medium_of_performances,
|
15
|
+
:produce_types,
|
16
|
+
:realize_types
|
17
|
+
].each do |table|
|
18
|
+
add_column table, :display_name_translations, :jsonb, default: {}, null: false
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|