enju_loc 0.2.0.beta.2 → 0.2.0.beta.3
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/lib/enju_loc/loc_search.rb +4 -0
- data/lib/enju_loc/version.rb +1 -1
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_extent.yml +66 -0
- data/spec/controllers/loc_search_controller_spec.rb +1 -1
- data/spec/dummy/app/models/user.rb +2 -0
- data/spec/dummy/db/migrate/149_create_message_templates.rb +18 -0
- data/spec/dummy/db/migrate/154_create_messages.rb +23 -0
- data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +18 -0
- data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +11 -0
- data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +6 -0
- data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
- data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +18 -0
- data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +18 -0
- data/spec/dummy/db/migrate/20140821151023_create_colors.rb +14 -0
- data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +5 -0
- data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +13 -0
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +13 -0
- data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +9 -0
- 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 +118 -5
- data/spec/fixtures/library_groups.yml +1 -1
- data/spec/models/loc_search_spec.rb +9 -1
- data/spec/rails_helper.rb +33 -27
- data/spec/spec_helper.rb +84 -41
- metadata +243 -199
- data/spec/dummy/config/initializers/enju_leaf.rb +0 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 4de6705bc6617da86e1da9b8e33ee20ea1b5cce3
         | 
| 4 | 
            +
              data.tar.gz: 0a21e27c308bbf16f22ad29a149f6ee866513ed9
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 7161702ce9ff614ab9417d7b2f6657129bda74f74dc7178b0b80d53dceb7ade31717f4e8ac7796beb392f462bf22a63d128c317a906133c30c07e717df2cb967
         | 
| 7 | 
            +
              data.tar.gz: 8ff7b2c060bfa82113adfc0defd076dd277d0a9f4db3a02e8c9879b1c5e7d3dad639b002a513a40937fe6f86af84c1c32be0b5c436df9b8ca421af6dbbfc39e1
         | 
    
        data/lib/enju_loc/loc_search.rb
    CHANGED
    
    | @@ -101,7 +101,9 @@ module EnjuLoc | |
| 101 101 | 
             
                        :statement_of_responsibility => statement_of_responsibility,
         | 
| 102 102 | 
             
                        :start_page => extent[:start_page],
         | 
| 103 103 | 
             
                        :end_page => extent[:end_page],
         | 
| 104 | 
            +
                        :extent => extent[:extent],
         | 
| 104 105 | 
             
                        :height => extent[:height],
         | 
| 106 | 
            +
                        :dimensions => extent[:dimensions],
         | 
| 105 107 | 
             
                        :access_address => access_address,
         | 
| 106 108 | 
             
                        :note => note,
         | 
| 107 109 | 
             
                        :publication_place => publication_place,
         | 
| @@ -254,11 +256,13 @@ module EnjuLoc | |
| 254 256 | 
             
                  if extent
         | 
| 255 257 | 
             
                    extent = extent.split(';')
         | 
| 256 258 | 
             
                    page = extent[0].try(:strip)
         | 
| 259 | 
            +
                    value[:extent] = page
         | 
| 257 260 | 
             
                    if page =~ /(\d+)\s*(p|page)/
         | 
| 258 261 | 
             
                      value[:start_page] = 1
         | 
| 259 262 | 
             
                      value[:end_page] = $1.dup.to_i
         | 
| 260 263 | 
             
                    end
         | 
| 261 264 | 
             
                    height = extent[1].try(:strip)
         | 
| 265 | 
            +
                    value[:dimensions] = height
         | 
| 262 266 | 
             
                    if height =~ /(\d+)\s*cm/
         | 
| 263 267 | 
             
                      value[:height] = $1.dup.to_i
         | 
| 264 268 | 
             
                    end
         | 
    
        data/lib/enju_loc/version.rb
    CHANGED
    
    
| @@ -0,0 +1,66 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: get
         | 
| 5 | 
            +
                uri: http://lx2.loc.gov:210/LCDB?maximumRecords=10&operation=searchRetrieve&query=bath.lccn=%22%5E94041789%22&recordSchema=mods&version=1.1
         | 
