enju_manifestation_viewer 0.1.0.pre17 → 0.1.0.pre18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 546c7f2fe141ff1771d6cdc24a66878864e59537
4
- data.tar.gz: fc1d28f02eb15dc1477fa53dd3d363b179da84f5
3
+ metadata.gz: 4567f3bd750078ea55fb475029bf8be57cf78249
4
+ data.tar.gz: 951677d21aa6ba77e77153130f1c3a54f38575bc
5
5
  SHA512:
6
- metadata.gz: 7df2b4c336a88eec140c12abdfb2fb61ecfb44237002b4ed3982eced1f3dd1131f788a7eeec2f22201360d8af9cef3f6c2374432a7324f38857395fdbde5aef5
7
- data.tar.gz: 8859932e6bbd234088df62959e1190a1380653e1ff07cb4dcd8b7090718c1ebb51daf3047beb6c52517394264212a93e8a8f9392da439e9a78d8dcbaa04cf640
6
+ metadata.gz: ae45026ac60fc4524ad0e6399ee739f1004c9c36c90d581cb492babbf0ece0f89d45a3a666a69818079e95e55b8c8280c2cd2cd7bc60831d3f0979114eaa5d4a
7
+ data.tar.gz: 52480b62f0c59a6c346ee45be55d3cc32848b9f4d1c6c91fb331945ac442aa6c8d4286806b9df26cebddd302a8223e7b71f8050ea1348ba21e07e782a68cf24d
@@ -44,10 +44,10 @@
44
44
  }
45
45
  var thumb_element = document.getElementById('gbsthumbnail');
46
46
  if (thumb_element.innerHTML === "") {
47
- <% if Setting.book_jacket.unknown_resource.blank? %>
48
- thumb_element.innerHTML = '<%= image_tag("unknown_resource.png", size: "150x150", alt: "*") %>';
47
+ <% if @library_group.settings[:book_jacket_unknown_resource] %>
48
+ thumb_element.innerHTML = '<%= @library_group.settings[:book_jacket_unknown_resource] %>';
49
49
  <% else %>
50
- thumb_element.innerHTML = '<%= Setting.book_jacket.unknown_resource %>';
50
+ thumb_element.innerHTML = '<%= image_tag("unknown_resource.png", size: "150x150", alt: "*") %>';
51
51
  <% end %>
52
52
  }
53
53
  });
@@ -5,10 +5,10 @@ module EnjuManifestationViewer
5
5
  link = ''
6
6
  manifestation.picture_files.each_with_index do |picture_file, i|
7
7
  if i == 0
8
- link += link_to(show_image(picture_file, :size => :thumb), picture_file_path(picture_file, :format => :download), :rel => "manifestation_#{manifestation.id}")
8
+ link += link_to(show_image(picture_file, size: :thumb), picture_file_path(picture_file, format: :download), rel: "manifestation_#{manifestation.id}")
9
9
  else
10
- link += content_tag :span, :style => "display: none" do
11
- link_to(show_image(picture_file, :size => :thumb), picture_file_path(picture_file, :format => :download), :rel => "manifestation_#{manifestation.id}")
10
+ link += content_tag :span, style: "display: none" do
11
+ link_to(show_image(picture_file, size: :thumb), picture_file_path(picture_file, format: :download), rel: "manifestation_#{manifestation.id}")
12
12
  end
13
13
  end
14
14
  end
@@ -21,72 +21,72 @@ module EnjuManifestationViewer
21
21
  end
22
22
 
23
23
  unless link
24
- link = link_to image_tag('unknown_resource.png', :width => '100', :height => '100', :alt => '*', :itemprop => 'image'), manifestation
24
+ link = link_to image_tag('unknown_resource.png', width: '100', height: '100', alt: '*', itemprop: 'image'), manifestation
25
25
  end
26
26
  link
27
27
  end
28
28
 
29
- def screenshot_tag(manifestation, generator = Setting.screenshot.generator)
29
+ def screenshot_tag(manifestation, generator = LibraryGroup.site_config.settings[:screenshot_generator])
30
30
  return nil unless manifestation.try(:access_address)
31
31
  case generator
