enju_nii 0.1.0.pre11 → 0.1.0.pre12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +36 -1
  3. data/app/controllers/cinii_books_controller.rb +3 -3
  4. data/app/controllers/nii_types_controller.rb +7 -2
  5. data/app/helpers/cinii_books_helper.rb +4 -1
  6. data/app/models/cinii_book.rb +4 -2
  7. data/app/models/enju_nii/ability.rb +5 -2
  8. data/app/models/nii_type.rb +13 -1
  9. data/db/migrate/20141115051741_remove_ncid_from_manifestations.rb +5 -0
  10. data/lib/enju_nii/cinii_book.rb +101 -26
  11. data/lib/enju_nii/version.rb +1 -1
  12. data/lib/enju_nii.rb +1 -0
  13. data/spec/cassette_library/CiniiBook/should_import_a_bibliographic_record.yml +302 -236
  14. data/spec/cassette_library/CiniiBook/should_import_a_bibliographic_record_with_dual_languages.yml +292 -0
  15. data/spec/cassette_library/CiniiBook/should_search_with_ncid.yml +75 -0
  16. data/spec/controllers/nii_types_controller_spec.rb +167 -0
  17. data/spec/dummy/app/models/ability.rb +4 -1
  18. data/spec/dummy/bin/bundle +3 -0
  19. data/spec/dummy/bin/rails +4 -0
  20. data/spec/dummy/bin/rake +4 -0
  21. data/spec/dummy/bin/setup +29 -0
  22. data/spec/dummy/config/application.rb +1 -1
  23. data/spec/dummy/config/boot.rb +4 -9
  24. data/spec/dummy/config/database.yml +23 -18
  25. data/spec/dummy/config/environment.rb +3 -3
  26. data/spec/dummy/config/environments/development.rb +25 -14
  27. data/spec/dummy/config/environments/production.rb +50 -31
  28. data/spec/dummy/config/environments/test.rb +20 -17
  29. data/spec/dummy/config/routes.rb +1 -1
  30. data/spec/dummy/db/migrate/005_create_manifestations.rb +0 -1
  31. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +5 -1
  32. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +5 -1
  33. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +5 -1
  34. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +5 -1
  35. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +5 -1
  36. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +5 -1
  37. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +14 -0
  38. data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +5 -0
  39. data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +5 -0
  40. data/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +5 -0
  41. data/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +9 -0
  42. data/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +5 -0
  43. data/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +5 -0
  44. data/spec/dummy/db/schema.rb +91 -78
  45. data/spec/fixtures/agent_types.yml +7 -7
  46. data/spec/fixtures/carrier_types.yml +19 -31
  47. data/spec/fixtures/content_types.yml +73 -7
  48. data/spec/fixtures/manifestations.yml +119 -119
  49. data/spec/fixtures/nii_types.yml +98 -0
  50. data/spec/fixtures/subject_types.yml +4 -4
  51. data/spec/fixtures/users.yml +1 -1
  52. data/spec/models/cinii_book_spec.rb +40 -1
  53. data/spec/spec_helper.rb +2 -0
  54. metadata +84 -19
  55. data/spec/dummy/db/development.sqlite3 +0 -0
  56. data/spec/dummy/db/test.sqlite3 +0 -0
  57. data/spec/dummy/script/rails +0 -6
  58. data/spec/factories/nii_type.rb +0 -5
@@ -1,21 +1,21 @@
1
1
  ---
2
2
  agent_type_00001:
3
3
  id: 1
4
- name: Person
4
+ name: person
5
5
  display_name: Person
6
6
  note:
7
7
  position: 1
8
8
 
9
9
  agent_type_00002:
10
10
  id: 2
11
- name: CorporateBody
11
+ name: corporate_body
12
12
  display_name: CorporateBody
13
13
  note:
14
14
  position: 2
15
15
 
16
16
  agent_type_00003:
17
17
  id: 3
18
- name: Conference
18
+ name: conference
19
19
  display_name: Conference
20
20
  note:
21
21
  position: 3
@@ -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
27
+ # id :integer not null, primary key
28
+ # name :string(255) not null
29
29
  # display_name :text
30
30
  # note :text
31
31
  # position :integer
32
- # created_at :datetime
33
- # updated_at :datetime
32
+ # created_at :datetime not null
33
+ # updated_at :datetime not null
34
34
  #
35
35
 
@@ -1,51 +1,39 @@
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: print
14
- display_name: print
15
- updated_at: 2007-11-20 16:04:29.853828 +09:00
3
+ name: volume
4
+ display_name: "en: Volume\r\n\
5
+ ja: 冊子体"
16
6
  id: 1
17
- note: !binary |
18
- 5pys44Gn44GZ44CC
19
-
20
- created_at: 2007-11-20 15:47:03.641530 +09:00
21
7
  position: 1
