enju_biblio 0.4.0.beta.2 → 0.4.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/items_controller.rb +5 -1
  3. data/app/controllers/manifestations_controller.rb +12 -6
  4. data/app/mailers/agent_import_mailer.rb +2 -2
  5. data/app/mailers/resource_export_mailer.rb +2 -2
  6. data/app/mailers/resource_import_mailer.rb +2 -2
  7. data/app/models/agent.rb +3 -4
  8. data/app/models/agent_import_file.rb +1 -8
  9. data/app/models/custom_property.rb +17 -0
  10. data/app/models/import_request.rb +0 -9
  11. data/app/models/isbn_record.rb +1 -1
  12. data/app/models/issn_record.rb +1 -1
  13. data/app/models/item.rb +49 -2
  14. data/app/models/manifestation.rb +109 -247
  15. data/app/models/resource_export_file.rb +3 -16
  16. data/app/models/resource_export_file_state_machine.rb +1 -1
  17. data/app/models/resource_import_file.rb +1 -9
  18. data/app/views/items/_custom_property_fields.html.erb +7 -0
  19. data/app/views/items/_form.html.erb +18 -6
  20. data/app/views/items/show.html.erb +8 -1
  21. data/app/views/layouts/items.html.erb +1 -1
  22. data/app/views/layouts/manifestations.html.erb +1 -1
  23. data/app/views/manifestations/_custom_property_fields.html.erb +7 -0
  24. data/app/views/manifestations/_form.html.erb +10 -0
  25. data/app/views/manifestations/_manifestation.txt.erb +1 -1
  26. data/app/views/manifestations/_paginate_id_link.html.erb +1 -1
  27. data/app/views/manifestations/_show_detail_librarian.html.erb +9 -1
  28. data/app/views/manifestations/_show_detail_user.html.erb +1 -1
  29. data/app/views/manifestations/index.txt.ruby +7 -0
  30. data/app/views/manifestations/show.txt.ruby +5 -0
  31. data/app/views/resource_import_files/_results.html.erb +6 -0
  32. data/app/views/resource_import_results/index.html.erb +0 -11
  33. data/app/views/series_statements/_form.html.erb +6 -8
  34. data/app/views/series_statements/show.html.erb +12 -0
  35. data/config/locales/translation_en.yml +12 -1
  36. data/config/locales/translation_ja.yml +14 -3
  37. data/db/migrate/001_create_agents.rb +0 -1
  38. data/db/migrate/005_create_manifestations.rb +0 -1
  39. data/db/migrate/006_create_items.rb +0 -1
  40. data/db/migrate/20191219122214_create_custom_properties.rb +12 -0
  41. data/lib/enju_biblio/version.rb +1 -1
  42. data/lib/generators/enju_biblio/setup/setup_generator.rb +2 -0
  43. data/spec/controllers/items_controller_spec.rb +25 -0
  44. data/spec/controllers/manifestations_controller_spec.rb +52 -0
  45. data/spec/dummy/app/controllers/application_controller.rb +0 -1
  46. data/spec/dummy/app/models/user.rb +0 -2
  47. data/spec/dummy/config/environments/development.rb +11 -24
  48. data/spec/dummy/config/environments/production.rb +16 -28
  49. data/spec/dummy/config/environments/test.rb +6 -6
  50. data/spec/dummy/config/initializers/assets.rb +1 -1
  51. data/spec/dummy/db/migrate/059_create_libraries.rb +1 -2
  52. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -2
  53. data/spec/dummy/db/migrate/077_create_user_groups.rb +1 -2
  54. data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -1
  55. data/spec/dummy/db/migrate/120_create_baskets.rb +1 -1
  56. data/spec/dummy/db/migrate/124_create_bookstores.rb +1 -2
  57. data/spec/dummy/db/migrate/130_create_request_status_types.rb +1 -1
  58. data/spec/dummy/db/migrate/131_create_request_types.rb +1 -1
  59. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +1 -2
  60. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +1 -1
  61. data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +1 -1
  62. data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +1 -1
  63. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +1 -1
  64. data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +1 -1
  65. data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +1 -1
  66. data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +1 -1
  67. data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +1 -1
  68. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +1 -1
  69. data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +1 -1
  70. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +1 -1
  71. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  72. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +1 -1
  73. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +2 -6
  74. data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +1 -1
  75. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
  76. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +2 -6
  77. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
  78. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
  79. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -1
  80. data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +1 -1
  81. data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +1 -1
  82. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +1 -1
  83. data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +1 -1
  84. data/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +1 -1
  85. data/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +1 -1
  86. data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +1 -1
  87. data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +1 -1
  88. data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +1 -1
  89. data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +1 -1
  90. data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +1 -1
  91. data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +1 -1
  92. data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +1 -1
  93. data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +1 -1
  94. data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +1 -1
  95. data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +1 -1
  96. data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
  97. data/spec/dummy/db/migrate/20191216131755_add_email_to_library_group.rb +6 -0
  98. data/spec/dummy/db/schema.rb +96 -91
  99. data/spec/dummy/db/test.sqlite3 +0 -0
  100. data/spec/dummy/public/500.html +1 -0
  101. data/spec/factories/custom_property.rb +18 -0
  102. data/spec/factories/series_statement.rb +4 -3
  103. data/spec/fixtures/agents.yml +0 -1
  104. data/spec/fixtures/bookstores.yml +0 -8
  105. data/spec/fixtures/budget_types.yml +10 -9
  106. data/spec/fixtures/events.yml +0 -9
  107. data/spec/fixtures/items.yml +10 -11
  108. data/spec/fixtures/library_groups.yml +6 -11
  109. data/spec/fixtures/manifestations.yml +0 -1
  110. data/spec/models/agent_spec.rb +0 -1
  111. data/spec/models/custom_property_spec.rb +18 -0
  112. data/spec/models/item_spec.rb +0 -1
  113. data/spec/models/manifestation_spec.rb +32 -8
  114. data/spec/rails_helper.rb +3 -3
  115. data/spec/system/custom_properties_spec.rb +84 -0
  116. data/spec/system/items_spec.rb +60 -0
  117. data/spec/system/series_statements_spec.rb +16 -0
  118. data/spec/views/manifestations/index.json.jbuilder_spec.rb +18 -0
  119. data/spec/views/manifestations/{index.txt.erb_spec.rb → index.txt.ruby_spec.rb} +1 -1
  120. data/spec/views/manifestations/{show.txt.erb_spec.rb → show.txt.ruby_spec.rb} +1 -1
  121. metadata +56 -58
  122. data/app/views/manifestations/index.txt.erb +0 -1
  123. data/app/views/manifestations/show.txt.erb +0 -1
  124. data/spec/dummy/db/migrate/20180709023037_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +0 -20
  125. data/spec/dummy/db/migrate/20180709023039_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +0 -15