32
- when :mozshot
33
- link_to image_tag("http://mozshot.nemui.org/shot?#{manifestation.access_address}", :width => 128, :height => 128, :alt => manifestation.original_title, :border => 0, :itemprop => 'image'), manifestation.access_address
34
- when :simpleapi
35
- link_to image_tag("http://img.simpleapi.net/small/#{manifestation.access_address}", :width => 128, :height => 128, :alt => manifestation.original_title, :border => 0, :itemprop => 'image'), manifestation.access_address
36
- when :heartrails
37
- link_to image_tag("http://capture.heartrails.com/medium?#{manifestation.access_address}", :width => 120, :height => 90, :alt => manifestation.original_title, :border => 0, :itemprop => 'image'), manifestation.access_address
38
- when :thumbalizr
39
- link_to image_tag("http://api.thumbalizr.com/?url=#{manifestation.access_address}&width=128", :width => 128, :height => 144, :alt => manifestation.original_title, :border => 0, :itemprop => 'image'), manifestation.access_address
32
+ when "mozshot"
33
+ link_to image_tag("http://mozshot.nemui.org/shot?#{manifestation.access_address}", width: 128, height: 128, alt: manifestation.original_title, border: 0, itemprop: 'image'), manifestation.access_address
34
+ when "simpleapi"
35
+ link_to image_tag("http://img.simpleapi.net/small/#{manifestation.access_address}", width: 128, height: 128, alt: manifestation.original_title, border: 0, itemprop: 'image'), manifestation.access_address
36
+ when "heartrails"
37
+ link_to image_tag("http://capture.heartrails.com/medium?#{manifestation.access_address}", width: 120, height: 90, alt: manifestation.original_title, border: 0, itemprop: 'image'), manifestation.access_address
38
+ when "thumbalizr"
39
+ link_to image_tag("http://api.thumbalizr.com/?url=#{manifestation.access_address}&width=128", width: 128, height: 144, alt: manifestation.original_title, border: 0, itemprop: 'image'), manifestation.access_address
40
40
  end
41
41
  end
42
42
 
43
- def book_jacket_tag(manifestation, generator = Setting.book_jacket.source)
43
+ def book_jacket_tag(manifestation, generator = LibraryGroup.site_config.settings[:book_jacket_source])
44
44
  return nil unless manifestation
45
45
  case generator
46
- when :amazon
47
- return nil unless Setting.amazon.hostname
46
+ when "amazon"
47
+ return nil unless LibraryGroup.site_config.settings[:amazon_hostname]
48
48
  book_jacket = manifestation.amazon_book_jacket
49
49
  if book_jacket
50
- link_to image_tag(book_jacket[:url], :width => book_jacket[:width], :height => book_jacket[:height], :alt => manifestation.original_title, :class => 'book_jacket', :itemprop => 'image'), "http://#{Setting.amazon.hostname}/dp/#{book_jacket[:asin]}"
50
+ link_to image_tag(book_jacket[:url], width: book_jacket[:width], height: book_jacket[:height], alt: manifestation.original_title, class: 'book_jacket', itemprop: 'image'), "http://#{LibraryGroup.site_config.settings[:amazon_hostname]}/dp/#{book_jacket[:asin]}"
51
51
  end
52
- when :google
53
- render :partial => 'manifestations/google_book_thumbnail', :locals => {:manifestation => manifestation}
52
+ when "google"
53
+ render partial: 'manifestations/google_book_thumbnail', locals: {manifestation: manifestation}
54
54
  end
55
55
  end
56
56
 
57
- def amazon_link(asin, hostname = Setting.amazon.hostname)
57
+ def amazon_link(asin, hostname = LibraryGroup.site_config.settings[:amazon_hostname])
58
58
  return nil if asin.blank?
59
59
  "http://#{hostname}/dp/#{asin}"
60
60
  end
61
61
 
62
- def book_jacket_source_link
63
- case Setting.book_jacket.source
64
- when :google
62
+ def book_jacket_source_link(source = LibraryGroup.site_config.settings[:book_jacket_source])
63
+ case source
64
+ when "google"
65
65
  link_to "Google Books", "http://books.google.com/"
66
- when :amazon
66
+ when "amazon"
67
67
  link_to "Amazon Web Services", "http://aws.amazon.com/"
68
68
  end
69
69
  end
70
70
 
71
- def book_jacket_header(source)
71
+ def book_jacket_header(source = LibraryGroup.site_config.settings[:book_jacket_source])
72
72
  string = ''
73
73
  case source
74
- when :google
75
- string << javascript_tag(nil, :src => "https://www.google.com/jsapi")
74
+ when "google"
75
+ string << javascript_tag(nil, src: "https://www.google.com/jsapi")
76
76
  string << render('manifestations/google_book_thumbnail_header')
77
77
  end
78
78
  string.html_safe
79
79
  end
80
80
 
81
- def screenshot_generator_link
82
- case Setting.screenshot.generator
83
- when :mozshot
81
+ def screenshot_generator_link(generator = LibraryGroup.site_config.settings[:screenshot_generator])
82
+ case generator
83
+ when "mozshot"
84
84
  link_to "MozShot", "http://mozshot.nemui.org/"
85
- when :simpleapi
85
+ when "simpleapi"
86
86
  link_to "SimpleAPI", "http://img.simpleapi.net/"
87
- when :heartrails
87
+ when "heartrails"
88
88
  link_to "HeartRails Capture", "http://capture.heartrails.com/"
89
- when :thumbalizr
89
+ when "thumbalizr"
90
90
  link_to "thumbalizr", "http://www.thumbalizr.com/"
91
91
  end
92
92
  end
@@ -1,3 +1,3 @@
1
1
  module EnjuManifestationViewer
2
- VERSION = "0.1.0.pre17"
2
+ VERSION = "0.1.0.pre18"
3
3
  end
