enju_ndl 0.2.0.beta.2 → 0.2.0.beta.3
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 +9 -2
- data/lib/enju_ndl/version.rb +1 -1
- data/spec/cassette_library/NdlBook/import/should_import_even_with_invalid_url.yml +174 -0
- data/spec/controllers/ndl_books_controller_spec.rb +1 -1
- data/spec/dummy/app/models/user.rb +2 -0
- data/spec/dummy/db/migrate/059_create_libraries.rb +7 -9
- data/spec/dummy/db/migrate/069_create_shelves.rb +3 -4
- data/spec/dummy/db/migrate/080_create_library_groups.rb +2 -3
- data/spec/dummy/db/migrate/120_create_baskets.rb +2 -3
- data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +4 -7
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +4 -5
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +3 -6
- data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
- data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +2 -2
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -2
- data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -3
- data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +3 -5
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +19 -6
- data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +15 -2
- data/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +9 -0
- data/spec/dummy/db/schema.rb +26 -10
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/conf/admin-extra.html +31 -0
- data/spec/dummy/solr/conf/elevate.xml +36 -0
- data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/spec/dummy/solr/conf/protwords.txt +21 -0
- data/spec/dummy/solr/conf/schema.xml +275 -0
- data/spec/dummy/solr/conf/scripts.conf +24 -0
- data/spec/dummy/solr/conf/solrconfig.xml +680 -0
- data/spec/dummy/solr/conf/spellings.txt +2 -0
- data/spec/dummy/solr/conf/stopwords.txt +58 -0
- data/spec/dummy/solr/conf/synonyms.txt +31 -0
- data/spec/dummy/solr/default/data/index/_1j.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_1j.fdx +0 -0
- data/spec/dummy/solr/default/data/index/_1j.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_1j.nvd +0 -0
- data/spec/dummy/solr/default/data/index/_1j.nvm +0 -0
- data/spec/dummy/solr/default/data/index/_1j.si +0 -0
- data/spec/dummy/solr/default/data/index/_1j_2.del +0 -0
- data/spec/dummy/solr/default/data/index/_1j_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/default/data/index/_1j_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/default/data/index/_1j_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/default/data/index/_1j_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/_1l.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_1l.fdx +0 -0
- data/spec/dummy/solr/default/data/index/_1l.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_1l.nvd +0 -0
- data/spec/dummy/solr/default/data/index/_1l.nvm +0 -0
- data/spec/dummy/solr/default/data/index/_1l.si +0 -0
- data/spec/dummy/solr/default/data/index/_1l_1.del +0 -0
- data/spec/dummy/solr/default/data/index/_1l_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/default/data/index/_1l_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/default/data/index/_1l_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/default/data/index/_1l_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/segments.gen +0 -0
- data/spec/dummy/solr/default/data/index/segments_29 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000068 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000070 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000072 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000073 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000074 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000075 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000076 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000077 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000078 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000079 +0 -0
- data/spec/dummy/solr/development/data/index/segments.gen +0 -0
- data/spec/dummy/solr/development/data/index/segments_1 +0 -0
- data/spec/dummy/solr/solr.xml +8 -0
- data/spec/dummy/solr/test/data/index/segments.gen +0 -0
- data/spec/dummy/solr/test/data/index/segments_1 +0 -0
- data/spec/fixtures/library_groups.yml +1 -1
- data/spec/models/import_request_spec.rb +1 -1
- data/spec/models/manifestation_spec.rb +1 -1
- data/spec/models/ndl_book_spec.rb +11 -1
- data/spec/models/question_spec.rb +1 -1
- data/spec/rails_helper.rb +61 -0
- data/spec/requests/ndl_books_spec.rb +1 -1
- data/spec/spec_helper.rb +83 -52
- metadata +415 -303
- data/spec/dummy/config/initializers/enju_leaf.rb +0 -1
- data/spec/dummy/db/migrate/20160813130535_add_email_to_library_group.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b12b8528ac406f72cefc769982ea23a5ce09cc5
|
4
|
+
data.tar.gz: 89feb9d27d4aa822e250467d9906b13e1dbb6cf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1050c4f1c7aa273a92d5dd61e210273f180935caf7b2347c202f8598deab9e6c8df2e1b9ef5b901a1428576e31753b403065a6da4b067641cf6b9dba22b54a6
|
7
|
+
data.tar.gz: fb0f5428fa79d6b767b5770a1d623e742ab7d43a747745b57883ed5ae929f3f0091650b855e2740cdfd2e599715cdca5ca1f883fc40d70fe516ce345970559df
|
data/lib/enju_ndl/ndl_search.rb
CHANGED
@@ -132,6 +132,8 @@ module EnjuNdl
|
|
132
132
|
:start_page => extent[:start_page],
|
133
133
|
:end_page => extent[:end_page],
|
134
134
|
:height => extent[:height],
|
135
|
+
:extent => extent[:extent],
|
136
|
+
:dimensions => extent[:dimensions],
|
135
137
|
:publication_place => publication_place,
|
136
138
|
:edition_string => edition_string,
|
137
139
|
)
|
@@ -213,8 +215,11 @@ module EnjuNdl
|
|
213
215
|
end
|
214
216
|
if classification_urls
|
215
217
|
classification_urls.each do |url|
|
216
|
-
|
217
|
-
|
218
|
+
begin
|
219
|
+
ndc_url = URI.parse(URI.escape(url))
|
220
|
+
rescue URI::InvalidURIError
|
221
|
+
end
|
222
|
+
if ndc_url and ndc_url.path.split('/').reverse[1] == "ndc9"
|
218
223
|
ndc_type = "ndc9"
|
219
224
|
ndc = ndc_url.path.split('/').last
|
220
225
|
classification_type = ClassificationType.where(name: ndc_type).first || ClassificationType.create!(name: ndc_type)
|
@@ -346,11 +351,13 @@ module EnjuNdl
|
|
346
351
|
if extent
|
347
352
|
extent = extent.split(';')
|
348
353
|
page = extent[0].try(:strip)
|
354
|
+
value[:extent] = page
|
349
355
|
if page =~ /\d+p/
|
350
356
|
value[:start_page] = 1
|
351
357
|
value[:end_page] = page.to_i
|
352
358
|
end
|
353
359
|
height = extent[1].try(:strip)
|
360
|
+
value[:dimensions] = height
|
354
361
|
if height =~ /\d+cm/
|
355
362
|
value[:height] = height.to_i
|
356
363
|
end
|
data/lib/enju_ndl/version.rb
CHANGED
@@ -0,0 +1,174 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://iss.ndl.go.jp/api/sru?maximumRecords=1&onlyBib=true&operation=searchRetrieve&query=(itemno=R100000002-I000003523406-00%20)&recordSchema=dcndl
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.2
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Sat, 01 Oct 2016 05:52:30 GMT
|
23
|
+
X-Runtime:
|
24
|
+
- '0.812651'
|
25
|
+
Etag:
|
26
|
+
- '"7f8f995bc73030df2f38518df1d3d78d"'
|
27
|
+
Cache-Control:
|
28
|
+
- max-age=0, private, must-revalidate
|
29
|
+
X-Ua-Compatible:
|
30
|
+
- IE=Edge,chrome=1
|
31
|
+
Status:
|
32
|
+
- '200'
|
33
|
+
Content-Type:
|
34
|
+
- application/xml; charset=utf-8
|
35
|
+
Set-Cookie:
|
36
|
+
- ROUTEID=.ps24; path=/
|
37
|
+
- TS01cb7804=011338590adebfcf3a27f8a0c948c25a74a2ed1ebe620714fb6dbff40466a4293f7632d7422f5681e6392d32f4177f8b08480e6667;
|
38
|
+
path=/; domain=.iss.ndl.go.jp
|
39
|
+
- TS01f3cfdf=011338590a42b713a5f726e6347fcc5453de8c6190b6695fd2442af9cae8c189c20e58322a37caadb6c0dcd3935c884390a80ca6ef647e9aa620a23794c830aca80e4b5550ab6aafc734a182f936f5b32396b483ee;
|
40
|
+
Path=/
|
41
|
+
- _front_session_id=21796c47b769a32b216c43843b600c33; domain=.iss.ndl.go.jp;
|
42
|
+
path=/; expires=Sat, 01-Oct-2016 06:52:31 GMT; HttpOnly
|
43
|
+
- ndl.go.jp=rd2o00000000000000000000ffff0a024f6co80; path=/
|
44
|
+
- serverid=1101; path=/
|
45
|
+
Vary:
|
46
|
+
- Accept-Encoding,User-Agent
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Frame-Options:
|
50
|
+
- SAMEORIGIN
|
51
|
+
Content-Length:
|
52
|
+
- '1457'
|
53
|
+
Connection:
|
54
|
+
- close
|
55
|
+
body:
|
56
|
+
encoding: ASCII-8BIT
|
57
|
+
string: !binary |-
|
58
|
+
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHNlYXJj
|
59
|
+
aFJldHJpZXZlUmVzcG9uc2UgeG1sbnM9Imh0dHA6Ly93d3cubG9jLmdvdi96
|
60
|
+
aW5nL3Nydy8iPgogIDx2ZXJzaW9uPjEuMjwvdmVyc2lvbj4KICA8bnVtYmVy
|
61
|
+
T2ZSZWNvcmRzPjE8L251bWJlck9mUmVjb3Jkcz4KICA8bmV4dFJlY29yZFBv
|
62
|
+
c2l0aW9uPjA8L25leHRSZWNvcmRQb3NpdGlvbj4KICA8ZXh0cmFSZXNwb25z
|
63
|
+
ZURhdGE+CiZsdDtmYWNldHMmZ3Q7CiAgJmx0O2xzdCBuYW1lPSZxdW90O1JF
|
64
|
+
UE9TSVRPUllfTk8mcXVvdDsmZ3Q7CiAgICAmbHQ7aW50I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vc2l0aW9uPgogICAgPC9y
|
170
|
+
ZWNvcmQ+CiAgPC9yZWNvcmRzPgo8L3NlYXJjaFJldHJpZXZlUmVzcG9uc2U+
|
171
|
+
Cg==
|
172
|
+
http_version:
|
173
|
+
recorded_at: Sat, 01 Oct 2016 05:52:31 GMT
|
174
|
+
recorded_with: VCR 3.0.3
|
@@ -1,9 +1,9 @@
|
|
1
1
|
class CreateLibraries < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :libraries do |t|
|
4
|
-
t.string :name, :null
|
4
|
+
t.string :name, index: true, null: false
|
5
5
|
t.text :display_name
|
6
|
-
t.string :short_display_name, :
|
6
|
+
t.string :short_display_name, null: false
|
7
7
|
t.string :zip_code
|
8
8
|
t.text :street
|
9
9
|
t.text :locality
|
@@ -12,17 +12,15 @@ class CreateLibraries < ActiveRecord::Migration
|
|
12
12
|
t.string :telephone_number_2
|
13
13
|
t.string :fax_number
|
14
14
|
t.text :note
|
15
|
-
t.integer :call_number_rows, :
|
16
|
-
t.string :call_number_delimiter, :
|
17
|
-
t.
|
18
|
-
t.integer :users_count, :
|
15
|
+
t.integer :call_number_rows, default: 1, null: false
|
16
|
+
t.string :call_number_delimiter, default: "|", null: false
|
17
|
+
t.references :library_group, index: true, null: false
|
18
|
+
t.integer :users_count, default: 0, null: false
|
19
19
|
t.integer :position
|
20
|
-
t.
|
20
|
+
t.references :country
|
21
21
|
|
22
22
|
t.timestamps
|
23
23
|
t.datetime :deleted_at
|
24
24
|
end
|
25
|
-
add_index :libraries, :library_group_id
|
26
|
-
add_index :libraries, :name, :unique => true
|
27
25
|
end
|
28
26
|
end
|
@@ -1,15 +1,14 @@
|
|
1
1
|
class CreateShelves < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :shelves do |t|
|
4
|
-
t.string :name, :
|
4
|
+
t.string :name, null: false
|
5
5
|
t.text :display_name
|
6
6
|
t.text :note
|
7
|
-
t.
|
8
|
-
t.integer :items_count, :
|
7
|
+
t.references :library, index: true, null: false
|
8
|
+
t.integer :items_count, default: 0, null: false
|
9
9
|
t.integer :position
|
10
10
|
t.timestamps
|
11
11
|
t.datetime :deleted_at
|
12
12
|
end
|
13
|
-
add_index :shelves, :library_id
|
14
13
|
end
|
15
14
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
class CreateLibraryGroups < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :library_groups do |t|
|
4
|
-
t.string :name, :
|
4
|
+
t.string :name, null: false
|
5
5
|
t.text :display_name
|
6
|
-
t.string :short_name, :null
|
6
|
+
t.string :short_name, index: true, null: false
|
7
7
|
t.text :my_networks
|
8
8
|
t.text :login_banner
|
9
9
|
t.text :note
|
@@ -12,6 +12,5 @@ class CreateLibraryGroups < ActiveRecord::Migration
|
|
12
12
|
|
13
13
|
t.timestamps
|
14
14
|
end
|
15
|
-
add_index :library_groups, :short_name
|
16
15
|
end
|
17
16
|
end
|
@@ -1,12 +1,11 @@
|
|
1
1
|
class CreateBaskets < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :baskets do |t|
|
4
|
-
t.
|
4
|
+
t.references :user, index: true
|
5
5
|
t.text :note
|
6
|
-
t.integer :lock_version, :
|
6
|
+
t.integer :lock_version, default: 0, null: false
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
add_index :baskets, :user_id
|
11
10
|
end
|
12
11
|
end
|
@@ -1,17 +1,14 @@
|
|
1
1
|
class CreateSubscriptions < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :subscriptions do |t|
|
4
|
-
t.text :title, :
|
4
|
+
t.text :title, null: false
|
5
5
|
t.text :note
|
6
|
-
|
7
|
-
t.
|
8
|
-
t.integer :order_list_id
|
6
|
+
t.references :user, index: true
|
7
|
+
t.references :order_list, index: true
|
9
8
|
t.datetime :deleted_at
|
10
|
-
t.integer :subscribes_count, :
|
9
|
+
t.integer :subscribes_count, default: 0, null: false
|
11
10
|
|
12
11
|
t.timestamps
|
13
12
|
end
|
14
|
-
add_index :subscriptions, :user_id
|
15
|
-
add_index :subscriptions, :order_list_id
|
16
13
|
end
|
17
14
|
end
|
@@ -1,14 +1,13 @@
|
|
1
1
|
class CreateSubscribes < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :subscribes do |t|
|
4
|
-
t.
|
5
|
-
t.integer :work_id, :
|
6
|
-
t.datetime :start_at, :
|
7
|
-
t.datetime :end_at, :
|
4
|
+
t.references :subscription, index: true, null: false
|
5
|
+
t.integer :work_id, null: false
|
6
|
+
t.datetime :start_at, null: false
|
7
|
+
t.datetime :end_at, null: false
|
8
8
|
|
9
9
|
t.timestamps
|
10
10
|
end
|
11
|
-
add_index :subscribes, :subscription_id
|
12
11
|
add_index :subscribes, :work_id
|
13
12
|
end
|
14
13
|
end
|
@@ -1,14 +1,11 @@
|
|
1
1
|
class CreateAccepts < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :accepts do |t|
|
4
|
-
t.
|
5
|
-
t.
|
6
|
-
t.
|
4
|
+
t.references :basket, index: true
|
5
|
+
t.references :item, index: true
|
6
|
+
t.references :librarian, index: true
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
|
11
|
-
add_index :accepts, :basket_id
|
12
|
-
add_index :accepts, :item_id
|
13
10
|
end
|
14
11
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateUserImportResults < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :user_import_results do |t|
|
4
|
-
t.
|
5
|
-
t.
|
4
|
+
t.references :user_import_file, index: true
|
5
|
+
t.references :user, index: true
|
6
6
|
t.text :body
|
7
7
|
|
8
8
|
t.timestamps
|
@@ -8,11 +8,10 @@ class CreateUserImportFileTransitions < ActiveRecord::Migration
|
|
8
8
|
t.text :metadata, default: "{}"
|
9
9
|
end
|
10
10
|
t.integer :sort_key
|
11
|
-
t.
|
11
|
+
t.references :user_import_file, index: true
|
12
12
|
t.timestamps
|
13
13
|
end
|
14
14
|
|
15
|
-
add_index :user_import_file_transitions, :user_import_file_id
|
16
15
|
add_index :user_import_file_transitions, [:sort_key, :user_import_file_id], unique: true, name: "index_user_import_file_transitions_on_sort_key_and_file_id"
|
17
16
|
end
|
18
17
|
end
|
@@ -1,14 +1,12 @@
|
|
1
1
|
class CreateColors < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :colors do |t|
|
4
|
-
t.
|
4
|
+
t.references :library_group, index: true
|
5
5
|
t.string :property
|
6
6
|
t.string :code
|
7
7
|
t.integer :position
|
8
8
|
|
9
9
|
t.timestamps
|
10
10
|
end
|
11
|
-
|
12
|
-
add_index :colors, :library_group_id
|
13
11
|
end
|
14
12
|
end
|
@@ -1,13 +1,11 @@
|
|
1
1
|
class CreateWithdraws < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :withdraws do |t|
|
4
|
-
t.
|
5
|
-
t.
|
6
|
-
t.
|
4
|
+
t.references :basket, index: true
|
5
|
+
t.references :item, index: true
|
6
|
+
t.references :librarian, index: true
|
7
7
|
|
8
8
|
t.timestamps null: false
|
9
9
|
end
|
10
|
-
add_index :withdraws, :basket_id
|
11
|
-
add_index :withdraws, :item_id
|
12
10
|
end
|
13
11
|
end
|
@@ -1,13 +1,26 @@
|
|
1
|
+
# This migration comes from enju_library_engine (originally 20151213070943)
|
1
2
|
class AddTranslationTableToLibraryGroup < ActiveRecord::Migration
|
2
3
|
def up
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
if defined?(Globalize)
|
5
|
+
LibraryGroup.create_translation_table!({
|
6
|
+
login_banner: :text
|
7
|
+
}, {
|
8
|
+
migrate_data: true
|
9
|
+
})
|
10
|
+
end
|
11
|
+
|
12
|
+
if defined?(AwesomeHstoreTranslate)
|
13
|
+
add_column :library_groups, :login_banner, :hstore
|
14
|
+
end
|
8
15
|
end
|
9
16
|
|
10
17
|
def down
|
11
|
-
|
18
|
+
if defined?(Globalize)
|
19
|
+
LibraryGroup.drop_translation_table! migrate_data: true
|
20
|
+
end
|
21
|
+
|
22
|
+
if defined?(AwesomeHstoreTranslate)
|
23
|
+
remove_column :library_groups, :login_banner
|
24
|
+
end
|
12
25
|
end
|
13
26
|
end
|
@@ -1,9 +1,22 @@
|
|
1
|
+
# This migration comes from enju_library_engine (originally 20151213072705)
|
1
2
|
class AddFooterBannerToLibraryGroup < ActiveRecord::Migration
|
2
3
|
def up
|
3
|
-
|
4
|
+
if defined?(Globalize)
|
5
|
+
LibraryGroup.add_translation_fields! footer_banner: :text
|
6
|
+
end
|
7
|
+
|
8
|
+
if defined?(AwesomeHstoreTranslate)
|
9
|
+
add_column :library_groups, :footer_banner, :hstore
|
10
|
+
end
|
4
11
|
end
|
5
12
|
|
6
13
|
def down
|
7
|
-
|
14
|
+
if defined?(Globalize)
|
15
|
+
remove_column :library_group_translations, :footer_banner
|
16
|
+
end
|
17
|
+
|
18
|
+
if defined?(AwesomeHstoreTranslate)
|
19
|
+
remove_column :library_groups, :footer_banner
|
20
|
+
end
|
8
21
|
end
|
9
22
|
end
|