@@ -5,6 +5,8 @@ class EnjuBiblio::SetupGenerator < Rails::Generators::Base
5
5
  def copy_setup_files
6
6
  directory("db/fixtures", "db/fixtures/enju_biblio")
7
7
  return if file == 'fixture'
8
+ inject_into_class 'app/controllers/application_controller.rb', ApplicationController,
9
+ " include EnjuBiblio::Controller\n"
8
10
  append_to_file("config/schedule.rb", File.open(File.expand_path('../templates', __FILE__) + '/config/schedule.rb').read)
9
11
  end
10
12
  end
@@ -265,6 +265,19 @@ describe ItemsController do
265
265
  assigns(:item).manifestation.should_not be_nil
266
266
  expect(response).to redirect_to(item_url(assigns(:item)))
267
267
  end
268
+
269
+ it 'assigns custom properties to @item' do
270
+ item = FactoryBot.create(:item_custom_property).resource
271
+ custom_properties_attrs = {
272
+ custom_properties_attributes: [{label: 'test', value: 'テスト'}]
273
+ }
274
+ put :update, params: {
275
+ id: item.id, item: @attrs.merge(custom_properties_attrs)
276
+ }
277
+ expect(assigns(:item)).to eq item
278
+ expect(assigns(:item).custom_properties.map{|property| property.label}).to eq ['custom property 1', 'test']
279
+ expect(assigns(:item).custom_properties.map{|property| property.value}).to eq ['カスタム項目 1', 'テスト']
280
+ end
268
281
  end
269
282
 
270
283
  describe 'with invalid params' do
