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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -8
  3. data/{lib/enju_nii/cinii_book.rb → app/models/concerns/enju_nii/enju_manifestation.rb} +19 -17
  4. data/app/models/nii_type.rb +1 -1
  5. data/lib/enju_nii/engine.rb +1 -1
  6. data/lib/enju_nii/version.rb +1 -1
  7. data/lib/enju_nii.rb +1 -22
  8. data/spec/dummy/app/models/user.rb +2 -1
  9. data/spec/dummy/bin/bundle +1 -1
  10. data/spec/dummy/bin/setup +1 -3
  11. data/spec/dummy/bin/update +4 -2
  12. data/spec/dummy/bin/yarn +3 -3
  13. data/spec/dummy/config/application.rb +1 -3
  14. data/spec/dummy/config/database.yml +70 -9
  15. data/spec/dummy/config/environments/test.rb +0 -3
  16. data/spec/dummy/db/migrate/029_create_subjects.rb +3 -6
  17. data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +2 -0
  18. data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +2 -4
  19. data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +4 -5
  20. data/spec/dummy/db/migrate/20150923173139_add_url_to_classification.rb +5 -0
  21. data/spec/dummy/db/migrate/20150925092505_add_label_to_classification.rb +5 -0
  22. data/spec/dummy/db/migrate/20160319144230_create_issn_records.rb +11 -0
  23. data/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb +11 -0
  24. data/spec/dummy/db/migrate/20170116134107_create_issn_record_and_manifestations.rb +11 -0
  25. data/spec/dummy/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb +11 -0
  26. data/spec/dummy/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
  27. data/spec/dummy/db/migrate/20190630115523_add_login_banner_translations_to_library_group.rb +6 -0
  28. data/spec/dummy/db/migrate/20190630151446_add_display_name_translations_to_role.rb +5 -0
  29. data/spec/dummy/db/migrate/20190712163038_add_display_name_translations_to_carrier_type.rb +21 -0
  30. data/spec/dummy/db/migrate/20190713114940_add_profile_id_to_user.rb +5 -0
  31. data/spec/dummy/db/migrate/20190713115451_add_full_name_translations_to_profile.rb +5 -0
  32. data/spec/dummy/db/schema.rb +157 -231
  33. data/spec/fixtures/agent_types.yml +11 -11
  34. data/spec/fixtures/carrier_types.yml +32 -16
  35. data/spec/fixtures/roles.yml +22 -5
  36. data/spec/models/cinii_book_spec.rb +0 -3
  37. data/spec/rails_helper.rb +5 -2
  38. metadata +239 -355
  39. data/spec/dummy/config/initializers/statesman.rb +0 -3
  40. data/spec/dummy/db/migrate/149_create_message_templates.rb +0 -18
  41. data/spec/dummy/db/migrate/154_create_messages.rb +0 -23
  42. data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +0 -18
  43. data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +0 -13
  44. data/spec/dummy/db/migrate/20090719201843_create_extents.rb +0 -12
  45. data/spec/dummy/db/migrate/20091202124834_create_versions.rb +0 -18
  46. data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +0 -11
  47. data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +0 -6
  48. data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +0 -6
  49. data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +0 -18
  50. data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +0 -18
  51. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +0 -18
  52. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +0 -22
  53. data/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +0 -9
  54. data/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +0 -9
  55. data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +0 -5
  56. data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +0 -5
  57. data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +0 -12
  58. data/spec/dummy/db/migrate/20200425072340_create_manifestation_custom_properties.rb +0 -12
  59. data/spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb +0 -12
  60. data/spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb +0 -12
  61. data/spec/dummy/db/migrate/20200425074822_create_item_custom_values.rb +0 -12
  62. data/spec/dummy/private/system/resource_export_files/resource_exports/000/000/001/original/resource_export.txt +0 -130
  63. data/spec/factories/identifier.rb +0 -7
  64. data/spec/factories/manifestation.rb +0 -6
  65. data/spec/fixtures/profiles.yml +0 -98
  66. data/spec/models/resource_export_file_spec.rb +0 -38
@@ -2,21 +2,21 @@
2
2
  agent_type_00001:
3
3
  id: 1
4
4
  name: person
