enju_subject 0.3.4 → 0.4.0.beta.1
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 +4 -4
- data/README.md +2 -3
- data/app/controllers/classifications_controller.rb +1 -0
- data/app/controllers/subjects_controller.rb +2 -1
- data/app/views/classification_types/index.html.erb +1 -1
- data/app/views/classification_types/show.html.erb +1 -1
- data/app/views/classifications/index.html.erb +1 -1
- data/app/views/classifications/show.html.erb +1 -1
- data/app/views/manifestations/_classification_detail.html.erb +1 -1
- data/app/views/manifestations/_classification_fields.html.erb +1 -1
- data/app/views/manifestations/_subject_detail.html.erb +1 -1
- data/app/views/manifestations/_subject_facet.html.erb +1 -1
- data/app/views/manifestations/_subject_fields.html.erb +2 -2
- data/app/views/subject_heading_types/index.html.erb +1 -1
- data/app/views/subject_heading_types/show.html.erb +1 -1
- data/app/views/subject_types/index.html.erb +1 -1
- data/app/views/subject_types/show.html.erb +2 -2
- data/app/views/subjects/_form.html.erb +2 -2
- data/app/views/subjects/index.atom.builder +1 -1
- data/app/views/subjects/index.rss.builder +1 -1
- data/app/views/subjects/show.html.erb +2 -2
- data/lib/enju_subject/version.rb +1 -1
- data/lib/generators/enju_subject/setup/templates/db/fixtures/classification_types.yml +20 -8
- data/lib/generators/enju_subject/setup/templates/db/fixtures/subject_heading_types.yml +0 -20
- data/lib/generators/enju_subject/setup/templates/db/fixtures/subject_types.yml +13 -0
- data/spec/dummy/app/models/user.rb +1 -1
- data/spec/dummy/bin/bundle +1 -1
- data/spec/dummy/bin/setup +1 -3
- data/spec/dummy/bin/update +4 -2
- data/spec/dummy/bin/yarn +3 -3
- data/spec/dummy/config/database.yml +70 -9
- data/spec/dummy/config/initializers/assets.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +2 -0
- data/spec/dummy/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
- data/spec/dummy/db/migrate/20190630115523_add_login_banner_translations_to_library_group.rb +6 -0
- data/spec/dummy/db/migrate/20190630151446_add_display_name_translations_to_role.rb +5 -0
- data/spec/dummy/db/migrate/20190712163038_add_display_name_translations_to_carrier_type.rb +21 -0
- data/spec/dummy/db/migrate/20190713114940_add_profile_id_to_user.rb +5 -0
- data/spec/dummy/db/migrate/20190713115451_add_full_name_translations_to_profile.rb +5 -0
- data/spec/dummy/db/schema.rb +125 -149
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/factories/profile.rb +7 -1
- data/spec/factories/user.rb +25 -31
- data/spec/fixtures/agent_types.yml +11 -11
- data/spec/fixtures/carrier_types.yml +28 -24
- data/spec/fixtures/libraries.yml +102 -0
- data/spec/fixtures/library_groups.yml +12 -6
- data/spec/fixtures/profiles.yml +10 -13
- data/spec/fixtures/roles.yml +22 -5
- data/spec/fixtures/shelves.yml +47 -0
- data/spec/fixtures/subject_types.yml +4 -4
- data/spec/fixtures/user_groups.yml +26 -6
- data/spec/fixtures/users.yml +8 -1
- data/spec/rails_helper.rb +5 -1
- metadata +250 -330
- data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +0 -5
- data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +0 -5
- data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +0 -12
- data/spec/dummy/db/migrate/20200425072340_create_manifestation_custom_properties.rb +0 -12
- data/spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb +0 -12
- data/spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb +0 -12
- data/spec/dummy/db/migrate/20200425074822_create_item_custom_values.rb +0 -12
- data/spec/lib/generators/enju_subject/setup/setup_generator_spec.rb +0 -33
@@ -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
|