enju_ndl 0.1.0.pre26 → 0.1.0.pre27
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.
- 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 +10 -6
- data/app/views/ndl_books/index.html.erb +1 -1
- data/lib/enju_ndl/ndl_search.rb +8 -2
- data/lib/enju_ndl/version.rb +1 -1
- data/spec/cassette_library/ImportRequest/should_import_isbn.yml +354 -352
- data/spec/cassette_library/Manifestation/should_imporrt_a_bibliographic_record.yml +650 -648
- data/spec/cassette_library/Manifestation/should_import_isbn.yml +355 -353
- data/spec/cassette_library/NdlBook/import/should_get_series_title.yml +61 -55
- data/spec/cassette_library/NdlBook/import/should_get_volume_number.yml +58 -56
- data/spec/cassette_library/NdlBook/import/should_import_audio_cd.yml +8 -8
- data/spec/cassette_library/NdlBook/import/should_import_bibliographic_record.yml +96 -96
- data/spec/cassette_library/NdlBook/import/should_import_bibliographic_record_that_does_not_have_any_classifications.yml +7 -7
- data/spec/cassette_library/NdlBook/import/should_import_pud_date_is_nil.yml +55 -55
- data/spec/cassette_library/NdlBook/import/should_import_series_statement.yml +7 -7
- data/spec/cassette_library/NdlBook/import/should_import_series_statement_if_the_resource_is_periodical.yml +190 -248
- data/spec/cassette_library/NdlBook/import/should_import_title_alternative.yml +165 -163
- data/spec/cassette_library/NdlBook/import/should_import_url_contain_whitespace.yml +8 -8
- data/spec/cassette_library/NdlBook/import/should_import_video_dvd.yml +7 -7
- data/spec/cassette_library/NdlBook/import/should_import_volume_number_string.yml +155 -152
- data/spec/cassette_library/NdlBook/import/should_not_get_series_title_if_book_has_not_series_title.yml +64 -62
- data/spec/cassette_library/NdlBook/import/should_not_get_volume_number_if_book_has_not_volume.yml +54 -52
- data/spec/cassette_library/NdlBook/search/should_not_distinguish_double_byte_space_from_one-byte_space_in_a_query.yml +625 -609
- data/spec/cassette_library/NdlBook/search/should_search_bibliographic_record.yml +353 -347
- data/spec/cassette_library/NdlBooksController/GET_index/should_get_index.yml +425 -423
- data/spec/cassette_library/NdlBooksController/POST_create/should_create_a_bibliographic_record_if_jpno_is_set.yml +7 -7
- data/spec/cassette_library/NdlBooksController/POST_create/should_not_create_a_bibliographic_record_if_jpno_is_not_set.yml +11 -11
- data/spec/cassette_library/Question/should_respond_to_search_crd.yml +296 -497
- data/spec/controllers/ndl_books_controller_spec.rb +1 -1
- data/spec/dummy/config/initializers/devise.rb +2 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/models/ndl_book_spec.rb +12 -11
- metadata +7 -7
@@ -25,7 +25,7 @@ describe NdlBooksController do
|
|
25
25
|
login_fixture_admin
|
26
26
|
|
27
27
|
it "should create a bibliographic record if jpno is set", :vcr => true do
|
28
|
-
post :create, :book => {:
|
28
|
+
post :create, :book => {:iss_itemno => 'R100000002-I000002539673-00'}
|
29
29
|
assigns(:manifestation).identifier_contents(:jpno).should eq ['97024234']
|
30
30
|
response.should redirect_to manifestation_items_url(assigns(:manifestation))
|
31
31
|
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# Use this hook to configure devise mailer, warden hooks and so forth.
|
2
2
|
# Many of these configuration options can be set straight in your model.
|
3
3
|
Devise.setup do |config|
|
4
|
+
config.secret_key = 'c692775b6661fc94814e6793256d06168e16fbaa1c80adad1ee3e3d668ae29a0a7ad1b7f3969072a1dade35423fb3e385429578a871fb99147b7c1ee5532dc25'
|
5
|
+
|
4
6
|
# ==> Mailer Configuration
|
5
7
|
# Configure the e-mail address which will be shown in Devise::Mailer,
|
6
8
|
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -10,7 +10,7 @@ describe NdlBook do
|
|
10
10
|
|
11
11
|
context "search" do
|
12
12
|
it "should search bibliographic record", :vcr => true do
|
13
|
-
NdlBook.search('library system')[:total_entries].should eq
|
13
|
+
NdlBook.search('library system')[:total_entries].should eq 5295
|
14
14
|
end
|
15
15
|
|
16
16
|
it "should not distinguish double byte space from one-byte space in a query", :vcr => true do
|
@@ -20,10 +20,11 @@ describe NdlBook do
|
|
20
20
|
|
21
21
|
context "import" do
|
22
22
|
it "should import bibliographic record", :vcr => true do
|
23
|
-
manifestation = NdlBook.import_from_sru_response('
|
23
|
+
manifestation = NdlBook.import_from_sru_response('R100000002-I000010980901-00')
|
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(:iss_itemno).should eq ["R100000002-I000010980901-00"]
|
27
28
|
manifestation.identifier_contents(:jpno).should eq ["21816393"]
|
28
29
|
manifestation.language.name.should eq "Japanese"
|
29
30
|
manifestation.creators.first.full_name.should eq '秋葉, 拓哉'
|
@@ -40,57 +41,57 @@ describe NdlBook do
|
|
40
41
|
end
|
41
42
|
|
42
43
|
it "should import bibliographic record that does not have any classifications", :vcr => true do
|
43
|
-
manifestation = NdlBook.import_from_sru_response('
|
44
|
+
manifestation = NdlBook.import_from_sru_response('R100000002-I000003641700-00')
|
44
45
|
manifestation.original_title.should eq "アンパンマンとどうぶつえん"
|
45
46
|
manifestation.title_transcription.should eq "アンパンマン ト ドウブツエン"
|
46
47
|
manifestation.ndc.should be_nil
|
47
48
|
end
|
48
49
|
|
49
50
|
it "should import volume_number_string", :vcr => true do
|
50
|
-
manifestation = NdlBook.import_from_sru_response('
|
51
|
+
manifestation = NdlBook.import_from_sru_response('R100000002-I000011037191-00')
|
51
52
|
manifestation.volume_number_string.should eq '上'
|
52
53
|
end
|
53
54
|
|
54
55
|
it "should import title_alternative", :vcr => true do
|
55
|
-
manifestation = NdlBook.import_from_sru_response('
|
56
|
+
manifestation = NdlBook.import_from_sru_response('R100000002-I000010926074-00')
|
56
57
|
manifestation.title_alternative.should eq 'PLATINADATA'
|
57
58
|
manifestation.title_alternative_transcription.should eq 'PLATINA DATA'
|
58
59
|
end
|
59
60
|
|
60
61
|
it "should import series_statement", :vcr => true do
|
61
|
-
manifestation = NdlBook.import_from_sru_response('
|
62
|
+
manifestation = NdlBook.import_from_sru_response('R100000002-I000004152429-00')
|
62
63
|
manifestation.original_title.should eq "ズッコケ三人組のダイエット講座"
|
63
64
|
manifestation.series_statements.first.original_title.should eq "ポプラ社文庫. ズッコケ文庫"
|
64
65
|
manifestation.periodical.should be_false
|
65
66
|
end
|
66
67
|
|
67
68
|
it "should import series_statement if the resource is periodical", :vcr => true do
|
68
|
-
manifestation = NdlBook.import_from_sru_response('
|
69
|
+
manifestation = NdlBook.import_from_sru_response('R100000039-I001413988-00')
|
69
70
|
manifestation.original_title.should eq "週刊新潮"
|
70
71
|
#manifestation.series_statements.first.original_title.should eq "週刊新潮"
|
71
72
|
manifestation.periodical.should be_true
|
72
73
|
end
|
73
74
|
|
74
75
|
it "should import pud_date is nil", :vcr => true do
|
75
|
-
manifestation = NdlBook.import_from_sru_response('
|
76
|
+
manifestation = NdlBook.import_from_sru_response('R100000002-I000000017951-00')
|
76
77
|
manifestation.original_title.should eq "西日本哲学会会報"
|
77
78
|
manifestation.pub_date.should be_nil
|
78
79
|
end
|
79
80
|
|
80
81
|
it "should import url contain whitespace", :vcr => true do
|
81
|
-
manifestation = NdlBook.import_from_sru_response('
|
82
|
+
manifestation = NdlBook.import_from_sru_response('R100000002-I000002109818-00')
|
82
83
|
manifestation.original_title.should eq "ザ・スコット・フィッツジェラルド・ブック"
|
83
84
|
manifestation.pub_date.should eq "1991-04"
|
84
85
|
end
|
85
86
|
|
86
87
|
it "should import audio cd", :vcr => true do
|
87
|
-
manifestation = NdlBook.import_from_sru_response('
|
88
|
+
manifestation = NdlBook.import_from_sru_response('R100000002-I000010273695-00')
|
88
89
|
manifestation.original_title.should eq "劇場版天元突破グレンラガン螺巌篇サウンドトラック・プラス"
|
89
90
|
manifestation.manifestation_content_type.name.should eq 'audio'
|
90
91
|
end
|
91
92
|
|
92
93
|
it "should import video dvd", :vcr => true do
|
93
|
-
manifestation = NdlBook.import_from_sru_response('
|
94
|
+
manifestation = NdlBook.import_from_sru_response('R100000002-I000009149656-00')
|
94
95
|
manifestation.original_title.should eq "天元突破グレンラガン"
|
95
96
|
manifestation.manifestation_content_type.name.should eq 'video'
|
96
97
|
end
|
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.pre27
|
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-
|
11
|
+
date: 2013-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.1.0.
|
131
|
+
version: 1.1.0.rc5
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - ~>
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.1.0.
|
138
|
+
version: 1.1.0.rc5
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: enju_question
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - ~>
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 0.1.0.
|
187
|
+
version: 0.1.0.pre21
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - ~>
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 0.1.0.
|
194
|
+
version: 0.1.0.pre21
|
195
195
|
description: NDL WebAPI wrapper for Next-L Enju
|
196
196
|
email:
|
197
197
|
- tanabe@mwr.mediacom.keio.ac.jp
|
@@ -423,7 +423,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
423
423
|
version: 1.3.1
|
424
424
|
requirements: []
|
425
425
|
rubyforge_project:
|
426
|
-
rubygems_version: 2.
|
426
|
+
rubygems_version: 2.1.3
|
427
427
|
signing_key:
|
428
428
|
specification_version: 4
|
429
429
|
summary: enju_ndl plugin
|