@@ -0,0 +1,5 @@
1
+ class AddSettingsToLibraryGroup < ActiveRecord::Migration
2
+ def change
3
+ add_column :library_groups, :settings, :text
4
+ end
5
+ end
@@ -11,9 +11,9 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20141003182825) do
14
+ ActiveRecord::Schema.define(version: 20150221063719) do
15
15
 
16
- create_table "accepts", force: true do |t|
16
+ create_table "accepts", force: :cascade do |t|
17
17
  t.integer "basket_id"
18
18
  t.integer "item_id"
19
19
  t.integer "librarian_id"
@@ -24,7 +24,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
24
24
  add_index "accepts", ["basket_id"], name: "index_accepts_on_basket_id"
25
25
  add_index "accepts", ["item_id"], name: "index_accepts_on_item_id"
26
26
 
27
- create_table "agent_import_file_transitions", force: true do |t|
27
+ create_table "agent_import_file_transitions", force: :cascade do |t|
28
28
  t.string "to_state"
29
29
  t.text "metadata", default: "{}"
30
30
  t.integer "sort_key"
@@ -36,7 +36,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
36
36
  add_index "agent_import_file_transitions", ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
37
37
  add_index "agent_import_file_transitions", ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
38
38
 
39
- create_table "agent_import_files", force: true do |t|
39
+ create_table "agent_import_files", force: :cascade do |t|
40
40
  t.integer "parent_id"
41
41
  t.string "content_type"
42
42
  t.integer "size"
@@ -58,7 +58,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
58
58
  add_index "agent_import_files", ["parent_id"], name: "index_agent_import_files_on_parent_id"
59
59
  add_index "agent_import_files", ["user_id"], name: "index_agent_import_files_on_user_id"
60
60
 
61
- create_table "agent_import_results", force: true do |t|
61
+ create_table "agent_import_results", force: :cascade do |t|
62
62
  t.integer "agent_import_file_id"
63
63
  t.integer "agent_id"
64
64
  t.text "body"
@@ -66,13 +66,13 @@ ActiveRecord::Schema.define(version: 20141003182825) do
66
66
  t.datetime "updated_at"
67
67
  end
68
68
 
69
- create_table "agent_merge_lists", force: true do |t|
69
+ create_table "agent_merge_lists", force: :cascade do |t|
70
70
  t.string "title"
71
71
  t.datetime "created_at"
72
72
  t.datetime "updated_at"
73
73
  end
74
74
 
75
- create_table "agent_merges", force: true do |t|
75
+ create_table "agent_merges", force: :cascade do |t|
76
76
  t.integer "agent_id", null: false
77
77
  t.integer "agent_merge_list_id", null: false
78
78
  t.datetime "created_at"
@@ -82,7 +82,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
82
82
  add_index "agent_merges", ["agent_id"], name: "index_agent_merges_on_agent_id"
83
83
  add_index "agent_merges", ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
84
84
 
85
- create_table "agent_relationship_types", force: true do |t|
85
+ create_table "agent_relationship_types", force: :cascade do |t|
86
86
  t.string "name", null: false
87
87
  t.text "display_name"
88
88
  t.text "note"
@@ -91,7 +91,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
91
91
  t.datetime "updated_at"
92
92
  end
93
93
 
94
- create_table "agent_relationships", force: true do |t|
94
+ create_table "agent_relationships", force: :cascade do |t|
95
95
  t.integer "parent_id"
96
96
  t.integer "child_id"
97
97
  t.integer "agent_relationship_type_id"
@@ -103,7 +103,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
103
103
  add_index "agent_relationships", ["child_id"], name: "index_agent_relationships_on_child_id"
104
104
  add_index "agent_relationships", ["parent_id"], name: "index_agent_relationships_on_parent_id"
105
105
 
106
- create_table "agent_types", force: true do |t|
106
+ create_table "agent_types", force: :cascade do |t|
107
107
  t.string "name", null: false
108
108
  t.text "display_name"
109
109
  t.text "note"
@@ -112,7 +112,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
112
112
  t.datetime "updated_at"
113
113
  end
114
114
 
115
- create_table "agents", force: true do |t|
115
+ create_table "agents", force: :cascade do |t|
116
116
  t.string "last_name"
117
117
  t.string "middle_name"
118
118
  t.string "first_name"
@@ -166,7 +166,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
166
166
  add_index "agents", ["language_id"], name: "index_agents_on_language_id"
167
167
  add_index "agents", ["required_role_id"], name: "index_agents_on_required_role_id"
168
168
 
169
- create_table "baskets", force: true do |t|
169
+ create_table "baskets", force: :cascade do |t|
170
170
  t.integer "user_id"
171
171
  t.text "note"
172
172
  t.integer "lock_version", default: 0, null: false
@@ -176,7 +176,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
176
176
 
177
177
  add_index "baskets", ["user_id"], name: "index_baskets_on_user_id"
178
178
 
179
- create_table "bookstores", force: true do |t|
179
+ create_table "bookstores", force: :cascade do |t|
180
180
  t.text "name", null: false
181
181
  t.string "zip_code"
182
182
  t.text "address"
@@ -190,7 +190,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
190
190
  t.datetime "updated_at"