@@ -435,6 +448,18 @@ describe ItemsController do
435
448
  put :update, params: { id: @item, item: @invalid_attrs }
436
449
  expect(response).to render_template('edit')
437
450
  end
451
+
452
+ it 'assigns custom properties to @item' do
453
+ item = FactoryBot.create(:item_custom_property).resource
454
+ custom_properties_attrs = {
455
+ custom_properties_attributes: [{name: 'test', value: 'テスト'}]
456
+ }
457
+ put :update, params: {
458
+ id: item.id, item: @invalid_attrs.merge(custom_properties_attrs)
459
+ }
460
+ expect(assigns(:item).custom_properties.count).to eq 1
461
+ expect(assigns(:item)).to_not be_valid
462
+ end
438
463
  end
439
464
  end
440
465
 
@@ -649,6 +649,7 @@ describe ManifestationsController do
649
649
  before(:each) do
650
650
  @manifestation = FactoryBot.create(:manifestation)
651
651
  @manifestation.series_statements = [SeriesStatement.find(1)]
652
+ @manifestation.publishers << FactoryBot.create(:agent)
652
653
  @attrs = valid_attributes
653
654
  @invalid_attrs = { original_title: '' }
654
655
  end
@@ -702,6 +703,32 @@ describe ManifestationsController do
702
703
  put :update, params: { id: @manifestation.id, manifestation: @attrs.merge(identifiers_attrs) }
703
704
  expect(assigns(:manifestation)).to eq @manifestation
704
705
  end
706
+
707
+ it 'assigns identifiers and publishers to @manifestation' do
708
+ identifiers_attrs = {
709
+ identifier_attributes: [FactoryBot.create(:identifier)]
710
+ }
711
+ publishers_attrs = {
712
+ publisher_attributes: [FactoryBot.create(:agent)]
713
+ }
714
+ put :update, params: {
715
+ id: @manifestation.id, manifestation: @attrs.merge(identifiers_attrs, publishers_attrs)
716
+ }
717
+ expect(assigns(:manifestation)).to eq @manifestation
718
+ end
719
+
720
+ it 'assigns custom properties to @manifestation' do
721
+ manifestation = FactoryBot.create(:manifestation_custom_property).resource
722
+ custom_properties_attrs = {
723
+ custom_properties_attributes: [{label: 'test', value: 'テスト'}]
724
+ }
725
+ put :update, params: {
726
+ id: manifestation.id, manifestation: @attrs.merge(custom_properties_attrs)
727
+ }
728
+ expect(assigns(:manifestation)).to eq manifestation
729
+ expect(assigns(:manifestation).custom_properties.map{|property| property.label}).to eq ['custom property 1', 'test']
730
+ expect(assigns(:manifestation).custom_properties.map{|property| property.value}).to eq ['カスタム項目 1', 'テスト']
731
+ end
705
732
  end
706
733
 
707
734
  describe 'with invalid params' do
@@ -714,6 +741,31 @@ describe ManifestationsController do
714
741
  put :update, params: { id: @manifestation, manifestation: @invalid_attrs }
715
742
  expect(response).to render_template('edit')
716
743
  end
744
+
745
+ it 'assigns identifiers and publishers to @manifestation' do
746
+ identifiers_attrs = {
747
+ identifier_attributes: [FactoryBot.create(:identifier)]
748
+ }
749
+ publishers_attrs = {
750
+ publisher_attributes: [FactoryBot.create(:agent)]
751
+ }
752
+ put :update, params: {
753
+ id: @manifestation.id, manifestation: @invalid_attrs.merge(identifiers_attrs, publishers_attrs)
754
+ }
755
+ expect(assigns(:manifestation)).to_not be_valid
756
+ end
757
+
758
+ it 'assigns custom properties to @manifestation' do
759
+ manifestation = FactoryBot.create(:manifestation_custom_property).resource
760
+ custom_properties_attrs = {
761
+ custom_properties_attributes: [{name: 'test', value: 'テスト'}]
762
+ }
763
+ put :update, params: {
764
+ id: manifestation.id, manifestation: @invalid_attrs.merge(custom_properties_attrs)
765
+ }
766
+ expect(assigns(:manifestation).custom_properties.count).to eq 1
767
+ expect(assigns(:manifestation)).to_not be_valid
768
+ end
717
769
  end
