enju_biblio 0.1.0.pre8 → 0.1.0.pre9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. data/app/controllers/manifestations_controller.rb +4 -1
  2. data/app/controllers/patrons_controller.rb +3 -2
  3. data/app/controllers/series_statements_controller.rb +19 -1
  4. data/app/models/import_request.rb +1 -1
  5. data/app/models/resource_import_file.rb +12 -1
  6. data/app/models/series_statement.rb +7 -1
  7. data/app/views/patrons/_index_work.html.erb +4 -2
  8. data/app/views/series_statements/_index.html.erb +21 -5
  9. data/app/views/series_statements/_periodical_facet.html.erb +15 -0
  10. data/db/migrate/20110618091240_add_periodical_to_series_statement.rb +1 -1
  11. data/lib/enju_biblio/engine.rb +1 -0
  12. data/lib/enju_biblio/version.rb +1 -1
  13. data/spec/cassette_library/enju_ndl/manifestation.yml +339 -780
  14. data/spec/cassette_library/enju_ndl/ndl_search.yml +992 -1994
  15. data/spec/dummy/db/production.sqlite3 +0 -0
  16. data/spec/dummy/db/schema.rb +3 -3
  17. data/spec/dummy/db/test.sqlite3 +0 -0
  18. data/spec/dummy/private/system/resource_imports/4/original/isbn_sample.txt +3 -0
  19. data/spec/dummy/private/system/resource_imports/4/original/item_delete_file.tsv +11 -0
  20. data/spec/dummy/private/system/resource_imports/4/original/item_update_file.tsv +4 -0
  21. data/spec/dummy/private/system/resource_imports/4/original/resource_import_file_sample1.tsv +19 -0
  22. data/spec/dummy/private/system/resource_imports/4/original/resource_import_file_sample2.tsv +19 -0
  23. data/spec/dummy/private/system/resource_imports/4/original/update_series_statement.tsv +2 -0
  24. data/spec/dummy/public/system/picture_files/pictures/000/000/005/medium/spinner.gif +0 -0
  25. data/spec/dummy/public/system/picture_files/pictures/000/000/005/original/spinner.gif +0 -0
  26. data/spec/dummy/public/system/picture_files/pictures/000/000/005/thumb/spinner.gif +0 -0
  27. data/spec/dummy/solr/conf/schema.xml +2 -14
  28. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  29. data/spec/dummy/solr/data/test/index/segments_7y4 +0 -0
  30. data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
  31. data/spec/fixtures/series_statements.yml +1 -0
  32. data/spec/models/series_statement_spec.rb +12 -0
  33. metadata +43 -6
  34. data/spec/dummy/solr/data/test/index/segments_gf +0 -0
File without changes
@@ -1078,13 +1078,13 @@ ActiveRecord::Schema.define(:version => 20120728204337) do
1078
1078
  t.text "title_subseries"
1079
1079
  t.text "numbering_subseries"
1080
1080
  t.integer "position"
1081
- t.datetime "created_at", :null => false
1082
- t.datetime "updated_at", :null => false
1081
+ t.datetime "created_at", :null => false
1082
+ t.datetime "updated_at", :null => false
1083
1083
  t.text "title_transcription"
1084
1084
  t.text "title_alternative"
1085
1085
  t.string "series_statement_identifier"
1086
1086
  t.string "issn"
1087
- t.boolean "periodical"
1087
+ t.boolean "periodical", :default => false, :null => false
1088
1088
  t.integer "root_manifestation_id"
1089
1089
  t.text "note"
1090
1090
  t.text "title_subseries_transcription"
