enju_loc 0.3.0 → 0.3.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 +5 -5
- data/MIT-LICENSE +0 -0
- data/README.md +15 -0
- data/Rakefile +1 -1
- data/lib/enju_loc/version.rb +1 -1
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/config/database.yml +17 -22
- data/spec/dummy/db/migrate/001_create_agents.rb +6 -6
- data/spec/dummy/db/migrate/005_create_manifestations.rb +9 -9
- data/spec/dummy/db/migrate/006_create_items.rb +5 -5
- data/spec/dummy/db/migrate/012_create_owns.rb +2 -2
- data/spec/dummy/db/migrate/015_create_creates.rb +2 -2
- data/spec/dummy/db/migrate/047_create_produces.rb +2 -2
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +1 -1
- data/spec/dummy/db/migrate/077_create_user_groups.rb +1 -1
- data/spec/dummy/db/migrate/112_create_frequencies.rb +1 -1
- data/spec/dummy/db/migrate/117_create_form_of_works.rb +1 -1
- data/spec/dummy/db/migrate/124_create_bookstores.rb +1 -1
- data/spec/dummy/db/migrate/125_create_donates.rb +2 -2
- data/spec/dummy/db/migrate/130_create_request_status_types.rb +1 -1
- data/spec/dummy/db/migrate/131_create_request_types.rb +1 -1
- data/spec/dummy/db/migrate/133_create_agent_merges.rb +1 -1
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +2 -2
- data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +1 -1
- data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +5 -5
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +4 -4
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +5 -5
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +1 -1
- data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +1 -1
- data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +1 -1
- data/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +1 -1
- data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +1 -1
- data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +1 -1
- data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +1 -1
- data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +2 -2
- data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +1 -1
- data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +2 -2
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +0 -8
- 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/migrate/20190818075603_add_memo_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +5 -0
- data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +12 -0
- data/spec/dummy/db/schema.rb +15 -1
- metadata +283 -230
- data/README.rdoc +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6696223bb3ce8643658c537e98b2cb28d1e9efc81f0fdc0375410e068bbde018
|
4
|
+
data.tar.gz: 3ee3afaf8dbbf0855bca7b76480035c4deb617785d367b158b37b329dc3e083e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 195657c2ff5e432af9b2e585ae15d97d036b0b2fe4ae97b378979487d305e628c5eb409abf51723b90e2189a7c917583bd406a86915aa2b1de3e7d5f78755b37
|
7
|
+
data.tar.gz: 506af0bec37ecc62ab58545533d3756d36a15147b20a8e4c93704b88294ae7e14cf727089b131dc9d7810d1b2b101650d5c448ab27850a1d7ceec0868d342780
|
data/MIT-LICENSE
CHANGED
File without changes
|
data/README.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# EnjuLoc
|
2
|
+
[<img src="https://travis-ci.com/next-l/enju_ndl.svg?branch=1.3" alt="Build
|
3
|
+
Status" />](https://travis-ci.com/next-l/enju_ndl) [<img
|
4
|
+
src="https://coveralls.io/repos/next-l/enju_ndl/badge.svg?branch=1.3&service=g
|
5
|
+
ithub" alt="Coverage Status"
|
6
|
+
/>](https://coveralls.io/github/next-l/enju_ndl?branch=1.3) [<img
|
7
|
+
src="https://hakiri.io/github/next-l/enju_loc/1.3.svg" alt="security"
|
8
|
+
/>](https://hakiri.io/github/next-l/enju_loc/1.3)
|
9
|
+
|
10
|
+
This project rocks and uses MIT-LICENSE.
|
11
|
+
|
12
|
+
## 製作者・貢献者 (Authors and contributors)
|
13
|
+
* [TAKAKU, Masao](https://github.com/masao) ([@tmasao](https://twitter.com/tmasao))
|
14
|
+
* [TANABE, Kosuke](https://github.com/nabeta) ([@nabeta](https://twitter.com/nabeta))
|
15
|
+
* [Project Next-L](https://www.next-l.jp) ([@ProjectNextL](https://twitter.com/ProjectNextL))
|
data/Rakefile
CHANGED
data/lib/enju_loc/version.rb
CHANGED
@@ -8,7 +8,7 @@ require "enju_loc"
|
|
8
8
|
module Dummy
|
9
9
|
class Application < Rails::Application
|
10
10
|
# Initialize configuration defaults for originally generated Rails version.
|
11
|
-
config.load_defaults 5.
|
11
|
+
config.load_defaults 5.2
|
12
12
|
|
13
13
|
# Settings in config/environments/* take precedence over those specified here.
|
14
14
|
# Application configuration should go into files in config/initializers
|
@@ -1,30 +1,25 @@
|
|
1
|
-
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
#
|
7
|
+
default: &default
|
2
8
|
adapter: sqlite3
|
3
|
-
|
4
|
-
|
5
|
-
mysql: &mysql
|
6
|
-
adapter: mysql2
|
7
|
-
username: root
|
8
|
-
password:
|
9
|
-
database: enju_<%= Rails.env %>
|
10
|
-
|
11
|
-
postgresql: &postgresql
|
12
|
-
adapter: postgresql
|
13
|
-
username: postgres
|
14
|
-
password:
|
15
|
-
database: enju_<%= Rails.env %>
|
16
|
-
|
17
|
-
defaults: &defaults
|
18
|
-
pool: 5
|
9
|
+
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
19
10
|
timeout: 5000
|
20
|
-
host: localhost
|
21
|
-
<<: *<%= ENV['DB'] || "sqlite" %>
|
22
11
|
|
23
12
|
development:
|
24
|
-
<<: *
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
25
15
|
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
26
19
|
test:
|
27
|
-
<<: *
|
20
|
+
<<: *default
|
21
|
+
database: db/test.sqlite3
|
28
22
|
|
29
23
|
production:
|
30
|
-
<<: *
|
24
|
+
<<: *default
|
25
|
+
database: db/production.sqlite3
|
@@ -32,13 +32,13 @@ class CreateAgents < ActiveRecord::Migration[4.2]
|
|
32
32
|
t.text :region
|
33
33
|
t.datetime :date_of_birth
|
34
34
|
t.datetime :date_of_death
|
35
|
-
t.integer :language_id, :
|
36
|
-
t.integer :country_id, :
|
37
|
-
t.integer :agent_type_id, :
|
38
|
-
t.integer :lock_version, :
|
35
|
+
t.integer :language_id, default: 1, null: false
|
36
|
+
t.integer :country_id, default: 1, null: false
|
37
|
+
t.integer :agent_type_id, default: 1, null: false
|
38
|
+
t.integer :lock_version, default: 0, null: false
|
39
39
|
t.text :note
|
40
|
-
t.integer :required_role_id, :
|
41
|
-
t.integer :required_score, :
|
40
|
+
t.integer :required_role_id, default: 1, null: false
|
41
|
+
t.integer :required_score, default: 0, null: false
|
42
42
|
t.text :email
|
43
43
|
t.text :url
|
44
44
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class CreateManifestations < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :manifestations do |t|
|
4
|
-
t.text :original_title, :
|
4
|
+
t.text :original_title, null: false
|
5
5
|
t.text :title_alternative
|
6
6
|
t.text :title_transcription
|
7
7
|
t.string :classification_number
|
@@ -11,8 +11,8 @@ class CreateManifestations < ActiveRecord::Migration[4.2]
|
|
11
11
|
t.timestamps
|
12
12
|
t.datetime :deleted_at
|
13
13
|
t.string :access_address
|
14
|
-
t.integer :language_id, :
|
15
|
-
t.integer :carrier_type_id, :
|
14
|
+
t.integer :language_id, default: 1, null: false
|
15
|
+
t.integer :carrier_type_id, default: 1, null: false
|
16
16
|
t.integer :start_page
|
17
17
|
t.integer :end_page
|
18
18
|
t.integer :height
|
@@ -25,12 +25,12 @@ class CreateManifestations < ActiveRecord::Migration[4.2]
|
|
25
25
|
t.string :serial_number_string
|
26
26
|
t.integer :edition
|
27
27
|
t.text :note
|
28
|
-
t.boolean :repository_content, :
|
29
|
-
t.integer :lock_version, :
|
30
|
-
t.integer :required_role_id, :
|
31
|
-
t.integer :required_score, :
|
32
|
-
t.integer :frequency_id, :
|
33
|
-
t.boolean :subscription_master, :
|
28
|
+
t.boolean :repository_content, default: false, null: false
|
29
|
+
t.integer :lock_version, default: 0, null: false
|
30
|
+
t.integer :required_role_id, default: 1, null: false
|
31
|
+
t.integer :required_score, default: 0, null: false
|
32
|
+
t.integer :frequency_id, default: 1, null: false
|
33
|
+
t.boolean :subscription_master, default: false, null: false
|
34
34
|
end
|
35
35
|
#add_index :manifestations, :carrier_type_id
|
36
36
|
#add_index :manifestations, :required_role_id
|
@@ -5,14 +5,14 @@ class CreateItems < ActiveRecord::Migration[4.2]
|
|
5
5
|
t.string :item_identifier
|
6
6
|
t.timestamps
|
7
7
|
t.datetime :deleted_at
|
8
|
-
t.integer :shelf_id, :
|
9
|
-
t.boolean :include_supplements, :
|
8
|
+
t.integer :shelf_id, default: 1, null: false
|
9
|
+
t.boolean :include_supplements, default: false, null: false
|
10
10
|
t.text :note
|
11
11
|
t.string :url
|
12
12
|
t.integer :price
|
13
|
-
t.integer :lock_version, :
|
14
|
-
t.integer :required_role_id, :
|
15
|
-
t.integer :required_score, :
|
13
|
+
t.integer :lock_version, default: 0, null: false
|
14
|
+
t.integer :required_role_id, default: 1, null: false
|
15
|
+
t.integer :required_score, default: 0, null: false
|
16
16
|
end
|
17
17
|
add_index :items, :shelf_id
|
18
18
|
add_index :items, :item_identifier
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateOwns < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :owns do |t|
|
4
|
-
t.references :agent, :
|
5
|
-
t.references :item, :
|
4
|
+
t.references :agent, null: false
|
5
|
+
t.references :item, null: false
|
6
6
|
t.integer :position
|
7
7
|
t.timestamps
|
8
8
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateCreates < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :creates do |t|
|
4
|
-
t.references :agent, :
|
5
|
-
t.references :work, :
|
4
|
+
t.references :agent, null: false
|
5
|
+
t.references :work, null: false
|
6
6
|
t.integer :position
|
7
7
|
t.timestamps
|
8
8
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateProduces < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :produces do |t|
|
4
|
-
t.references :agent, :
|
5
|
-
t.references :manifestation, :
|
4
|
+
t.references :agent, null: false
|
5
|
+
t.references :manifestation, null: false
|
6
6
|
t.integer :position
|
7
7
|
t.timestamps
|
8
8
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateRealizes < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :realizes do |t|
|
4
|
-
t.references :agent, :
|
5
|
-
t.references :expression, :
|
4
|
+
t.references :agent, null: false
|
5
|
+
t.references :expression, null: false
|
6
6
|
t.integer :position
|
7
7
|
|
8
8
|
t.timestamps
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class CreateSearchEngines < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :search_engines do |t|
|
4
|
-
t.string :name, :
|
4
|
+
t.string :name, null: false
|
5
5
|
t.text :display_name
|
6
|
-
t.string :url, :
|
7
|
-
t.text :base_url, :
|
8
|
-
t.text :http_method, :
|
9
|
-
t.text :query_param, :
|
6
|
+
t.string :url, null: false
|
7
|
+
t.text :base_url, null: false
|
8
|
+
t.text :http_method, null: false
|
9
|
+
t.text :query_param, null: false
|
10
10
|
t.text :additional_param
|
11
11
|
t.text :note
|
12
12
|
t.integer :position
|
@@ -12,11 +12,11 @@ class CreateCountries < ActiveRecord::Migration[4.2]
|
|
12
12
|
|
13
13
|
def change
|
14
14
|
create_table :countries do |t|
|
15
|
-
t.string :name, :
|
15
|
+
t.string :name, size: 80, null: false
|
16
16
|
t.text :display_name
|
17
|
-
t.string :alpha_2, :
|
18
|
-
t.string :alpha_3, :
|
19
|
-
t.string :numeric_3, :
|
17
|
+
t.string :alpha_2, size: 2
|
18
|
+
t.string :alpha_3, size: 3
|
19
|
+
t.string :numeric_3, size: 3
|
20
20
|
t.text :note
|
21
21
|
t.integer :position
|
22
22
|
end
|
@@ -6,16 +6,16 @@ class CreateLanguages < ActiveRecord::Migration[4.2]
|
|
6
6
|
|
7
7
|
def change
|
8
8
|
create_table :languages do |t|
|
9
|
-
t.string :name, :
|
9
|
+
t.string :name, null: false
|
10
10
|
t.string :native_name
|
11
11
|
t.text :display_name
|
12
|
-
t.string :iso_639_1, :
|
13
|
-
t.string :iso_639_2, :
|
14
|
-
t.string :iso_639_3, :
|
12
|
+
t.string :iso_639_1, size: 3
|
13
|
+
t.string :iso_639_2, size: 3
|
14
|
+
t.string :iso_639_3, size: 3
|
15
15
|
t.text :note
|
16
16
|
t.integer :position
|
17
17
|
end
|
18
|
-
add_index :languages, :name, :
|
18
|
+
add_index :languages, :name, unique: true
|
19
19
|
add_index :languages, :iso_639_1
|
20
20
|
add_index :languages, :iso_639_2
|
21
21
|
add_index :languages, :iso_639_3
|
@@ -10,6 +10,6 @@ class CreatePictureFiles < ActiveRecord::Migration[4.2]
|
|
10
10
|
|
11
11
|
t.timestamps
|
12
12
|
end
|
13
|
-
add_index :picture_files, [:picture_attachable_id, :picture_attachable_type], :
|
13
|
+
add_index :picture_files, [:picture_attachable_id, :picture_attachable_type], name: "index_picture_files_on_picture_attachable_id_and_type"
|
14
14
|
end
|
15
15
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class AddValidPeriodForNewUserToUserGroup < ActiveRecord::Migration[4.2]
|
2
2
|
def self.up
|
3
|
-
add_column :user_groups, :valid_period_for_new_user, :integer, :
|
3
|
+
add_column :user_groups, :valid_period_for_new_user, :integer, default: 0, null: false
|
4
4
|
add_column :user_groups, :expired_at, :timestamp
|
5
5
|
end
|
6
6
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateSeriesStatementMerges < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :series_statement_merges do |t|
|
4
|
-
t.integer :series_statement_id, :
|
5
|
-
t.integer :series_statement_merge_list_id, :
|
4
|
+
t.integer :series_statement_id, null: false
|
5
|
+
t.integer :series_statement_merge_list_id, null: false
|
6
6
|
|
7
7
|
t.timestamps
|
8
8
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateIdentifiers < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :identifiers do |t|
|
4
|
-
t.string :body, :
|
5
|
-
t.integer :identifier_type_id, :
|
4
|
+
t.string :body, null: false
|
5
|
+
t.integer :identifier_type_id, null: false
|
6
6
|
t.integer :manifestation_id
|
7
7
|
t.boolean :primary
|
8
8
|
t.integer :position
|
@@ -8,19 +8,11 @@ class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[4.2]
|
|
8
8
|
migrate_data: true
|
9
9
|
})
|
10
10
|
end
|
11
|
-
|
12
|
-
if defined?(AwesomeHstoreTranslate)
|
13
|
-
add_column :library_groups, :login_banner, :hstore
|
14
|
-
end
|
15
11
|
end
|
16
12
|
|
17
13
|
def down
|
18
14
|
if defined?(Globalize)
|
19
15
|
LibraryGroup.drop_translation_table! migrate_data: true
|
20
16
|
end
|
21
|
-
|
22
|
-
if defined?(AwesomeHstoreTranslate)
|
23
|
-
remove_column :library_groups, :login_banner
|
24
|
-
end
|
25
17
|
end
|
26
18
|
end
|
@@ -0,0 +1,12 @@
|
|
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
|