191
191
  end
192
192
 
193
- create_table "budget_types", force: true do |t|
193
+ create_table "budget_types", force: :cascade do |t|
194
194
  t.string "name"
195
195
  t.text "display_name"
196
196
  t.text "note"
@@ -199,7 +199,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
199
199
  t.datetime "updated_at"
200
200
  end
201
201
 
202
- create_table "carrier_types", force: true do |t|
202
+ create_table "carrier_types", force: :cascade do |t|
203
203
  t.string "name", null: false
204
204
  t.text "display_name"
205
205
  t.text "note"
@@ -208,7 +208,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
208
208
  t.datetime "updated_at"
209
209
  end
210
210
 
211
- create_table "colors", force: true do |t|
211
+ create_table "colors", force: :cascade do |t|
212
212
  t.integer "library_group_id"
213
213
  t.string "property"
214
214
  t.string "code"
@@ -219,7 +219,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
219
219
 
220
220
  add_index "colors", ["library_group_id"], name: "index_colors_on_library_group_id"
221
221
 
222
- create_table "content_types", force: true do |t|
222
+ create_table "content_types", force: :cascade do |t|
223
223
  t.string "name", null: false
224
224
  t.text "display_name"
225
225
  t.text "note"
@@ -228,7 +228,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
228
228
  t.datetime "updated_at"
229
229
  end
230
230
 
231
- create_table "countries", force: true do |t|
231
+ create_table "countries", force: :cascade do |t|
232
232
  t.string "name", null: false
233
233
  t.text "display_name"
234
234
  t.string "alpha_2"
@@ -243,7 +243,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
243
243
  add_index "countries", ["name"], name: "index_countries_on_name"
244
244
  add_index "countries", ["numeric_3"], name: "index_countries_on_numeric_3"
245
245
 
246
- create_table "create_types", force: true do |t|
246
+ create_table "create_types", force: :cascade do |t|
247
247
  t.string "name"
248
248
  t.text "display_name"
249
249
  t.text "note"
@@ -252,7 +252,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
252
252
  t.datetime "updated_at"
253
253
  end
254
254
 
255
- create_table "creates", force: true do |t|
255
+ create_table "creates", force: :cascade do |t|
256
256
  t.integer "agent_id", null: false
257
257
  t.integer "work_id", null: false
258
258
  t.integer "position"
@@ -264,7 +264,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
264
264
  add_index "creates", ["agent_id"], name: "index_creates_on_agent_id"
265
265
  add_index "creates", ["work_id"], name: "index_creates_on_work_id"
266
266
 
267
- create_table "donates", force: true do |t|
267
+ create_table "donates", force: :cascade do |t|
268
268
  t.integer "agent_id", null: false
269
269
  t.integer "item_id", null: false
270
270
  t.datetime "created_at"
@@ -274,7 +274,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
274
274
  add_index "donates", ["agent_id"], name: "index_donates_on_agent_id"
275
275
  add_index "donates", ["item_id"], name: "index_donates_on_item_id"
276
276
 
277
- create_table "exemplifies", force: true do |t|
277
+ create_table "exemplifies", force: :cascade do |t|
278
278
  t.integer "manifestation_id", null: false
279
279
  t.integer "item_id", null: false
280
280
  t.integer "position"
@@ -285,7 +285,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
285
285
  add_index "exemplifies", ["item_id"], name: "index_exemplifies_on_item_id", unique: true
286
286
  add_index "exemplifies", ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
287
287
 
288
- create_table "form_of_works", force: true do |t|
288
+ create_table "form_of_works", force: :cascade do |t|
289
289
  t.string "name", null: false
290
290
  t.text "display_name"
291
291
  t.text "note"
@@ -294,7 +294,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
294
294
  t.datetime "updated_at"
295
295
  end
296
296
 
297
- create_table "frequencies", force: true do |t|
297
+ create_table "frequencies", force: :cascade do |t|
298
298
  t.string "name", null: false
299
299
  t.text "display_name"
300
300
  t.text "note"
@@ -303,7 +303,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
303
303
  t.datetime "updated_at"
304
304
  end
305
305
 
306
- create_table "identifier_types", force: true do |t|
306
+ create_table "identifier_types", force: :cascade do |t|
307
307
  t.string "name"
308
308
  t.text "display_name"
309
309
  t.text "note"
@@ -312,7 +312,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
312
312
  t.datetime "updated_at"
313
313
  end
314
314
 
315
- create_table "identifiers", force: true do |t|
315
+ create_table "identifiers", force: :cascade do |t|
316
316
  t.string "body", null: false
317
317
  t.integer "identifier_type_id", null: false
318
318
  t.integer "manifestation_id"
@@ -325,7 +325,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
325
325
  add_index "identifiers", ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
326
326
  add_index "identifiers", ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
327
327
 
328
- create_table "import_request_transitions", force: true do |t|
328
+ create_table "import_request_transitions", force: :cascade do |t|
329
329
  t.string "to_state"
330
330
  t.text "metadata", default: "{}"
331
331
  t.integer "sort_key"