| 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 | 
            +
                  Content-Length:
         | 
| 22 | 
            +
                  - '3309'
         | 
| 23 | 
            +
                  Server:
         | 
| 24 | 
            +
                  - Metaproxy/1.11.6
         | 
| 25 | 
            +
                  Connection:
         | 
| 26 | 
            +
                  - Keep-Alive
         | 
| 27 | 
            +
                  Content-Type:
         | 
| 28 | 
            +
                  - text/xml
         | 
| 29 | 
            +
                body:
         | 
| 30 | 
            +
                  encoding: UTF-8
         | 
| 31 | 
            +
                  string: "<?xml version=\"1.0\"?>\n<zs:searchRetrieveResponse xmlns:zs=\"http://www.loc.gov/zing/srw/\"><zs:version>1.1</zs:version><zs:numberOfRecords>1</zs:numberOfRecords><zs:records><zs:record><zs:recordSchema>mods</zs:recordSchema><zs:recordPacking>xml</zs:recordPacking><zs:recordData><mods
         | 
| 32 | 
            +
                    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.loc.gov/mods/v3\"
         | 
| 33 | 
            +
                    version=\"3.5\" xsi:schemaLocation=\"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-5.xsd\">\n
         | 
| 34 | 
            +
                    \ <titleInfo>\n    <nonSort>The </nonSort>\n    <title>little boat</title>\n
         | 
| 35 | 
            +
                    \ </titleInfo>\n  <name type=\"personal\" usage=\"primary\">\n    <namePart>Henderson,
         | 
| 36 | 
            +
                    Kathy</namePart>\n    <namePart type=\"date\">1949-</namePart>\n  </name>\n
         | 
| 37 | 
            +
                    \ <name type=\"personal\">\n    <namePart>Benson, Patrick</namePart>\n    <role>\n
         | 
| 38 | 
            +
                    \     <roleTerm type=\"text\">ill.</roleTerm>\n    </role>\n  </name>\n  <typeOfResource>text</typeOfResource>\n
         | 
| 39 | 
            +
                    \ <originInfo>\n    <place>\n      <placeTerm type=\"code\" authority=\"marccountry\">mau</placeTerm>\n
         | 
| 40 | 
            +
                    \   </place>\n    <place>\n      <placeTerm type=\"text\">Cambridge, Mass</placeTerm>\n
         | 
| 41 | 
            +
                    \   </place>\n    <publisher>Candlewick Press</publisher>\n    <dateIssued>1995</dateIssued>\n
         | 
| 42 | 
            +
                    \   <edition>1st U.S. ed.</edition>\n    <issuance>monographic</issuance>\n
         | 
| 43 | 
            +
                    \ </originInfo>\n  <language>\n    <languageTerm authority=\"iso639-2b\" type=\"code\">eng</languageTerm>\n
         | 
| 44 | 
            +
                    \ </language>\n  <physicalDescription>\n    <form authority=\"marcform\">print</form>\n
         | 
| 45 | 
            +
                    \   <extent>1 v. (unpaged) : col. ill. ; 25 x 29 cm.</extent>\n  </physicalDescription>\n
         | 
| 46 | 
            +
                    \ <abstract type=\"Summary\">A little boy playing at the seashore makes a
         | 
| 47 | 
            +
                    toy sailboat that is swept out to sea, and, after braving storms, hungry fish,
         | 
| 48 | 
            +
                    and bigger boats, is finally found by a little girl at the opposite shore.</abstract>\n
         | 
| 49 | 
            +
                    \ <targetAudience authority=\"marctarget\">juvenile</targetAudience>\n  <note
         | 
| 50 | 
            +
                    type=\"statement of responsibility\" altRepGroup=\"00\">Kathy Henderson ;
         | 
| 51 | 
            +
                    illustrated by Patrick Benson.</note>\n  <subject authority=\"lcshac\">\n
         | 
| 52 | 
            +
                    \   <topic>Sailboats</topic>\n    <topic>Fiction</topic>\n  </subject>\n  <subject
         | 