Binary file
@@ -0,0 +1,3 @@
1
+ isbn library_short_name
2
+ invalid
3
+ 9784873113647
@@ -0,0 +1,11 @@
1
+ "item_identifier"
2
+ "00001"
3
+ "00002"
4
+ "00003"
5
+ "00004"
6
+ "00005"
7
+ "00006"
8
+ "00007"
9
+ "00008"
10
+ "00009"
11
+ "00010"
@@ -0,0 +1,4 @@
1
+ item_identifier original_title creator publisher subject acquired_at
2
+ "00001" たなべ// こうすけ test1 test1// test2
3
+ "00002" test2
4
+ "00003" テスト3 2012-01-01
@@ -0,0 +1,19 @@
1
+ manifestation_identifier original_title note title_transcription title_alternative periodical series_statement_identifier series_title series_title_transcription creator creator_transcription publisher publisher_transcription pub_date volume_number_string edition isbn issn manifestation_price item_price height shelf item_identifier nbn lccn subject budget_type bookstore dummy
2
+ 資料ID タイトル 注記 タイトルよみ 代替タイトル 定期刊行物フラグ シリーズ番号 シリーズタイトル シリーズタイトルよみ 著者 著者よみ 出版者 出版者よみ 出版日 巻 版 isbn issn 販売価格 受入価格 高さ 書架名 個別資料ID nbn lccn 件名 インポート省略
3
+ test1 ○ identifierなし、item_identifierなし test てすと test2 invalid
4
+ test2 ○ identifierなし、item_identifierあり test||author//test1||illustrator 2001 10101 Public fund Example store
5
+ 101 test3 × ダミー test test2 Public fund Example store 適当な値
6
+ 101 test3 ○ identifierあり、item_identifierなし 主シリーズ//副シリーズ//1 しゅしりーず//ふくしりーず//いち test test2
7
+ 102 test4 ○ identifierあり、item_identifierあり test1 test 2001-1 10102
8
+ 101 “test 5” △ identifier重複、item_identifier非重複 test1||author//test2||illustrator てすと1//てすと2 test 10103 Example store
9
+ 102 test6 × identifier重複、item_identifier重複 test test3 10101
10
+ test7 ○ ISBN不正、タイトルあり、所蔵情報あり 2001-1-1 9000000000000 first_shelf 10104 Public fund
11
+ × ISBN不正、タイトルなし 22222222 10105
12
+ test8 ○ ISBNなし、所蔵情報あり test test4//test5 てすと4//てすと5 1000 0 first_shelf 11111
13
+ test9 × item_identifier重複 11111
14
+ ○ ISBN重複(シリーズ情報あり)、item_identifierなし 4798002062
15
+ △ ISBN重複(シリーズ情報なし)、item_identifier非重複 4798002062 11112
16
+ × ISBN重複、item_identifier重複 4798002062 11111
17
+ × ISBN重複(13桁)、item_identifierなし 978-4798002064
18
+ 103 "ダブル""クォート""を含む資料" ○ ダブルクォートを含む資料
19
+ 104 test10 ○ TSV中にタイトルがあれば他の項目もTSVファイル優先 test3 test4 4797327030
@@ -0,0 +1,19 @@
1
+ manifestation_identifier original_title note title_transcription title_alternative periodical series_statement_identifier series_title series_title_transcription creator creator_transcription publisher publisher_transcription pub_date volume_number_string edition isbn issn manifestation_price item_price height shelf item_identifier nbn lccn subject budget_type bookstore dummy
2
+ ����ID �^�C�g�� ���L �^�C�g����� ��փ^�C�g�� ������s���t���O �V���[�Y�ԍ� �V���[�Y�^�C�g�� �V���[�Y�^�C�g����� ���� ���҂�� �o�Ŏ� �o�Ŏ҂�� �o�œ� �� �� isbn issn �̔����i ������i ���� ���˖� �•ʎ���ID nbn lccn ���� �C���|�[�g�ȗ�
3
+ test1 �� identifier�Ȃ��Aitem_identifier�Ȃ� test �Ă��� test2 invalid
4
+ test2 �� identifier�Ȃ��Aitem_identifier���� test||author//test1||illustrator 2001 10101 Public fund Example store
5
+ 101 test3 �~ �_�~�[ test test2 Public fund Example store �K���Ȓl
6
+ 101 test3 �� identifier����Aitem_identifier�Ȃ� ��V���[�Y//���V���[�Y//1 ���サ��[��//�ӂ�����[��//���� test test2
7
+ 102 test4 �� identifier����Aitem_identifier���� test1 test 2001-1 10102
8
+ 101 �gtest 5�h �� identifier�d���Aitem_identifier��d�� test1||author//test2||illustrator ����1//����2 test 10103 Example store
9
+ 102 test6 �~ identifier�d���Aitem_identifier�d�� test test3 10101
10
+ test7 �� ISBN�s���A�^�C�g������A������񂠂� 2001-1-1 9000000000000 first_shelf 10104 Public fund
11
+ �~ ISBN�s���A�^�C�g���Ȃ� 22222222 10105
12
+ test8 �� ISBN�Ȃ��A������񂠂� test test4//test5 �Ă���4//�Ă���5 1000 0 first_shelf 11111
13
+ test9 �~ item_identifier�d�� 11111
14
+ �� ISBN�d���i�V���[�Y��񂠂�j�Aitem_identifier�Ȃ� 4798002062
15
+ �� ISBN�d���i�V���[�Y���Ȃ��j�Aitem_identifier��d�� 4798002062 11112
16
+ �~ ISBN�d���Aitem_identifier�d�� 4798002062 11111
17
+ �~ ISBN�d���i13���j�Aitem_identifier�Ȃ� 978-4798002064
18
+ 103 "�_�u��""�N�H�[�g""���܂ގ���" �� �_�u���N�H�[�g���܂ގ���
19
+ 104 test10 �� TSV���Ƀ^�C�g��������Α��̍��ڂ�TSV�t�@�C���D�� test3 test4 4797327030
@@ -0,0 +1,2 @@
1
+ manifestation_id series_statement_id
2
+ 10 2
@@ -84,14 +84,11 @@
84
84
  <fieldType name="tfloat" class="solr.TrieFloatField" omitNorms="true"/>
85
85
  <!-- *** This fieldType is used by Sunspot! *** -->
86
86
  <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true"/>
87
-
88
- <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
89
- <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
90
87
  </types>
91
88
  <fields>
92
89
  <!-- Valid attributes for fields:
93
90
  name: mandatory - the name for the field
94
- type: mandatory - the name of a previously defined type from the
91
+ type: mandatory - the name of a previously defined type from the
95
92
  <types> section
96
93
  indexed: true if this field should be indexed (searchable or sortable)
97
94
  stored: true if this field should be retrievable
@@ -226,17 +223,8 @@
226
223
  <dynamicField name="*_ets" stored="true" termVectors="true" type="tdouble" multiValued="false" indexed="true"/>
227
224
  <!-- *** This dynamicField is used by Sunspot! *** -->
228
225
  <dynamicField name="*_etms" stored="true" termVectors="true" type="tdouble" multiValued="true" indexed="true"/>
229
-
230
- <!-- Type used to index the lat and lon components for the "location" FieldType -->
231
- <dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false" multiValued="false"/>
232
- <dynamicField name="*_p" type="location" indexed="true" stored="true" multiValued="false"/>
233
-
234
- <dynamicField name="*_ll" stored="false" type="location" multiValued="false" indexed="true"/>
235
- <dynamicField name="*_llm" stored="false" type="location" multiValued="true" indexed="true"/>
236
- <dynamicField name="*_lls" stored="true" type="location" multiValued="false" indexed="true"/>
237
- <dynamicField name="*_llms" stored="true" type="location" multiValued="true" indexed="true"/>
238
226
  </fields>
239
- <!-- Field to use to determine and enforce document uniqueness.
227
+ <!-- Field to use to determine and enforce document uniqueness.
240
228
  Unless this field is marked with required="false", it will be a required field
241
229
  -->
242
230
  <uniqueKey>id</uniqueKey>
@@ -19,6 +19,7 @@ three:
19
19
  original_title: テスト雑誌
20
20
  periodical: true
21
21
  position: 3
22
+ root_manifestation_id: 201
22
23
 
23
24
 
24
25
  # == Schema Information
@@ -11,6 +11,18 @@ describe SeriesStatement do
11
11
  series_statement.reload
12
12
  series_statement.root_manifestation.periodical_master?.should be_true
13
13
  end
14
+
15
+ it "should destroy root_manifestation" do
16
+ series_statement = FactoryGirl.create(:series_statement, :periodical => true)
17
+ series_statement.root_manifestation = Manifestation.first
18
+ series_statement.save
19
+ series_statement.reload
20
+ series_statement.root_manifestation.should be_true
21
+ series_statement.periodical = false
22
+ series_statement.save
23
+ series_statement.reload
24
+ series_statement.root_manifestation.should be_nil
25
+ end
14
26
  end
15
27
 
16
28
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_biblio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre8
4
+ version: 0.1.0.pre9
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-23 00:00:00.000000000 Z
12
+ date: 2012-11-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -251,6 +251,22 @@ dependencies:
251
251
  - - ! '>='
252
252
  - !ruby/object:Gem::Version
253
253
  version: '0'
254
+ - !ruby/object:Gem::Dependency
255
+ name: lisbn
256
+ requirement: !ruby/object:Gem::Requirement
257
+ none: false
258
+ requirements:
259
+ - - ! '>='
260
+ - !ruby/object:Gem::Version
261
+ version: '0'
262
+ type: :runtime
263
+ prerelease: false
264
+ version_requirements: !ruby/object:Gem::Requirement
265
+ none: false
266
+ requirements:
267
+ - - ! '>='
268
+ - !ruby/object:Gem::Version
269
+ version: '0'
254
270
  - !ruby/object:Gem::Dependency
255
271
  name: sqlite3
256
272
  requirement: !ruby/object:Gem::Requirement
@@ -498,7 +514,7 @@ dependencies:
498
514
  requirements:
499
515
  - - ~>
500
516
  - !ruby/object:Gem::Version
501
- version: 0.1.0.pre4
517
+ version: 0.1.0.pre5
502
518
  type: :development
503
519
  prerelease: false
504
520
  version_requirements: !ruby/object:Gem::Requirement
@@ -506,7 +522,7 @@ dependencies:
506
522
  requirements:
507
523
  - - ~>
508
524
  - !ruby/object:Gem::Version
509
- version: 0.1.0.pre4
525
+ version: 0.1.0.pre5
510
526
  description: Bibliographic record module for Next-L Enju
511
527
  email:
512
528
  - tanabe@mwr.mediacom.keio.ac.jp
@@ -876,6 +892,7 @@ files:
876
892
  - app/views/series_statements/_index_series_statement_merge_list.html.erb
877
893
  - app/views/series_statements/_manifestation_list.html.erb
878
894
  - app/views/series_statements/_merge.html.erb
895
+ - app/views/series_statements/_periodical_facet.html.erb
879
896
  - app/views/series_statements/_refine_search_form.html.erb
880
897
  - app/views/series_statements/_tab_menu.html.erb
881
898
  - app/views/series_statements/edit.html.erb
@@ -1121,6 +1138,7 @@ files:
1121
1138
  - spec/dummy/db/migrate/20120415060342_rename_event_import_file_imported_at_to_executed_at.rb
1122
1139
  - spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb
1123
1140
  - spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb
1141
+ - spec/dummy/db/production.sqlite3
1124
1142
  - spec/dummy/db/schema.rb
1125
1143
  - spec/dummy/db/test.sqlite3
1126
1144
  - spec/dummy/lib/plugins/ext/event-calendar.rb
@@ -1143,10 +1161,19 @@ files:
1143
1161
  - spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample1.tsv
1144
1162
  - spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample2.tsv
1145
1163
  - spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/update_series_statement.tsv
1164
+ - spec/dummy/private/system/resource_imports/4/original/isbn_sample.txt
1165
+ - spec/dummy/private/system/resource_imports/4/original/item_delete_file.tsv
1166
+ - spec/dummy/private/system/resource_imports/4/original/item_update_file.tsv
1167
+ - spec/dummy/private/system/resource_imports/4/original/resource_import_file_sample1.tsv
1168
+ - spec/dummy/private/system/resource_imports/4/original/resource_import_file_sample2.tsv
1169
+ - spec/dummy/private/system/resource_imports/4/original/update_series_statement.tsv
1146
1170
  - spec/dummy/public/404.html
1147
1171
  - spec/dummy/public/422.html
1148
1172
  - spec/dummy/public/500.html
1149
1173
  - spec/dummy/public/favicon.ico
1174
+ - spec/dummy/public/system/picture_files/pictures/000/000/005/medium/spinner.gif
1175
+ - spec/dummy/public/system/picture_files/pictures/000/000/005/original/spinner.gif
1176
+ - spec/dummy/public/system/picture_files/pictures/000/000/005/thumb/spinner.gif
1150
1177
  - spec/dummy/Rakefile
1151
1178
  - spec/dummy/README.rdoc
1152
1179
  - spec/dummy/script/rails
@@ -1161,7 +1188,7 @@ files:
1161
1188
  - spec/dummy/solr/conf/stopwords.txt
1162
1189
  - spec/dummy/solr/conf/synonyms.txt
1163
1190
  - spec/dummy/solr/data/test/index/segments.gen
1164
- - spec/dummy/solr/data/test/index/segments_gf
1191
+ - spec/dummy/solr/data/test/index/segments_7y4
1165
1192
  - spec/dummy/solr/data/test/spellchecker/segments.gen
1166
1193
  - spec/dummy/solr/data/test/spellchecker/segments_1
1167
1194
  - spec/factories/accepts.rb
@@ -1550,6 +1577,7 @@ test_files:
1550
1577
  - spec/dummy/db/migrate/20120415060342_rename_event_import_file_imported_at_to_executed_at.rb
1551
1578
  - spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb
1552
1579
  - spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb
1580
+ - spec/dummy/db/production.sqlite3
1553
1581
  - spec/dummy/db/schema.rb
1554
1582
  - spec/dummy/db/test.sqlite3
1555
1583
  - spec/dummy/lib/plugins/ext/event-calendar.rb
@@ -1572,10 +1600,19 @@ test_files:
1572
1600
  - spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample1.tsv
1573
1601
  - spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample2.tsv
1574
1602
  - spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/update_series_statement.tsv
1603
+ - spec/dummy/private/system/resource_imports/4/original/isbn_sample.txt
1604
+ - spec/dummy/private/system/resource_imports/4/original/item_delete_file.tsv
1605
+ - spec/dummy/private/system/resource_imports/4/original/item_update_file.tsv
1606
+ - spec/dummy/private/system/resource_imports/4/original/resource_import_file_sample1.tsv
1607
+ - spec/dummy/private/system/resource_imports/4/original/resource_import_file_sample2.tsv
1608
+ - spec/dummy/private/system/resource_imports/4/original/update_series_statement.tsv
1575
1609
  - spec/dummy/public/404.html
1576
1610
  - spec/dummy/public/422.html
1577
1611
  - spec/dummy/public/500.html
1578
1612
  - spec/dummy/public/favicon.ico
1613
+ - spec/dummy/public/system/picture_files/pictures/000/000/005/medium/spinner.gif
1614
+ - spec/dummy/public/system/picture_files/pictures/000/000/005/original/spinner.gif
1615
+ - spec/dummy/public/system/picture_files/pictures/000/000/005/thumb/spinner.gif
1579
1616
  - spec/dummy/Rakefile
1580
1617
  - spec/dummy/README.rdoc
1581
1618
  - spec/dummy/script/rails
@@ -1590,7 +1627,7 @@ test_files:
1590
1627
  - spec/dummy/solr/conf/stopwords.txt
1591
1628
  - spec/dummy/solr/conf/synonyms.txt
1592
1629
  - spec/dummy/solr/data/test/index/segments.gen
1593
- - spec/dummy/solr/data/test/index/segments_gf
1630
+ - spec/dummy/solr/data/test/index/segments_7y4
1594
1631
  - spec/dummy/solr/data/test/spellchecker/segments.gen
1595
1632
  - spec/dummy/solr/data/test/spellchecker/segments_1
1596
1633
  - spec/factories/accepts.rb