enju_biblio 0.3.0.beta.2 → 0.3.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +1 -1
- data/lib/enju_biblio/version.rb +1 -1
- data/spec/controllers/agent_import_files_controller_spec.rb +2 -2
- data/spec/controllers/agent_merge_lists_controller_spec.rb +2 -2
- data/spec/controllers/agent_merges_controller_spec.rb +2 -2
- data/spec/controllers/agent_relationship_types_controller_spec.rb +2 -2
- data/spec/controllers/agents_controller_spec.rb +12 -12
- data/spec/controllers/content_types_controller_spec.rb +1 -1
- data/spec/controllers/countries_controller_spec.rb +1 -1
- data/spec/controllers/frequencies_controller_spec.rb +1 -1
- data/spec/controllers/items_controller_spec.rb +6 -6
- data/spec/controllers/manifestation_relationship_types_controller_spec.rb +2 -2
- data/spec/controllers/manifestations_controller_spec.rb +27 -27
- data/spec/controllers/owns_controller_spec.rb +2 -2
- data/spec/controllers/resource_export_files_controller_spec.rb +4 -4
- data/spec/controllers/resource_import_files_controller_spec.rb +5 -5
- data/spec/controllers/series_statement_merges_controller_spec.rb +2 -2
- data/spec/controllers/series_statements_controller_spec.rb +4 -4
- data/spec/dummy/app/helpers/application_helper.rb +1 -1
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/db/migrate/002_devise_create_users.rb +0 -1
- data/spec/dummy/db/migrate/033_create_checkouts.rb +1 -1
- data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +1 -1
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +2 -2
- data/spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb +1 -1
- data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +0 -1
- data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +1 -1
- data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140523171309_create_event_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140812153137_create_event_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +3 -4
- data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
- data/spec/factories/checkout.rb +1 -1
- data/spec/factories/create_types.rb +3 -3
- data/spec/factories/produce_types.rb +3 -3
- data/spec/factories/profile.rb +2 -2
- data/spec/factories/realize_types.rb +3 -3
- data/spec/factories/role.rb +1 -1
- data/spec/factories/user.rb +13 -13
- metadata +486 -472
@@ -96,7 +96,7 @@ describe OwnsController do
|
|
96
96
|
it 'assigns the requested own as @own' do
|
97
97
|
get :new
|
98
98
|
expect(assigns(:own)).not_to be_valid
|
99
|
-
expect(response).to
|
99
|
+
expect(response).to be_successful
|
100
100
|
end
|
101
101
|
end
|
102
102
|
|
@@ -106,7 +106,7 @@ describe OwnsController do
|
|
106
106
|
it 'assigns the requested own as @own' do
|
107
107
|
get :new
|
108
108
|
expect(assigns(:own)).not_to be_valid
|
109
|
-
expect(response).to
|
109
|
+
expect(response).to be_successful
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
@@ -48,7 +48,7 @@ describe ResourceExportFilesController do
|
|
48
48
|
it 'assigns the requested resource_export_file as @resource_export_file' do
|
49
49
|
get :show, params: { id: resource_export_files(:resource_export_file_00003).id }
|
50
50
|
expect(assigns(:resource_export_file)).to eq(resource_export_files(:resource_export_file_00003))
|
51
|
-
expect(response).to
|
51
|
+
expect(response).to be_successful
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -58,7 +58,7 @@ describe ResourceExportFilesController do
|
|
58
58
|
it 'assigns the requested resource_export_file as @resource_export_file' do
|
59
59
|
get :show, params: { id: resource_export_files(:resource_export_file_00003).id }
|
60
60
|
expect(assigns(:resource_export_file)).to eq(resource_export_files(:resource_export_file_00003))
|
61
|
-
expect(response).to
|
61
|
+
expect(response).to be_successful
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
@@ -88,7 +88,7 @@ describe ResourceExportFilesController do
|
|
88
88
|
it 'assigns the requested resource_export_file as @resource_export_file' do
|
89
89
|
get :new
|
90
90
|
expect(assigns(:resource_export_file)).to be_valid
|
91
|
-
expect(response).to
|
91
|
+
expect(response).to be_successful
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
@@ -98,7 +98,7 @@ describe ResourceExportFilesController do
|
|
98
98
|
it 'should not assign the requested resource_export_file as @resource_export_file' do
|
99
99
|
get :new
|
100
100
|
expect(assigns(:resource_export_file)).to be_valid
|
101
|
-
expect(response).to
|
101
|
+
expect(response).to be_successful
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
@@ -48,7 +48,7 @@ describe ResourceImportFilesController do
|
|
48
48
|
it 'assigns the requested resource_import_file as @resource_import_file' do
|
49
49
|
get :show, params: { id: resource_import_files(:resource_import_file_00003).id }
|
50
50
|
expect(assigns(:resource_import_file)).to eq(resource_import_files(:resource_import_file_00003))
|
51
|
-
expect(response).to
|
51
|
+
expect(response).to be_successful
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -58,7 +58,7 @@ describe ResourceImportFilesController do
|
|
58
58
|
it 'assigns the requested resource_import_file as @resource_import_file' do
|
59
59
|
get :show, params: { id: resource_import_files(:resource_import_file_00003).id }
|
60
60
|
expect(assigns(:resource_import_file)).to eq(resource_import_files(:resource_import_file_00003))
|
61
|
-
expect(response).to
|
61
|
+
expect(response).to be_successful
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
@@ -88,7 +88,7 @@ describe ResourceImportFilesController do
|
|
88
88
|
it 'assigns the requested resource_import_file as @resource_import_file' do
|
89
89
|
get :new
|
90
90
|
expect(assigns(:resource_import_file)).not_to be_valid
|
91
|
-
expect(response).to
|
91
|
+
expect(response).to be_successful
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
@@ -98,7 +98,7 @@ describe ResourceImportFilesController do
|
|
98
98
|
it 'should not assign the requested resource_import_file as @resource_import_file' do
|
99
99
|
get :new
|
100
100
|
expect(assigns(:resource_import_file)).not_to be_valid
|
101
|
-
expect(response).to
|
101
|
+
expect(response).to be_successful
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
@@ -139,7 +139,7 @@ describe ResourceImportFilesController do
|
|
139
139
|
post :create, params: { resource_import_file: { resource_import: fixture_file_upload('/../../examples/resource_import_file_sample1.tsv', 'text/csv'), edit_mode: 'create' } }
|
140
140
|
expect(assigns(:resource_import_file)).not_to be_valid
|
141
141
|
assigns(:resource_import_file).user.username.should eq @user.username
|
142
|
-
expect(response).to
|
142
|
+
expect(response).to be_successful
|
143
143
|
end
|
144
144
|
end
|
145
145
|
|
@@ -88,7 +88,7 @@ describe SeriesStatementMergesController do
|
|
88
88
|
it 'assigns the requested series_statement_merge as @series_statement_merge' do
|
89
89
|
get :new
|
90
90
|
assigns(:series_statement_merge).should_not be_valid
|
91
|
-
response.should
|
91
|
+
response.should be_successful
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
@@ -98,7 +98,7 @@ describe SeriesStatementMergesController do
|
|
98
98
|
it 'assigns the requested series_statement_merge as @series_statement_merge' do
|
99
99
|
get :new
|
100
100
|
assigns(:series_statement_merge).should_not be_valid
|
101
|
-
response.should
|
101
|
+
response.should be_successful
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
@@ -55,7 +55,7 @@ describe SeriesStatementsController do
|
|
55
55
|
series_statement = FactoryBot.create(:series_statement)
|
56
56
|
get :show, params: { id: series_statement.id }
|
57
57
|
expect(assigns(:series_statement)).to eq(series_statement)
|
58
|
-
expect(response).to
|
58
|
+
expect(response).to be_successful
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
@@ -66,7 +66,7 @@ describe SeriesStatementsController do
|
|
66
66
|
series_statement = FactoryBot.create(:series_statement)
|
67
67
|
get :show, params: { id: series_statement.id }
|
68
68
|
expect(assigns(:series_statement)).to eq(series_statement)
|
69
|
-
expect(response).to
|
69
|
+
expect(response).to be_successful
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
@@ -77,7 +77,7 @@ describe SeriesStatementsController do
|
|
77
77
|
series_statement = FactoryBot.create(:series_statement)
|
78
78
|
get :show, params: { id: series_statement.id }
|
79
79
|
expect(assigns(:series_statement)).to eq(series_statement)
|
80
|
-
expect(response).to
|
80
|
+
expect(response).to be_successful
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
@@ -86,7 +86,7 @@ describe SeriesStatementsController do
|
|
86
86
|
series_statement = FactoryBot.create(:series_statement)
|
87
87
|
get :show, params: { id: series_statement.id }
|
88
88
|
expect(assigns(:series_statement)).to eq(series_statement)
|
89
|
-
expect(response).to
|
89
|
+
expect(response).to be_successful
|
90
90
|
end
|
91
91
|
end
|
92
92
|
end
|
@@ -3,7 +3,7 @@ module ApplicationHelper
|
|
3
3
|
include EnjuLeaf::ApplicationHelper
|
4
4
|
include EnjuBiblio::ApplicationHelper if defined?(EnjuBiblio)
|
5
5
|
if defined?(EnjuManifestationViewer)
|
6
|
-
include EnjuManifestationViewer::BookJacketHelper
|
7
6
|
include EnjuManifestationViewer::ManifestationViewerHelper
|
7
|
+
include EnjuManifestationViewer::BookJacketHelper
|
8
8
|
end
|
9
9
|
end
|
@@ -14,7 +14,7 @@ class CreateCheckouts < ActiveRecord::Migration[4.2]
|
|
14
14
|
add_index :checkouts, :user_id
|
15
15
|
add_index :checkouts, :item_id
|
16
16
|
add_index :checkouts, :basket_id
|
17
|
-
add_index :checkouts, [
|
17
|
+
add_index :checkouts, %i[item_id basket_id], unique: true
|
18
18
|
add_index :checkouts, :librarian_id
|
19
19
|
add_index :checkouts, :checkin_id
|
20
20
|
end
|
@@ -8,11 +8,11 @@ class CreateVersions < ActiveRecord::Migration[4.2]
|
|
8
8
|
t.text :object
|
9
9
|
t.datetime :created_at
|
10
10
|
end
|
11
|
-
add_index :versions, [
|
11
|
+
add_index :versions, %i[item_type item_id]
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.down
|
15
|
-
remove_index :versions, [
|
15
|
+
remove_index :versions, %i[item_type item_id]
|
16
16
|
drop_table :versions
|
17
17
|
end
|
18
18
|
end
|
@@ -11,6 +11,6 @@ class AddAdditionalAttributesToUser < ActiveRecord::Migration[4.2]
|
|
11
11
|
add_column :users, :confirmed_at, :datetime
|
12
12
|
|
13
13
|
add_index :users, :username, unique: true
|
14
|
-
add_index :users, :unlock_token,
|
14
|
+
add_index :users, :unlock_token, unique: true
|
15
15
|
end
|
16
16
|
end
|
@@ -13,6 +13,6 @@ class CreateReserveTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :reserve_transitions, :reserve_id
|
16
|
-
add_index :reserve_transitions, [
|
16
|
+
add_index :reserve_transitions, %i[sort_key reserve_id], unique: true
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateMessageTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :message_transitions, :message_id
|
16
|
-
add_index :message_transitions, [
|
16
|
+
add_index :message_transitions, %i[sort_key message_id], unique: true
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateMessageRequestTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :message_request_transitions, :message_request_id
|
16
|
-
add_index :message_request_transitions, [
|
16
|
+
add_index :message_request_transitions, %i[sort_key message_request_id], unique: true, name: "index_message_request_transitions_on_sort_key_and_request_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateEventImportFileTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :event_import_file_transitions, :event_import_file_id
|
16
|
-
add_index :event_import_file_transitions, [
|
16
|
+
add_index :event_import_file_transitions, %i[sort_key event_import_file_id], unique: true, name: "index_event_import_file_transitions_on_sort_key_and_file_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -12,6 +12,6 @@ class CreateUserImportFileTransitions < ActiveRecord::Migration[4.2]
|
|
12
12
|
t.timestamps
|
13
13
|
end
|
14
14
|
|
15
|
-
add_index :user_import_file_transitions, [
|
15
|
+
add_index :user_import_file_transitions, %i[sort_key user_import_file_id], unique: true, name: "index_user_import_file_transitions_on_sort_key_and_file_id"
|
16
16
|
end
|
17
17
|
end
|
@@ -13,6 +13,6 @@ class CreateBookmarkStatTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :bookmark_stat_transitions, :bookmark_stat_id
|
16
|
-
add_index :bookmark_stat_transitions, [
|
16
|
+
add_index :bookmark_stat_transitions, %i[sort_key bookmark_stat_id], unique: true, name: "index_bookmark_stat_transitions_on_sort_key_and_stat_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateUserCheckoutStatTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :user_checkout_stat_transitions, :user_checkout_stat_id
|
16
|
-
add_index :user_checkout_stat_transitions, [
|
16
|
+
add_index :user_checkout_stat_transitions, %i[sort_key user_checkout_stat_id], unique: true, name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateUserReserveStatTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :user_reserve_stat_transitions, :user_reserve_stat_id
|
16
|
-
add_index :user_reserve_stat_transitions, [
|
16
|
+
add_index :user_reserve_stat_transitions, %i[sort_key user_reserve_stat_id], unique: true, name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateManifestationCheckoutStatTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :manifestation_checkout_stat_transitions, :manifestation_checkout_stat_id, name: "index_manifestation_checkout_stat_transitions_on_stat_id"
|
16
|
-
add_index :manifestation_checkout_stat_transitions, [
|
16
|
+
add_index :manifestation_checkout_stat_transitions, %i[sort_key manifestation_checkout_stat_id], unique: true, name: "index_manifestation_checkout_stat_transitions_on_transition"
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateManifestationReserveStatTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :manifestation_reserve_stat_transitions, :manifestation_reserve_stat_id, name: "index_manifestation_reserve_stat_transitions_on_stat_id"
|
16
|
-
add_index :manifestation_reserve_stat_transitions, [
|
16
|
+
add_index :manifestation_reserve_stat_transitions, %i[sort_key manifestation_reserve_stat_id], unique: true, name: "index_manifestation_reserve_stat_transitions_on_transition"
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateUserExportFileTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :user_export_file_transitions, :user_export_file_id, name: "index_user_export_file_transitions_on_file_id"
|
16
|
-
add_index :user_export_file_transitions, [
|
16
|
+
add_index :user_export_file_transitions, %i[sort_key user_export_file_id], unique: true, name: "index_user_export_file_transitions_on_sort_key_and_file_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateEventExportFileTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
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, [
|
16
|
+
add_index :event_export_file_transitions, %i[sort_key event_export_file_id], unique: true, name: "index_event_export_file_transitions_on_sort_key_and_file_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -3,10 +3,9 @@ class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[4.2]
|
|
3
3
|
def up
|
4
4
|
if defined?(Globalize)
|
5
5
|
LibraryGroup.create_translation_table!({
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
})
|
6
|
+
login_banner: :text
|
7
|
+
},
|
8
|
+
migrate_data: true)
|
10
9
|
end
|
11
10
|
|
12
11
|
if defined?(AwesomeHstoreTranslate)
|
@@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Mig
|
|
2
2
|
disable_ddl_transaction!
|
3
3
|
|
4
4
|
def up
|
5
|
-
add_index :user_import_file_transitions, [
|
5
|
+
add_index :user_import_file_transitions, %i[user_import_file_id most_recent], unique: true, where: "most_recent", name: "index_user_import_file_transitions_parent_most_recent" # , algorithm: :concurrently
|
6
6
|
change_column_null :user_import_file_transitions, :most_recent, false
|
7
7
|
end
|
8
8
|
|
@@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Mig
|
|
2
2
|
disable_ddl_transaction!
|
3
3
|
|
4
4
|
def up
|
5
|
-
add_index :user_export_file_transitions, [
|
5
|
+
add_index :user_export_file_transitions, %i[user_export_file_id most_recent], unique: true, where: "most_recent", name: "index_user_export_file_transitions_parent_most_recent" # , algorithm: :concurrently
|
6
6
|
change_column_null :user_export_file_transitions, :most_recent, false
|
7
7
|
end
|
8
8
|
|
data/spec/factories/checkout.rb
CHANGED
data/spec/factories/profile.rb
CHANGED
@@ -3,8 +3,8 @@ FactoryBot.define do
|
|
3
3
|
f.user_group_id {UserGroup.first.id}
|
4
4
|
f.required_role_id {Role.where(name: 'User').first.id}
|
5
5
|
f.sequence(:user_number){|n| "user_number_#{n}"}
|
6
|
-
f.library_id 2
|
7
|
-
f.locale "ja"
|
6
|
+
f.library_id { 2 }
|
7
|
+
f.locale { "ja" }
|
8
8
|
f.user_id {FactoryBot.create(:user).id}
|
9
9
|
end
|
10
10
|
end
|