5
- display_name: Person
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
- display_name: CorporateBody
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
- display_name: Conference
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 :integer not null, primary key
28
- # name :string(255) not null
29
- # display_name :text
30
- # note :text
31
- # position :integer
32
- # created_at :datetime not null
33
- # updated_at :datetime not null
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,39 +1,55 @@
1
1
  ---
2
2
  carrier_type_00001:
3
3
  name: volume
4
- display_name: "en: Volume\r\n\
5
- ja: 冊子体"
4
+ display_name_translations: {"en": "Volume", "ja": "Volume"}
5
+ updated_at: 2007-11-20 16:04:29.853828 +09:00
6
6
  id: 1
7
+ note: !binary |
8
+ 5pys44Gn44GZ44CC
9
+
10
+ created_at: 2007-11-20 15:47:03.641530 +09:00
7
11
  position: 1
8
12
  carrier_type_00002:
9
13
  name: audio_disc
10
- display_name: "en: Audio disc\r\n\
11
- ja: オーディオディスク"
14
+ display_name_translations: {"en": "Audio disc", "ja": "Audio disc"}
15
+ updated_at: 2007-12-19 01:45:26.040674 +09:00
12
16
  id: 2
17
+ note: "\xE9\x9F\xB3\xE6\xA5\xBDCD\xE3\x81\xA7\xE3\x81\x99\xE3\x80\x82"
18
+ created_at: 2007-12-19 01:45:26.040674 +09:00
13
19
  position: 2
14
20
  carrier_type_00003:
15
21
  name: videodisc
16
- display_name: "en: Videodisc\r\n\
17
- ja: ビデオディスク"
22
+ display_name_translations: {"en": "Video disc", "ja": "Video disc"}
23
+ updated_at: 2007-12-23 04:24:23.151410 +09:00
18
24
  id: 3
25
+ note: "DVD\xE3\x81\xA7\xE3\x81\x99\xE3\x80\x82"
26
+ created_at: 2007-12-23 04:24:23.151410 +09:00
19
27
  position: 3
20
28
  carrier_type_00004:
21
29
  name: online_resource
22
- display_name: "en: Online resource\r\n\
23
- ja: オンラインリソース"
30
+ display_name_translations: {"en": "online_resource", "ja": "online_resource"}
31
+ updated_at: 2007-12-24 01:30:50.637433 +09:00
24
32
  id: 4
33
+ note: !binary |
34
+ 44Kz44Oz44OU44Ol44O844K/44Gu44OV44Kh44Kk44Or44Gn44GZ44CC
35
+
36
+ created_at: 2007-12-24 01:30:50.637433 +09:00
25
37
  position: 4
26
38
 
27
39
  # == Schema Information
28
40
  #
29
41
  # Table name: carrier_types
30
42
  #
31
- # id :integer not null, primary key
32
- # name :string(255) not null
33
- # display_name :text
34
- # note :text
35
- # position :integer
36
- # created_at :datetime not null
37
- # updated_at :datetime not null
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
38
55
  #
39
-
@@ -1,21 +1,38 @@
1
1
  ---
2
2
  role_00001:
3
3
  name: Guest
4
- display_name: Guest
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
- display_name: User
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
- display_name: Librarian
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
- display_name: Administrator
22
+ display_name_translations: {"en": "Administrator", "ja": "管理者"}
20
23
  id: 4
21
- note:
24
+ note:
25
+ position: 4
26
+
27
+ # == Schema Information
28
+ #
29
+ # Table name: roles
30
+ #
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
38
+ #
@@ -1,11 +1,8 @@
1
- # -*- encoding: utf-8 -*-
2
1
  require 'rails_helper'
3
2
 
4
3
  describe CiniiBook do
5
4
  fixtures :all
6
5
 
7
- Manifestation.enju_nii_cinii_books
8
-
9
6
  it "should search bibliographic records", vcr: true do
10
7
  CiniiBook.search("library system")[:total_entries].should eq 3563
11
8
  end
data/spec/rails_helper.rb CHANGED
@@ -1,14 +1,17 @@
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'
8
12
  require File.expand_path("../dummy/config/environment", __FILE__)
9
13
  require 'rspec/rails'
10
14
  require 'vcr'
11
- require 'factory_bot_rails'
12
15
 
13
16
  # Requires supporting ruby files with custom matchers and macros, etc,
14
17
  # in spec/support/ and its subdirectories.