| 53 | 
            +
                    authority=\"lcshac\">\n    <topic>Seashore</topic>\n    <topic>Fiction</topic>\n
         | 
| 54 | 
            +
                    \ </subject>\n  <subject authority=\"lcshac\">\n    <topic>Ocean</topic>\n
         | 
| 55 | 
            +
                    \   <topic>Fiction</topic>\n  </subject>\n  <classification authority=\"lcc\">PZ7.H8305
         | 
| 56 | 
            +
                    Li 1995</classification>\n  <classification authority=\"ddc\" edition=\"20\">[E]</classification>\n
         | 
| 57 | 
            +
                    \ <identifier type=\"isbn\">1564024202</identifier>\n  <identifier type=\"lccn\">94041789</identifier>\n
         | 
| 58 | 
            +
                    \ <recordInfo>\n    <descriptionStandard>aacr</descriptionStandard>\n    <recordContentSource
         | 
| 59 | 
            +
                    authority=\"marcorg\">DLC</recordContentSource>\n    <recordCreationDate encoding=\"marc\">941028</recordCreationDate>\n
         | 
| 60 | 
            +
                    \   <recordChangeDate encoding=\"iso8601\">19970109142517.9</recordChangeDate>\n
         | 
| 61 | 
            +
                    \   <recordIdentifier>2070844</recordIdentifier>\n    <recordOrigin>Converted
         | 
| 62 | 
            +
                    from MARCXML to MODS version 3.5 using MARC21slim2MODS3-5.xsl\n\t\t\t\t(Revision
         | 
| 63 | 
            +
                    1.106 2014/12/19)</recordOrigin>\n  </recordInfo>\n</mods></zs:recordData><zs:recordPosition>1</zs:recordPosition></zs:record></zs:records><zs:echoedSearchRetrieveRequest><zs:version>1.1</zs:version><zs:query>bath.lccn=\"^94041789\"</zs:query><zs:maximumRecords>10</zs:maximumRecords><zs:recordPacking>xml</zs:recordPacking><zs:recordSchema>mods</zs:recordSchema></zs:echoedSearchRetrieveRequest></zs:searchRetrieveResponse>\n"
         | 
| 64 | 
            +
                http_version: 
         | 
| 65 | 
            +
              recorded_at: Sat, 01 Oct 2016 06:15:12 GMT
         | 
| 66 | 
            +
            recorded_with: VCR 3.0.3
         | 
| @@ -0,0 +1,18 @@ | |
| 1 | 
            +
            class CreateMessageTemplates < ActiveRecord::Migration
         | 
| 2 | 
            +
              def self.up
         | 
| 3 | 
            +
                create_table :message_templates do |t|
         | 
| 4 | 
            +
                  t.string :status, :null => false
         | 
| 5 | 
            +
                  t.text :title, :null => false
         | 
| 6 | 
            +
                  t.text :body, :null => false
         | 
| 7 | 
            +
                  t.integer :position
         | 
| 8 | 
            +
                  t.string :locale, :default => I18n.default_locale.to_s
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                  t.timestamps
         | 
| 11 | 
            +
                end
         | 
| 12 | 
            +
                add_index :message_templates, :status, :unique => true
         | 
| 13 | 
            +
              end
         | 
| 14 | 
            +
             | 
| 15 | 
            +
              def self.down
         | 
| 16 | 
            +
                drop_table :message_templates
         | 
| 17 | 
            +
              end
         | 
| 18 | 
            +
            end
         | 
| @@ -0,0 +1,23 @@ | |
| 1 | 
            +
            class CreateMessages < ActiveRecord::Migration
         | 
| 2 | 
            +
              def self.up
         | 
| 3 | 
            +
                create_table :messages, :force => true do |t|
         | 
| 4 | 
            +
                  t.datetime :read_at
         | 
| 5 | 
            +
                  t.integer  :receiver_id, :sender_id
         | 
| 6 | 
            +
                  t.string   :subject, :null => false
         | 
| 7 | 
            +
                  t.text     :body
         | 