718
770
  end
719
771
 
@@ -5,7 +5,6 @@ class ApplicationController < ActionController::Base
5
5
  include EnjuBiblio::Controller
6
6
  include EnjuSubject::Controller
7
7
  #include EnjuInventory::Controller
8
- before_action :set_paper_trail_whodunnit
9
8
  after_action :verify_authorized
10
9
 
11
10
  include Pundit
@@ -8,11 +8,9 @@ class User < ApplicationRecord
8
8
 
9
9
  include EnjuSeed::EnjuUser
10
10
  include EnjuMessage::EnjuUser
11
- include EnjuBookmark::EnjuUser
12
11
  end
13
12
 
14
13
  Manifestation.include(EnjuSubject::EnjuManifestation)
15
14
  Manifestation.include(EnjuManifestationViewer::EnjuManifestation)
16
15
  Manifestation.include(EnjuNdl::EnjuManifestation)
17
- Manifestation.include(EnjuBookmark::EnjuManifestation)
18
16
  Item.include(EnjuLibrary::EnjuItem)
@@ -9,28 +9,13 @@ Rails.application.configure do
9
9
  # Do not eager load code on boot.
10
10
  config.eager_load = false
11
11
 
12
- # Show full error reports.
13
- config.consider_all_requests_local = true
14
-
15
- # Enable/disable caching. By default caching is disabled.
16
- if Rails.root.join('tmp/caching-dev.txt').exist?
17
- config.action_controller.perform_caching = true
18
-
19
- config.cache_store = :memory_store
20
- config.public_file_server.headers = {
21
- 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
22
- }
23
- else
24
- config.action_controller.perform_caching = false
25
-
26
- config.cache_store = :null_store
27
- end
12
+ # Show full error reports and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
28
15
 
29
16
  # Don't care if the mailer can't send.
30
17
  config.action_mailer.raise_delivery_errors = false
31
18
 
32
- config.action_mailer.perform_caching = false
33
-
34
19
  # Print deprecation notices to the Rails logger.
35
20
  config.active_support.deprecation = :log
36
21
 
@@ -42,13 +27,15 @@ Rails.application.configure do
42
27
  # number of complex assets.
43
28
  config.assets.debug = true
44
29
 
45
- # Suppress logger output for asset requests.
46
- config.assets.quiet = true
30
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31
+ # yet still be able to expire them through the digest params.
32
+ config.assets.digest = true
33
+
34
+ # Adds additional error checking when serving assets at runtime.
35
+ # Checks for improperly declared sprockets dependencies.
36
+ # Raises helpful error messages.
37
+ config.assets.raise_runtime_errors = true
47
38
 
48
39
  # Raises error for missing translations
49
40
  # config.action_view.raise_on_missing_translations = true
50
-
51
- # Use an evented file watcher to asynchronously detect changes in source code,
52
- # routes, locales, etc. This feature depends on the listen gem.
53
- # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
54
41
  end
@@ -14,14 +14,15 @@ Rails.application.configure do
14
14
  config.consider_all_requests_local = false
15
15
  config.action_controller.perform_caching = true
16
16
 
17
- # Attempt to read encrypted secrets from `config/secrets.yml.enc`.
18
- # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
19
- # `config/secrets.yml.key`.
20
- config.read_encrypted_secrets = true
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like
20
+ # NGINX, varnish or squid.
21
+ # config.action_dispatch.rack_cache = true
21
22
 
22
23
  # Disable serving static files from the `/public` folder by default since
23
24
  # Apache or NGINX already handles this.
24
- config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
25
+ config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
25
26
 
26
27
  # Compress JavaScripts and CSS.
27
28
  config.assets.js_compressor = :uglifier
@@ -30,20 +31,16 @@ Rails.application.configure do
30
31
  # Do not fallback to assets pipeline if a precompiled asset is missed.
31
32
  config.assets.compile = false
32
33
 
33
- # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
34
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
+ # yet still be able to expire them through the digest params.
36
+ config.assets.digest = true
34
37
 
35
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
36
- # config.action_controller.asset_host = 'http://assets.example.com'
38
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
37
39
 
