enju_subject 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1eb9c394a337f1e6771f22f07cccd209cd514239be76495ed4ecfa50659ea7e0
4
- data.tar.gz: b7f9d5cb3430e1e5c05f1006e78b3ad5928d54db3d239169f50be2182f427e25
3
+ metadata.gz: 13a77e302ed1fea49a89324f48453fc11b65714371e5d2241333a6096948f570
4
+ data.tar.gz: 9cd009abe585d7662c0f826aaf7618acc4b8033afa6e8974e0d60a81e6405e4e
5
5
  SHA512:
6
- metadata.gz: e4c6140f3c7d72fd6a3bbe577718c588e71148b15115d9d0b300a04f8839e324c9c997410a8b88dab020beeaba0ba93ef68c639054bc52bd58585c87031799e0
7
- data.tar.gz: 6f00c3852029b0b759c1d8eb9cac38c345aa8901a2e8ac36e376de596243819b83c605a75faed3df5238b66c628748e039a1dedd9c75d433df09c7d4f12791c6
6
+ metadata.gz: ec447e0ba0fc1b0e270f02e462adb264c5653d2083343e803ed676162ca57cb4b25826659bb6edc52c4c7f25f3cfcc40a44e8c69b7f3d9354e1510c7c2e9bef5
7
+ data.tar.gz: 5a0b71003ae24e8b308c29b337b03869a6e7392703399c0a57d225190724aaf41c8d72087654c7b0945f71c15a1aa4ab2fad03c4ecb76a983dbde24acb23afe8
@@ -62,7 +62,7 @@ class ClassificationTypesController < ApplicationController
62
62
  end
63
63
 
64
64
  respond_to do |format|
65
- if @classification_type.update_attributes(classification_type_params)
65
+ if @classification_type.update(classification_type_params)
66
66
  format.html { redirect_to @classification_type, notice: t('controller.successfully_updated', model: t('activerecord.models.classification_type')) }
67
67
  format.json { head :no_content }
68
68
  else
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  class ClassificationsController < ApplicationController
3
2
  before_action :set_classification, only: [:show, :edit, :update, :destroy]
4
3
  before_action :check_policy, only: [:index, :new, :create]
@@ -85,7 +84,7 @@ class ClassificationsController < ApplicationController
85
84
  # PUT /classifications/1.json
86
85
  def update
87
86
  respond_to do |format|
88
- if @classification.update_attributes(classification_params)
87
+ if @classification.update(classification_params)
89
88
  format.html { redirect_to @classification, notice: t('controller.successfully_updated', model: t('activerecord.models.classification')) }
90
89
  format.json { head :no_content }
91
90
  else
@@ -62,7 +62,7 @@ class SubjectHeadingTypesController < ApplicationController
62
62
  end
63
63
 
64
64
  respond_to do |format|
65
- if @subject_heading_type.update_attributes(subject_heading_type_params)
65
+ if @subject_heading_type.update(subject_heading_type_params)
66
66
  format.html { redirect_to @subject_heading_type, notice: t('controller.successfully_updated', model: t('activerecord.models.subject_heading_type')) }
67
67
  format.json { head :no_content }
68
68
  else
@@ -62,7 +62,7 @@ class SubjectTypesController < ApplicationController
62
62
  end
63
63
 
64
64
  respond_to do |format|
65
- if @subject_type.update_attributes(subject_type_params)
65
+ if @subject_type.update(subject_type_params)
66
66
  format.html { redirect_to @subject_type, notice: t('controller.successfully_updated', model: t('activerecord.models.subject_type')) }
67
67
  format.json { head :no_content }
68
68
  else
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  class SubjectsController < ApplicationController
3
2
  before_action :set_subject, only: [:show, :edit, :update, :destroy]
4
3
  before_action :check_policy, only: [:index, :new, :create]
@@ -107,7 +106,7 @@ class SubjectsController < ApplicationController
107
106
  # PUT /subjects/1.json
108
107
  def update
109
108
  respond_to do |format|
110
- if @subject.update_attributes(subject_params)
109
+ if @subject.update(subject_params)
111
110
  format.html { redirect_to @subject, notice: t('controller.successfully_updated', model: t('activerecord.models.subject')) }
112
111
  format.json { head :no_content }
113
112
  else
@@ -1,4 +1,4 @@
1
- class Classification < ActiveRecord::Base
1
+ class Classification < ApplicationRecord
2
2
  belongs_to :classification_type
3
3
  belongs_to :manifestation, touch: true, optional: true
4
4
 
@@ -1,4 +1,4 @@
1
- class ClassificationType < ActiveRecord::Base
1
+ class ClassificationType < ApplicationRecord
2
2
  include MasterModel
3
3
  has_many :classifications
4
4
  validates :name, format: { with: /\A[0-9a-z][0-9a-z_\-]*[0-9a-z]\Z/ }
@@ -1,4 +1,4 @@
1
- class Subject < ActiveRecord::Base
1
+ class Subject < ApplicationRecord
2
2
  belongs_to :manifestation, touch: true, optional: true
3
3
  belongs_to :subject_type