| 8 | 
            +
                  t.integer :message_request_id
         | 
| 9 | 
            +
                  t.integer :parent_id
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                  t.timestamps
         | 
| 12 | 
            +
                end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                add_index :messages, :sender_id
         | 
| 15 | 
            +
                add_index :messages, :receiver_id
         | 
| 16 | 
            +
                add_index :messages, :message_request_id
         | 
| 17 | 
            +
                add_index :messages, :parent_id
         | 
| 18 | 
            +
              end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
              def self.down
         | 
| 21 | 
            +
                drop_table :messages
         | 
| 22 | 
            +
              end
         | 
| 23 | 
            +
            end
         | 
| @@ -0,0 +1,18 @@ | |
| 1 | 
            +
            class CreateMessageRequests < ActiveRecord::Migration
         | 
| 2 | 
            +
              def self.up
         | 
| 3 | 
            +
                create_table :message_requests do |t|
         | 
| 4 | 
            +
                  t.integer :sender_id
         | 
| 5 | 
            +
                  t.integer :receiver_id
         | 
| 6 | 
            +
                  t.integer :message_template_id
         | 
| 7 | 
            +
                  t.datetime :sent_at
         | 
| 8 | 
            +
                  t.datetime :deleted_at
         | 
| 9 | 
            +
                  t.text :body
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                  t.timestamps
         | 
| 12 | 
            +
                end
         | 
| 13 | 
            +
              end
         | 
| 14 | 
            +
             | 
| 15 | 
            +
              def self.down
         | 
| 16 | 
            +
                drop_table :message_requests
         | 
| 17 | 
            +
              end
         | 
| 18 | 
            +
            end
         | 
| @@ -6,7 +6,7 @@ class CreateUserImportFiles < ActiveRecord::Migration | |
| 6 6 | 
             
                  t.datetime :executed_at
         | 
| 7 7 | 
             
                  t.string :user_import_file_name
         | 
| 8 8 | 
             
                  t.string :user_import_content_type
         | 
| 9 | 
            -
                  t. | 
| 9 | 
            +
                  t.integer :user_import_file_size
         | 
| 10 10 | 
             
                  t.datetime :user_import_updated_at
         | 
| 11 11 | 
             
                  t.string :user_import_fingerprint
         | 
| 12 12 | 
             
                  t.string :edit_mode
         | 
| @@ -0,0 +1,18 @@ | |
| 1 | 
            +
            class CreateMessageTransitions < ActiveRecord::Migration
         | 
| 2 | 
            +
              def change
         | 
| 3 | 
            +
                create_table :message_transitions do |t|
         | 
| 4 | 
            +
                  t.string :to_state
         | 
| 5 | 
            +
                  if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
         | 
| 6 | 
            +
                    t.text :metadata
         | 
| 7 | 
            +
                  else
         | 
| 8 | 
            +
                    t.text :metadata, default: "{}"
         | 
| 9 | 
            +
                  end
         | 
| 10 | 
            +
                  t.integer :sort_key
         | 
| 11 | 
            +
                  t.integer :message_id
         | 
| 12 | 
            +
                  t.timestamps
         | 
| 13 | 
            +
                end
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                add_index :message_transitions, :message_id
         | 
| 16 | 
            +
                add_index :message_transitions, [:sort_key, :message_id], unique: true
         | 
| 17 | 
            +
              end
         | 
| 18 | 
            +
            end
         | 
| @@ -0,0 +1,18 @@ | |
| 1 | 
            +
            class CreateMessageRequestTransitions < ActiveRecord::Migration
         | 
| 2 | 
            +
              def change
         | 
| 3 | 
            +
                create_table :message_request_transitions do |t|
         | 
| 4 | 
            +
                  t.string :to_state
         | 
| 5 | 
            +
                  if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
         | 
| 6 | 
            +
                    t.text :metadata
         | 
| 7 | 
            +
                  else
         | 
| 8 | 
            +
                    t.text :metadata, default: "{}"
         | 
| 9 | 
            +
                  end
         | 
