enju_ndl 0.1.0.pre19 → 0.1.0.pre20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ ---
2
+ subject_heading_type_00001:
3
+ name: unknown
4
+ display_name: unknown
5
+ updated_at: 2008-03-03 00:44:49.850140 +09:00
6
+ id: 1
7
+ note: ""
8
+ created_at: 2008-03-03 00:44:34.260739 +09:00
9
+ position: 1
10
+ subject_heading_type_00002:
11
+ name: ndlsh
12
+ display_name: NDLSH
13
+ updated_at: 2008-03-03 00:44:49.850140 +09:00
14
+ id: 2
15
+ note: ""
16
+ created_at: 2008-03-03 00:44:34.260739 +09:00
17
+ position: 2
18
+ subject_heading_type_00003:
19
+ name: bsh
20
+ display_name: BSH
21
+ updated_at: 2008-03-03 00:44:58.685360 +09:00
22
+ id: 3
23
+ note: ""
24
+ created_at: 2008-03-03 00:44:58.685360 +09:00
25
+ position: 3
26
+
27
+ # == Schema Information
28
+ #
29
+ # Table name: subject_heading_types
30
+ #
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
38
+ #
39
+
@@ -1,28 +1,42 @@
1
1
  ---
2
2
  subject_type_00001:
3
3
  id: 1
4
- name: Concept
4
+ name: concept
5
5
  display_name: Concept
6
6
  note:
7
7
  position: 1
8
8
 
9
9
  subject_type_00002:
10
10
  id: 2
11
- name: Event
11
+ name: event
12
12
  display_name: Event
13
13
  note:
14
14
  position: 2
15
15
 
16
16
  subject_type_00003:
17
17
  id: 3
18
- name: Object
18
+ name: object
19
19
  display_name: Object
20
20
  note:
21
21
  position: 3
22
22
 
23
23
  subject_type_00004:
24
24
  id: 4
25
- name: Place
25
+ name: place
26
26
  display_name: Place
27
27
  note:
28
28
  position: 4
29
+
30
+ # == Schema Information
31
+ #
32
+ # Table name: subject_types
33
+ #
34
+ # id :integer not null, primary key
35
+ # name :string(255) not null
36
+ # display_name :text
37
+ # note :text
38
+ # position :integer
39
+ # created_at :datetime not null
40
+ # updated_at :datetime not null
41
+ #
42
+
@@ -0,0 +1,10 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'spec_helper'
3
+
4
+ describe ImportRequest do
5
+ fixtures :all
6
+
7
+ it "should import isbn", :vcr => true do
8
+ ImportRequest.import_isbn('4797327030').should be_valid
9
+ end
10
+ end
@@ -3,11 +3,13 @@ require 'spec_helper'
3
3
 
4
4
  describe Manifestation do
5
5
  fixtures :all
6
- VCR.use_cassette "enju_ndl/search", :record => :new_episodes do
7
6
 
8
- it "should imporrt a bibliographic record" do
9
- manifestation = Manifestation.import_from_ndl_search(:isbn => '406258087X')
10
- manifestation.should be_valid
11
- end
7
+ it "should imporrt a bibliographic record", :vcr => true do
8
+ manifestation = Manifestation.import_from_ndl_search(:isbn => '406258087X')
9
+ manifestation.should be_valid
10
+ end
11
+
12
+ it "should import isbn", :vcr => true do
13
+ Manifestation.import_isbn('4797327030').should be_valid
12
14
  end
13
15
  end
@@ -22,9 +22,9 @@ describe NdlBook do
22
22
  it "should import bibliographic record", :vcr => true do
23
23
  manifestation = NdlBook.import_from_sru_response('21816393')
24
24
  manifestation.manifestation_identifier.should eq 'http://iss.ndl.go.jp/books/R100000002-I000010980901-00'
25
- manifestation.isbn.should eq '9784839931995'
25
+ manifestation.identifier_contents(:isbn).should eq ['9784839931995']
26
26
  manifestation.classifications.pluck(:category).should eq ["007.64"]
27
- manifestation.nbn.should eq "21816393"
27
+ manifestation.identifier_contents(:nbn).should eq ["21816393"]
28
28
  manifestation.language.name.should eq "Japanese"
29
29
  manifestation.creators.first.full_name.should eq '秋葉, 拓哉'
30
30
  manifestation.creators.first.full_name_transcription.should eq 'アキバ, タクヤ'
@@ -66,8 +66,8 @@ describe NdlBook do
66
66
  it "should import series_statement if the resource is periodical", :vcr => true do
67
67
  manifestation = NdlBook.import_from_sru_response('00010852')
68
68
  manifestation.original_title.should eq "週刊新潮"
