enju_nii 0.3.2 → 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 +4 -8
- data/{lib/enju_nii/cinii_book.rb → app/models/concerns/enju_nii/enju_manifestation.rb} +19 -17
- data/app/models/nii_type.rb +1 -1
- data/lib/enju_nii/engine.rb +1 -1
- data/lib/enju_nii/version.rb +1 -1
- data/lib/enju_nii.rb +1 -22
- data/spec/dummy/app/models/user.rb +2 -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 +1 -3
- data/spec/dummy/config/database.yml +70 -9
- data/spec/dummy/config/environments/test.rb +0 -3
- data/spec/dummy/db/migrate/029_create_subjects.rb +3 -6
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +2 -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/20150923173139_add_url_to_classification.rb +5 -0
- data/spec/dummy/db/migrate/20150925092505_add_label_to_classification.rb +5 -0
- data/spec/dummy/db/migrate/20160319144230_create_issn_records.rb +11 -0
- data/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb +11 -0
- data/spec/dummy/db/migrate/20170116134107_create_issn_record_and_manifestations.rb +11 -0
- data/spec/dummy/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb +11 -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 +157 -231
- data/spec/fixtures/agent_types.yml +11 -11
- data/spec/fixtures/carrier_types.yml +32 -16
- data/spec/fixtures/roles.yml +22 -5
- data/spec/models/cinii_book_spec.rb +0 -3
- data/spec/rails_helper.rb +5 -2
- metadata +239 -355
- data/spec/dummy/config/initializers/statesman.rb +0 -3
- data/spec/dummy/db/migrate/149_create_message_templates.rb +0 -18
- data/spec/dummy/db/migrate/154_create_messages.rb +0 -23
- data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +0 -18
- data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +0 -13
- data/spec/dummy/db/migrate/20090719201843_create_extents.rb +0 -12
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +0 -18
- data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +0 -11
- data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +0 -6
- data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +0 -6
- data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +0 -18
- 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/20160703185015_add_most_recent_to_message_transitions.rb +0 -9
- data/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +0 -9
- 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/dummy/private/system/resource_export_files/resource_exports/000/000/001/original/resource_export.txt +0 -130
- data/spec/factories/identifier.rb +0 -7
- data/spec/factories/manifestation.rb +0 -6
- data/spec/fixtures/profiles.yml +0 -98
- data/spec/models/resource_export_file_spec.rb +0 -38
data/spec/fixtures/profiles.yml
DELETED
@@ -1,98 +0,0 @@
|
|
1
|
-
---
|
2
|
-
admin:
|
3
|
-
updated_at: 2008-05-31 13:16:30.163731 +09:00
|
4
|
-
user_group_id: 2
|
5
|
-
id: 1
|
6
|
-
user_id: 1
|
7
|
-
note:
|
8
|
-
library_id: 2
|
9
|
-
created_at: 2007-11-19 16:58:32.111941 +09:00
|
10
|
-
required_role_id: 4
|
11
|
-
user_number: "00001"
|
12
|
-
locale: "en"
|
13
|
-
librarian1:
|
14
|
-
updated_at: 2008-05-31 12:41:16.337474 +09:00
|
15
|
-
user_group_id: 1
|
16
|
-
id: 2
|
17
|
-
user_id: 2
|
18
|
-
note:
|
19
|
-
library_id: 1
|
20
|
-
created_at: 2007-11-19 16:58:33.172441 +09:00
|
21
|
-
required_role_id: 1
|
22
|
-
user_number: "00002"
|
23
|
-
locale: "ja"
|
24
|
-
user1:
|
25
|
-
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
26
|
-
user_group_id: 1
|
27
|
-
id: 3
|
28
|
-
user_id: 3
|
29
|
-
note:
|
30
|
-
library_id: 2
|
31
|
-
created_at: 2007-11-19 16:58:34.637413 +09:00
|
32
|
-
required_role_id: 3
|
33
|
-
user_number: "00003"
|
34
|
-
locale: "ja"
|
35
|
-
librarian2:
|
36
|
-
updated_at: 2008-05-31 12:42:23.340575 +09:00
|
37
|
-
user_group_id: 1
|
38
|
-
id: 4
|
39
|
-
user_id: 4
|
40
|
-
note:
|
41
|
-
library_id: 2
|
42
|
-
created_at: 2008-01-18 12:24:04.222344 +09:00
|
43
|
-
required_role_id: 1
|
44
|
-
user_number: "00004"
|
45
|
-
locale: "ja"
|
46
|
-
user2:
|
47
|
-
updated_at: 2008-05-31 12:42:44.711117 +09:00
|
48
|
-
user_group_id: 1
|
49
|
-
id: 5
|
50
|
-
user_id: 5
|
51
|
-
note:
|
52
|
-
library_id: 1
|
53
|
-
created_at: 2008-01-18 13:29:06.922728 +09:00
|
54
|
-
required_role_id: 2
|
55
|
-
# user_number: '00005'
|
56
|
-
locale: "ja"
|
57
|
-
user3:
|
58
|
-
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
59
|
-
user_group_id: 1
|
60
|
-
id: 6
|
61
|
-
user_id: 6
|
62
|
-
note:
|
63
|
-
library_id: 2
|
64
|
-
created_at: 2007-11-19 16:58:34.637413 +09:00
|
65
|
-
required_role_id: 3
|
66
|
-
user_number: "00006"
|
67
|
-
locale: "ja"
|
68
|
-
user4:
|
69
|
-
updated_at: 2008-05-31 13:02:25.101261 +09:00
|
70
|
-
user_group_id: 1
|
71
|
-
id: 7
|
72
|
-
user_id: 7
|
73
|
-
note:
|
74
|
-
library_id: 2
|
75
|
-
created_at: 2007-11-19 16:58:34.637413 +09:00
|
76
|
-
required_role_id: 3
|
77
|
-
user_number: "00007"
|
78
|
-
locale: "ja"
|
79
|
-
|
80
|
-
# == Schema Information
|
81
|
-
#
|
82
|
-
# Table name: profiles
|
83
|
-
#
|
84
|
-
# id :integer not null, primary key
|
85
|
-
# user_id :integer
|
86
|
-
# user_group_id :integer
|
87
|
-
# library_id :integer
|
88
|
-
# locale :string(255)
|
89
|
-
# user_number :string(255)
|
90
|
-
# full_name :text
|
91
|
-
# note :text
|
92
|
-
# keyword_list :text
|
93
|
-
# required_role_id :integer
|
94
|
-
# created_at :datetime not null
|
95
|
-
# updated_at :datetime not null
|
96
|
-
# checkout_icalendar_token :string(255)
|
97
|
-
# save_checkout_history :boolean default(FALSE), not null
|
98
|
-
#
|
@@ -1,38 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
|
3
|
-
describe ResourceExportFile do
|
4
|
-
fixtures :all
|
5
|
-
|
6
|
-
it "should export ncid" do
|
7
|
-
manifestation = FactoryBot.create(:manifestation)
|
8
|
-
type = IdentifierType.find_or_create_by(name: "ncid")
|
9
|
-
identifier = FactoryBot.create(:identifier, identifier_type: type, body: "a11223344")
|
10
|
-
manifestation.identifiers << identifier
|
11
|
-
export_file = ResourceExportFile.new
|
12
|
-
export_file.user = users(:admin)
|
13
|
-
export_file.save!
|
14
|
-
export_file.export!
|
15
|
-
file = export_file.resource_export
|
16
|
-
CSV.open(file.path, {headers: true, col_sep: "\t"}).each do |row|
|
17
|
-
expect(row).to have_key "ncid"
|
18
|
-
if row['manifestation_id'] == identifier.manifestation_id
|
19
|
-
expect(row["ncid"]).to eq identifier.body
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
# == Schema Information
|
26
|
-
#
|
27
|
-
# Table name: resource_export_files
|
28
|
-
#
|
29
|
-
# id :integer not null, primary key
|
30
|
-
# user_id :integer
|
31
|
-
# resource_export_file_name :string
|
32
|
-
# resource_export_content_type :string
|
33
|
-
# resource_export_file_size :integer
|
34
|
-
# resource_export_updated_at :datetime
|
35
|
-
# executed_at :datetime
|
36
|
-
# created_at :datetime
|
37
|
-
# updated_at :datetime
|
38
|
-
#
|