| 10 | 
            +
                  t.integer :sort_key
         | 
| 11 | 
            +
                  t.integer :message_request_id
         | 
| 12 | 
            +
                  t.timestamps
         | 
| 13 | 
            +
                end
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                add_index :message_request_transitions, :message_request_id
         | 
| 16 | 
            +
                add_index :message_request_transitions, [:sort_key, :message_request_id], unique: true, name: "index_message_request_transitions_on_sort_key_and_request_id"
         | 
| 17 | 
            +
              end
         | 
| 18 | 
            +
            end
         | 
| @@ -0,0 +1,14 @@ | |
| 1 | 
            +
            class CreateColors < ActiveRecord::Migration
         | 
| 2 | 
            +
              def change
         | 
| 3 | 
            +
                create_table :colors do |t|
         | 
| 4 | 
            +
                  t.integer :library_group_id
         | 
| 5 | 
            +
                  t.string :property
         | 
| 6 | 
            +
                  t.string :code
         | 
| 7 | 
            +
                  t.integer :position
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                  t.timestamps
         | 
| 10 | 
            +
                end
         | 
| 11 | 
            +
             | 
| 12 | 
            +
                add_index :colors, :library_group_id
         | 
| 13 | 
            +
              end
         | 
| 14 | 
            +
            end
         | 
| @@ -0,0 +1,13 @@ | |
| 1 | 
            +
            class CreateWithdraws < ActiveRecord::Migration
         | 
| 2 | 
            +
              def change
         | 
| 3 | 
            +
                create_table :withdraws do |t|
         | 
| 4 | 
            +
                  t.integer :basket_id
         | 
| 5 | 
            +
                  t.integer :item_id
         | 
| 6 | 
            +
                  t.integer :librarian_id
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                  t.timestamps null: false
         | 
| 9 | 
            +
                end
         | 
| 10 | 
            +
                add_index :withdraws, :basket_id
         | 
| 11 | 
            +
                add_index :withdraws, :item_id
         | 
| 12 | 
            +
              end
         | 
| 13 | 
            +
            end
         | 
| @@ -0,0 +1,13 @@ | |
| 1 | 
            +
            class AddTranslationTableToLibraryGroup < ActiveRecord::Migration
         | 
| 2 | 
            +
              def up
         | 
| 3 | 
            +
                LibraryGroup.create_translation_table!({
         | 
| 4 | 
            +
                  login_banner: :text
         | 
| 5 | 
            +
                }, {
         | 
| 6 | 
            +
                  migrate_data: true
         | 
| 7 | 
            +
                })
         | 
| 8 | 
            +
              end
         | 
| 9 | 
            +
             | 
| 10 | 
            +
              def down
         | 
| 11 | 
            +
                LibraryGroup.drop_translation_table! migrate_data: true
         | 
| 12 | 
            +
              end
         | 
| 13 | 
            +
            end
         | 
    
        data/spec/dummy/db/schema.rb
    CHANGED
    
    | @@ -11,7 +11,7 @@ | |
| 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:  | 
| 14 | 
            +
            ActiveRecord::Schema.define(version: 20160814165332) do
         | 
| 15 15 |  | 
| 16 16 | 
             
              create_table "accepts", force: :cascade do |t|
         | 
| 17 17 | 
             
                t.integer  "basket_id"
         | 
| @@ -234,6 +234,17 @@ ActiveRecord::Schema.define(version: 20141003182825) do | |
| 234 234 | 
             
              add_index "classifications", ["manifestation_id"], name: "index_classifications_on_manifestation_id"
         | 
| 235 235 | 
             
              add_index "classifications", ["parent_id"], name: "index_classifications_on_parent_id"
         | 
| 236 236 |  | 
| 237 | 
            +
              create_table "colors", force: :cascade do |t|
         | 
| 238 | 
            +
                t.integer  "library_group_id"
         | 
| 239 | 
            +
                t.string   "property"
         | 
| 240 | 
            +
                t.string   "code"
         | 
| 241 | 
            +
                t.integer  "position"
         | 
| 242 | 
            +
                t.datetime "created_at"
         | 
