enju_ndl 0.3.3 → 0.4.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +2 -7
- data/Rakefile +24 -13
- data/app/models/concerns/enju_ndl/enju_agent.rb +12 -0
- data/{lib/enju_ndl/ndl_search.rb → app/models/concerns/enju_ndl/enju_manifestation.rb} +40 -34
- data/{lib/enju_ndl/crd.rb → app/models/concerns/enju_ndl/enju_question.rb} +12 -9
- data/app/models/jpno_record.rb +14 -0
- data/app/models/ndl_bib_id_record.rb +14 -0
- data/app/models/ndl_book.rb +2 -2
- data/app/models/ndla_record.rb +14 -0
- data/db/migrate/20170116150432_create_jpno_records.rb +10 -0
- data/db/migrate/20171126072934_create_ndla_records.rb +10 -0
- data/db/migrate/20190501043418_create_ndl_bib_id_records.rb +10 -0
- data/lib/enju_ndl/version.rb +1 -1
- data/lib/enju_ndl.rb +1 -21
- data/spec/dummy/app/models/user.rb +5 -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/application.rb +2 -1
- data/spec/dummy/config/database.yml +70 -9
- data/spec/dummy/config/initializers/assets.rb +1 -1
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +2 -4
- data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +4 -5
- 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 +195 -147
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/fixtures/agent_types.yml +10 -11
- data/spec/fixtures/carrier_types.yml +28 -24
- data/spec/fixtures/frequencies.yml +17 -25
- data/spec/fixtures/profiles.yml +9 -12
- data/spec/fixtures/roles.yml +16 -13
- data/spec/fixtures/users.yml +7 -0
- data/spec/rails_helper.rb +5 -1
- metadata +360 -428
- data/app/assets/config/enju_ndl_manifest.js +0 -0
- 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
Binary file
|
@@ -2,21 +2,21 @@
|
|
2
2
|
agent_type_00001:
|
3
3
|
id: 1
|
4
4
|
name: person
|
5
|
-
|
5
|
+
display_name_translations: {"en": "Person", "ja": "個人"}
|
6
6
|
note:
|
7
7
|
position: 1
|
8
8
|
|
9
9
|
agent_type_00002:
|
10
10
|
id: 2
|
11
11
|
name: corporate_body
|
12
|
-
|
12
|
+
display_name_translations: {"en": "CorporateBody", "ja": "団体"}
|
13
13
|
note:
|
14
14
|
position: 2
|
15
15
|
|
16
16
|
agent_type_00003:
|
17
17
|
id: 3
|
18
18
|
name: conference
|
19
|
-
|
19
|
+
display_name_translations: {"en": "Conference", "ja": "会議"}
|
20
20
|
note:
|
21
21
|
position: 3
|
22
22
|
|
@@ -24,12 +24,11 @@ agent_type_00003:
|
|
24
24
|
#
|
25
25
|
# Table name: agent_types
|
26
26
|
#
|
27
|
-
# id
|
28
|
-
# name
|
29
|
-
#
|
30
|
-
# note
|
31
|
-
# position
|
32
|
-
# created_at
|
33
|
-
# updated_at
|
27
|
+
# id :bigint not null, primary key
|
28
|
+
# name :string not null
|
29
|
+
# display_name_translations :jsonb not null
|
30
|
+
# note :text
|
31
|
+
# position :integer default(1), not null
|
32
|
+
# created_at :datetime not null
|
33
|
+
# updated_at :datetime not null
|
34
34
|
#
|
35
|
-
|
@@ -1,17 +1,7 @@
|
|
1
1
|
---
|
2
|
-
carrier_type_00004:
|
3
|
-
name: file
|
4
|
-
display_name: file
|
5
|
-
updated_at: 2007-12-24 01:30:50.637433 +09:00
|
6
|
-
id: 4
|
7
|
-
note: !binary |
|
8
|
-
44Kz44Oz44OU44Ol44O844K/44Gu44OV44Kh44Kk44Or44Gn44GZ44CC
|
9
|
-
|
10
|
-
created_at: 2007-12-24 01:30:50.637433 +09:00
|
11
|
-
position: 4
|
12
2
|
carrier_type_00001:
|
13
|
-
name:
|
14
|
-
|
3
|
+
name: volume
|
4
|
+
display_name_translations: {"en": "Volume", "ja": "Volume"}
|
15
5
|
updated_at: 2007-11-20 16:04:29.853828 +09:00
|
16
6
|
id: 1
|
17
7
|
note: !binary |
|
@@ -20,32 +10,46 @@ carrier_type_00001:
|
|
20
10
|
created_at: 2007-11-20 15:47:03.641530 +09:00
|
21
11
|
position: 1
|
22
12
|
carrier_type_00002:
|
23
|
-
name:
|
24
|
-
|
13
|
+
name: audio_disc
|
14
|
+
display_name_translations: {"en": "Audio disc", "ja": "Audio disc"}
|
25
15
|
updated_at: 2007-12-19 01:45:26.040674 +09:00
|
26
16
|
id: 2
|
27
17
|
note: "\xE9\x9F\xB3\xE6\xA5\xBDCD\xE3\x81\xA7\xE3\x81\x99\xE3\x80\x82"
|
28
18
|
created_at: 2007-12-19 01:45:26.040674 +09:00
|
29
19
|
position: 2
|
30
20
|
carrier_type_00003:
|
31
|
-
name:
|
32
|
-
|
21
|
+
name: videodisc
|
22
|
+
display_name_translations: {"en": "Video disc", "ja": "Video disc"}
|
33
23
|
updated_at: 2007-12-23 04:24:23.151410 +09:00
|
34
24
|
id: 3
|
35
25
|
note: "DVD\xE3\x81\xA7\xE3\x81\x99\xE3\x80\x82"
|
36
26
|
created_at: 2007-12-23 04:24:23.151410 +09:00
|
37
27
|
position: 3
|
28
|
+
carrier_type_00004:
|
29
|
+
name: online_resource
|
30
|
+
display_name_translations: {"en": "online_resource", "ja": "online_resource"}
|
31
|
+
updated_at: 2007-12-24 01:30:50.637433 +09:00
|
32
|
+
id: 4
|
33
|
+
note: !binary |
|
34
|
+
44Kz44Oz44OU44Ol44O844K/44Gu44OV44Kh44Kk44Or44Gn44GZ44CC
|
35
|
+
|
36
|
+
created_at: 2007-12-24 01:30:50.637433 +09:00
|
37
|
+
position: 4
|
38
38
|
|
39
39
|
# == Schema Information
|
40
40
|
#
|
41
41
|
# Table name: carrier_types
|
42
42
|
#
|
43
|
-
# id
|
44
|
-
# name
|
45
|
-
# display_name
|
46
|
-
# note
|
47
|
-
# position
|
48
|
-
# created_at
|
49
|
-
# updated_at
|
43
|
+
# id :integer not null, primary key
|
44
|
+
# name :string not null
|
45
|
+
# display_name :text
|
46
|
+
# note :text
|
47
|
+
# position :integer
|
48
|
+
# created_at :datetime
|
49
|
+
# updated_at :datetime
|
50
|
+
# attachment_file_name :string
|
51
|
+
# attachment_content_type :string
|
52
|
+
# attachment_file_size :bigint
|
53
|
+
# attachment_updated_at :datetime
|
54
|
+
# display_name_translations :jsonb not null
|
50
55
|
#
|
51
|
-
|
@@ -1,56 +1,47 @@
|
|
1
1
|
---
|
2
2
|
frequency_00001:
|
3
3
|
name: unknown
|
4
|
-
|
5
|
-
ja: 不明・不定期刊"
|
4
|
+
display_name_translations: {"en": "unknown", "ja": "不明・不定期刊"}
|
6
5
|
id: 1
|
7
6
|
position: 1
|
8
7
|
frequency_00002:
|
9
8
|
name: daily
|
10
|
-
|
11
|
-
ja: 日刊"
|
9
|
+
display_name_translations: {"en": "daily", "ja": "日刊"}
|
12
10
|
id: 2
|
13
11
|
position: 2
|
14
12
|
frequency_00003:
|
15
13
|
name: weekly
|
16
|
-
|
17
|
-
ja: 週刊"
|
14
|
+
display_name_translations: {"en": "weekly", "ja": "週刊"}
|
18
15
|
id: 3
|
19
16
|
position: 3
|
20
17
|
frequency_00004:
|
21
18
|
name: biweekly
|
22
|
-
|
23
|
-
ja: 隔週刊"
|
19
|
+
display_name_translations: {"en": "biweekly", "ja": "隔週刊"}
|
24
20
|
id: 4
|
25
21
|
position: 4
|
26
22
|
frequency_00005:
|
27
23
|
name: monthly
|
28
|
-
|
29
|
-
ja: 月刊"
|
24
|
+
display_name_translations: {"en": "monthly", "ja": "月刊"}
|
30
25
|
id: 5
|
31
26
|
position: 5
|
32
27
|
frequency_00006:
|
33
28
|
name: bimonthly
|
34
|
-
|
35
|
-
ja: 隔月刊"
|
29
|
+
display_name_translations: {"en": "bimonthly", "ja": "隔月刊"}
|
36
30
|
id: 6
|
37
31
|
position: 6
|
38
32
|
frequency_00007:
|
39
33
|
name: quarterly
|
40
|
-
|
41
|
-
ja: 季刊"
|
34
|
+
display_name_translations: {"en": "quarterly", "ja": "季刊"}
|
42
35
|
id: 7
|
43
36
|
position: 7
|
44
37
|
frequency_00008:
|
45
38
|
name: yearly
|
46
|
-
|
47
|
-
ja: 年刊"
|
39
|
+
display_name_translations: {"en": "yearly", "ja": "年刊"}
|
48
40
|
id: 8
|
49
41
|
position: 8
|
50
42
|
frequency_00009:
|
51
43
|
name: biyearly
|
52
|
-
|
53
|
-
ja: 隔年刊"
|
44
|
+
display_name_translations: {"en": "biyearly", "ja": "隔年刊"}
|
54
45
|
id: 9
|
55
46
|
position: 9
|
56
47
|
|
@@ -58,11 +49,12 @@ frequency_00009:
|
|
58
49
|
#
|
59
50
|
# Table name: frequencies
|
60
51
|
#
|
61
|
-
# id
|
62
|
-
# name
|
63
|
-
# display_name
|
64
|
-
# note
|
65
|
-
# position
|
66
|
-
# created_at
|
67
|
-
# updated_at
|
52
|
+
# id :integer not null, primary key
|
53
|
+
# name :string not null
|
54
|
+
# display_name :text
|
55
|
+
# note :text
|
56
|
+
# position :integer
|
57
|
+
# created_at :datetime
|
58
|
+
# updated_at :datetime
|
59
|
+
# display_name_translations :jsonb not null
|
68
60
|
#
|
data/spec/fixtures/profiles.yml
CHANGED
@@ -3,7 +3,6 @@ admin:
|
|
3
3
|
updated_at: 2008-05-31 13:16:30.163731 +09:00
|
4
4
|
user_group_id: 2
|
5
5
|
id: 1
|
6
|
-
user_id: 1
|
7
6
|
note:
|
8
7
|
library_id: 2
|
9
8
|
created_at: 2007-11-19 16:58:32.111941 +09:00
|
@@ -14,7 +13,6 @@ librarian1:
|
|
14
13
|
updated_at: 2008-05-31 12:41:16.337474 +09:00
|
15
14
|
user_group_id: 1
|
16
15
|
id: 2
|
17
|
-
user_id: 2
|
18
16
|
note:
|
19
17
|
library_id: 1
|
20
18
|
created_at: 2007-11-19 16:58:33.172441 +09:00
|
@@ -25,7 +23,6 @@ user1:
|
|
25
23
|
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
26
24
|
user_group_id: 1
|
27
25
|
id: 3
|
28
|
-
user_id: 3
|
29
26
|
note:
|
30
27
|
library_id: 2
|
31
28
|
created_at: 2007-11-19 16:58:34.637413 +09:00
|
@@ -36,7 +33,6 @@ librarian2:
|
|
36
33
|
updated_at: 2008-05-31 12:42:23.340575 +09:00
|
37
34
|
user_group_id: 1
|
38
35
|
id: 4
|
39
|
-
user_id: 4
|
40
36
|
note:
|
41
37
|
library_id: 2
|
42
38
|
created_at: 2008-01-18 12:24:04.222344 +09:00
|
@@ -47,7 +43,6 @@ user2:
|
|
47
43
|
updated_at: 2008-05-31 12:42:44.711117 +09:00
|
48
44
|
user_group_id: 1
|
49
45
|
id: 5
|
50
|
-
user_id: 5
|
51
46
|
note:
|
52
47
|
library_id: 1
|
53
48
|
created_at: 2008-01-18 13:29:06.922728 +09:00
|
@@ -58,7 +53,6 @@ user3:
|
|
58
53
|
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
59
54
|
user_group_id: 1
|
60
55
|
id: 6
|
61
|
-
user_id: 6
|
62
56
|
note:
|
63
57
|
library_id: 2
|
64
58
|
created_at: 2007-11-19 16:58:34.637413 +09:00
|
@@ -69,7 +63,6 @@ user4:
|
|
69
63
|
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
70
64
|
user_group_id: 1
|
71
65
|
id: 7
|
72
|
-
user_id: 7
|
73
66
|
note:
|
74
67
|
library_id: 2
|
75
68
|
created_at: 2007-11-19 16:58:34.637413 +09:00
|
@@ -85,14 +78,18 @@ user4:
|
|
85
78
|
# user_id :integer
|
86
79
|
# user_group_id :integer
|
87
80
|
# library_id :integer
|
88
|
-
# locale :string
|
89
|
-
# user_number :string
|
81
|
+
# locale :string
|
82
|
+
# user_number :string
|
90
83
|
# full_name :text
|
91
84
|
# note :text
|
92
85
|
# keyword_list :text
|
93
86
|
# required_role_id :integer
|
94
|
-
# created_at :datetime
|
95
|
-
# updated_at :datetime
|
96
|
-
# checkout_icalendar_token :string
|
87
|
+
# created_at :datetime
|
88
|
+
# updated_at :datetime
|
89
|
+
# checkout_icalendar_token :string
|
97
90
|
# save_checkout_history :boolean default(FALSE), not null
|
91
|
+
# expired_at :datetime
|
92
|
+
# full_name_transcription :text
|
93
|
+
# date_of_birth :datetime
|
94
|
+
# full_name_translations :jsonb not null
|
98
95
|
#
|
data/spec/fixtures/roles.yml
CHANGED
@@ -1,35 +1,38 @@
|
|
1
1
|
---
|
2
2
|
role_00001:
|
3
3
|
name: Guest
|
4
|
-
|
4
|
+
display_name_translations: {"en": "Guest", "ja": "ゲスト"}
|
5
5
|
id: 1
|
6
6
|
note:
|
7
|
+
position: 1
|
7
8
|
role_00002:
|
8
9
|
name: User
|
9
|
-
|
10
|
+
display_name_translations: {"en": "User", "ja": "一般利用者"}
|
10
11
|
id: 2
|
11
12
|
note:
|
13
|
+
position: 2
|
12
14
|
role_00003:
|
13
15
|
name: Librarian
|
14
|
-
|
16
|
+
display_name_translations: {"en": "Librarian", "ja": "図書館員"}
|
15
17
|
id: 3
|
16
18
|
note:
|
19
|
+
position: 3
|
17
20
|
role_00004:
|
18
21
|
name: Administrator
|
19
|
-
|
22
|
+
display_name_translations: {"en": "Administrator", "ja": "管理者"}
|
20
23
|
id: 4
|
21
|
-
note:
|
24
|
+
note:
|
25
|
+
position: 4
|
22
26
|
|
23
27
|
# == Schema Information
|
24
28
|
#
|
25
29
|
# Table name: roles
|
26
30
|
#
|
27
|
-
# id
|
28
|
-
# name
|
29
|
-
#
|
30
|
-
# note
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
31
|
+
# id :bigint not null, primary key
|
32
|
+
# name :string not null
|
33
|
+
# display_name_translations :jsonb not null
|
34
|
+
# note :text
|
35
|
+
# position :integer default(1), not null
|
36
|
+
# created_at :datetime not null
|
37
|
+
# updated_at :datetime not null
|
34
38
|
#
|
35
|
-
|
data/spec/fixtures/users.yml
CHANGED
@@ -6,6 +6,7 @@ admin:
|
|
6
6
|
username: enjuadmin
|
7
7
|
email: tanabe@kamata.lib.teu.ac.jp
|
8
8
|
created_at: 2007-11-19 16:58:32.111941 +09:00
|
9
|
+
profile_id: 1
|
9
10
|
librarian1:
|
10
11
|
updated_at: 2008-05-31 12:41:16.337474 +09:00
|
11
12
|
encrypted_password: $2a$10$9O2VuTccN4gHq36ARg0QReSrb1D7WrBBhZZ759RM9moHbB0W5zCzS
|
@@ -13,6 +14,7 @@ librarian1:
|
|
13
14
|
username: librarian1
|
14
15
|
email: librarian1@kamata.lib.teu.ac.jp
|
15
16
|
created_at: 2007-11-19 16:58:33.172441 +09:00
|
17
|
+
profile_id: 2
|
16
18
|
user1:
|
17
19
|
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
18
20
|
encrypted_password: $2a$10$JthS59A0BNkDOoFpCXM0V.GhhffKaoWKbzpPahYp/vTFrOyM7h/uW
|
@@ -20,6 +22,7 @@ user1:
|
|
20
22
|
username: user1
|
21
23
|
email: user1@kamata.lib.teu.ac.jp
|
22
24
|
created_at: 2007-11-19 16:58:34.637413 +09:00
|
25
|
+
profile_id: 3
|
23
26
|
librarian2:
|
24
27
|
updated_at: 2008-05-31 12:42:23.340575 +09:00
|
25
28
|
encrypted_password: $2a$10$YmmTGrYQ1Ir6oc7wXnp.GuNeO1eYLoP3sv8wMSIrTdaGw2BPwRrpS
|
@@ -27,6 +30,7 @@ librarian2:
|
|
27
30
|
username: librarian2
|
28
31
|
email: librarian2@library.example.jp
|
29
32
|
created_at: 2008-01-18 12:24:04.222344 +09:00
|
33
|
+
profile_id: 4
|
30
34
|
user2:
|
31
35
|
updated_at: 2008-05-31 12:42:44.711117 +09:00
|
32
36
|
encrypted_password: $2a$10$i7UjJhLVrJM/J7qaTwW39OXw1NiwowUEbtNHVDV0sqMLjX9.UO9ca
|
@@ -34,6 +38,7 @@ user2:
|
|
34
38
|
username: user2
|
35
39
|
email: user2@library.example.jp
|
36
40
|
created_at: 2008-01-18 13:29:06.922728 +09:00
|
41
|
+
profile_id: 5
|
37
42
|
user3:
|
38
43
|
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
39
44
|
encrypted_password: cc53de0c2d9a1a228daa9a673ec824473747e17507a6c3c4f7e5eff8821f531d4b9e23616b3ddc66fe17006b2298a556fbd567ac080e87f00f37eef8cee6c417
|
@@ -41,6 +46,7 @@ user3:
|
|
41
46
|
username: user3
|
42
47
|
email: user3@kamata.lib.teu.ac.jp
|
43
48
|
created_at: 2007-11-19 16:58:34.637413 +09:00
|
49
|
+
profile_id: 6
|
44
50
|
user4:
|
45
51
|
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
46
52
|
encrypted_password: cc53de0c2d9a1a228daa9a673ec824473747e17507a6c3c4f7e5eff8821f531d4b9e23616b3ddc66fe17006b2298a556fbd567ac080e87f00f37eef8cee6c417
|
@@ -49,3 +55,4 @@ user4:
|
|
49
55
|
email: user4@kamata.lib.teu.ac.jp
|
50
56
|
created_at: 2007-11-19 16:58:34.637413 +09:00
|
51
57
|
locked_at: <%= 1.day.ago.to_s(:db) %>
|
58
|
+
profile_id: 7
|
data/spec/rails_helper.rb
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
require 'simplecov'
|
2
2
|
require 'coveralls'
|
3
|
+
|
4
|
+
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
|
5
|
+
SimpleCov::Formatter::HTMLFormatter,
|
6
|
+
Coveralls::SimpleCov::Formatter
|
7
|
+
])
|
3
8
|
SimpleCov.start 'rails'
|
4
|
-
Coveralls.wear!
|
5
9
|
|
6
10
|
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
7
11
|
ENV["RAILS_ENV"] ||= 'test'
|