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.
@@ -176,7 +176,7 @@ class Manifestation < ActiveRecord::Base
176
176
  enju_ndl_search if defined?(EnjuNdl)
177
177
  #enju_amazon
178
178
  enju_oai if defined?(EnjuOai)
179
- #enju_nii
179
+ enju_nii_cinii_books if defined?(EnjuNii)
180
180
  #enju_export
181
181
 
182
182
  has_paper_trail
@@ -181,7 +181,16 @@ class PatronImportFile < ActiveRecord::Base
181
181
  end
182
182
  open(uploaded_file_path){|f|
183
183
  f.each{|line|
184
- tempfile.puts(NKF.nkf('-w -Lu', line))
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
@@ -9,7 +9,11 @@ require 'dynamic_form'
9
9
  require 'simple_form'
10
10
  require 'resque_mailer'
11
11
  require 'library_stdnums'
12
- require 'charlock_holmes/string' rescue nil
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
@@ -1,3 +1,3 @@
1
1
  module EnjuBiblio
2
- VERSION = "0.1.0.pre9"
2
+ VERSION = "0.1.0.pre10"
3
3
  end
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.pre9
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-14 00:00:00.000000000 Z
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/segments_7y4
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/segments_7y4
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