38
40
  # Specifies the header that your server uses for sending files.
39
41
  # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
40
42
  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
41
43
 
42
- # Mount Action Cable outside main process or domain
43
- # config.action_cable.mount_path = nil
44
- # config.action_cable.url = 'wss://example.com/cable'
45
- # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
46
-
47
44
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
48
45
  # config.force_ssl = true
49
46
 
@@ -52,15 +49,16 @@ Rails.application.configure do
52
49
  config.log_level = :debug
53
50
 
54
51
  # Prepend all log lines with the following tags.
55
- config.log_tags = [ :request_id ]
52
+ # config.log_tags = [ :subdomain, :uuid ]
53
+
54
+ # Use a different logger for distributed setups.
55
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
56
56
 
57
57
  # Use a different cache store in production.
58
58
  # config.cache_store = :mem_cache_store
59
59
 
60
- # Use a real queuing backend for Active Job (and separate queues per environment)
61
- # config.active_job.queue_adapter = :resque
62
- # config.active_job.queue_name_prefix = "dummy_#{Rails.env}"
63
- config.action_mailer.perform_caching = false
60
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
+ # config.action_controller.asset_host = 'http://assets.example.com'
64
62
 
65
63
  # Ignore bad email addresses and do not raise email delivery errors.
66
64
  # Set this to true and configure the email server for immediate delivery to raise delivery errors.
@@ -76,16 +74,6 @@ Rails.application.configure do
76
74
  # Use default logging formatter so that PID and timestamp are not suppressed.
77
75
  config.log_formatter = ::Logger::Formatter.new
78
76
 
79
- # Use a different logger for distributed setups.
80
- # require 'syslog/logger'
81
- # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
82
-
83
- if ENV["RAILS_LOG_TO_STDOUT"].present?
84
- logger = ActiveSupport::Logger.new(STDOUT)
85
- logger.formatter = config.log_formatter
86
- config.logger = ActiveSupport::TaggedLogging.new(logger)
87
- end
88
-
89
77
  # Do not dump schema after migrations.
90
78
  config.active_record.dump_schema_after_migration = false
91
79
  end
@@ -12,11 +12,9 @@ Rails.application.configure do
12
12
  # preloads Rails for running tests, you may have to set it to true.
13
13
  config.eager_load = false
14
14
 
15
- # Configure public file server for tests with Cache-Control for performance.
16
- config.public_file_server.enabled = true
17
- config.public_file_server.headers = {
18
- 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
19
- }
15
+ # Configure static file server for tests with Cache-Control for performance.
16
+ config.serve_static_files = true
17
+ config.static_cache_control = 'public, max-age=3600'
20
18
 
21
19
  # Show full error reports and disable caching.
22
20
  config.consider_all_requests_local = true
@@ -27,13 +25,15 @@ Rails.application.configure do
27
25
 
28
26
  # Disable request forgery protection in test environment.
29
27
  config.action_controller.allow_forgery_protection = false
30
- config.action_mailer.perform_caching = false
31
28
 
32
29
  # Tell Action Mailer not to deliver emails to the real world.
33
30
  # The :test delivery method accumulates sent emails in the
34
31
  # ActionMailer::Base.deliveries array.
35
32
  config.action_mailer.delivery_method = :test
36
33
 
34
+ # Randomize the order test cases are executed.
35
+ config.active_support.test_order = :random
36
+
37
37
  # Print deprecation notices to the stderr.
38
38
  config.active_support.deprecation = :stderr
39
39
 
