enju_subject 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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -3
  3. data/app/controllers/classifications_controller.rb +1 -0
  4. data/app/controllers/subjects_controller.rb +2 -1
  5. data/app/views/classification_types/index.html.erb +1 -1
  6. data/app/views/classification_types/show.html.erb +1 -1
  7. data/app/views/classifications/index.html.erb +1 -1
  8. data/app/views/classifications/show.html.erb +1 -1
  9. data/app/views/manifestations/_classification_detail.html.erb +1 -1
  10. data/app/views/manifestations/_classification_fields.html.erb +1 -1
  11. data/app/views/manifestations/_subject_detail.html.erb +1 -1
  12. data/app/views/manifestations/_subject_facet.html.erb +1 -1
  13. data/app/views/manifestations/_subject_fields.html.erb +2 -2
  14. data/app/views/subject_heading_types/index.html.erb +1 -1
  15. data/app/views/subject_heading_types/show.html.erb +1 -1
  16. data/app/views/subject_types/index.html.erb +1 -1
  17. data/app/views/subject_types/show.html.erb +2 -2
  18. data/app/views/subjects/_form.html.erb +2 -2
  19. data/app/views/subjects/index.atom.builder +1 -1
  20. data/app/views/subjects/index.rss.builder +1 -1
  21. data/app/views/subjects/show.html.erb +2 -2
  22. data/lib/enju_subject/version.rb +1 -1
  23. data/lib/generators/enju_subject/setup/templates/db/fixtures/classification_types.yml +20 -8
  24. data/lib/generators/enju_subject/setup/templates/db/fixtures/subject_heading_types.yml +0 -20
  25. data/lib/generators/enju_subject/setup/templates/db/fixtures/subject_types.yml +13 -0
  26. data/spec/dummy/app/models/user.rb +1 -1
  27. data/spec/dummy/bin/bundle +1 -1
  28. data/spec/dummy/bin/setup +1 -3
  29. data/spec/dummy/bin/update +4 -2
  30. data/spec/dummy/bin/yarn +3 -3
  31. data/spec/dummy/config/database.yml +70 -9
  32. data/spec/dummy/config/initializers/assets.rb +1 -1
  33. data/spec/dummy/db/development.sqlite3 +0 -0
  34. data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +2 -0
  35. data/spec/dummy/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
  36. data/spec/dummy/db/migrate/20190630115523_add_login_banner_translations_to_library_group.rb +6 -0
  37. data/spec/dummy/db/migrate/20190630151446_add_display_name_translations_to_role.rb +5 -0
  38. data/spec/dummy/db/migrate/20190712163038_add_display_name_translations_to_carrier_type.rb +21 -0
  39. data/spec/dummy/db/migrate/20190713114940_add_profile_id_to_user.rb +5 -0
  40. data/spec/dummy/db/migrate/20190713115451_add_full_name_translations_to_profile.rb +5 -0
  41. data/spec/dummy/db/schema.rb +125 -149
  42. data/spec/dummy/db/test.sqlite3 +0 -0
  43. data/spec/factories/profile.rb +7 -1
  44. data/spec/factories/user.rb +25 -31
  45. data/spec/fixtures/agent_types.yml +11 -11
  46. data/spec/fixtures/carrier_types.yml +28 -24
  47. data/spec/fixtures/libraries.yml +102 -0
  48. data/spec/fixtures/library_groups.yml +12 -6
  49. data/spec/fixtures/profiles.yml +10 -13
  50. data/spec/fixtures/roles.yml +22 -5
  51. data/spec/fixtures/shelves.yml +47 -0
  52. data/spec/fixtures/subject_types.yml +4 -4
  53. data/spec/fixtures/user_groups.yml +26 -6
  54. data/spec/fixtures/users.yml +8 -1
  55. data/spec/rails_helper.rb +5 -1
  56. metadata +250 -330
  57. data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +0 -5
  58. data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +0 -5
  59. data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +0 -12
  60. data/spec/dummy/db/migrate/20200425072340_create_manifestation_custom_properties.rb +0 -12
  61. data/spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb +0 -12
  62. data/spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb +0 -12
  63. data/spec/dummy/db/migrate/20200425074822_create_item_custom_values.rb +0 -12
  64. data/spec/lib/generators/enju_subject/setup/setup_generator_spec.rb +0 -33
@@ -1,5 +0,0 @@
1
- class AddMemoToManifestation < ActiveRecord::Migration[5.2]
2
- def change
3
- add_column :manifestations, :memo, :text
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddMemoToItem < ActiveRecord::Migration[5.2]
2
- def change
3
- add_column :items, :memo, :text
4
- end
5
- end
@@ -1,12 +0,0 @@
1
- class CreateCustomProperties < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :custom_properties do |t|
4
- t.integer :resource_id, null: false
5
- t.string :resource_type, null: false
6
- t.text :label, null: false
7
- t.text :value
8
-
9
- t.timestamps
10
- end
11
- end
12
- end
@@ -1,12 +0,0 @@
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
@@ -1,12 +0,0 @@
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
@@ -1,12 +0,0 @@
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
@@ -1,12 +0,0 @@
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
@@ -1,33 +0,0 @@
1
- require "rails_helper.rb"
2
- require "generator_spec"
3
- require 'generator_spec/test_case'
4
- require 'generators/enju_subject/setup/setup_generator'
5
-
6
- describe EnjuSubject::SetupGenerator, type: :generator do
7
- destination File.expand_path("tmp", Rails.root)
8
- before(:each) do
9
- prepare_destination
10
- %w( app/controllers/application_controller.rb app/models/user.rb ).each do |f|
11
- dist_file = "#{Rails.root}/tmp/#{f}"
12
- dist_dir = File.dirname(dist_file)
13
- mkdir_p dist_dir
14
- touch dist_file
15
- end
16
- run_generator
17
- end
18
-
19
- it "does work" do
20
- expect(destination_root).to have_structure {
21
- directory "app" do
22
- directory "models" do
23
- file "user.rb" do
24
- contains "Manifestation.include(EnjuSubject::EnjuManifestation)"
25
- end
26
- end
27
- directory "controllers" do
28
- file "application_controller.rb"
29
- end
30
- end
31
- }
32
- end
33
- end