22
8
  carrier_type_00002:
23
- name: CD
24
- display_name: CD
25
- updated_at: 2007-12-19 01:45:26.040674 +09:00
9
+ name: audio_disc
10
+ display_name: "en: Audio disc\r\n\
11
+ ja: オーディオディスク"
26
12
  id: 2
27
- note: "\xE9\x9F\xB3\xE6\xA5\xBDCD\xE3\x81\xA7\xE3\x81\x99\xE3\x80\x82"
28
- created_at: 2007-12-19 01:45:26.040674 +09:00
29
13
  position: 2
30
14
  carrier_type_00003:
31
- name: DVD
32
- display_name: DVD
33
- updated_at: 2007-12-23 04:24:23.151410 +09:00
15
+ name: videodisc
16
+ display_name: "en: Videodisc\r\n\
17
+ ja: ビデオディスク"
34
18
  id: 3
35
- note: "DVD\xE3\x81\xA7\xE3\x81\x99\xE3\x80\x82"
36
- created_at: 2007-12-23 04:24:23.151410 +09:00
37
19
  position: 3
20
+ carrier_type_00004:
21
+ name: online_resource
22
+ display_name: "en: Online resource\r\n\
23
+ ja: オンラインリソース"
24
+ id: 4
25
+ position: 4
38
26
 
39
27
  # == Schema Information
40
28
  #
41
29
  # Table name: carrier_types
42
30
  #
43
- # id :integer not null, primary key
44
- # name :string(255) not null
31
+ # id :integer not null, primary key
32
+ # name :string(255) not null
45
33
  # display_name :text
46
34
  # note :text
47
35
  # position :integer
48
- # created_at :datetime
49
- # updated_at :datetime
36
+ # created_at :datetime not null
37
+ # updated_at :datetime not null
50
38
  #
51
39
 
@@ -1,19 +1,85 @@
1
1
  ---
2
2
  content_type_00001:
3
3
  id: 1
4
- name: text
5
- display_name: text
4
+ name: text
5
+ display_name: "en: text\r\n\
6
+ ja: 文字"
6
7
  note:
7
8
  position: 1
8
9
  content_type_00002:
9
10
  id: 2
10
- name: audio
11
- display_name: audio
12
- note:
11
+ name: performed_music
12
+ display_name: "en: Performed music\r\n\
13
+ ja: 音楽"
14
+ note: 曲の演奏など
13
15
  position: 2
14
16
  content_type_00003:
15
17
  id: 3
16
- name: video
17
- display_name: video
18
+ name: two_dimensional_moving_image
19
+ display_name: "en: Two-dimensional moving image\r\n\
20
+ ja: 動画"
18
21
  note:
19
22
  position: 3
23
+ content_type_00004:
24
+ id: 4
25
+ name: tactile_text
26
+ display_name: "en: Tactile text\r\n\
27
+ ja: 点字など"
28
+ note: 触ることのできる文字
29
+ position: 4
30
+ content_type_00005:
31
+ id: 5
32
+ name: still_image
33
+ display_name: "en: Still image\r\n\
34
+ ja: 画像"
35
+ note: 静止画像
36
+ position: 5
37
+ content_type_00006:
38
+ id: 6
39
+ name: cartographic_image
40
+ display_name: "en: Cartographic image\r\n\
41
+ ja: 地図"
42
+ note:
43
+ position: 6
44
+ content_type_00007:
45
+ id: 7
46
+ name: spoken_word
47
+ display_name: "en: Spoken word\r\n\
48
+ ja: 音声"
49
+ note: 読み上げ音声など
50
+ position: 7
51
+ content_type_00008:
52
+ id: 8
53
+ name: sounds
54
+ display_name: "en: Sounds\r\n\
55
+ ja: 音"
56
+ note: 波音など
57
+ position: 8
58
+ content_type_00009:
59
+ id: 9
60
+ name: notated_music
61
+ display_name: "en: Notated music\r\n\
62
+ ja: 楽譜"
63
+ note:
64
+ position: 9
65
+ content_type_00010:
66
+ id: 10
67
+ name: three_dimensional_moving_image
68
+ display_name: "en: Three-dimensional moving image\r\n\
69
+ ja: 3D動画"
70
+ note:
71
+ position: 10
72
+ content_type_00011:
73
+ id: 11
74
+ name: other
75
+ display_name: "en: Other\r\n\
76
+ ja: その他"
77
+ note: LCMARCに由来
78
+ position: 11
79
+ content_type_00012:
80
+ id: 12
81
+ name: unspecified
82
+ display_name: "en: Unspecified\r\n\
83
+ ja: 不明"
84
+ note: LCMARCに由来
85
+ position: 12