enju_ndl 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.
- checksums.yaml +4 -4
- data/lib/enju_ndl/ndl_search.rb +7 -12
- data/lib/enju_ndl/version.rb +1 -1
- data/spec/cassette_library/NdlBook/import/should_get_series_title.yml +6 -6
- data/spec/cassette_library/NdlBook/import/should_get_volume_number.yml +8 -8
- data/spec/cassette_library/NdlBook/import/should_import_audio_cd.yml +5 -5
- data/spec/cassette_library/NdlBook/import/should_import_bibliographic_record.yml +5 -5
- data/spec/cassette_library/NdlBook/import/should_import_bibliographic_record_that_does_not_have_any_classifications.yml +6 -6
- 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 +5 -5
- data/spec/cassette_library/NdlBook/import/should_import_series_statement_if_the_resource_is_periodical.yml +161 -190
- data/spec/cassette_library/NdlBook/import/should_import_title_alternative.yml +163 -165
- data/spec/cassette_library/NdlBook/import/should_import_url_contain_whitespace.yml +151 -154
- 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 +131 -134
- data/spec/cassette_library/NdlBook/import/should_not_get_series_title_if_book_has_not_series_title.yml +6 -6
- 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 +208 -198
- data/spec/cassette_library/NdlBook/search/should_search_bibliographic_record.yml +34 -36
- data/spec/cassette_library/NdlBooksController/GET_index/should_get_index.yml +133 -133
- data/spec/cassette_library/NdlBooksController/POST_create/should_create_a_bibliographic_record_if_nbn_is_set.yml +7 -7
- data/spec/cassette_library/NdlBooksController/POST_create/should_not_create_a_bibliographic_record_if_nbn_is_not_set.yml +6 -6
- data/spec/cassette_library/Question/should_respond_to_search_crd.yml +456 -456
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/models/manifestation_spec.rb +1 -1
- data/spec/models/ndl_book_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9724c8694811e438179387d1234ddfa7b2410cc
|
4
|
+
data.tar.gz: 4a73dc043ecfe6929a967e3a4dad1077d619549d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07ee6cd50bcb9ed88c9d8c4530ad728f3ad8b975b3ab57aa10eb8d2de8074c762a37a81ec30e818e1b7e6987da94ab9e7bc7006fae44c1d74392b84b96154e9f
|
7
|
+
data.tar.gz: 6da4ded4fa6be71d972cfde1e7bc60f022e9f0ae7f7ad7cc58094759d7bf445ce1e190a082c5b74690ded92defe1540b59204c1cfa05eca3c9eafe5b7004f7ba
|
data/lib/enju_ndl/ndl_search.rb
CHANGED
@@ -6,10 +6,11 @@ module EnjuNdl
|
|
6
6
|
end
|
7
7
|
|
8
8
|
module ClassMethods
|
9
|
-
def
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
def import_from_ndl_search(options)
|
10
|
+
#if options[:isbn]
|
11
|
+
lisbn = Lisbn.new(options[:isbn])
|
12
|
+
raise EnjuNdl::InvalidIsbn unless lisbn.valid?
|
13
|
+
#end
|
13
14
|
|
14
15
|
manifestation = Manifestation.find_by_isbn(lisbn.isbn)
|
15
16
|
return manifestation if manifestation
|
@@ -110,7 +111,7 @@ module EnjuNdl
|
|
110
111
|
manifestation.manifestation_content_type = content_type if content_type
|
111
112
|
if manifestation.save
|
112
113
|
manifestation.publishers << publisher_patrons
|
113
|
-
|
114
|
+
create_additional_attributes(doc, manifestation)
|
114
115
|
create_series_statement(doc, manifestation)
|
115
116
|
end
|
116
117
|
end
|
@@ -119,13 +120,7 @@ module EnjuNdl
|
|
119
120
|
return manifestation
|
120
121
|
end
|
121
122
|
|
122
|
-
def
|
123
|
-
manifestation = import_isbn(isbn)
|
124
|
-
manifestation.save!
|
125
|
-
manifestation
|
126
|
-
end
|
127
|
-
|
128
|
-
def create_frbr_instance(doc, manifestation)
|
123
|
+
def create_additional_attributes(doc, manifestation)
|
129
124
|
title = get_title(doc)
|
130
125
|
creators = get_creators(doc).uniq
|
131
126
|
language = get_language(doc)
|
data/lib/enju_ndl/version.rb
CHANGED
@@ -19,7 +19,7 @@ http_interactions:
|
|
19
19
|
message: OK
|
20
20
|
headers:
|
21
21
|
date:
|
22
|
-
-
|
22
|
+
- Wed, 10 Apr 2013 02:43:51 GMT
|
23
23
|
server:
|
24
24
|
- Apache
|
25
25
|
x-powered-by:
|
@@ -29,7 +29,7 @@ http_interactions:
|
|
29
29
|
x-ua-compatible:
|
30
30
|
- IE=Edge,chrome=1
|
31
31
|
x-runtime:
|
32
|
-
- '0.
|
32
|
+
- '0.222430'
|
33
33
|
cache-control:
|
34
34
|
- max-age=0, private, must-revalidate
|
35
35
|
status:
|
@@ -37,9 +37,9 @@ http_interactions:
|
|
37
37
|
content-type:
|
38
38
|
- application/xml; charset=utf-8
|
39
39
|
set-cookie:
|
40
|
-
- _front_session_id=
|
41
|
-
path=/; expires=
|
42
|
-
- serverid=
|
40
|
+
- _front_session_id=c074feccdbb7d54773865f76e7ac53ca; domain=.iss.ndl.go.jp;
|
41
|
+
path=/; expires=Wed, 10-Apr-2013 03:43:51 GMT; HttpOnly
|
42
|
+
- serverid=1102; path=/
|
43
43
|
vary:
|
44
44
|
- Accept-Encoding,User-Agent
|
45
45
|
content-encoding:
|
@@ -111,5 +111,5 @@ http_interactions:
|
|
111
111
|
dHA6Ly9pZC5uZGwuZ28uanAvYmliLzAwMDAwODE4MDAwMyIvPgogICAgPC9p
|
112
112
|
dGVtPgogIDwvY2hhbm5lbD4KPC9yc3M+Cg==
|
113
113
|
http_version: '1.0'
|
114
|
-
recorded_at:
|
114
|
+
recorded_at: Wed, 10 Apr 2013 02:43:52 GMT
|
115
115
|
recorded_with: VCR 2.4.0
|
@@ -19,17 +19,17 @@ http_interactions:
|
|
19
19
|
message: OK
|
20
20
|
headers:
|
21
21
|
date:
|
22
|
-
-
|
22
|
+
- Wed, 10 Apr 2013 02:43:51 GMT
|
23
23
|
server:
|
24
24
|
- Apache
|
25
25
|
x-powered-by:
|
26
26
|
- Phusion Passenger (mod_rails/mod_rack) 2.2.15
|
27
27
|
etag:
|
28
|
-
- '"
|
28
|
+
- '"867921384dfb763ce72815f16b2b5dc1"'
|
29
29
|
x-ua-compatible:
|
30
30
|
- IE=Edge,chrome=1
|
31
31
|
x-runtime:
|
32
|
-
- '0.
|
32
|
+
- '0.259952'
|
33
33
|
cache-control:
|
34
34
|
- max-age=0, private, must-revalidate
|
35
35
|
status:
|
@@ -37,15 +37,15 @@ http_interactions:
|
|
37
37
|
content-type:
|
38
38
|
- application/xml; charset=utf-8
|
39
39
|
set-cookie:
|
40
|
-
- _front_session_id=
|
41
|
-
path=/; expires=
|
40
|
+
- _front_session_id=c0a313bb37c8a017568b09ab18c626cd; domain=.iss.ndl.go.jp;
|
41
|
+
path=/; expires=Wed, 10-Apr-2013 03:43:51 GMT; HttpOnly
|
42
42
|
- serverid=1101; path=/
|
43
43
|
vary:
|
44
44
|
- Accept-Encoding,User-Agent
|
45
45
|
content-encoding:
|
46
46
|
- gzip
|
47
47
|
content-length:
|
48
|
-
- '
|
48
|
+
- '1174'
|
49
49
|
connection:
|
50
50
|
- close
|
51
51
|
body:
|
@@ -85,7 +85,7 @@ http_interactions:
|
|
85
85
|
5Yay5pa55LiBIFvokZddLDwvYXV0aG9yPgogICAgICA8Y2F0ZWdvcnk+5pys
|
86
86
|
PC9jYXRlZ29yeT4KICAgICAgPGd1aWQgaXNQZXJtYUxpbms9InRydWUiPmh0
|
87
87
|
dHA6Ly9pc3MubmRsLmdvLmpwL2Jvb2tzL1IxMDAwMDAwMDItSTAyMzU5MTUy
|
88
|
-
My0wMDwvZ3VpZD4KICAgICAgPHB1YkRhdGU+
|
88
|
+
My0wMDwvZ3VpZD4KICAgICAgPHB1YkRhdGU+RnJpLCAyOSBNYXIgMjAxMyAw
|
89
89
|
OTowMDowMCArMDkwMDwvcHViRGF0ZT4KICAgICAgPGRjOnRpdGxlPuWkqeWc
|
90
90
|
sOaYjuWvnzwvZGM6dGl0bGU+CiAgICAgIDxkY25kbDp0aXRsZVRyYW5zY3Jp
|
91
91
|
cHRpb24+44OG44Oz44OBIOODoeOCpOOCteODhDwvZGNuZGw6dGl0bGVUcmFu
|
@@ -112,5 +112,5 @@ http_interactions:
|
|
112
112
|
OnJlc291cmNlPSJodHRwOi8vaWQubmRsLmdvLmpwL2JpYi8wMjM1OTE1MjMi
|
113
113
|
Lz4KICAgIDwvaXRlbT4KICA8L2NoYW5uZWw+CjwvcnNzPgo=
|
114
114
|
http_version: '1.0'
|
115
|
-
recorded_at:
|
115
|
+
recorded_at: Wed, 10 Apr 2013 02:43:51 GMT
|
116
116
|
recorded_with: VCR 2.4.0
|
@@ -19,7 +19,7 @@ http_interactions:
|
|
19
19
|
message: OK
|
20
20
|
headers:
|
21
21
|
date:
|
22
|
-
-
|
22
|
+
- Wed, 10 Apr 2013 02:43:50 GMT
|
23
23
|
server:
|
24
24
|
- Apache
|
25
25
|
x-powered-by:
|
@@ -29,7 +29,7 @@ http_interactions:
|
|
29
29
|
x-ua-compatible:
|
30
30
|
- IE=Edge,chrome=1
|
31
31
|
x-runtime:
|
32
|
-
- '0.
|
32
|
+
- '0.078273'
|
33
33
|
cache-control:
|
34
34
|
- max-age=0, private, must-revalidate
|
35
35
|
status:
|
@@ -37,8 +37,8 @@ http_interactions:
|
|
37
37
|
content-type:
|
38
38
|
- application/xml; charset=utf-8
|
39
39
|
set-cookie:
|
40
|
-
- _front_session_id=
|
41
|
-
path=/; expires=
|
40
|
+
- _front_session_id=1ed4069b623d21e99ff9b76ebd9b2cac; domain=.iss.ndl.go.jp;
|
41
|
+
path=/; expires=Wed, 10-Apr-2013 03:43:50 GMT; HttpOnly
|
42
42
|
- serverid=1101; path=/
|
43
43
|
vary:
|
44
44
|
- Accept-Encoding,User-Agent
|
@@ -158,5 +158,5 @@ http_interactions:
|
|
158
158
|
PjE8L3JlY29yZFBvc2l0aW9uPgogICAgPC9yZWNvcmQ+CiAgPC9yZWNvcmRz
|
159
159
|
Pgo8L3NlYXJjaFJldHJpZXZlUmVzcG9uc2U+Cg==
|
160
160
|
http_version: '1.0'
|
161
|
-
recorded_at:
|
161
|
+
recorded_at: Wed, 10 Apr 2013 02:43:50 GMT
|
162
162
|
recorded_with: VCR 2.4.0
|
@@ -19,7 +19,7 @@ http_interactions:
|
|
19
19
|
message: OK
|
20
20
|
headers:
|
21
21
|
date:
|
22
|
-
-
|
22
|
+
- Wed, 10 Apr 2013 02:43:46 GMT
|
23
23
|
server:
|
24
24
|
- Apache
|
25
25
|
x-powered-by:
|
@@ -29,7 +29,7 @@ http_interactions:
|
|
29
29
|
x-ua-compatible:
|
30
30
|
- IE=Edge,chrome=1
|
31
31
|
x-runtime:
|
32
|
-
- '0.
|
32
|
+
- '0.370741'
|
33
33
|
cache-control:
|
34
34
|
- max-age=0, private, must-revalidate
|
35
35
|
status:
|
@@ -37,8 +37,8 @@ http_interactions:
|
|
37
37
|
content-type:
|
38
38
|
- application/xml; charset=utf-8
|
39
39
|
set-cookie:
|
40
|
-
- _front_session_id=
|
41
|
-
path=/; expires=
|
40
|
+
- _front_session_id=63bb6ebec9ef5c129f360f58269523e9; domain=.iss.ndl.go.jp;
|
41
|
+
path=/; expires=Wed, 10-Apr-2013 03:43:46 GMT; HttpOnly
|
42
42
|
- serverid=1105; path=/
|
43
43
|
vary:
|
44
44
|
- Accept-Encoding,User-Agent
|
@@ -192,5 +192,5 @@ http_interactions:
|
|
192
192
|
b24+MTwvcmVjb3JkUG9zaXRpb24+CiAgICA8L3JlY29yZD4KICA8L3JlY29y
|
193
193
|
ZHM+Cjwvc2VhcmNoUmV0cmlldmVSZXNwb25zZT4K
|
194
194
|
http_version: '1.0'
|
195
|
-
recorded_at:
|
195
|
+
recorded_at: Wed, 10 Apr 2013 02:43:47 GMT
|
196
196
|
recorded_with: VCR 2.4.0
|
@@ -19,7 +19,7 @@ http_interactions:
|
|
19
19
|
message: OK
|
20
20
|
headers:
|
21
21
|
date:
|
22
|
-
-
|
22
|
+
- Wed, 10 Apr 2013 02:43:47 GMT
|
23
23
|
server:
|
24
24
|
- Apache
|
25
25
|
x-powered-by:
|
@@ -29,7 +29,7 @@ http_interactions:
|
|
29
29
|
x-ua-compatible:
|
30
30
|
- IE=Edge,chrome=1
|
31
31
|
x-runtime:
|
32
|
-
- '0.
|
32
|
+
- '0.226711'
|
33
33
|
cache-control:
|
34
34
|
- max-age=0, private, must-revalidate
|
35
35
|
status:
|
@@ -37,9 +37,9 @@ http_interactions:
|
|
37
37
|
content-type:
|
38
38
|
- application/xml; charset=utf-8
|
39
39
|
set-cookie:
|
40
|
-
- _front_session_id=
|
41
|
-
path=/; expires=
|
42
|
-
- serverid=
|
40
|
+
- _front_session_id=2104556fe84eebb96957ebecc3d28056; domain=.iss.ndl.go.jp;
|
41
|
+
path=/; expires=Wed, 10-Apr-2013 03:43:47 GMT; HttpOnly
|
42
|
+
- serverid=1102; path=/
|
43
43
|
vary:
|
44
44
|
- Accept-Encoding,User-Agent
|
45
45
|
content-encoding:
|
@@ -184,5 +184,5 @@ http_interactions:
|
|
184
184
|
PjE8L3JlY29yZFBvc2l0aW9uPgogICAgPC9yZWNvcmQ+CiAgPC9yZWNvcmRz
|
185
185
|
Pgo8L3NlYXJjaFJldHJpZXZlUmVzcG9uc2U+Cg==
|
186
186
|
http_version: '1.0'
|
187
|
-
recorded_at:
|
187
|
+
recorded_at: Wed, 10 Apr 2013 02:43:47 GMT
|
188
188
|
recorded_with: VCR 2.4.0
|
@@ -19,7 +19,7 @@ http_interactions:
|
|
19
19
|
message: OK
|
20
20
|
headers:
|
21
21
|
date:
|
22
|
-
-
|
22
|
+
- Wed, 10 Apr 2013 02:43:49 GMT
|
23
23
|
server:
|
24
24
|
- Apache
|
25
25
|
x-powered-by:
|
@@ -29,7 +29,7 @@ http_interactions:
|
|
29
29
|
x-ua-compatible:
|
30
30
|
- IE=Edge,chrome=1
|
31
31
|
x-runtime:
|
32
|
-
- '0.
|
32
|
+
- '0.157770'
|
33
33
|
cache-control:
|
34
34
|
- max-age=0, private, must-revalidate
|
35
35
|
status:
|
@@ -37,9 +37,9 @@ http_interactions:
|
|
37
37
|
content-type:
|
38
38
|
- application/xml; charset=utf-8
|
39
39
|
set-cookie:
|
40
|
-
- _front_session_id=
|
41
|
-
path=/; expires=
|
42
|
-
- serverid=
|
40
|
+
- _front_session_id=b9eb82b4ffc889411744b7b889e40ab2; domain=.iss.ndl.go.jp;
|
41
|
+
path=/; expires=Wed, 10-Apr-2013 03:43:50 GMT; HttpOnly
|
42
|
+
- serverid=1101; path=/
|
43
43
|
vary:
|
44
44
|
- Accept-Encoding,User-Agent
|
45
45
|
content-encoding:
|
@@ -140,5 +140,5 @@ http_interactions:
|
|
140
140
|
dGlvbj4KICAgIDwvcmVjb3JkPgogIDwvcmVjb3Jkcz4KPC9zZWFyY2hSZXRy
|
141
141
|
aWV2ZVJlc3BvbnNlPgo=
|
142
142
|
http_version: '1.0'
|
143
|
-
recorded_at:
|
143
|
+
recorded_at: Wed, 10 Apr 2013 02:43:50 GMT
|
144
144
|
recorded_with: VCR 2.4.0
|
@@ -19,7 +19,7 @@ http_interactions:
|
|
19
19
|
message: OK
|
20
20
|
headers:
|
21
21
|
date:
|
22
|
-
-
|
22
|
+
- Wed, 10 Apr 2013 02:43:48 GMT
|
23
23
|
server:
|
24
24
|
- Apache
|
25
25
|
x-powered-by:
|
@@ -29,7 +29,7 @@ http_interactions:
|
|
29
29
|
x-ua-compatible:
|
30
30
|
- IE=Edge,chrome=1
|
31
31
|
x-runtime:
|
32
|
-
- '0.
|
32
|
+
- '0.119390'
|
33
33
|
cache-control:
|
34
34
|
- max-age=0, private, must-revalidate
|
35
35
|
status:
|
@@ -37,8 +37,8 @@ http_interactions:
|
|
37
37
|
content-type:
|
38
38
|
- application/xml; charset=utf-8
|
39
39
|
set-cookie:
|
40
|
-
- _front_session_id=
|
41
|
-
path=/; expires=
|
40
|
+
- _front_session_id=94117645cbb848521a51ad089050f369; domain=.iss.ndl.go.jp;
|
41
|
+
path=/; expires=Wed, 10-Apr-2013 03:43:49 GMT; HttpOnly
|
42
42
|
- serverid=1105; path=/
|
43
43
|
vary:
|
44
44
|
- Accept-Encoding,User-Agent
|
@@ -221,5 +221,5 @@ http_interactions:
|
|
221
221
|
b3JkUG9zaXRpb24+MTwvcmVjb3JkUG9zaXRpb24+CiAgICA8L3JlY29yZD4K
|
222
222
|
ICA8L3JlY29yZHM+Cjwvc2VhcmNoUmV0cmlldmVSZXNwb25zZT4K
|
223
223
|
http_version: '1.0'
|
224
|
-
recorded_at:
|
224
|
+
recorded_at: Wed, 10 Apr 2013 02:43:49 GMT
|
225
225
|
recorded_with: VCR 2.4.0
|