enju_event 0.3.5 → 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/README.md +3 -3
- data/Rakefile +1 -1
- data/app/controllers/event_import_files_controller.rb +0 -1
- data/app/controllers/event_import_results_controller.rb +4 -4
- data/app/controllers/events_controller.rb +1 -1
- data/app/controllers/places_controller.rb +1 -1
- data/app/models/event.rb +37 -49
- data/app/models/event_category.rb +9 -7
- data/app/models/event_export_file.rb +9 -12
- data/app/models/event_import_file.rb +9 -5
- data/app/models/event_import_result.rb +1 -6
- data/app/views/event_categories/_form.html.erb +1 -1
- data/app/views/event_categories/index.html.erb +1 -1
- data/app/views/event_categories/show.html.erb +1 -1
- data/app/views/event_import_files/new.html.erb +2 -2
- data/app/views/event_import_files/show.html.erb +74 -70
- data/app/views/event_import_results/index.html.erb +12 -1
- data/app/views/event_import_results/index.txt.erb +3 -0
- data/app/views/events/_form.html.erb +2 -2
- data/app/views/events/index.atom.builder +2 -2
- data/app/views/events/index.html+phone.erb +2 -2
- data/app/views/events/index.html.erb +5 -5
- data/app/views/events/index.ics.erb +1 -1
- data/app/views/events/index.json.jbuilder +1 -1
- data/app/views/events/index.rss.builder +2 -2
- data/app/views/events/index.txt.erb +4 -0
- data/app/views/events/show.html+phone.erb +3 -3
- data/app/views/events/show.html.erb +3 -3
- data/app/views/layouts/calendar.html.erb +4 -4
- data/app/views/participates/index.html.erb +1 -1
- data/app/views/participates/show.html.erb +1 -1
- data/app/views/picture_files/_index_event.html.erb +1 -1
- data/config/locales/translation_en.yml +0 -1
- data/config/locales/translation_ja.yml +0 -1
- data/db/migrate/20190630153136_add_display_name_translations_to_event.rb +6 -0
- data/lib/enju_event/engine.rb +1 -0
- data/lib/enju_event/version.rb +1 -1
- data/lib/generators/enju_event/setup/setup_generator.rb +3 -3
- data/lib/generators/enju_event/setup/templates/db/fixtures/event_categories.yml +35 -6
- data/spec/controllers/event_import_results_controller_spec.rb +2 -2
- data/spec/controllers/events_controller_spec.rb +2 -2
- 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/config/initializers/mime_types.rb +0 -1
- data/spec/dummy/db/migrate/154_create_messages.rb +4 -8
- data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +3 -3
- data/spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
- data/spec/dummy/db/migrate/{20181026064038_add_login_banner_to_library_group.rb → 20190630115523_add_login_banner_translations_to_library_group.rb} +1 -1
- 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 +148 -266
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/factories/event_category.rb +4 -2
- data/spec/factories/library.rb +2 -0
- data/spec/fixtures/agent_types.yml +11 -11
- data/spec/fixtures/event_categories.yml +14 -13
- data/spec/fixtures/event_export_files.yml +1 -1
- data/spec/fixtures/events.yml +22 -29
- data/spec/fixtures/libraries.yml +30 -32
- data/spec/fixtures/library_groups.yml +44 -20
- data/spec/fixtures/shelves.yml +16 -15
- data/spec/models/event_category_spec.rb +8 -7
- data/spec/models/event_export_file_spec.rb +1 -1
- data/spec/models/event_spec.rb +14 -13
- data/spec/rails_helper.rb +5 -1
- data/spec/system/events_spec.rb +0 -5
- metadata +256 -389
- data/app/views/event_import_files/_results.html.erb +0 -26
- data/app/views/event_import_results/index.text.ruby +0 -5
- data/app/views/events/index.text.ruby +0 -7
- data/app/views/layouts/mailer.html.erb +0 -13
- data/app/views/layouts/mailer.text.erb +0 -1
- data/config/brakeman.ignore +0 -66
- data/spec/dummy/app/assets/config/manifest.js +0 -5
- data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +0 -13
- data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +0 -21
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +0 -18
- data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +0 -13
- data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +0 -6
- data/spec/dummy/db/migrate/20150421023923_create_identities.rb +0 -14
- data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +0 -5
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +0 -18
- data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +0 -22
- data/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb +0 -11
- data/spec/dummy/db/migrate/20181030072731_add_not_null_to_position_on_carrier_type.rb +0 -14
- data/spec/dummy/db/migrate/20181030074920_add_not_null_to_position_on_library.rb +0 -14
- data/spec/dummy/db/migrate/20190208135957_create_active_storage_tables.active_storage.rb +0 -27
- data/spec/dummy/db/migrate/20190311154610_create_periodicals.rb +0 -10
- data/spec/dummy/db/migrate/20190314151124_add_full_name_translations_to_create.rb +0 -7
- 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/mailers/event_export_spec.rb +0 -5
- data/spec/mailers/event_import_spec.rb +0 -5
- data/spec/mailers/previews/event_export_preview.rb +0 -4
- data/spec/mailers/previews/event_import_preview.rb +0 -4
- data/spec/system/event_import_results_spec.rb +0 -17
- data/spec/views/event_import_results/index.text.ruby_spec.rb +0 -22
Binary file
|
@@ -1,5 +1,7 @@
|
|
1
1
|
FactoryBot.define do
|
2
|
-
factory :event_category do
|
3
|
-
|
2
|
+
factory :event_category do
|
3
|
+
sequence(:name){|n| "event_category_#{n}"}
|
4
|
+
sequence(:display_name_en){|n| "event_category_#{n}"}
|
5
|
+
sequence(:display_name_ja){|n| "event_category_#{n}"}
|
4
6
|
end
|
5
7
|
end
|
data/spec/factories/library.rb
CHANGED
@@ -2,6 +2,8 @@ FactoryBot.define do
|
|
2
2
|
factory :library do |f|
|
3
3
|
f.sequence(:name){|n| "library#{n}"}
|
4
4
|
f.sequence(:short_display_name){|n| "library_#{n}"}
|
5
|
+
f.sequence(:display_name_en){|n| "library_#{n}"}
|
6
|
+
f.sequence(:display_name_ja){|n| "library_#{n}"}
|
5
7
|
f.library_group_id{LibraryGroup.first.id}
|
6
8
|
end
|
7
9
|
end
|
@@ -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,12 @@ agent_type_00003:
|
|
24
24
|
#
|
25
25
|
# Table name: agent_types
|
26
26
|
#
|
27
|
-
# id
|
28
|
-
# name
|
29
|
-
# display_name
|
30
|
-
# note
|
31
|
-
# position
|
32
|
-
# created_at
|
33
|
-
# updated_at
|
27
|
+
# id :integer not null, primary key
|
28
|
+
# name :string not null
|
29
|
+
# display_name :text
|
30
|
+
# note :text
|
31
|
+
# position :integer
|
32
|
+
# created_at :datetime
|
33
|
+
# updated_at :datetime
|
34
|
+
# display_name_translations :jsonb not null
|
34
35
|
#
|
35
|
-
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
event_category_00001:
|
3
|
-
name: unknown
|
4
|
-
|
3
|
+
name: unknown
|
4
|
+
display_name_translations: {"en": "(not specified)", "ja": "未定"}
|
5
5
|
updated_at: 2008-01-01 16:24:17.869192 +09:00
|
6
6
|
id: 1
|
7
7
|
note: ""
|
@@ -9,7 +9,7 @@ event_category_00001:
|
|
9
9
|
position: 1
|
10
10
|
event_category_00002:
|
11
11
|
name: closed
|
12
|
-
|
12
|
+
display_name_translations: {"en": "closed", "ja": "休館日"}
|
13
13
|
updated_at: 2008-01-01 16:24:32.561469 +09:00
|
14
14
|
id: 2
|
15
15
|
note: ""
|
@@ -17,7 +17,7 @@ event_category_00002:
|
|
17
17
|
position: 2
|
18
18
|
event_category_00003:
|
19
19
|
name: book_talk
|
20
|
-
|
20
|
+
display_name_translations: {"en": "talk event", "ja": "おはなし会"}
|
21
21
|
updated_at: 2008-01-01 16:24:45.267241 +09:00
|
22
22
|
id: 3
|
23
23
|
note: ""
|
@@ -25,7 +25,7 @@ event_category_00003:
|
|
25
25
|
position: 3
|
26
26
|
event_category_00004:
|
27
27
|
name: movie_theater
|
28
|
-
|
28
|
+
display_name_translations: {"en": "screening", "ja": "上映会"}
|
29
29
|
updated_at: 2008-01-01 16:24:55.261682 +09:00
|
30
30
|
id: 4
|
31
31
|
note: ""
|
@@ -33,7 +33,7 @@ event_category_00004:
|
|
33
33
|
position: 4
|
34
34
|
event_category_00005:
|
35
35
|
name: talk_event
|
36
|
-
|
36
|
+
display_name_translations: {"en": "seminar", "ja": "講演会"}
|
37
37
|
updated_at: 2008-01-01 16:25:04.251141 +09:00
|
38
38
|
id: 5
|
39
39
|
note: ""
|
@@ -44,11 +44,12 @@ event_category_00005:
|
|
44
44
|
#
|
45
45
|
# Table name: event_categories
|
46
46
|
#
|
47
|
-
# id
|
48
|
-
# name
|
49
|
-
# display_name
|
50
|
-
# note
|
51
|
-
# position
|
52
|
-
# created_at
|
53
|
-
# updated_at
|
47
|
+
# id :integer not null, primary key
|
48
|
+
# name :string not null
|
49
|
+
# display_name :text
|
50
|
+
# note :text
|
51
|
+
# position :integer
|
52
|
+
# created_at :datetime
|
53
|
+
# updated_at :datetime
|
54
|
+
# display_name_translations :jsonb not null
|
54
55
|
#
|
@@ -18,7 +18,7 @@ event_export_file_00003:
|
|
18
18
|
# user_id :integer
|
19
19
|
# event_export_file_name :string
|
20
20
|
# event_export_content_type :string
|
21
|
-
# event_export_file_size :
|
21
|
+
# event_export_file_size :bigint
|
22
22
|
# event_export_updated_at :datetime
|
23
23
|
# executed_at :datetime
|
24
24
|
# created_at :datetime
|
data/spec/fixtures/events.yml
CHANGED
@@ -4,8 +4,7 @@ event_00001:
|
|
4
4
|
event_category_id: 1
|
5
5
|
end_at: 2008-01-14 02:54:00 +09:00
|
6
6
|
name: 仕事始め
|
7
|
-
|
8
|
-
deleted_at:
|
7
|
+
display_name_translations: {"ja": "仕事始め"}
|
9
8
|
start_at: 2008-01-13 02:54:00 +09:00
|
10
9
|
id: 1
|
11
10
|
note: なんとかかんとか
|
@@ -16,8 +15,7 @@ event_00002:
|
|
16
15
|
event_category_id: 2
|
17
16
|
end_at: 2008-01-14 02:54:00 +09:00
|
18
17
|
name: テスト
|
19
|
-
|
20
|
-
deleted_at:
|
18
|
+
display_name_translations: {"ja": "テスト"}
|
21
19
|
start_at: 2008-01-13 02:54:00 +09:00
|
22
20
|
id: 2
|
23
21
|
note: テスト用のイベントです。
|
@@ -28,8 +26,7 @@ event_00003:
|
|
28
26
|
event_category_id: 1
|
29
27
|
end_at: 2008-02-05 00:00:00 +09:00
|
30
28
|
name: ミーティング
|
31
|
-
|
32
|
-
deleted_at:
|
29
|
+
display_name_translations: {"ja": "ミーティング"}
|
33
30
|
start_at: 2008-01-13 00:00:00 +09:00
|
34
31
|
id: 3
|
35
32
|
note: ""
|
@@ -40,8 +37,7 @@ event_00004:
|
|
40
37
|
event_category_id: 4
|
41
38
|
end_at: 2008-02-06 00:00:00 +09:00
|
42
39
|
name: テスト
|
43
|
-
|
44
|
-
deleted_at:
|
40
|
+
display_name_translations: {"ja": "テスト"}
|
45
41
|
start_at: 2008-02-05 00:00:00 +09:00
|
46
42
|
id: 4
|
47
43
|
note: なんとかかんとか
|
@@ -52,8 +48,7 @@ event_00005:
|
|
52
48
|
event_category_id: 1
|
53
49
|
end_at: 2008-02-08 00:00:00 +09:00
|
54
50
|
name: test
|
55
|
-
|
56
|
-
deleted_at:
|
51
|
+
display_name_translations: {"ja": "test"}
|
57
52
|
start_at: 2008-02-05 00:00:00 +09:00
|
58
53
|
id: 5
|
59
54
|
note: ""
|
@@ -64,8 +59,7 @@ event_00006:
|
|
64
59
|
event_category_id: 2
|
65
60
|
end_at: 2008-02-08 00:00:00 +09:00
|
66
61
|
name: なんとかかんとか
|
67
|
-
|
68
|
-
deleted_at:
|
62
|
+
display_name_translations: {"ja": "なんとかかんとか"}
|
69
63
|
start_at: 2008-02-05 00:00:00 +09:00
|
70
64
|
id: 6
|
71
65
|
note: ""
|
@@ -76,8 +70,7 @@ event_00007:
|
|
76
70
|
event_category_id: 1
|
77
71
|
end_at: 2008-02-08 00:00:00 +09:00
|
78
72
|
name: test
|
79
|
-
|
80
|
-
deleted_at:
|
73
|
+
display_name_translations: {"ja": "test"}
|
81
74
|
start_at: 2008-02-05 00:00:00 +09:00
|
82
75
|
id: 7
|
83
76
|
note: test
|
@@ -88,8 +81,7 @@ event_00008:
|
|
88
81
|
event_category_id: 1
|
89
82
|
end_at: 2008-02-05 15:00:00 +09:00
|
90
83
|
name: test
|
91
|
-
|
92
|
-
deleted_at:
|
84
|
+
display_name_translations: {"ja": "test"}
|
93
85
|
start_at: 2008-02-05 15:00:00 +09:00
|
94
86
|
id: 8
|
95
87
|
note: test
|
@@ -100,17 +92,18 @@ event_00008:
|
|
100
92
|
#
|
101
93
|
# Table name: events
|
102
94
|
#
|
103
|
-
# id
|
104
|
-
# library_id
|
105
|
-
# event_category_id
|
106
|
-
# name
|
107
|
-
# note
|
108
|
-
# start_at
|
109
|
-
# end_at
|
110
|
-
# all_day
|
111
|
-
# deleted_at
|
112
|
-
# display_name
|
113
|
-
# created_at
|
114
|
-
# updated_at
|
115
|
-
# place_id
|
95
|
+
# id :integer not null, primary key
|
96
|
+
# library_id :integer not null
|
97
|
+
# event_category_id :integer not null
|
98
|
+
# name :string
|
99
|
+
# note :text
|
100
|
+
# start_at :datetime
|
101
|
+
# end_at :datetime
|
102
|
+
# all_day :boolean default(FALSE), not null
|
103
|
+
# deleted_at :datetime
|
104
|
+
# display_name :text
|
105
|
+
# created_at :datetime
|
106
|
+
# updated_at :datetime
|
107
|
+
# place_id :integer
|
108
|
+
# display_name_translations :jsonb not null
|
116
109
|
#
|
data/spec/fixtures/libraries.yml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
library_00001:
|
3
3
|
name: web
|
4
4
|
short_display_name: Web
|
5
|
-
|
5
|
+
display_name_translations: {"en": "World Wide Web", "ja": "ウェブ"}
|
6
6
|
fax_number:
|
7
7
|
updated_at: 2007-08-31 00:18:06.662349 +09:00
|
8
8
|
telephone_number_1:
|
@@ -19,7 +19,7 @@ library_00001:
|
|
19
19
|
library_00002:
|
20
20
|
name: kamata
|
21
21
|
short_display_name: 蒲田
|
22
|
-
|
22
|
+
display_name_translations: {"en": "Kamata Library", "ja": "蒲田図書館"}
|
23
23
|
fax_number: ""
|
24
24
|
updated_at: 2007-08-31 00:18:06.662349 +09:00
|
25
25
|
telephone_number_1: 81-3-3732-5111
|
@@ -37,7 +37,7 @@ library_00002:
|
|
37
37
|
library_00003:
|
38
38
|
name: hachioji
|
39
39
|
short_display_name: 八王子
|
40
|
-
|
40
|
+
display_name_translations: {"en": "Hachioji Library", "ja": "八王子図書館"}
|
41
41
|
fax_number: 042-637-2116
|
42
42
|
updated_at: 2007-08-31 00:18:16.188285 +09:00
|
43
43
|
telephone_number_1: 042-637-2033
|
@@ -54,7 +54,7 @@ library_00003:
|
|
54
54
|
library_00004:
|
55
55
|
name: mita
|
56
56
|
short_display_name: 三田
|
57
|
-
|
57
|
+
display_name_translations: {"en": "Mita Library", "ja": "三田図書館"}
|
58
58
|
fax_number: ""
|
59
59
|
updated_at: 2007-08-31 00:18:20.043951 +09:00
|
60
60
|
telephone_number_1: ""
|
@@ -73,32 +73,30 @@ library_00004:
|
|
73
73
|
#
|
74
74
|
# Table name: libraries
|
75
75
|
#
|
76
|
-
# id
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
85
|
-
#
|
86
|
-
#
|
87
|
-
#
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
#
|
93
|
-
#
|
94
|
-
#
|
95
|
-
#
|
96
|
-
#
|
97
|
-
#
|
98
|
-
#
|
99
|
-
# latitude
|
100
|
-
# longitude
|
101
|
-
#
|
102
|
-
# calil_neighborhood_systemid :text
|
76
|
+
# id :integer not null, primary key
|
77
|
+
# name :string not null
|
78
|
+
# display_name :text
|
79
|
+
# short_display_name :string not null
|
80
|
+
# zip_code :string
|
81
|
+
# street :text
|
82
|
+
# locality :text
|
83
|
+
# region :text
|
84
|
+
# telephone_number_1 :string
|
85
|
+
# telephone_number_2 :string
|
86
|
+
# fax_number :string
|
87
|
+
# note :text
|
88
|
+
# call_number_rows :integer default(1), not null
|
89
|
+
# call_number_delimiter :string default("|"), not null
|
90
|
+
# library_group_id :integer not null
|
91
|
+
# users_count :integer default(0), not null
|
92
|
+
# position :integer
|
93
|
+
# country_id :integer
|
94
|
+
# created_at :datetime
|
95
|
+
# updated_at :datetime
|
96
|
+
# deleted_at :datetime
|
97
|
+
# opening_hour :text
|
98
|
+
# isil :string
|
99
|
+
# latitude :float
|
100
|
+
# longitude :float
|
101
|
+
# display_name_translations :jsonb not null
|
103
102
|
#
|
104
|
-
|
@@ -1,32 +1,56 @@
|
|
1
1
|
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
2
2
|
one:
|
3
3
|
id: 1
|
4
|
-
name:
|
5
|
-
|
6
|
-
short_name:
|
4
|
+
name: enju_library
|
5
|
+
display_name_translations: {"en": "Enju Library", "ja": "えんじゅ図書館"}
|
6
|
+
short_name: enju_library
|
7
7
|
note:
|
8
|
-
my_networks: 0.0.0.0/0
|
8
|
+
my_networks: "0.0.0.0/0\r\n\
|
9
|
+
::/0"
|
9
10
|
url: "http://localhost:3000/"
|
11
|
+
position: 1
|
12
|
+
login_banner_translations: {"ja": "オープンソース図書館システム Next-L Enju です。このメッセージは管理者としてログインした後に変更することができます。",
|
13
|
+
"en": "Next-L Enju, an open-source integrated library system. You can edit this message after logging in as Administrator."}
|
14
|
+
footer_banner_translations: {"en":"[Next-L Enju Leaf __VERSION__](https://github.com/next-l/enju_leaf), an open source integrated library system | [About this system](/page/about) | [Report bugs](https://github.com/next-l/enju_leaf/issues) | [Manual](https://next-l.github.io/manual/1.3/)",
|
15
|
+
"ja":"[Next-L Enju Leaf __VERSION__](https://github.com/next-l/enju_leaf), オープンソース統合図書館システム | [このシステムについて](/page/about) | [不具合を報告する](https://github.com/next-l/enju_leaf/issues) | [マニュアル](https://next-l.github.io/manual/1.3/)"}
|
16
|
+
admin_networks: "0.0.0.0/0\r\n\
|
17
|
+
::/0"
|
10
18
|
user_id: 1
|
19
|
+
pub_year_facet_range_interval: 10
|
11
20
|
|
12
21
|
# == Schema Information
|
13
22
|
#
|
14
23
|
# Table name: library_groups
|
15
24
|
#
|
16
|
-
# id
|
17
|
-
# name
|
18
|
-
# display_name
|
19
|
-
# short_name
|
20
|
-
# my_networks
|
21
|
-
#
|
22
|
-
# note
|
23
|
-
#
|
24
|
-
#
|
25
|
-
# created_at
|
26
|
-
# updated_at
|
27
|
-
# admin_networks
|
28
|
-
# allow_bookmark_external_url
|
29
|
-
#
|
30
|
-
#
|
25
|
+
# id :integer not null, primary key
|
26
|
+
# name :string not null
|
27
|
+
# display_name :text
|
28
|
+
# short_name :string not null
|
29
|
+
# my_networks :text
|
30
|
+
# old_login_banner :text
|
31
|
+
# note :text
|
32
|
+
# country_id :integer
|
33
|
+
# position :integer
|
34
|
+
# created_at :datetime
|
35
|
+
# updated_at :datetime
|
36
|
+
# admin_networks :text
|
37
|
+
# allow_bookmark_external_url :boolean default(FALSE), not null
|
38
|
+
# url :string default("http://localhost:3000/")
|
39
|
+
# settings :text
|
40
|
+
# html_snippet :text
|
41
|
+
# book_jacket_source :string
|
42
|
+
# max_number_of_results :integer default(500)
|
43
|
+
# family_name_first :boolean default(TRUE)
|
44
|
+
# screenshot_generator :string
|
45
|
+
# pub_year_facet_range_interval :integer default(10)
|
46
|
+
# user_id :integer
|
47
|
+
# csv_charset_conversion :boolean default(FALSE), not null
|
48
|
+
# header_logo_file_name :string
|
49
|
+
# header_logo_content_type :string
|
50
|
+
# header_logo_file_size :bigint
|
51
|
+
# header_logo_updated_at :datetime
|
52
|
+
# header_logo_meta :text
|
53
|
+
# display_name_translations :jsonb not null
|
54
|
+
# login_banner_translations :jsonb not null
|
55
|
+
# footer_banner_translations :jsonb not null
|
31
56
|
#
|
32
|
-
|
data/spec/fixtures/shelves.yml
CHANGED
@@ -1,28 +1,28 @@
|
|
1
1
|
---
|
2
2
|
shelf_00001:
|
3
3
|
name: web
|
4
|
-
|
4
|
+
display_name_translations: {"en": "Library bookmark", "ja": "ブックマーク"}
|
5
5
|
id: 1
|
6
6
|
note:
|
7
7
|
library_id: 1
|
8
8
|
position: 1
|
9
9
|
shelf_00002:
|
10
10
|
name: first_shelf
|
11
|
-
|
11
|
+
display_name_translations: {"en": "First shelf", "ja": "最初の書棚"}
|
12
12
|
id: 2
|
13
13
|
note:
|
14
14
|
library_id: 2
|
15
15
|
position: 2
|
16
16
|
shelf_00003:
|
17
17
|
name: second_shelf
|
18
|
-
|
18
|
+
display_name_translations: {"en": "Second shelf", "ja": "二つ目の書棚"}
|
19
19
|
id: 3
|
20
20
|
note:
|
21
21
|
library_id: 2
|
22
22
|
position: 3
|
23
23
|
shelf_00004:
|
24
24
|
name: third_shelf
|
25
|
-
|
25
|
+
display_name_translations: {"en": "Third shelf", "ja": "三つ目の書棚"}
|
26
26
|
id: 4
|
27
27
|
note:
|
28
28
|
library_id: 3
|
@@ -32,15 +32,16 @@ shelf_00004:
|
|
32
32
|
#
|
33
33
|
# Table name: shelves
|
34
34
|
#
|
35
|
-
# id
|
36
|
-
# name
|
37
|
-
# display_name
|
38
|
-
# note
|
39
|
-
# library_id
|
40
|
-
# items_count
|
41
|
-
# position
|
42
|
-
# created_at
|
43
|
-
# updated_at
|
44
|
-
# deleted_at
|
35
|
+
# id :integer not null, primary key
|
36
|
+
# name :string not null
|
37
|
+
# display_name :text
|
38
|
+
# note :text
|
39
|
+
# library_id :integer not null
|
40
|
+
# items_count :integer default(0), not null
|
41
|
+
# position :integer
|
42
|
+
# created_at :datetime
|
43
|
+
# updated_at :datetime
|
44
|
+
# deleted_at :datetime
|
45
|
+
# closed :boolean default(FALSE), not null
|
46
|
+
# display_name_translations :jsonb not null
|
45
47
|
#
|
46
|
-
|
@@ -9,11 +9,12 @@ end
|
|
9
9
|
#
|
10
10
|
# Table name: event_categories
|
11
11
|
#
|
12
|
-
# id
|
13
|
-
# name
|
14
|
-
# display_name
|
15
|
-
# note
|
16
|
-
# position
|
17
|
-
# created_at
|
18
|
-
# updated_at
|
12
|
+
# id :integer not null, primary key
|
13
|
+
# name :string not null
|
14
|
+
# display_name :text
|
15
|
+
# note :text
|
16
|
+
# position :integer
|
17
|
+
# created_at :datetime
|
18
|
+
# updated_at :datetime
|
19
|
+
# display_name_translations :jsonb not null
|
19
20
|
#
|
@@ -22,7 +22,7 @@ end
|
|
22
22
|
# user_id :integer
|
23
23
|
# event_export_file_name :string
|
24
24
|
# event_export_content_type :string
|
25
|
-
# event_export_file_size :
|
25
|
+
# event_export_file_size :bigint
|
26
26
|
# event_export_updated_at :datetime
|
27
27
|
# executed_at :datetime
|
28
28
|
# created_at :datetime
|
data/spec/models/event_spec.rb
CHANGED
@@ -29,17 +29,18 @@ end
|
|
29
29
|
#
|
30
30
|
# Table name: events
|
31
31
|
#
|
32
|
-
# id
|
33
|
-
# library_id
|
34
|
-
# event_category_id
|
35
|
-
# name
|
36
|
-
# note
|
37
|
-
# start_at
|
38
|
-
# end_at
|
39
|
-
# all_day
|
40
|
-
# deleted_at
|
41
|
-
# display_name
|
42
|
-
# created_at
|
43
|
-
# updated_at
|
44
|
-
# place_id
|
32
|
+
# id :integer not null, primary key
|
33
|
+
# library_id :integer not null
|
34
|
+
# event_category_id :integer not null
|
35
|
+
# name :string
|
36
|
+
# note :text
|
37
|
+
# start_at :datetime
|
38
|
+
# end_at :datetime
|
39
|
+
# all_day :boolean default(FALSE), not null
|
40
|
+
# deleted_at :datetime
|
41
|
+
# display_name :text
|
42
|
+
# created_at :datetime
|
43
|
+
# updated_at :datetime
|
44
|
+
# place_id :integer
|
45
|
+
# display_name_translations :jsonb not null
|
45
46
|
#
|
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'
|
data/spec/system/events_spec.rb
CHANGED
@@ -13,10 +13,5 @@ RSpec.describe 'Events', type: :system do
|
|
13
13
|
visit events_path(query: 'test')
|
14
14
|
expect(page).to have_link 'Kamata Library', href: events_path(library_id: 'kamata', query: 'test')
|
15
15
|
end
|
16
|
-
|
17
|
-
it 'should export events in text format' do
|
18
|
-
visit events_path(format: :text)
|
19
|
-
expect(page).to have_content 'kamata'
|
20
|
-
end
|
21
16
|
end
|
22
17
|
end
|