@@ -337,7 +337,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
337
337
  add_index "import_request_transitions", ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
338
338
  add_index "import_request_transitions", ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
339
339
 
340
- create_table "import_requests", force: true do |t|
340
+ create_table "import_requests", force: :cascade do |t|
341
341
  t.string "isbn"
342
342
  t.integer "manifestation_id"
343
343
  t.integer "user_id"
@@ -349,7 +349,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
349
349
  add_index "import_requests", ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
350
350
  add_index "import_requests", ["user_id"], name: "index_import_requests_on_user_id"
351
351
 
352
- create_table "items", force: true do |t|
352
+ create_table "items", force: :cascade do |t|
353
353
  t.string "call_number"
354
354
  t.string "item_identifier"
355
355
  t.datetime "created_at"
@@ -379,7 +379,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
379
379
  add_index "items", ["required_role_id"], name: "index_items_on_required_role_id"
380
380
  add_index "items", ["shelf_id"], name: "index_items_on_shelf_id"
381
381
 
382
- create_table "languages", force: true do |t|
382
+ create_table "languages", force: :cascade do |t|
383
383
  t.string "name", null: false
384
384
  t.string "native_name"
385
385
  t.text "display_name"
@@ -395,7 +395,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
395
395
  add_index "languages", ["iso_639_3"], name: "index_languages_on_iso_639_3"
396
396
  add_index "languages", ["name"], name: "index_languages_on_name", unique: true
397
397
 
398
- create_table "libraries", force: true do |t|
398
+ create_table "libraries", force: :cascade do |t|
399
399
  t.string "name", null: false
400
400
  t.text "display_name"
401
401
  t.string "short_display_name", null: false
@@ -425,7 +425,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
425
425
  add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
426
426
  add_index "libraries", ["name"], name: "index_libraries_on_name", unique: true
427
427
 
428
- create_table "library_groups", force: true do |t|
428
+ create_table "library_groups", force: :cascade do |t|
429
429
  t.string "name", null: false
430
430
  t.text "display_name"
431
431
  t.string "short_name", null: false
@@ -438,11 +438,12 @@ ActiveRecord::Schema.define(version: 20141003182825) do
438
438
  t.datetime "updated_at"
439
439
  t.text "admin_networks"
440
440
  t.string "url", default: "http://localhost:3000/"
441
+ t.text "settings"
441
442
  end
442
443
 
443
444
  add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
444
445
 
445
- create_table "licenses", force: true do |t|
446
+ create_table "licenses", force: :cascade do |t|
446
447
  t.string "name", null: false
447
448
  t.string "display_name"
448
449
  t.text "note"
@@ -451,7 +452,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
451
452
  t.datetime "updated_at"
452
453
  end
453
454
 
454
- create_table "manifestation_relationship_types", force: true do |t|
455
+ create_table "manifestation_relationship_types", force: :cascade do |t|
455
456
  t.string "name", null: false
456
457
  t.text "display_name"
457
458
  t.text "note"
@@ -460,7 +461,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
460
461
  t.datetime "updated_at"
461
462
  end
462
463
 
463
- create_table "manifestation_relationships", force: true do |t|
464
+ create_table "manifestation_relationships", force: :cascade do |t|
464
465
  t.integer "parent_id"
465
466
  t.integer "child_id"
466
467
  t.integer "manifestation_relationship_type_id"
@@ -472,7 +473,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
472
473
  add_index "manifestation_relationships", ["child_id"], name: "index_manifestation_relationships_on_child_id"
473
474
  add_index "manifestation_relationships", ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
474
475
 
475
- create_table "manifestations", force: true do |t|
476
+ create_table "manifestations", force: :cascade do |t|
476
477
  t.text "original_title", null: false
477
478
  t.text "title_alternative"
478
479
  t.text "title_transcription"
@@ -538,7 +539,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
538
539
  add_index "manifestations", ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
539
540
  add_index "manifestations", ["updated_at"], name: "index_manifestations_on_updated_at"
540
541
 
541
- create_table "medium_of_performances", force: true do |t|
542
+ create_table "medium_of_performances", force: :cascade do |t|
542
543
  t.string "name", null: false
543
544
  t.text "display_name"
544
545
  t.text "note"
@@ -547,7 +548,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
547
548
  t.datetime "updated_at"
548
549
  end
549
550
 
550
- create_table "owns", force: true do |t|
551
+ create_table "owns", force: :cascade do |t|
551
552
  t.integer "agent_id", null: false
552
553
  t.integer "item_id", null: false
553
554
  t.integer "position"
@@ -558,7 +559,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
558
559
  add_index "owns", ["agent_id"], name: "index_owns_on_agent_id"
559
560
  add_index "owns", ["item_id"], name: "index_owns_on_item_id"
560
561
 
561
- create_table "picture_files", force: true do |t|
562
+ create_table "picture_files", force: :cascade do |t|
562
563
  t.integer "picture_attachable_id"
563
564
  t.string "picture_attachable_type"
564
565
  t.string "content_type"
@@ -577,7 +578,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
577
578
 