4
4
  belongs_to :subject_heading_type
@@ -1,4 +1,4 @@
1
- class SubjectHeadingType < ActiveRecord::Base
1
+ class SubjectHeadingType < ApplicationRecord
2
2
  include MasterModel
3
3
  has_many :subjects
4
4
  validates :name, format: {with: /\A[0-9a-z][0-9a-z_\-]*[0-9a-z]\Z/}
@@ -1,4 +1,4 @@
1
- class SubjectType < ActiveRecord::Base
1
+ class SubjectType < ApplicationRecord
2
2
  include MasterModel
3
3
  has_many :subjects
4
4
  validates :name, format: {with: /\A[0-9A-Za-z][0-9a-z_\-]*[0-9a-z]\Z/}
@@ -3,7 +3,7 @@
3
3
 
4
4
  <div class="field">
5
5
  <%= f.label :name %><br />
6
- <%= f.text_field :name, class: 'short_name' %>
6
+ <%= f.text_field :name, required: true, class: 'short_name' %>
7
7
  </div>
8
8
  <div class="field">
9
9
  <%= f.label :display_name %><br />
@@ -3,7 +3,7 @@
3
3
 
4
4
  <div class="field">
5
5
  <%= f.label :name %><br />
6
- <%= f.text_field :name %>
6
+ <%= f.text_field :name, required: true %>
7
7
  </div>
8
8
  <div class="field">
9
9
  <%= f.label :display_name %><br />
@@ -3,7 +3,7 @@
3
3
 
4
4
  <div class="field">
5
5
  <%= f.label :name %><br />
6
- <%= f.text_field :name %>
6
+ <%= f.text_field :name, required: true %>
7
7
  </div>
8
8
  <div class="field">
9
9
  <%= f.label :display_name %><br />
@@ -1,3 +1,3 @@
1
1
  module EnjuSubject
2
- VERSION = "0.3.2".freeze
2
+ VERSION = "0.3.3".freeze
3
3
  end
@@ -3,9 +3,7 @@ class CreatePictureFiles < ActiveRecord::Migration[4.2]
3
3
  create_table :picture_files do |t|
4
4
  t.integer :picture_attachable_id
5
5
  t.string :picture_attachable_type
6
- t.string :content_type
7
6
  t.text :title
8
- t.string :thumbnail
9
7
  t.integer :position
10
8
 
11
9
  t.timestamps
@@ -0,0 +1,12 @@
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
@@ -0,0 +1,12 @@
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
@@ -0,0 +1,12 @@
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
@@ -0,0 +1,12 @@
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
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 2019_12_19_122214) do
13
+ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
14
14
 
15
15
  create_table "accepts", force: :cascade do |t|
16
16
  t.integer "basket_id"
@@ -402,6 +402,27 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
402
402
  t.index ["user_id"], name: "index_import_requests_on_user_id"
403
403
  end
404
404
 
405
+ create_table "item_custom_properties", force: :cascade do |t|
406
+ t.string "name", null: false
407
+ t.text "display_name", null: false
408
+ t.text "note"
409
+ t.integer "position", default: 1, null: false
410
+ t.datetime "created_at", null: false
411
+ t.datetime "updated_at", null: false
412
+ t.index ["name"], name: "index_item_custom_properties_on_name", unique: true
413
+ end
414
+
415
+ create_table "item_custom_values", force: :cascade do |t|
416
+ t.integer "item_custom_property_id", null: false
417
+ t.integer "item_id", null: false
418
+ t.text "value"
419
+ t.datetime "created_at", null: false
420
+ t.datetime "updated_at", null: false
421
+ t.index ["item_custom_property_id", "item_id"], name: "index_item_custom_values_on_custom_item_property_and_item_id", unique: true
422
+ t.index ["item_custom_property_id"], name: "index_item_custom_values_on_custom_property_id"
423
+ t.index ["item_id"], name: "index_item_custom_values_on_item_id"
424
+ end
425
+
405
426
  create_table "items", force: :cascade do |t|
406
427
  t.string "call_number"
407
428
  t.string "item_identifier"
@@ -525,6 +546,27 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
525
546
  t.datetime "updated_at"
526
547
  end
527
548
 
549
+ create_table "manifestation_custom_properties", force: :cascade do |t|
550
+ t.string "name", null: false
551
+ t.text "display_name", null: false
552
+ t.text "note"
553
+ t.integer "position", default: 1, null: false
554
+ t.datetime "created_at", null: false
555
+ t.datetime "updated_at", null: false
556
+ t.index ["name"], name: "index_manifestation_custom_properties_on_name", unique: true
557
+ end
558
+
559
+ create_table "manifestation_custom_values", force: :cascade do |t|
560
+ t.integer "manifestation_custom_property_id", null: false
561
+ t.integer "manifestation_id", null: false
562
+ t.text "value"
563
+ t.datetime "created_at", null: false
564
+ t.datetime "updated_at", null: false
565
+ t.index ["manifestation_custom_property_id", "manifestation_id"], name: "index_manifestation_custom_values_on_property_manifestation", unique: true
566
+ t.index ["manifestation_custom_property_id"], name: "index_manifestation_custom_values_on_custom_property_id"
567
+ t.index ["manifestation_id"], name: "index_manifestation_custom_values_on_manifestation_id"
568
+ end
569
+
528
570
  create_table "manifestation_relationship_types", force: :cascade do |t|
