enju_ndl 0.1.0.pre21 → 0.1.0.pre22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/ndl_books_controller.rb +1 -1
- data/app/helpers/ndl_books_helper.rb +5 -5
- data/app/models/ndl_book.rb +1 -1
- data/lib/enju_ndl/ndl_search.rb +11 -12
- data/lib/enju_ndl/version.rb +1 -1
- data/spec/cassette_library/ImportRequest/should_import_isbn.yml +11 -11
- data/spec/cassette_library/Manifestation/should_imporrt_a_bibliographic_record.yml +12 -12
- data/spec/cassette_library/Manifestation/should_import_isbn.yml +10 -10
- data/spec/cassette_library/NdlBook/import/should_get_series_title.yml +6 -6
- data/spec/cassette_library/NdlBook/import/should_get_volume_number.yml +6 -6
- data/spec/cassette_library/NdlBook/import/should_import_audio_cd.yml +6 -6
- data/spec/cassette_library/NdlBook/import/should_import_bibliographic_record.yml +6 -6
- data/spec/cassette_library/NdlBook/import/should_import_bibliographic_record_that_does_not_have_any_classifications.yml +5 -5
- data/spec/cassette_library/NdlBook/import/should_import_pud_date_is_nil.yml +6 -6
- data/spec/cassette_library/NdlBook/import/should_import_series_statement.yml +6 -6
- data/spec/cassette_library/NdlBook/import/should_import_series_statement_if_the_resource_is_periodical.yml +144 -181
- data/spec/cassette_library/NdlBook/import/should_import_title_alternative.yml +6 -6
- data/spec/cassette_library/NdlBook/import/should_import_url_contain_whitespace.yml +5 -5
- data/spec/cassette_library/NdlBook/import/should_import_video_dvd.yml +6 -6
- data/spec/cassette_library/NdlBook/import/should_import_volume_number_string.yml +135 -133
- data/spec/cassette_library/NdlBook/import/should_not_get_series_title_if_book_has_not_series_title.yml +5 -5
- data/spec/cassette_library/NdlBook/import/should_not_get_volume_number_if_book_has_not_volume.yml +6 -6
- data/spec/cassette_library/NdlBook/search/should_not_distinguish_double_byte_space_from_one-byte_space_in_a_query.yml +12 -12
- data/spec/cassette_library/NdlBook/search/should_search_bibliographic_record.yml +34 -32
- data/spec/cassette_library/NdlBooksController/GET_index/should_get_index.yml +8 -8
- data/spec/cassette_library/NdlBooksController/POST_create/{should_create_a_bibliographic_record_if_nbn_is_set.yml → should_create_a_bibliographic_record_if_jpno_is_set.yml} +5 -5
- data/spec/cassette_library/NdlBooksController/POST_create/{should_not_create_a_bibliographic_record_if_nbn_is_not_set.yml → should_not_create_a_bibliographic_record_if_jpno_is_not_set.yml} +6 -6
- data/spec/cassette_library/Question/should_respond_to_search_crd.yml +3 -3
- data/spec/controllers/ndl_books_controller_spec.rb +5 -5
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +5 -0
- data/spec/dummy/db/schema.rb +2 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/fixtures/classification_types.yml +13 -0
- data/spec/fixtures/identifier_types.yml +7 -0
- data/spec/models/ndl_book_spec.rb +2 -1
- metadata +14 -10
@@ -19,7 +19,7 @@ http_interactions:
|
|
19
19
|
message: OK
|
20
20
|
headers:
|
21
21
|
date:
|
22
|
-
-
|
22
|
+
- Tue, 14 May 2013 04:32:13 GMT
|
23
23
|
server:
|
24
24
|
- Apache
|
25
25
|
etag:
|
@@ -27,7 +27,7 @@ http_interactions:
|
|
27
27
|
x-ua-compatible:
|
28
28
|
- IE=Edge,chrome=1
|
29
29
|
x-runtime:
|
30
|
-
- '0.
|
30
|
+
- '0.007394'
|
31
31
|
cache-control:
|
32
32
|
- max-age=0, private, must-revalidate
|
33
33
|
status:
|
@@ -35,9 +35,9 @@ http_interactions:
|
|
35
35
|
content-type:
|
36
36
|
- application/xml; charset=utf-8
|
37
37
|
set-cookie:
|
38
|
-
- _front_session_id=
|
39
|
-
path=/; expires=
|
40
|
-
- serverid=
|
38
|
+
- _front_session_id=71366c596f9b10ea5ba0b0f33c6ecd39; domain=.iss.ndl.go.jp;
|
39
|
+
path=/; expires=Tue, 14-May-2013 05:32:13 GMT; HttpOnly
|
40
|
+
- serverid=1105; path=/
|
41
41
|
vary:
|
42
42
|
- Accept-Encoding,User-Agent
|
43
43
|
content-encoding:
|
@@ -60,5 +60,5 @@ http_interactions:
|
|
60
60
|
</diagnostics>
|
61
61
|
</searchRetrieveResponse>
|
62
62
|
http_version: '1.0'
|
63
|
-
recorded_at:
|
63
|
+
recorded_at: Tue, 14 May 2013 04:32:13 GMT
|
64
64
|
recorded_with: VCR 2.4.0
|
@@ -19,13 +19,13 @@ http_interactions:
|
|
19
19
|
message: OK
|
20
20
|
headers:
|
21
21
|
date:
|
22
|
-
-
|
22
|
+
- Tue, 14 May 2013 04:32:31 GMT
|
23
23
|
server:
|
24
24
|
- Apache
|
25
25
|
x-powered-by:
|
26
26
|
- PHP/5.4.8
|
27
27
|
set-cookie:
|
28
|
-
- ndl_crd_session=
|
28
|
+
- ndl_crd_session=kqubm3q1kpjmt3v9kig2jmq580; path=/reference/
|
29
29
|
expires:
|
30
30
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
31
31
|
cache-control:
|
@@ -538,5 +538,5 @@ http_interactions:
|
|
538
538
|
MDAwMTA2MDg5PC9VUkw+CQk8SU1BR0U+54ShPC9JTUFHRT4JCTxwb3NpdGlv
|
539
539
|
bj40PC9wb3NpdGlvbj4KCTwvcmVzdWx0PgoJPC9yZXN1bHRfc2V0Pg==
|
540
540
|
http_version: '1.0'
|
541
|
-
recorded_at:
|
541
|
+
recorded_at: Tue, 14 May 2013 04:32:32 GMT
|
542
542
|
recorded_with: VCR 2.4.0
|
@@ -24,14 +24,14 @@ describe NdlBooksController do
|
|
24
24
|
describe "POST create" do
|
25
25
|
login_fixture_admin
|
26
26
|
|
27
|
-
it "should create a bibliographic record if
|
28
|
-
post :create, :book => {:
|
29
|
-
assigns(:manifestation).identifier_contents(:
|
27
|
+
it "should create a bibliographic record if jpno is set", :vcr => true do
|
28
|
+
post :create, :book => {:jpno => '97024234'}
|
29
|
+
assigns(:manifestation).identifier_contents(:jpno).should eq ['97024234']
|
30
30
|
response.should redirect_to manifestation_items_url(assigns(:manifestation))
|
31
31
|
end
|
32
32
|
|
33
|
-
it "should not create a bibliographic record if
|
34
|
-
post :create, :book => {:
|
33
|
+
it "should not create a bibliographic record if jpno is not set", :vcr => true do
|
34
|
+
post :create, :book => {:jpno => nil}
|
35
35
|
assigns(:manifestation).should be_nil
|
36
36
|
response.should redirect_to ndl_books_url
|
37
37
|
end
|
Binary file
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20130509185724) do
|
15
15
|
|
16
16
|
create_table "carrier_types", :force => true do |t|
|
17
17
|
t.string "name", :null => false
|
@@ -304,6 +304,7 @@ ActiveRecord::Schema.define(:version => 20130506175834) do
|
|
304
304
|
t.integer "month_of_publication"
|
305
305
|
t.string "doi"
|
306
306
|
t.boolean "periodical"
|
307
|
+
t.text "statement_of_responsibility"
|
307
308
|
end
|
308
309
|
|
309
310
|
add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -24,7 +24,7 @@ describe NdlBook do
|
|
24
24
|
manifestation.manifestation_identifier.should eq 'http://iss.ndl.go.jp/books/R100000002-I000010980901-00'
|
25
25
|
manifestation.identifier_contents(:isbn).should eq ['9784839931995']
|
26
26
|
manifestation.classifications.pluck(:category).should eq ["007.64"]
|
27
|
-
manifestation.identifier_contents(:
|
27
|
+
manifestation.identifier_contents(:jpno).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 'アキバ, タクヤ'
|
@@ -36,6 +36,7 @@ describe NdlBook do
|
|
36
36
|
manifestation.subjects.size.should eq 1
|
37
37
|
manifestation.subjects.first.subject_heading_type.name.should eq 'ndlsh'
|
38
38
|
manifestation.subjects.first.term.should eq 'プログラミング (コンピュータ)'
|
39
|
+
manifestation.statement_of_responsibility.should eq '秋葉拓哉, 岩田陽一, 北川宜稔 著; Usu-ya 編'
|
39
40
|
end
|
40
41
|
|
41
42
|
it "should import bibliographic record that does not have any classifications", :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.
|
4
|
+
version: 0.1.0.pre22
|
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-
|
11
|
+
date: 2013-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.1.0.
|
75
|
+
version: 0.1.0.pre18
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.1.0.
|
82
|
+
version: 0.1.0.pre18
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: sqlite3
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - ~>
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.1.0.
|
145
|
+
version: 0.1.0.pre39
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - ~>
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.1.0.
|
152
|
+
version: 0.1.0.pre39
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: enju_question
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -236,8 +236,8 @@ files:
|
|
236
236
|
- spec/cassette_library/NdlBook/search/should_not_distinguish_double_byte_space_from_one-byte_space_in_a_query.yml
|
237
237
|
- spec/cassette_library/NdlBook/search/should_search_bibliographic_record.yml
|
238
238
|
- spec/cassette_library/NdlBooksController/GET_index/should_get_index.yml
|
239
|
-
- spec/cassette_library/NdlBooksController/POST_create/
|
240
|
-
- spec/cassette_library/NdlBooksController/POST_create/
|
239
|
+
- spec/cassette_library/NdlBooksController/POST_create/should_create_a_bibliographic_record_if_jpno_is_set.yml
|
240
|
+
- spec/cassette_library/NdlBooksController/POST_create/should_not_create_a_bibliographic_record_if_jpno_is_not_set.yml
|
241
241
|
- spec/cassette_library/Question/should_respond_to_search_crd.yml
|
242
242
|
- spec/controllers/ndl_books_controller_spec.rb
|
243
243
|
- spec/dummy/app/assets/javascripts/application.js
|
@@ -365,6 +365,7 @@ files:
|
|
365
365
|
- spec/dummy/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb
|
366
366
|
- spec/dummy/db/migrate/20130506175303_create_identifier_types.rb
|
367
367
|
- spec/dummy/db/migrate/20130506175834_create_identifiers.rb
|
368
|
+
- spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb
|
368
369
|
- spec/dummy/db/schema.rb
|
369
370
|
- spec/dummy/db/test.sqlite3
|
370
371
|
- spec/dummy/public/404.html
|
@@ -388,6 +389,7 @@ files:
|
|
388
389
|
- spec/dummy/test/unit/role_test.rb
|
389
390
|
- spec/dummy/test/unit/user_test.rb
|
390
391
|
- spec/fixtures/carrier_types.yml
|
392
|
+
- spec/fixtures/classification_types.yml
|
391
393
|
- spec/fixtures/content_types.yml
|
392
394
|
- spec/fixtures/countries.yml
|
393
395
|
- spec/fixtures/identifier_types.yml
|
@@ -450,8 +452,8 @@ test_files:
|
|
450
452
|
- spec/cassette_library/NdlBook/search/should_not_distinguish_double_byte_space_from_one-byte_space_in_a_query.yml
|
451
453
|
- spec/cassette_library/NdlBook/search/should_search_bibliographic_record.yml
|
452
454
|
- spec/cassette_library/NdlBooksController/GET_index/should_get_index.yml
|
453
|
-
- spec/cassette_library/NdlBooksController/POST_create/
|
454
|
-
- spec/cassette_library/NdlBooksController/POST_create/
|
455
|
+
- spec/cassette_library/NdlBooksController/POST_create/should_create_a_bibliographic_record_if_jpno_is_set.yml
|
456
|
+
- spec/cassette_library/NdlBooksController/POST_create/should_not_create_a_bibliographic_record_if_jpno_is_not_set.yml
|
455
457
|
- spec/cassette_library/Question/should_respond_to_search_crd.yml
|
456
458
|
- spec/controllers/ndl_books_controller_spec.rb
|
457
459
|
- spec/dummy/app/assets/javascripts/application.js
|
@@ -579,6 +581,7 @@ test_files:
|
|
579
581
|
- spec/dummy/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb
|
580
582
|
- spec/dummy/db/migrate/20130506175303_create_identifier_types.rb
|
581
583
|
- spec/dummy/db/migrate/20130506175834_create_identifiers.rb
|
584
|
+
- spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb
|
582
585
|
- spec/dummy/db/schema.rb
|
583
586
|
- spec/dummy/db/test.sqlite3
|
584
587
|
- spec/dummy/public/404.html
|
@@ -602,6 +605,7 @@ test_files:
|
|
602
605
|
- spec/dummy/test/unit/role_test.rb
|
603
606
|
- spec/dummy/test/unit/user_test.rb
|
604
607
|
- spec/fixtures/carrier_types.yml
|
608
|
+
- spec/fixtures/classification_types.yml
|
605
609
|
- spec/fixtures/content_types.yml
|
606
610
|
- spec/fixtures/countries.yml
|
607
611
|
- spec/fixtures/identifier_types.yml
|