578
579
  add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
579
580
 
580
- create_table "produce_types", force: true do |t|
581
+ create_table "produce_types", force: :cascade do |t|
581
582
  t.string "name"
582
583
  t.text "display_name"
583
584
  t.text "note"
@@ -586,7 +587,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
586
587
  t.datetime "updated_at"
587
588
  end
588
589
 
589
- create_table "produces", force: true do |t|
590
+ create_table "produces", force: :cascade do |t|
590
591
  t.integer "agent_id", null: false
591
592
  t.integer "manifestation_id", null: false
592
593
  t.integer "position"
@@ -598,7 +599,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
598
599
  add_index "produces", ["agent_id"], name: "index_produces_on_agent_id"
599
600
  add_index "produces", ["manifestation_id"], name: "index_produces_on_manifestation_id"
600
601
 
601
- create_table "profiles", force: true do |t|
602
+ create_table "profiles", force: :cascade do |t|
602
603
  t.integer "user_id"
603
604
  t.integer "user_group_id"
604
605
  t.integer "library_id"
@@ -618,7 +619,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
618
619
  add_index "profiles", ["user_id"], name: "index_profiles_on_user_id"
619
620
  add_index "profiles", ["user_number"], name: "index_profiles_on_user_number", unique: true
620
621
 
621
- create_table "realize_types", force: true do |t|
622
+ create_table "realize_types", force: :cascade do |t|
622
623
  t.string "name"
623
624
  t.text "display_name"
624
625
  t.text "note"
@@ -627,7 +628,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
627
628
  t.datetime "updated_at"
628
629
  end
629
630
 
630
- create_table "realizes", force: true do |t|
631
+ create_table "realizes", force: :cascade do |t|
631
632
  t.integer "agent_id", null: false
632
633
  t.integer "expression_id", null: false
633
634
  t.integer "position"
@@ -639,7 +640,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
639
640
  add_index "realizes", ["agent_id"], name: "index_realizes_on_agent_id"
640
641
  add_index "realizes", ["expression_id"], name: "index_realizes_on_expression_id"
641
642
 
642
- create_table "request_status_types", force: true do |t|
643
+ create_table "request_status_types", force: :cascade do |t|
643
644
  t.string "name", null: false
644
645
  t.text "display_name"
645
646
  t.text "note"
@@ -648,7 +649,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
648
649
  t.datetime "updated_at"
649
650
  end
650
651
 
651
- create_table "request_types", force: true do |t|
652
+ create_table "request_types", force: :cascade do |t|
652
653
  t.string "name", null: false
653
654
  t.text "display_name"
654
655
  t.text "note"
@@ -657,7 +658,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
657
658
  t.datetime "updated_at"
658
659
  end
659
660
 
660
- create_table "resource_export_file_transitions", force: true do |t|
661
+ create_table "resource_export_file_transitions", force: :cascade do |t|
661
662
  t.string "to_state"
662
663
  t.text "metadata", default: "{}"
663
664
  t.integer "sort_key"
@@ -669,7 +670,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
669
670
  add_index "resource_export_file_transitions", ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
670
671
  add_index "resource_export_file_transitions", ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
671
672
 
672
- create_table "resource_export_files", force: true do |t|
673
+ create_table "resource_export_files", force: :cascade do |t|
673
674
  t.integer "user_id"
674
675
  t.string "resource_export_file_name"
675
676
  t.string "resource_export_content_type"
@@ -680,7 +681,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
680
681
  t.datetime "updated_at"
681
682
  end
682
683
 
683
- create_table "resource_import_file_transitions", force: true do |t|
684
+ create_table "resource_import_file_transitions", force: :cascade do |t|
684
685
  t.string "to_state"
685
686
  t.text "metadata", default: "{}"
686
687
  t.integer "sort_key"
@@ -692,7 +693,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
692
693
  add_index "resource_import_file_transitions", ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
693
694
  add_index "resource_import_file_transitions", ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
694
695
 
695
- create_table "resource_import_files", force: true do |t|
696
+ create_table "resource_import_files", force: :cascade do |t|
696
697
  t.integer "parent_id"
697
698
  t.string "content_type"
698
699
  t.integer "size"
@@ -715,7 +716,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
715
716
  add_index "resource_import_files", ["parent_id"], name: "index_resource_import_files_on_parent_id"
716
717
  add_index "resource_import_files", ["user_id"], name: "index_resource_import_files_on_user_id"
717
718
 
718
- create_table "resource_import_results", force: true do |t|
719
+ create_table "resource_import_results", force: :cascade do |t|
719
720
  t.integer "resource_import_file_id"
720
721
  t.integer "manifestation_id"
721
722
  t.integer "item_id"
@@ -729,7 +730,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
729
730
  add_index "resource_import_results", ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
730
731
  add_index "resource_import_results", ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
731
732
 
732
- create_table "roles", force: true do |t|
733
+ create_table "roles", force: :cascade do |t|
733
734
  t.string "name", null: false
734
735
  t.string "display_name"
735
736
  t.text "note"