| 243 | 
            +
                t.datetime "updated_at"
         | 
| 244 | 
            +
              end
         | 
| 245 | 
            +
             | 
| 246 | 
            +
              add_index "colors", ["library_group_id"], name: "index_colors_on_library_group_id"
         | 
| 247 | 
            +
             | 
| 237 248 | 
             
              create_table "content_types", force: :cascade do |t|
         | 
| 238 249 | 
             
                t.string   "name",         null: false
         | 
| 239 250 | 
             
                t.text     "display_name"
         | 
| @@ -449,10 +460,22 @@ ActiveRecord::Schema.define(version: 20141003182825) do | |
| 449 460 | 
             
              add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
         | 
| 450 461 | 
             
              add_index "libraries", ["name"], name: "index_libraries_on_name", unique: true
         | 
| 451 462 |  | 
| 463 | 
            +
              create_table "library_group_translations", force: :cascade do |t|
         | 
| 464 | 
            +
                t.integer  "library_group_id", null: false
         | 
| 465 | 
            +
                t.string   "locale",           null: false
         | 
| 466 | 
            +
                t.datetime "created_at",       null: false
         | 
| 467 | 
            +
                t.datetime "updated_at",       null: false
         | 
| 468 | 
            +
                t.text     "login_banner"
         | 
| 469 | 
            +
                t.text     "footer_banner"
         | 
| 470 | 
            +
              end
         | 
| 471 | 
            +
             | 
| 472 | 
            +
              add_index "library_group_translations", ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
         | 
| 473 | 
            +
              add_index "library_group_translations", ["locale"], name: "index_library_group_translations_on_locale"
         | 
| 474 | 
            +
             | 
| 452 475 | 
             
              create_table "library_groups", force: :cascade do |t|
         | 
| 453 | 
            -
                t.string   "name", | 
| 476 | 
            +
                t.string   "name",                                                             null: false
         | 
| 454 477 | 
             
                t.text     "display_name"
         | 
| 455 | 
            -
                t.string   "short_name", | 
| 478 | 
            +
                t.string   "short_name",                                                       null: false
         | 
| 456 479 | 
             
                t.text     "my_networks"
         | 
| 457 480 | 
             
                t.text     "login_banner"
         | 
| 458 481 | 
             
                t.text     "note"
         | 
| @@ -461,10 +484,17 @@ ActiveRecord::Schema.define(version: 20141003182825) do | |
| 461 484 | 
             
                t.datetime "created_at"
         | 
| 462 485 | 
             
                t.datetime "updated_at"
         | 
| 463 486 | 
             
                t.text     "admin_networks"
         | 
| 464 | 
            -
                t.string   "url", | 
| 487 | 
            +
                t.string   "url",                           default: "http://localhost:3000/"
         | 
| 488 | 
            +
                t.text     "settings"
         | 
| 489 | 
            +
                t.text     "html_snippet"
         | 
| 490 | 
            +
                t.integer  "max_number_of_results",         default: 500
         | 
| 491 | 
            +
                t.boolean  "family_name_first",             default: true
         | 
| 492 | 
            +
                t.integer  "pub_year_facet_range_interval", default: 10
         | 
| 493 | 
            +
                t.integer  "user_id"
         | 
| 465 494 | 
             
              end
         | 
| 466 495 |  | 
| 467 496 | 
             
              add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
         | 
| 497 | 
            +
              add_index "library_groups", ["user_id"], name: "index_library_groups_on_user_id"
         | 
| 468 498 |  | 
| 469 499 | 
             
              create_table "licenses", force: :cascade do |t|
         | 
| 470 500 | 
             
                t.string   "name",         null: false
         | 
| @@ -572,6 +602,75 @@ ActiveRecord::Schema.define(version: 20141003182825) do | |
| 572 602 | 
             
                t.datetime "updated_at"
         | 
| 573 603 | 
             
              end
         | 
| 574 604 |  | 
| 605 | 
            +
              create_table "message_request_transitions", force: :cascade do |t|
         | 
