enju_biblio 0.1.0.pre9 → 0.1.0.pre10
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/manifestation.rb +1 -1
- data/app/models/patron_import_file.rb +10 -1
- data/db/migrate/005_create_manifestations.rb +3 -3
- data/lib/enju_biblio/engine.rb +5 -1
- data/lib/enju_biblio/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_8fm +0 -0
- metadata +4 -4
- data/spec/dummy/solr/data/test/index/segments_7y4 +0 -0
data/app/models/manifestation.rb
CHANGED
@@ -181,7 +181,16 @@ class PatronImportFile < ActiveRecord::Base
|
|
181
181
|
end
|
182
182
|
open(uploaded_file_path){|f|
|
183
183
|
f.each{|line|
|
184
|
-
|
184
|
+
if defined?(CharlockHolmes::EncodingDetector)
|
185
|
+
begin
|
186
|
+
string = line.encode('UTF-8', CharlockHolmes::EncodingDetector.detect[:encoding])
|
187
|
+
rescue StandardError
|
188
|
+
string = NKF.nkf('-w -Lu', line)
|
189
|
+
end
|
190
|
+
else
|
191
|
+
string = NKF.nkf('-w -Lu', line)
|
192
|
+
end
|
193
|
+
tempfile.puts(string)
|
185
194
|
}
|
186
195
|
}
|
187
196
|
tempfile.close
|
@@ -41,15 +41,15 @@ class CreateManifestations < ActiveRecord::Migration
|
|
41
41
|
t.integer :frequency_id, :default => 1, :null => false
|
42
42
|
t.boolean :subscription_master, :default => false, :null => false
|
43
43
|
end
|
44
|
-
add_index :manifestations, :carrier_type_id
|
45
|
-
add_index :manifestations, :required_role_id
|
44
|
+
#add_index :manifestations, :carrier_type_id
|
45
|
+
#add_index :manifestations, :required_role_id
|
46
46
|
add_index :manifestations, :isbn
|
47
47
|
add_index :manifestations, :nbn
|
48
48
|
add_index :manifestations, :lccn
|
49
49
|
add_index :manifestations, :oclc_number
|
50
50
|
add_index :manifestations, :issn
|
51
51
|
add_index :manifestations, :access_address
|
52
|
-
add_index :manifestations, :frequency_id
|
52
|
+
#add_index :manifestations, :frequency_id
|
53
53
|
add_index :manifestations, :manifestation_identifier
|
54
54
|
add_index :manifestations, :updated_at
|
55
55
|
end
|
data/lib/enju_biblio/engine.rb
CHANGED
@@ -9,7 +9,11 @@ require 'dynamic_form'
|
|
9
9
|
require 'simple_form'
|
10
10
|
require 'resque_mailer'
|
11
11
|
require 'library_stdnums'
|
12
|
-
require '
|
12
|
+
require 'nkf'
|
13
|
+
begin
|
14
|
+
require 'charlock_holmes/string'
|
15
|
+
rescue LoadError
|
16
|
+
end
|
13
17
|
|
14
18
|
module EnjuBiblio
|
15
19
|
class Engine < ::Rails::Engine
|
data/lib/enju_biblio/version.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
Binary file
|
Binary file
|
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.
|
4
|
+
version: 0.1.0.pre10
|
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-11-
|
12
|
+
date: 2012-11-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -1188,7 +1188,7 @@ files:
|
|
1188
1188
|
- spec/dummy/solr/conf/stopwords.txt
|
1189
1189
|
- spec/dummy/solr/conf/synonyms.txt
|
1190
1190
|
- spec/dummy/solr/data/test/index/segments.gen
|
1191
|
-
- spec/dummy/solr/data/test/index/
|
1191
|
+
- spec/dummy/solr/data/test/index/segments_8fm
|
1192
1192
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
1193
1193
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
1194
1194
|
- spec/factories/accepts.rb
|
@@ -1627,7 +1627,7 @@ test_files:
|
|
1627
1627
|
- spec/dummy/solr/conf/stopwords.txt
|
1628
1628
|
- spec/dummy/solr/conf/synonyms.txt
|
1629
1629
|
- spec/dummy/solr/data/test/index/segments.gen
|
1630
|
-
- spec/dummy/solr/data/test/index/
|
1630
|
+
- spec/dummy/solr/data/test/index/segments_8fm
|
1631
1631
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
1632
1632
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
1633
1633
|
- spec/factories/accepts.rb
|
Binary file
|