69
- manifestation.series_statements.first.original_title.should eq "週刊新潮"
70
- manifestation.periodical.should be_false
69
+ #manifestation.series_statements.first.original_title.should eq "週刊新潮"
70
+ manifestation.periodical.should be_true
71
71
  end
72
72
 
73
73
  it "should import pud_date is nil", :vcr => true do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_ndl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre19
4
+ version: 0.1.0.pre20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-06 00:00:00.000000000 Z
11
+ date: 2013-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -216,6 +216,9 @@ files:
216
216
  - MIT-LICENSE
217
217
  - Rakefile
218
218
  - README.rdoc
219
+ - spec/cassette_library/ImportRequest/should_import_isbn.yml
220
+ - spec/cassette_library/Manifestation/should_imporrt_a_bibliographic_record.yml
221
+ - spec/cassette_library/Manifestation/should_import_isbn.yml
219
222
  - spec/cassette_library/NdlBook/import/should_get_series_title.yml
220
223
  - spec/cassette_library/NdlBook/import/should_get_volume_number.yml
221
224
  - spec/cassette_library/NdlBook/import/should_import_audio_cd.yml
@@ -360,6 +363,8 @@ files:
360
363
  - spec/dummy/db/migrate/20130504133816_add_manifestation_id_to_subject.rb
361
364
  - spec/dummy/db/migrate/20130504143515_add_manifestation_id_to_classification.rb
362
365
  - spec/dummy/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb
366
+ - spec/dummy/db/migrate/20130506175303_create_identifier_types.rb
367
+ - spec/dummy/db/migrate/20130506175834_create_identifiers.rb
363
368
  - spec/dummy/db/schema.rb
364
369
  - spec/dummy/db/test.sqlite3
365
370
  - spec/dummy/public/404.html
@@ -385,12 +390,15 @@ files:
385
390
  - spec/fixtures/carrier_types.yml
386
391
  - spec/fixtures/content_types.yml
387
392
  - spec/fixtures/countries.yml
393
+ - spec/fixtures/identifier_types.yml
388
394
  - spec/fixtures/languages.yml
389
395
  - spec/fixtures/patron_types.yml
390
396
  - spec/fixtures/roles.yml
397
+ - spec/fixtures/subject_heading_types.yml
391
398
  - spec/fixtures/subject_types.yml
392
399
  - spec/fixtures/user_has_roles.yml
393
400
  - spec/fixtures/users.yml
401
+ - spec/models/import_request_spec.rb
394
402
  - spec/models/manifestation_spec.rb
395
403
  - spec/models/ndl_book_spec.rb
396
404
  - spec/models/question_spec.rb
@@ -422,6 +430,9 @@ signing_key:
422
430
  specification_version: 4
423
431
  summary: enju_ndl plugin
424
432
  test_files:
433
+ - spec/cassette_library/ImportRequest/should_import_isbn.yml
434
+ - spec/cassette_library/Manifestation/should_imporrt_a_bibliographic_record.yml
435
+ - spec/cassette_library/Manifestation/should_import_isbn.yml
425
436
  - spec/cassette_library/NdlBook/import/should_get_series_title.yml
426
437
  - spec/cassette_library/NdlBook/import/should_get_volume_number.yml
427
438
  - spec/cassette_library/NdlBook/import/should_import_audio_cd.yml
@@ -566,6 +577,8 @@ test_files:
566
577
  - spec/dummy/db/migrate/20130504133816_add_manifestation_id_to_subject.rb
567
578
  - spec/dummy/db/migrate/20130504143515_add_manifestation_id_to_classification.rb
568
579
  - spec/dummy/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb
580
+ - spec/dummy/db/migrate/20130506175303_create_identifier_types.rb
581
+ - spec/dummy/db/migrate/20130506175834_create_identifiers.rb
569
582
  - spec/dummy/db/schema.rb
570
583
  - spec/dummy/db/test.sqlite3
571
584
  - spec/dummy/public/404.html
@@ -591,12 +604,15 @@ test_files:
591
604
  - spec/fixtures/carrier_types.yml
592
605
  - spec/fixtures/content_types.yml
593
606
  - spec/fixtures/countries.yml
607
+ - spec/fixtures/identifier_types.yml
594
608
  - spec/fixtures/languages.yml
595
609
  - spec/fixtures/patron_types.yml
596
610
  - spec/fixtures/roles.yml
611
+ - spec/fixtures/subject_heading_types.yml
597
612
  - spec/fixtures/subject_types.yml
598
613
  - spec/fixtures/user_has_roles.yml
599
614
  - spec/fixtures/users.yml
615
+ - spec/models/import_request_spec.rb
600
616
  - spec/models/manifestation_spec.rb
601
617
  - spec/models/ndl_book_spec.rb
602
618
  - spec/models/question_spec.rb