| 606 | 
            +
                t.string   "to_state"
         | 
| 607 | 
            +
                t.text     "metadata",           default: "{}"
         | 
| 608 | 
            +
                t.integer  "sort_key"
         | 
| 609 | 
            +
                t.integer  "message_request_id"
         | 
| 610 | 
            +
                t.datetime "created_at"
         | 
| 611 | 
            +
                t.datetime "updated_at"
         | 
| 612 | 
            +
                t.boolean  "most_recent"
         | 
| 613 | 
            +
              end
         | 
| 614 | 
            +
             | 
| 615 | 
            +
              add_index "message_request_transitions", ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
         | 
| 616 | 
            +
              add_index "message_request_transitions", ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
         | 
| 617 | 
            +
             | 
| 618 | 
            +
              create_table "message_requests", force: :cascade do |t|
         | 
| 619 | 
            +
                t.integer  "sender_id"
         | 
| 620 | 
            +
                t.integer  "receiver_id"
         | 
| 621 | 
            +
                t.integer  "message_template_id"
         | 
| 622 | 
            +
                t.datetime "sent_at"
         | 
| 623 | 
            +
                t.datetime "deleted_at"
         | 
| 624 | 
            +
                t.text     "body"
         | 
| 625 | 
            +
                t.datetime "created_at"
         | 
| 626 | 
            +
                t.datetime "updated_at"
         | 
| 627 | 
            +
              end
         | 
| 628 | 
            +
             | 
| 629 | 
            +
              create_table "message_templates", force: :cascade do |t|
         | 
| 630 | 
            +
                t.string   "status",                    null: false
         | 
| 631 | 
            +
                t.text     "title",                     null: false
         | 
| 632 | 
            +
                t.text     "body",                      null: false
         | 
| 633 | 
            +
                t.integer  "position"
         | 
| 634 | 
            +
                t.string   "locale",     default: "en"
         | 
| 635 | 
            +
                t.datetime "created_at"
         | 
| 636 | 
            +
                t.datetime "updated_at"
         | 
| 637 | 
            +
              end
         | 
| 638 | 
            +
             | 
| 639 | 
            +
              add_index "message_templates", ["status"], name: "index_message_templates_on_status", unique: true
         | 
| 640 | 
            +
             | 
| 641 | 
            +
              create_table "message_transitions", force: :cascade do |t|
         | 
| 642 | 
            +
                t.string   "to_state"
         | 
| 643 | 
            +
                t.text     "metadata",    default: "{}"
         | 
| 644 | 
            +
                t.integer  "sort_key"
         | 
| 645 | 
            +
                t.integer  "message_id"
         | 
| 646 | 
            +
                t.datetime "created_at"
         | 
| 647 | 
            +
                t.datetime "updated_at"
         | 
| 648 | 
            +
                t.boolean  "most_recent"
         | 
| 649 | 
            +
              end
         | 
| 650 | 
            +
             | 
| 651 | 
            +
              add_index "message_transitions", ["message_id"], name: "index_message_transitions_on_message_id"
         | 
| 652 | 
            +
              add_index "message_transitions", ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
         | 
| 653 | 
            +
             | 
| 654 | 
            +
              create_table "messages", force: :cascade do |t|
         | 
| 655 | 
            +
                t.datetime "read_at"
         | 
| 656 | 
            +
                t.integer  "receiver_id"
         | 
| 657 | 
            +
                t.integer  "sender_id"
         | 
| 658 | 
            +
                t.string   "subject",            null: false
         | 
| 659 | 
            +
                t.text     "body"
         | 
| 660 | 
            +
                t.integer  "message_request_id"
         | 
| 661 | 
            +
                t.integer  "parent_id"
         | 
| 662 | 
            +
                t.datetime "created_at"
         | 
| 663 | 
            +
                t.datetime "updated_at"
         | 
| 664 | 
            +
                t.integer  "lft"
         | 
| 665 | 
            +
                t.integer  "rgt"
         | 
| 666 | 
            +
                t.integer  "depth"
         | 
| 667 | 
            +
              end
         | 