@@ -739,7 +740,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
739
740
  t.integer "position"
740
741
  end
741
742
 
742
- create_table "search_engines", force: true do |t|
743
+ create_table "search_engines", force: :cascade do |t|
743
744
  t.string "name", null: false
744
745
  t.text "display_name"
745
746
  t.string "url", null: false
@@ -753,13 +754,13 @@ ActiveRecord::Schema.define(version: 20141003182825) do
753
754
  t.datetime "updated_at"
754
755
  end
755
756
 
756
- create_table "series_statement_merge_lists", force: true do |t|
757
+ create_table "series_statement_merge_lists", force: :cascade do |t|
757
758
  t.string "title"
758
759
  t.datetime "created_at"
759
760
  t.datetime "updated_at"
760
761
  end
761
762
 
762
- create_table "series_statement_merges", force: true do |t|
763
+ create_table "series_statement_merges", force: :cascade do |t|
763
764
  t.integer "series_statement_id", null: false
764
765
  t.integer "series_statement_merge_list_id", null: false
765
766
  t.datetime "created_at"
@@ -769,7 +770,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
769
770
  add_index "series_statement_merges", ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
770
771
  add_index "series_statement_merges", ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
771
772
 
772
- create_table "series_statements", force: true do |t|
773
+ create_table "series_statements", force: :cascade do |t|
773
774
  t.text "original_title"
774
775
  t.text "numbering"
775
776
  t.text "title_subseries"
@@ -794,7 +795,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
794
795
  add_index "series_statements", ["root_manifestation_id"], name: "index_series_statements_on_root_manifestation_id"
795
796
  add_index "series_statements", ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
796
797
 
797
- create_table "shelves", force: true do |t|
798
+ create_table "shelves", force: :cascade do |t|
798
799
  t.string "name", null: false
799
800
  t.text "display_name"
800
801
  t.text "note"
@@ -809,7 +810,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
809
810
 
810
811
  add_index "shelves", ["library_id"], name: "index_shelves_on_library_id"
811
812
 
812
- create_table "subscribes", force: true do |t|
813
+ create_table "subscribes", force: :cascade do |t|
813
814
  t.integer "subscription_id", null: false
814
815
  t.integer "work_id", null: false
815
816
  t.datetime "start_at", null: false
@@ -821,7 +822,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
821
822
  add_index "subscribes", ["subscription_id"], name: "index_subscribes_on_subscription_id"
822
823
  add_index "subscribes", ["work_id"], name: "index_subscribes_on_work_id"
823
824
 
824
- create_table "subscriptions", force: true do |t|
825
+ create_table "subscriptions", force: :cascade do |t|
825
826
  t.text "title", null: false
826
827
  t.text "note"
827
828
  t.integer "user_id"
@@ -835,7 +836,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
835
836
  add_index "subscriptions", ["order_list_id"], name: "index_subscriptions_on_order_list_id"
836
837
  add_index "subscriptions", ["user_id"], name: "index_subscriptions_on_user_id"
837
838
 
838
- create_table "user_export_file_transitions", force: true do |t|
839
+ create_table "user_export_file_transitions", force: :cascade do |t|
839
840
  t.string "to_state"
840
841
  t.text "metadata", default: "{}"
841
842
  t.integer "sort_key"
@@ -847,7 +848,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
847
848
  add_index "user_export_file_transitions", ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
848
849
  add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
849
850
 
850
- create_table "user_export_files", force: true do |t|
851
+ create_table "user_export_files", force: :cascade do |t|
851
852
  t.integer "user_id"
852
853
  t.string "user_export_file_name"
853
854
  t.string "user_export_content_type"
@@ -858,7 +859,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
858
859
  t.datetime "updated_at"
859
860
  end
860
861
 
861
- create_table "user_groups", force: true do |t|
862
+ create_table "user_groups", force: :cascade do |t|
862
863
  t.string "name"
863
864
  t.text "display_name"
864
865
  t.text "note"
@@ -870,7 +871,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
870
871
  t.datetime "expired_at"
871
872
  end
872
873
 
873
- create_table "user_has_roles", force: true do |t|
874
+ create_table "user_has_roles", force: :cascade do |t|
874
875
  t.integer "user_id"
875
876
  t.integer "role_id"
876
877
  t.datetime "created_at"
@@ -880,7 +881,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
880
881
  add_index "user_has_roles", ["role_id"], name: "index_user_has_roles_on_role_id"
881
882
  add_index "user_has_roles", ["user_id"], name: "index_user_has_roles_on_user_id"
882
883
 
883
- create_table "user_import_file_transitions", force: true do |t|
884
+ create_table "user_import_file_transitions", force: :cascade do |t|
884
885
  t.string "to_state"
885
886
  t.text "metadata", default: "{}"
886
887
  t.integer "sort_key"
@@ -892,7 +893,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
892
893
  add_index "user_import_file_transitions", ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
893
894
  add_index "user_import_file_transitions", ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
894
895
 
895
- create_table "user_import_files", force: true do |t|
896
+ create_table "user_import_files", force: :cascade do |t|
896
897
  t.integer "user_id"