529
571
  t.string "name", null: false
530
572
  t.text "display_name"
@@ -700,9 +742,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
700
742
  create_table "picture_files", force: :cascade do |t|
701
743
  t.integer "picture_attachable_id"
702
744
  t.string "picture_attachable_type"
703
- t.string "content_type"
704
745
  t.text "title"
705
- t.string "thumbnail"
706
746
  t.integer "position"
707
747
  t.datetime "created_at"
708
748
  t.datetime "updated_at"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_subject
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-30 00:00:00.000000000 Z
11
+ date: 2020-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: enju_biblio
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.3.8
19
+ version: 0.3.10
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.3.8
26
+ version: 0.3.10
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: enju_leaf
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.3.3
33
+ version: 1.3.4
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.3.3
40
+ version: 1.3.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: sqlite3
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.8'
89
+ version: '4.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.8'
96
+ version: '4.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: simplecov
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -140,16 +140,16 @@ dependencies:
140
140
  name: coveralls
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: 0.8.23
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: 0.8.23
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: generator_spec
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -518,13 +518,15 @@ files:
518
518
  - spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb
519
519
  - spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb
520
520
  - spec/dummy/db/migrate/20191219122214_create_custom_properties.rb
521
+ - spec/dummy/db/migrate/20200425072340_create_manifestation_custom_properties.rb
522
+ - spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb
523
+ - spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb
524
+ - spec/dummy/db/migrate/20200425074822_create_item_custom_values.rb
521
525
  - spec/dummy/db/schema.rb
522
526
  - spec/dummy/db/seeds.rb
523
527
  - spec/dummy/public/404.html
524
528
  - spec/dummy/public/422.html
525
529
  - spec/dummy/public/500.html
526
- - spec/dummy/public/apple-touch-icon-precomposed.png
527
- - spec/dummy/public/apple-touch-icon.png
528
530
  - spec/dummy/public/favicon.ico
529
531
  - spec/dummy/spec/fixtures/subjects.yml
530
532
  - spec/factories/classification.rb
@@ -569,7 +571,7 @@ files:
569
571
  homepage: https://github.com/next-l/enju_subject
570
572
  licenses: []
571
573
  metadata: {}
572
- post_install_message:
574
+ post_install_message:
573
575
  rdoc_options: []
574
576
  require_paths:
575
577
  - lib
@@ -585,7 +587,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
585
587
  version: '0'
586
588
  requirements: []
587
589
  rubygems_version: 3.0.3
588
- signing_key:
590
+ signing_key:
589
591
  specification_version: 4
590
592
  summary: enju_subject plugin
591
593
  test_files:
@@ -635,10 +637,8 @@ test_files:
635
637
  - spec/dummy/Rakefile
636
638
  - spec/dummy/public/favicon.ico
637
639
  - spec/dummy/public/422.html
638
- - spec/dummy/public/apple-touch-icon.png
639
640
  - spec/dummy/public/500.html
640
641
  - spec/dummy/public/404.html
641
- - spec/dummy/public/apple-touch-icon-precomposed.png
642
642
  - spec/dummy/db/schema.rb
643
643
  - spec/dummy/db/seeds.rb
644
644
  - spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb
@@ -652,6 +652,7 @@ test_files:
652
652
  - spec/dummy/db/migrate/20150421023923_create_identities.rb
653
653
  - spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb
654
654
  - spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb
655
+ - spec/dummy/db/migrate/20200425072340_create_manifestation_custom_properties.rb
655
656
  - spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb
656
657
  - spec/dummy/db/migrate/20111124110355_create_produce_types.rb
657
658
  - spec/dummy/db/migrate/20090719201843_create_extents.rb
@@ -661,6 +662,7 @@ test_files:
661
662
  - spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
662
663
  - spec/dummy/db/migrate/124_create_bookstores.rb
663
664
  - spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
665
+ - spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb
664
666
  - spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb
665
667
  - spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb
666
668
  - spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb
@@ -709,6 +711,7 @@ test_files:
709
711
  - spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb
710
712
  - spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
711
713
  - spec/dummy/db/migrate/080_create_library_groups.rb
714
+ - spec/dummy/db/migrate/20200425074822_create_item_custom_values.rb
712
715
  - spec/dummy/db/migrate/20091214131723_create_series_statements.rb
713
716
  - spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb
714
717
  - spec/dummy/db/migrate/20081025083323_create_countries.rb
@@ -808,6 +811,7 @@ test_files:
808
811
  - spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb
809
812
  - spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb
810
813
  - spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb
814
+ - spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb
811
815
  - spec/dummy/db/migrate/120_create_baskets.rb
812
816
  - spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb
813
817
  - spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb
File without changes