| 668 | 
            +
             | 
| 669 | 
            +
              add_index "messages", ["message_request_id"], name: "index_messages_on_message_request_id"
         | 
| 670 | 
            +
              add_index "messages", ["parent_id"], name: "index_messages_on_parent_id"
         | 
| 671 | 
            +
              add_index "messages", ["receiver_id"], name: "index_messages_on_receiver_id"
         | 
| 672 | 
            +
              add_index "messages", ["sender_id"], name: "index_messages_on_sender_id"
         | 
| 673 | 
            +
             | 
| 575 674 | 
             
              create_table "owns", force: :cascade do |t|
         | 
| 576 675 | 
             
                t.integer  "agent_id",   null: false
         | 
| 577 676 | 
             
                t.integer  "item_id",    null: false
         | 
| @@ -910,6 +1009,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do | |
| 910 1009 | 
             
                t.integer  "user_export_file_id"
         | 
| 911 1010 | 
             
                t.datetime "created_at"
         | 
| 912 1011 | 
             
                t.datetime "updated_at"
         | 
| 1012 | 
            +
                t.boolean  "most_recent"
         | 
| 913 1013 | 
             
              end
         | 
| 914 1014 |  | 
| 915 1015 | 
             
              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
         | 
| @@ -955,6 +1055,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do | |
| 955 1055 | 
             
                t.integer  "user_import_file_id"
         | 
| 956 1056 | 
             
                t.datetime "created_at"
         | 
| 957 1057 | 
             
                t.datetime "updated_at"
         | 
| 1058 | 
            +
                t.boolean  "most_recent"
         | 
| 958 1059 | 
             
              end
         | 
| 959 1060 |  | 
| 960 1061 | 
             
              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
         | 
| @@ -966,7 +1067,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do | |
| 966 1067 | 
             
                t.datetime "executed_at"
         | 
| 967 1068 | 
             
                t.string   "user_import_file_name"
         | 
| 968 1069 | 
             
                t.string   "user_import_content_type"
         | 
| 969 | 
            -
                t. | 
| 1070 | 
            +
                t.integer  "user_import_file_size"
         | 
| 970 1071 | 
             
                t.datetime "user_import_updated_at"
         | 
| 971 1072 | 
             
                t.string   "user_import_fingerprint"
         | 
| 972 1073 | 
             
                t.string   "edit_mode"
         | 
| @@ -984,6 +1085,7 @@ ActiveRecord::Schema.define(version: 20141003182825) do | |
| 984 1085 | 
             
                t.text     "body"
         | 
| 985 1086 | 
             
                t.datetime "created_at"
         | 
| 986 1087 | 
             
                t.datetime "updated_at"
         | 
| 1088 | 
            +
                t.text     "error_message"
         | 
| 987 1089 | 
             
              end
         | 
| 988 1090 |  | 
| 989 1091 | 
             
              create_table "users", force: :cascade do |t|
         | 
| @@ -1024,4 +1126,15 @@ ActiveRecord::Schema.define(version: 20141003182825) do | |
| 1024 1126 |  | 
| 1025 1127 | 
             
              add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
         | 
| 1026 1128 |  | 
| 1129 | 
            +
              create_table "withdraws", force: :cascade do |t|
         | 
| 1130 | 
            +
                t.integer  "basket_id"
         | 
| 1131 | 
            +
                t.integer  "item_id"
         | 
| 1132 | 
            +
                t.integer  "librarian_id"
         | 
| 1133 | 
            +
                t.datetime "created_at",   null: false
         | 
| 1134 | 
            +
                t.datetime "updated_at",   null: false
         | 
| 1135 | 
            +
              end
         | 
| 1136 | 
            +
             | 
| 1137 | 
            +
              add_index "withdraws", ["basket_id"], name: "index_withdraws_on_basket_id"
         | 
| 1138 | 
            +
              add_index "withdraws", ["item_id"], name: "index_withdraws_on_item_id"
         | 
| 1139 | 
            +
             | 
| 1027 1140 | 
             
            end
         |