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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ec47a509dd7bd209791197d6c822b0b84c44b67
4
- data.tar.gz: 32cdd9f4bde06623a6798d9dceba72c338d58f1d
3
+ metadata.gz: 68aa97ed6ffa7f1b6171341f4418c4515261e491
4
+ data.tar.gz: 972c34fe9c4fe4f7f7e7c278f2a04c024a51cfc5
5
5
  SHA512:
6
- metadata.gz: 2ade2ec7c7902f4d8351550652ff10ca1f6d594478b1c14b90fec4e2eae66fa68ded7686a6c251ef27f179401e9c0d72d112e99aa0300f757551e055403ea02f
7
- data.tar.gz: 6d90d19cb810d5a1eb9f0d94b850854cf66f5837998b95d264664510ff19b16629fe71a15db6ec1a4ae67847cfcc9990d301e4b331a9d1b34f5487d2ead4aabc
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)
@@ -17,5 +17,5 @@ end
17
17
  # user_export_file_id :integer
18
18
  # created_at :datetime
19
19
  # updated_at :datetime
20
- # most_recent :boolean
20
+ # most_recent :boolean not null
21
21
  #
@@ -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
 
@@ -17,5 +17,5 @@ end
17
17
  # user_import_file_id :integer
18
18
  # created_at :datetime
19
19
  # updated_at :datetime
20
- # most_recent :boolean
20
+ # most_recent :boolean not null
21
21
  #
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module EnjuLibrary
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
@@ -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
@@ -0,0 +1,5 @@
1
+ class SetNotNullToManifestationIdOnItems < ActiveRecord::Migration
2
+ def change
3
+ change_column_null :items, :manifestation_id, false
4
+ end
5
+ end
@@ -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: 20180102162311) do
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
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: '1.3'
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: '1.3'
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.3
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.3
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.1
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.1
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.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.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.4
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.4
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