897
898
  t.text "note"
898
899
  t.datetime "executed_at"
@@ -910,7 +911,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
910
911
  t.integer "default_user_group_id"
911
912
  end
912
913
 
913
- create_table "user_import_results", force: true do |t|
914
+ create_table "user_import_results", force: :cascade do |t|
914
915
  t.integer "user_import_file_id"
915
916
  t.integer "user_id"
916
917
  t.text "body"
@@ -918,7 +919,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
918
919
  t.datetime "updated_at"
919
920
  end
920
921
 
921
- create_table "users", force: true do |t|
922
+ create_table "users", force: :cascade do |t|
922
923
  t.string "email", default: "", null: false
923
924
  t.string "encrypted_password", default: "", null: false
924
925
  t.string "reset_password_token"
@@ -945,7 +946,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do
945
946
  add_index "users", ["unlock_token"], name: "index_users_on_unlock_token", unique: true
946
947
  add_index "users", ["username"], name: "index_users_on_username", unique: true
947
948
 
948
- create_table "versions", force: true do |t|
949
+ create_table "versions", force: :cascade do |t|
949
950
  t.string "item_type", null: false
950
951
  t.integer "item_id", null: false
951
952
  t.string "event", null: false
@@ -0,0 +1,37 @@
1
+ # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
+ one:
3
+ id: 1
4
+ name: unknown
5
+ display_name: unknown
6
+ short_name: unknown
7
+ note:
8
+ my_networks: "0.0.0.0/0\r\n\
9
+ ::/0"
10
+ url: "http://localhost:3000/"
11
+ position: 1
12
+ login_banner: "*Next-L Enju*"
13
+ admin_networks: "0.0.0.0/0\r\n\
14
+ ::/0"
15
+ settings: <% if Rails::VERSION::MAJOR > 3 %>
16
+ "{\"max_number_of_results\":200,\"family_name_first\":true,\"amazon_hostname\":\"www.amazon.co.jp\",\"book_jacket_source\":\"google\",\"screenshot_generator\":\"mozshot\"}"
17
+ <% else %>
18
+ "---\n:max_number_of_results: 200\n:family_name_first: true\n:amazon_hostname: www.amazon.co.jp\n:book_jacket_source: google\n:screenshot_generator: mozshot\n"
19
+ <% end %>
20
+ # == Schema Information
21
+ #
22
+ # Table name: library_groups
23
+ #
24
+ # id :integer not null, primary key
25
+ # name :string(255) not null
26
+ # display_name :text
27
+ # short_name :string(255) not null
28
+ # my_networks :text
29
+ # login_banner :text
30
+ # note :text
31
+ # country_id :integer
32
+ # position :integer
33
+ # created_at :datetime not null
34
+ # updated_at :datetime not null
35
+ # admin_networks :text
36
+ # url :string(255) default("http://localhost:3000/")
37
+ #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_manifestation_viewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre17
4
+ version: 0.1.0.pre18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-12 00:00:00.000000000 Z
11
+ date: 2015-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: enju_biblio
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.0.pre64
19
+ version: 0.1.0.pre66
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.0.pre64
26
+ version: 0.1.0.pre66
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: enju_leaf
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.1.0.rc17
33
+ version: 1.1.0.rc18
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.1.0.rc17
40
+ version: 1.1.0.rc18
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: sqlite3
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +150,20 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: appraisal
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
153
167
  description: embed external contents on Next-L Enju
154
168
  email:
155
169
  - nabeta@fastmail.fm
@@ -333,6 +347,7 @@ files:
333
347
  - spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb
334
348
  - spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb
335
349
  - spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb
350
+ - spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb
336
351
  - spec/dummy/db/schema.rb
337
352
  - spec/dummy/public/404.html
338
353
  - spec/dummy/public/422.html
@@ -340,6 +355,7 @@ files:
340
355
  - spec/dummy/public/favicon.ico
341
356
  - spec/fixtures/identifier_types.yml
342
357
  - spec/fixtures/identifiers.yml
358
+ - spec/fixtures/library_groups.yml
343
359
  - spec/fixtures/manifestations.yml
344
360
  - spec/helpers/book_jacket_helper_spec.rb
345
361
  - spec/helpers/manifestation_viewer_helper_spec.rb
@@ -525,6 +541,7 @@ test_files:
525
541
  - spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb
526
542
  - spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb
527
543
  - spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb
544
+ - spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb
528
545
  - spec/dummy/db/schema.rb
529
546
  - spec/dummy/public/404.html
530
547
  - spec/dummy/public/422.html
@@ -534,6 +551,7 @@ test_files:
534
551
  - spec/dummy/README.rdoc
535
552
  - spec/fixtures/identifier_types.yml
536
553
  - spec/fixtures/identifiers.yml
554
+ - spec/fixtures/library_groups.yml
537
555
  - spec/fixtures/manifestations.yml
538
556
  - spec/helpers/book_jacket_helper_spec.rb
539
557
  - spec/helpers/manifestation_viewer_helper_spec.rb