enju_library 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/user_export_file.rb +1 -1
- data/app/models/user_export_file_transition.rb +1 -1
- data/app/models/user_import_file.rb +1 -1
- data/app/models/user_import_file_transition.rb +1 -1
- data/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +13 -0
- data/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +13 -0
- data/lib/enju_library/version.rb +1 -1
- data/lib/tasks/enju_library_tasks.rake +2 -0
- data/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +5 -0
- data/spec/dummy/db/schema.rb +6 -4
- metadata +15 -12
- data/lib/generators/enju_library/update/update_generator.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68aa97ed6ffa7f1b6171341f4418c4515261e491
|
4
|
+
data.tar.gz: 972c34fe9c4fe4f7f7e7c278f2a04c024a51cfc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ce9f626875d6fec18c594cec82fff8b64e16befb3102b452b6bfaaad86d18ea2f715bd4b64a64e025221d463d6d1a6330904e63a4ff25109d2940fe7cd578ed
|
7
|
+
data.tar.gz: 103923704202a2704aa121e9cb4b295fec7f40debdb839a092114850ea284b73349401a075abbad8cb6e12d1207d0783c2fc4e8bd16d31b7cb1050a55164a4f4
|
@@ -17,7 +17,7 @@ class UserExportFile < ActiveRecord::Base
|
|
17
17
|
end
|
18
18
|
validates_attachment_content_type :user_export, content_type: /\Atext\/plain\Z/
|
19
19
|
|
20
|
-
has_many :user_export_file_transitions
|
20
|
+
has_many :user_export_file_transitions, autosave: false
|
21
21
|
|
22
22
|
def state_machine
|
23
23
|
UserExportFileStateMachine.new(self, transition_class: UserExportFileTransition)
|
@@ -31,7 +31,7 @@ class UserImportFile < ActiveRecord::Base
|
|
31
31
|
belongs_to :default_library, class_name: 'Library'
|
32
32
|
has_many :user_import_results
|
33
33
|
|
34
|
-
has_many :user_import_file_transitions
|
34
|
+
has_many :user_import_file_transitions, autosave: false
|
35
35
|
|
36
36
|
attr_accessor :mode
|
37
37
|
|
data/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Migration
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :user_import_file_transitions, [:user_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_user_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :user_import_file_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :user_import_file_transitions, name: "index_user_import_file_transitions_parent_most_recent"
|
11
|
+
change_column_null :user_import_file_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
data/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Migration
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :user_export_file_transitions, [:user_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_user_export_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :user_export_file_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :user_export_file_transitions, name: "index_user_export_file_transitions_parent_most_recent"
|
11
|
+
change_column_null :user_export_file_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
data/lib/enju_library/version.rb
CHANGED
@@ -4,11 +4,13 @@ require 'tasks/color'
|
|
4
4
|
desc "create initial records for enju_library"
|
5
5
|
namespace :enju_library do
|
6
6
|
task :setup => :environment do
|
7
|
+
ActiveRecord::FixtureSet.create_fixtures('db/fixtures/enju_library', 'library_groups')
|
7
8
|
Dir.glob(Rails.root.to_s + '/db/fixtures/enju_library/**/*.yml').each do |file|
|
8
9
|
dirname = File.basename(File.dirname file)
|
9
10
|
dirname = nil if dirname == "enju_library"
|
10
11
|
basename = [ dirname, File.basename(file, ".*") ].compact
|
11
12
|
basename = File.join(*basename)
|
13
|
+
next if basename == 'library_groups'
|
12
14
|
ActiveRecord::FixtureSet.create_fixtures('db/fixtures/enju_library', basename)
|
13
15
|
end
|
14
16
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20180107160740) do
|
15
15
|
|
16
16
|
create_table "accepts", force: :cascade do |t|
|
17
17
|
t.integer "basket_id"
|
@@ -669,7 +669,7 @@ ActiveRecord::Schema.define(version: 20180102162311) do
|
|
669
669
|
t.string "binding_item_identifier"
|
670
670
|
t.string "binding_call_number"
|
671
671
|
t.datetime "binded_at"
|
672
|
-
t.integer "manifestation_id"
|
672
|
+
t.integer "manifestation_id", null: false
|
673
673
|
end
|
674
674
|
|
675
675
|
add_index "items", ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
|
@@ -1471,10 +1471,11 @@ ActiveRecord::Schema.define(version: 20180102162311) do
|
|
1471
1471
|
t.integer "user_export_file_id"
|
1472
1472
|
t.datetime "created_at"
|
1473
1473
|
t.datetime "updated_at"
|
1474
|
-
t.boolean "most_recent"
|
1474
|
+
t.boolean "most_recent", null: false
|
1475
1475
|
end
|
1476
1476
|
|
1477
1477
|
add_index "user_export_file_transitions", ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
|
1478
|
+
add_index "user_export_file_transitions", ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true
|
1478
1479
|
add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
|
1479
1480
|
add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
|
1480
1481
|
|
@@ -1543,10 +1544,11 @@ ActiveRecord::Schema.define(version: 20180102162311) do
|
|
1543
1544
|
t.integer "user_import_file_id"
|
1544
1545
|
t.datetime "created_at"
|
1545
1546
|
t.datetime "updated_at"
|
1546
|
-
t.boolean "most_recent"
|
1547
|
+
t.boolean "most_recent", null: false
|
1547
1548
|
end
|
1548
1549
|
|
1549
1550
|
add_index "user_import_file_transitions", ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
|
1551
|
+
add_index "user_import_file_transitions", ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true
|
1550
1552
|
add_index "user_import_file_transitions", ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
|
1551
1553
|
|
1552
1554
|
create_table "user_import_files", force: :cascade do |t|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_library
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kosuke Tanabe
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '3.3'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '3.3'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: paperclip
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,28 +114,28 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.2.
|
117
|
+
version: 0.2.5
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.2.
|
124
|
+
version: 0.2.5
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: enju_manifestation_viewer
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.2.
|
131
|
+
version: 0.2.3
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.2.
|
138
|
+
version: 0.2.3
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: enju_ndl
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,28 +156,28 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.2.
|
159
|
+
version: 0.2.3
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0.2.
|
166
|
+
version: 0.2.3
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: enju_circulation
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 0.2.
|
173
|
+
version: 0.2.5
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 0.2.
|
180
|
+
version: 0.2.5
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: sqlite3
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -576,6 +576,8 @@ files:
|
|
576
576
|
- db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb
|
577
577
|
- db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb
|
578
578
|
- db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb
|
579
|
+
- db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb
|
580
|
+
- db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb
|
579
581
|
- lib/enju_library.rb
|
580
582
|
- lib/enju_library/engine.rb
|
581
583
|
- lib/enju_library/version.rb
|
@@ -589,7 +591,6 @@ files:
|
|
589
591
|
- lib/generators/enju_library/setup/templates/db/fixtures/request_status_types.yml
|
590
592
|
- lib/generators/enju_library/setup/templates/db/fixtures/request_types.yml
|
591
593
|
- lib/generators/enju_library/setup/templates/db/fixtures/shelves.yml
|
592
|
-
- lib/generators/enju_library/update/update_generator.rb
|
593
594
|
- lib/tasks/color.rb
|
594
595
|
- lib/tasks/enju_library_tasks.rake
|
595
596
|
- spec/controllers/accepts_controller_spec.rb
|
@@ -837,6 +838,7 @@ files:
|
|
837
838
|
- spec/dummy/db/migrate/20160813191820_add_screenshot_generator_to_library_group.rb
|
838
839
|
- spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb
|
839
840
|
- spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb
|
841
|
+
- spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb
|
840
842
|
- spec/dummy/db/schema.rb
|
841
843
|
- spec/dummy/public/404.html
|
842
844
|
- spec/dummy/public/422.html
|
@@ -1111,6 +1113,7 @@ test_files:
|
|
1111
1113
|
- spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb
|
1112
1114
|
- spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb
|
1113
1115
|
- spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb
|
1116
|
+
- spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb
|
1114
1117
|
- spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb
|
1115
1118
|
- spec/dummy/db/migrate/154_create_messages.rb
|
1116
1119
|
- spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb
|
@@ -1,9 +0,0 @@
|
|
1
|
-
class EnjuLibrary::UpdateGenerator < Rails::Generators::Base
|
2
|
-
source_root File.expand_path('../templates', __FILE__)
|
3
|
-
desc "Create files for updating Next-L Enju"
|
4
|
-
|
5
|
-
def copy_statesman_migration_files
|
6
|
-
generate('statesman:add_constraints_to_most_recent', 'UserImportFile', 'UserImportFileTransition')
|
7
|
-
generate('statesman:add_constraints_to_most_recent', 'UserExportFile', 'UserExportFileTransition')
|
8
|
-
end
|
9
|
-
end
|