@@ -12,4 +12,4 @@ Rails.application.config.assets.paths << Rails.root.join('../../', 'node_modules
12
12
  # application.js, application.css, and all non-JS/CSS in the app/assets
13
13
  # folder are already added.
14
14
  # Rails.application.config.assets.precompile += %w( admin.js admin.css )
15
- Rails.application.config.assets.precompile += %w( *.png icons/*.png *.gif enju_leaf/*.css )
15
+ Rails.application.config.assets.precompile += %w( *.png icons/*.png *.gif *.css )
@@ -1,4 +1,4 @@
1
- class CreateLibraries < ActiveRecord::Migration[4.2]
1
+ class CreateLibraries < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :libraries do |t|
4
4
  t.string :name, index: true, null: false
@@ -20,7 +20,6 @@ class CreateLibraries < ActiveRecord::Migration[4.2]
20
20
  t.references :country
21
21
 
22
22
  t.timestamps
23
- t.datetime :deleted_at
24
23
  end
25
24
  end
26
25
  end
@@ -1,4 +1,4 @@
1
- class CreateShelves < ActiveRecord::Migration[4.2]
1
+ class CreateShelves < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :shelves do |t|
4
4
  t.string :name, null: false
@@ -8,7 +8,6 @@ class CreateShelves < ActiveRecord::Migration[4.2]
8
8
  t.integer :items_count, default: 0, null: false
9
9
  t.integer :position
10
10
  t.timestamps
11
- t.datetime :deleted_at
12
11
  end
13
12
  end
14
13
  end
@@ -1,4 +1,4 @@
1
- class CreateUserGroups < ActiveRecord::Migration[4.2]
1
+ class CreateUserGroups < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :user_groups do |t|
4
4
  t.string :name, not_null: true
@@ -6,7 +6,6 @@ class CreateUserGroups < ActiveRecord::Migration[4.2]
6
6
  t.text :note
7
7
  t.integer :position
8
8
  t.timestamps
9
- t.datetime :deleted_at
10
9
  end
11
10
  end
12
11
  end
@@ -1,4 +1,4 @@
1
- class CreateLibraryGroups < ActiveRecord::Migration[4.2]
1
+ class CreateLibraryGroups < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :library_groups do |t|
4
4
  t.string :name, null: false
@@ -1,4 +1,4 @@
1
- class CreateBaskets < ActiveRecord::Migration[4.2]
1
+ class CreateBaskets < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :baskets do |t|
4
4
  t.references :user, index: true
@@ -1,4 +1,4 @@
1
- class CreateBookstores < ActiveRecord::Migration[4.2]
1
+ class CreateBookstores < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :bookstores do |t|
4
4
  t.text :name, null: false
@@ -9,7 +9,6 @@ class CreateBookstores < ActiveRecord::Migration[4.2]
9
9
  t.string :fax_number
10
10
  t.string :url
11
11
  t.integer :position
12
- t.datetime :deleted_at
13
12
 
14
13
  t.timestamps
15
14
  end
@@ -1,4 +1,4 @@
1
- class CreateRequestStatusTypes < ActiveRecord::Migration[4.2]
1
+ class CreateRequestStatusTypes < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :request_status_types do |t|
4
4
  t.string :name, null: false
@@ -1,4 +1,4 @@
1
- class CreateRequestTypes < ActiveRecord::Migration[4.2]
1
+ class CreateRequestTypes < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :request_types do |t|
4
4
  t.string :name, null: false
@@ -1,11 +1,10 @@
1
- class CreateSubscriptions < ActiveRecord::Migration[4.2]
1
+ class CreateSubscriptions < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :subscriptions do |t|
4
4
  t.text :title, null: false
5
5
  t.text :note
6
6
  t.references :user, index: true
7
7
  t.references :order_list, index: true
8
- t.datetime :deleted_at
9
8
  t.integer :subscribes_count, default: 0, null: false
10
9
 
11
10
  t.timestamps
@@ -1,4 +1,4 @@
1
- class CreateSubscribes < ActiveRecord::Migration[4.2]
1
+ class CreateSubscribes < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :subscribes do |t|
4
4
  t.references :subscription, index: true, null: false
@@ -1,4 +1,4 @@
1
- class CreateSearchEngines < ActiveRecord::Migration[4.2]
1
+ class CreateSearchEngines < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :search_engines do |t|
4
4
  t.string :name, null: false
@@ -1,4 +1,4 @@
1
- class AddAdminNetworksToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddAdminNetworksToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def self.up
3
3
  add_column :library_groups, :admin_networks, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddOpeningHourToLibrary < ActiveRecord::Migration[4.2]
1
+ class AddOpeningHourToLibrary < ActiveRecord::Migration[5.2]
2
2
  def self.up
3
3
  add_column :libraries, :opening_hour, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddUrlToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddUrlToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def self.up
3
3
  add_column :library_groups, :url, :string, default: 'http://localhost:3000/'
4
4
  end