enju_subject 0.3.4 → 0.4.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -3
  3. data/app/controllers/classifications_controller.rb +1 -0
  4. data/app/controllers/subjects_controller.rb +2 -1
  5. data/app/views/classification_types/index.html.erb +1 -1
  6. data/app/views/classification_types/show.html.erb +1 -1
  7. data/app/views/classifications/index.html.erb +1 -1
  8. data/app/views/classifications/show.html.erb +1 -1
  9. data/app/views/manifestations/_classification_detail.html.erb +1 -1
  10. data/app/views/manifestations/_classification_fields.html.erb +1 -1
  11. data/app/views/manifestations/_subject_detail.html.erb +1 -1
  12. data/app/views/manifestations/_subject_facet.html.erb +1 -1
  13. data/app/views/manifestations/_subject_fields.html.erb +2 -2
  14. data/app/views/subject_heading_types/index.html.erb +1 -1
  15. data/app/views/subject_heading_types/show.html.erb +1 -1
  16. data/app/views/subject_types/index.html.erb +1 -1
  17. data/app/views/subject_types/show.html.erb +2 -2
  18. data/app/views/subjects/_form.html.erb +2 -2
  19. data/app/views/subjects/index.atom.builder +1 -1
  20. data/app/views/subjects/index.rss.builder +1 -1
  21. data/app/views/subjects/show.html.erb +2 -2
  22. data/lib/enju_subject/version.rb +1 -1
  23. data/lib/generators/enju_subject/setup/templates/db/fixtures/classification_types.yml +20 -8
  24. data/lib/generators/enju_subject/setup/templates/db/fixtures/subject_heading_types.yml +0 -20
  25. data/lib/generators/enju_subject/setup/templates/db/fixtures/subject_types.yml +13 -0
  26. data/spec/dummy/app/models/user.rb +1 -1
  27. data/spec/dummy/bin/bundle +1 -1
  28. data/spec/dummy/bin/setup +1 -3
  29. data/spec/dummy/bin/update +4 -2
  30. data/spec/dummy/bin/yarn +3 -3
  31. data/spec/dummy/config/database.yml +70 -9
  32. data/spec/dummy/config/initializers/assets.rb +1 -1
  33. data/spec/dummy/db/development.sqlite3 +0 -0
  34. data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +2 -0
  35. data/spec/dummy/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
  36. data/spec/dummy/db/migrate/20190630115523_add_login_banner_translations_to_library_group.rb +6 -0
  37. data/spec/dummy/db/migrate/20190630151446_add_display_name_translations_to_role.rb +5 -0
  38. data/spec/dummy/db/migrate/20190712163038_add_display_name_translations_to_carrier_type.rb +21 -0
  39. data/spec/dummy/db/migrate/20190713114940_add_profile_id_to_user.rb +5 -0
  40. data/spec/dummy/db/migrate/20190713115451_add_full_name_translations_to_profile.rb +5 -0
  41. data/spec/dummy/db/schema.rb +125 -149
  42. data/spec/dummy/db/test.sqlite3 +0 -0
  43. data/spec/factories/profile.rb +7 -1
  44. data/spec/factories/user.rb +25 -31
  45. data/spec/fixtures/agent_types.yml +11 -11
  46. data/spec/fixtures/carrier_types.yml +28 -24
  47. data/spec/fixtures/libraries.yml +102 -0
  48. data/spec/fixtures/library_groups.yml +12 -6
  49. data/spec/fixtures/profiles.yml +10 -13
  50. data/spec/fixtures/roles.yml +22 -5
  51. data/spec/fixtures/shelves.yml +47 -0
  52. data/spec/fixtures/subject_types.yml +4 -4
  53. data/spec/fixtures/user_groups.yml +26 -6
  54. data/spec/fixtures/users.yml +8 -1
  55. data/spec/rails_helper.rb +5 -1
  56. metadata +250 -330
  57. data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +0 -5
  58. data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +0 -5
  59. data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +0 -12
  60. data/spec/dummy/db/migrate/20200425072340_create_manifestation_custom_properties.rb +0 -12
  61. data/spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb +0 -12
  62. data/spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb +0 -12
  63. data/spec/dummy/db/migrate/20200425074822_create_item_custom_values.rb +0 -12
  64. data/spec/lib/generators/enju_subject/setup/setup_generator_spec.rb +0 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d32a20b9efe5acb58db6f8785349609f59bb626797cf54ca6dff99bb829b65b7
4
- data.tar.gz: 524637ea07d613bd759aeda5d4f392fe515b8249b1adbe1af6ee6b6fe9913503
3
+ metadata.gz: 394e3e8ec1f70a4d86cc1a06caff3ec295cd5a792d90e1051e5cd85fdf813bc4
4
+ data.tar.gz: e3552ec21acdc26c0e955079e87007f6416a77d028599e65526f0a007ee2481b
5
5
  SHA512:
6
- metadata.gz: 175f8b549efd88277a5d70489d74f73e1a993820b5897682ff5c09ddce6925c8ffb8b812da82e6a149773f778fbc5c49fad2b27a742a623e8f723c1e75eb6004
7
- data.tar.gz: 43ab4857320b8a22667854dcae87ee05ccfe913226c3312324017db772968a5dbfaacfb0d90477f886c604e695e9a8a2ee71a9a61152cdf3275d9bc402a73916
6
+ metadata.gz: ed27799276e47bdbb1f587117699c503e84c0119fb5c510d7a527d20825f5ce02ef669108f696de0ad627cb11cc398e5c7b78c89438cde457cc00f20042d2b65
7
+ data.tar.gz: df142581d47f451f9b66eebb9392dde48f290e5ab160a6922e57d4bc19bec9fc02d1e4866035a8ed4f9d63d93af1d5c62012ce8d1dd793ecad7fd9712ae37cd7
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # EnjuSubject
2
- [![Travis CI](https://travis-ci.com/next-l/enju_subject.svg?branch=1.3)](https://travis-ci.com/next-l/enju_subject)
3
- [![Coverage Status](https://coveralls.io/repos/github/next-l/enju_subject/badge.svg?branch=1.3)](https://coveralls.io/github/next-l/enju_subject?branch=1.3)
4
- [![security](https://hakiri.io/github/next-l/enju_subject/1.3.svg)](https://hakiri.io/github/next-l/enju_subject/1.3)
2
+ [![CircleCI](https://circleci.com/gh/next-l/enju_subject/tree/2.x.svg?style=svg)](https://circleci.com/gh/next-l/enju_subject/tree/2.x)
3
+ [![Coverage Status](https://coveralls.io/repos/github/next-l/enju_subject/badge.svg?branch=2.x)](https://coveralls.io/github/next-l/enju_subject?branch=2.x)
5
4
 
6
5
  This project rocks and uses MIT-LICENSE.
7
6
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  class ClassificationsController < ApplicationController
2
3
  before_action :set_classification, only: [:show, :edit, :update, :destroy]
3
4
  before_action :check_policy, only: [:index, :new, :create]
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  class SubjectsController < ApplicationController
2
3
  before_action :set_subject, only: [:show, :edit, :update, :destroy]
3
4
  before_action :check_policy, only: [:index, :new, :create]
@@ -52,7 +53,7 @@ class SubjectsController < ApplicationController
52
53
  # GET /subjects/1.json
53
54
  def show
54
55
  if params[:term]
55
- subject = Subject.find_by(term: params[:term])
56
+ subject = Subject.where(term: params[:term]).first
56
57
  redirected_to subject
57
58
  return
58
59
  end
@@ -24,7 +24,7 @@
24
24
  </td>
25
25
  <td><%= classification_type.name -%></td>
26
26
  <td>
27
- <%= link_to classification_type.display_name.localize, classification_type -%>
27
+ <%= link_to classification_type.display_name, classification_type -%>
28
28
  <br />
29
29
  <%= classification_type.note %>
30
30
  </td>
@@ -10,7 +10,7 @@
10
10
 
11
11
  <p>
12
12
  <strong><%= t('activerecord.attributes.classification_type.display_name') -%>:</strong>
13
- <%= @classification_type.display_name.localize -%>
13
+ <%= @classification_type.display_name -%>
14
14
  </p>
15
15
 
16
16
  <p>
@@ -24,7 +24,7 @@
24
24
  <tr class="line<%= cycle("0", "1") -%>">
25
25
  <td><%= link_to classification.category, classification -%></td>
26
26
  <td><%= classification.label -%></td>
27
- <td><%= link_to classification.classification_type.display_name.localize, classification.classification_type -%></td>
27
+ <td><%= link_to classification.classification_type.display_name, classification.classification_type -%></td>
28
28
  <td>
29
29
  <%- if policy(classification).destroy? -%>
30
30
  <%= link_to t('page.edit'), edit_classification_path(classification) -%>
@@ -5,7 +5,7 @@
5
5
 
6
6
  <p>
7
7
  <strong><%= t('activerecord.models.classification_type') -%>:</strong>
8
- <%= link_to @classification.classification_type.display_name.localize, @classification.classification_type %>
8
+ <%= link_to @classification.classification_type.display_name, @classification.classification_type %>
9
9
  </p>
10
10
 
11
11
  <p>
@@ -5,7 +5,7 @@
5
5
  <ul>
6
6
  <%- manifestation.classifications.each do |classification| -%>
7
7
  <li>
8
- <%= link_to "#{classification.classification_type.display_name.localize}: #{classification.category}", manifestations_path(query: "classification_sm:#{classification.classification_type.name}_#{classification.category}") -%>
8
+ <%= link_to "#{classification.classification_type.display_name}: #{classification.category}", manifestations_path(query: "classification_sm:#{classification.classification_type.name}_#{classification.category}") -%>
9
9
  </li>
10
10
  <%- end -%>
11
11
  </ul>
@@ -1,5 +1,5 @@
1
1
  <div class="nested-fields">
2
- <%= f.select(:classification_type_id, @classification_types.collect{|c| [c.display_name.localize, c.id]}) %>
2
+ <%= f.select(:classification_type_id, @classification_types.collect{|c| [c.display_name, c.id]}) %>
3
3
  <%= f.text_field :category, class: 'resource_subject' %>
4
4
  <%= link_to_remove_association t('page.remove'), f, data: {confirm: t('page.are_you_sure')} %>
5
5
  </div>
@@ -5,7 +5,7 @@
5
5
  <ul>
6
6
  <%- manifestation.subjects.each do |subject| -%>
7
7
  <li>
8
- <%= link_to "#{subject.subject_heading_type.display_name.localize}: #{subject.term}", manifestations_path(query: "subject_sm:\"#{subject.term}\"") -%>
8
+ <%= link_to "#{subject.subject_heading_type.display_name}: #{subject.term}", manifestations_path(query: "subject_sm:\"#{subject.term}\"") -%>
9
9
  </li>
10
10
  <%- end -%>
11
11
  </ul>
@@ -2,7 +2,7 @@
2
2
  <%- unless @subject_facet.blank? -%>
3
3
  <ul>
4
4
  <%- @subject_facet[0..19].each do |facet| -%>
5
- <%- subject = Subject.find_by(id: facet.value) -%>
5
+ <%- subject = Subject.where(id: facet.value).first -%>
6
6
  <%- if subject -%>
7
7
  <li>
8
8
  <%= link_to "#{subject.term} (#{facet.count})", url_for(params.permit.merge(page: nil, subject: "\"#{subject.term}\"", view: nil, only_path: true)) -%>
@@ -1,6 +1,6 @@
1
1
  <div class="nested-fields">
2
- <%= f.select(:subject_heading_type_id, @subject_heading_types.collect{|s| [s.display_name.localize, s.id]}) %>
2
+ <%= f.select(:subject_heading_type_id, @subject_heading_types.collect{|s| [s.display_name, s.id]}) %>
3
3
  <%= f.text_field :term, class: 'resource_subject' %>
4
- <%= f.select(:subject_type_id, @subject_types.collect{|s| [s.display_name.localize, s.id]}) %>
4
+ <%= f.select(:subject_type_id, @subject_types.collect{|s| [s.display_name, s.id]}) %>
5
5
  <%= link_to_remove_association t('page.remove'), f, data: {confirm: t('page.are_you_sure')} %>
6
6
  </div>
@@ -24,7 +24,7 @@
24
24
  </td>
25
25
  <td><%= subject_heading_type.name -%></td>
26
26
  <td>
27
- <%= link_to subject_heading_type.display_name.localize, subject_heading_type -%>
27
+ <%= link_to subject_heading_type.display_name, subject_heading_type -%>
28
28
  <br />
29
29
  <%= subject_heading_type.note %>
30
30
  </td>
@@ -10,7 +10,7 @@
10
10
 
11
11
  <p>
12
12
  <strong><%= t('activerecord.attributes.subject_heading_type.display_name') -%>:</strong>
13
- <%= @subject_heading_type.display_name.localize -%>
13
+ <%= @subject_heading_type.display_name -%>
14
14
  </p>
15
15
 
16
16
  <p>
@@ -24,7 +24,7 @@
24
24
  </td>
25
25
  <td><%= subject_type.name -%></td>
26
26
  <td>
27
- <%= link_to subject_type.display_name.localize, subject_type -%>
27
+ <%= link_to subject_type.display_name, subject_type -%>
28
28
  <br />
29
29
  <%= subject_type.note %>
30
30
  </td>
@@ -10,7 +10,7 @@
10
10
 
11
11
  <p>
12
12
  <strong><%= t('activerecord.attributes.subject_type.display_name') -%>:</strong>
13
- <%= @subject_type.display_name.localize %>
13
+ <%= @subject_type.display_name %>
14
14
  </p>
15
15
 
16
16
  <p>
@@ -23,7 +23,7 @@
23
23
 
24
24
  <div id="submenu" class="ui-corner-all ui-widget-content">
25
25
  <ul>
26
- <%- if policy(@subject_type).update? -%>
26
+ <%- if policy().update?@subject_type -%>
27
27
  <li><%= link_to t('page.edit'), edit_subject_type_path(@subject_type) %></li>
28
28
  <%- end -%>
29
29
  <li><%= link_to t('page.back'), :back %></li>
@@ -2,11 +2,11 @@
2
2
  <%= f.error_messages -%>
3
3
  <div class="field">
4
4
  <%= f.label t('activerecord.models.subject_heading_type') -%>
5
- <%= f.select(:subject_heading_type_id, @subject_heading_types.collect{|s| [s.display_name.localize, s.id]}) -%>
5
+ <%= f.select(:subject_heading_type_id, @subject_heading_types.collect{|s| [s.display_name, s.id]}) -%>
6
6
  </div>
7
7
  <div class="field">
8
8
  <%= f.label t('activerecord.models.subject_type') -%>
9
- <%= f.select(:subject_type_id, @subject_types.collect{|s| [s.display_name.localize, s.id]}) -%>
9
+ <%= f.select(:subject_type_id, @subject_types.collect{|s| [s.display_name, s.id]}) -%>
10
10
  </div>
11
11
 
12
12
  <div class="field">
@@ -1,5 +1,5 @@
1
1
  atom_feed(url: subjects_url(format: :atom)) do |feed|
2
- feed.title t('page.listing', model: t('activerecord.models.subject')) + " (#{@library_group.display_name.localize})"
2
+ feed.title t('page.listing', model: t('activerecord.models.subject')) + " (#{@library_group.display_name})"
3
3
  feed.updated(@subjects.first ? @subjects.first.created_at : Time.zone.now)
4
4
 
5
5
  @subjects.each do |subject|
@@ -3,7 +3,7 @@ xml.rss('version' => "2.0",
3
3
  'xmlns:opensearch' => "http://a9.com/-/spec/opensearch/1.1/",
4
4
  'xmlns:atom' => "http://www.w3.org/2005/Atom"){
5
5
  xml.channel{
6
- xml.title t('page.listing', model: t('activerecord.models.subject')) + " (#{@library_group.display_name.localize})"
6
+ xml.title t('page.listing', model: t('activerecord.models.subject')) + " (#{@library_group.display_name})"
7
7
  xml.link "#{request.protocol}#{request.host_with_port}#{url_for(params.permit.merge(format: nil, only_path: true))}"
8
8
  xml.description "Next-L Enju, an open source integrated library system developed by Project Next-L"
9
9
  xml.language @locale.to_s
@@ -10,12 +10,12 @@
10
10
 
11
11
  <p>
12
12
  <strong><%= t('activerecord.models.subject_heading_type') -%>:</strong>
13
- <%= link_to @subject.subject_heading_type.display_name.localize, @subject.subject_heading_type -%>
13
+ <%= link_to @subject.subject_heading_type.display_name, @subject.subject_heading_type -%>
14
14
  </p>
15
15
 
16
16
  <p>
17
17
  <strong><%= t('activerecord.models.subject_type') -%>:</strong>
18
- <%= link_to @subject.subject_type.display_name.localize, @subject.subject_type -%>
18
+ <%= link_to @subject.subject_type.display_name, @subject.subject_type -%>
19
19
  </p>
20
20
 
21
21
  <p>
@@ -1,3 +1,3 @@
1
1
  module EnjuSubject
2
- VERSION = "0.3.4".freeze
2
+ VERSION = "0.4.0.beta.1"
3
3
  end
@@ -1,25 +1,37 @@
1
1
  ---
2
2
  classification_type_00001:
3
- name: ndc9
4
- display_name: NDC9
3
+ name: ndc
4
+ display_name: NDC
5
5
  id: 1
6
6
  note: ""
7
7
  position: 1
8
8
  classification_type_00002:
9
- name: ddc
10
- display_name: DDC
9
+ name: ndlc
10
+ display_name: NDLC
11
11
  id: 2
12
12
  note: ""
13
13
  position: 2
14
14
  classification_type_00003:
15
- name: ndc8
16
- display_name: NDC8
15
+ name: ddc
16
+ display_name: DDC
17
17
  id: 3
18
18
  note: ""
19
19
  position: 3
20
20
  classification_type_00004:
21
- name: ndc10
22
- display_name: NDC10
21
+ name: udc
22
+ display_name: UDC
23
23
  id: 4
24
24
  note: ""
25
25
  position: 4
26
+ classification_type_00005:
27
+ name: lcc
28
+ display_name: LCC
29
+ id: 5
30
+ note: ""
31
+ position: 5
32
+ classification_type_00006:
33
+ name: nlmc
34
+ display_name: NLMC
35
+ id: 6
36
+ note: ""
37
+ position: 6
@@ -17,23 +17,3 @@ subject_heading_type_00003:
17
17
  id: 3
18
18
  note: ""
19
19
  position: 3
20
- subject_heading_type_00004:
21
- name: lcsh
22
- display_name: LCSH
23
- id: 4
24
- note: ""
25
- position: 4
26
-
27
- # == Schema Information
28
- #
29
- # Table name: subject_heading_types
30
- #
31
- # id :integer not null, primary key
32
- # name :string(255) not null
33
- # display_name :text
34
- # note :text
35
- # position :integer
36
- # created_at :datetime not null
37
- # updated_at :datetime not null
38
- #
39
-
@@ -26,3 +26,16 @@ subject_type_00004:
26
26
  display_name: Place
27
27
  note:
28
28
  position: 4
29
+
30
+ # == Schema Information
31
+ #
32
+ # Table name: subject_types
33
+ #
34
+ # id :bigint not null, primary key
35
+ # name :string not null
36
+ # display_name :text
37
+ # note :text
38
+ # position :integer default(1), not null
39
+ # created_at :datetime not null
40
+ # updated_at :datetime not null
41
+ #
@@ -1,4 +1,4 @@
1
- class User < ActiveRecord::Base
1
+ class User < ApplicationRecord
2
2
  devise :database_authenticatable, #:registerable,
3
3
  :recoverable, :rememberable, :trackable, #, :validatable
4
4
  :lockable, lock_strategy: :none, unlock_strategy: :none
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3
3
  load Gem.bin_path('bundler', 'bundle')
data/spec/dummy/bin/setup CHANGED
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
- require 'pathname'
3
2
  require 'fileutils'
4
3
  include FileUtils
5
4
 
6
5
  # path to your application root.
7
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+ APP_ROOT = File.expand_path('..', __dir__)
8
7
 
9
8
  def system!(*args)
10
9
  system(*args) || abort("\n== Command #{args} failed ==")
@@ -21,7 +20,6 @@ chdir APP_ROOT do
21
20
  # Install JavaScript dependencies if using Yarn
22
21
  # system('bin/yarn')
23
22
 
24
-
25
23
  # puts "\n== Copying sample files =="
26
24
  # unless File.exist?('config/database.yml')
27
25
  # cp 'config/database.yml.sample', 'config/database.yml'
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
- require 'pathname'
3
2
  require 'fileutils'
4
3
  include FileUtils
5
4
 
6
5
  # path to your application root.
7
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+ APP_ROOT = File.expand_path('..', __dir__)
8
7
 
9
8
  def system!(*args)
10
9
  system(*args) || abort("\n== Command #{args} failed ==")
@@ -18,6 +17,9 @@ chdir APP_ROOT do
18
17
  system! 'gem install bundler --conservative'
19
18
  system('bundle check') || system!('bundle install')
20
19
 
20
+ # Install JavaScript dependencies if using Yarn
21
+ # system('bin/yarn')
22
+
21
23
  puts "\n== Updating database =="
22
24
  system! 'bin/rails db:migrate'
23
25
 
data/spec/dummy/bin/yarn CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
- VENDOR_PATH = File.expand_path('..', __dir__)
3
- Dir.chdir(VENDOR_PATH) do
2
+ APP_ROOT = File.expand_path('..', __dir__)
3
+ Dir.chdir(APP_ROOT) do
4
4
  begin
5
- exec "yarnpkg #{ARGV.join(" ")}"
5
+ exec "yarnpkg", *ARGV
6
6
  rescue Errno::ENOENT
7
7
  $stderr.puts "Yarn executable was not detected in the system."
8
8
  $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
@@ -1,25 +1,86 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3
1
+ # PostgreSQL. Versions 9.1 and up are supported.
3
2
  #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
3
+ # Install the pg driver:
4
+ # gem install pg
5
+ # On OS X with Homebrew:
6
+ # gem install pg -- --with-pg-config=/usr/local/bin/pg_config
7
+ # On OS X with MacPorts:
8
+ # gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
9
+ # On Windows:
10
+ # gem install pg
11
+ # Choose the win32 build.
12
+ # Install PostgreSQL and put its /bin directory on your path.
13
+ #
14
+ # Configure Using Gemfile
15
+ # gem 'pg'
6
16
  #
7
17
  default: &default
8
- adapter: sqlite3
18
+ adapter: postgresql
19
+ encoding: unicode
20
+ # For details on connection pooling, see Rails configuration guide
21
+ # http://guides.rubyonrails.org/configuring.html#database-pooling
9
22
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
- timeout: 5000
23
+ username: postgres
11
24
 
12
25
  development:
13
26
  <<: *default
14
- database: db/development.sqlite3
27
+ database: enju_subject_dummy_development
28
+
29
+ # The specified database role being used to connect to postgres.
30
+ # To create additional roles in postgres see `$ createuser --help`.
31
+ # When left blank, postgres will use the default role. This is
32
+ # the same name as the operating system user that initialized the database.
33
+ #username: enju_subject_dummy
34
+
35
+ # The password associated with the postgres role (username).
36
+ #password:
37
+
38
+ # Connect on a TCP socket. Omitted by default since the client uses a
39
+ # domain socket that doesn't need configuration. Windows does not have
40
+ # domain sockets, so uncomment these lines.
41
+ #host: localhost
42
+
43
+ # The TCP port the server listens on. Defaults to 5432.
44
+ # If your server runs on a different port number, change accordingly.
45
+ #port: 5432
46
+
47
+ # Schema search path. The server defaults to $user,public
48
+ #schema_search_path: myapp,sharedapp,public
49
+
50
+ # Minimum log levels, in increasing order:
51
+ # debug5, debug4, debug3, debug2, debug1,
52
+ # log, notice, warning, error, fatal, and panic
53
+ # Defaults to warning.
54
+ #min_messages: notice
15
55
 
16
56
  # Warning: The database defined as "test" will be erased and
17
57
  # re-generated from your development database when you run "rake".
18
58
  # Do not set this db to the same as development or production.
19
59
  test:
20
60
  <<: *default
21
- database: db/test.sqlite3
61
+ database: enju_subject_dummy_test
22
62
 
63
+ # As with config/secrets.yml, you never want to store sensitive information,
64
+ # like your database password, in your source code. If your source code is
65
+ # ever seen by anyone, they now have access to your database.
66
+ #
67
+ # Instead, provide the password as a unix environment variable when you boot
68
+ # the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
69
+ # for a full rundown on how to provide these environment variables in a
70
+ # production deployment.
71
+ #
72
+ # On Heroku and other platform providers, you may have a full connection URL
73
+ # available as an environment variable. For example:
74
+ #
75
+ # DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
76
+ #
77
+ # You can use this database configuration with:
78
+ #
79
+ # production:
80
+ # url: <%= ENV['DATABASE_URL'] %>
81
+ #
23
82
  production:
24
83
  <<: *default
25
- database: db/production.sqlite3
84
+ database: enju_subject_dummy_production
85
+ username: enju_subject_dummy
86
+ password: <%= ENV['DUMMY_DATABASE_PASSWORD'] %>
@@ -6,7 +6,7 @@ Rails.application.config.assets.version = '1.0'
6
6
  # Add additional assets to the asset load path.
7
7
  # Rails.application.config.assets.paths << Emoji.images_path
8
8
  # Add Yarn node_modules folder to the asset load path.
9
- Rails.application.config.assets.paths << Rails.root.join('node_modules')
9
+ Rails.application.config.assets.paths << Rails.root.join('../../', 'node_modules')
10
10
 
11
11
  # Precompile additional assets.
12
12
  # application.js, application.css, and all non-JS/CSS in the app/assets
File without changes
@@ -3,7 +3,9 @@ class CreatePictureFiles < ActiveRecord::Migration[4.2]
3
3
  create_table :picture_files do |t|
4
4
  t.integer :picture_attachable_id
5
5
  t.string :picture_attachable_type
6
+ t.string :content_type
6
7
  t.text :title
8
+ t.string :thumbnail
7
9
  t.integer :position
8
10
 
9
11
  t.timestamps
@@ -0,0 +1,12 @@
1
+ class AddDisplayNameTranslationsToLibraryGroup < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :budget_types, :display_name_translations, :jsonb, default: {}, null: false
4
+ add_column :libraries, :display_name_translations, :jsonb, default: {}, null: false
5
+ add_column :library_groups, :display_name_translations, :jsonb, default: {}, null: false
6
+ add_column :request_status_types, :display_name_translations, :jsonb, default: {}, null: false
7
+ add_column :request_types, :display_name_translations, :jsonb, default: {}, null: false
8
+ add_column :search_engines, :display_name_translations, :jsonb, default: {}, null: false
9
+ add_column :shelves, :display_name_translations, :jsonb, default: {}, null: false
10
+ add_column :user_groups, :display_name_translations, :jsonb, default: {}, null: false
11
+ end
12
+ end
@@ -0,0 +1,6 @@
1
+ class AddLoginBannerTranslationsToLibraryGroup < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :library_groups, :login_banner_translations, :jsonb, default: {}, null: false
4
+ add_column :library_groups, :footer_banner_translations, :jsonb, default: {}, null: false
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ class AddDisplayNameTranslationsToRole < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :roles, :display_name_translations, :jsonb, default: {}, null: false
4
+ end
5
+ end
@@ -0,0 +1,21 @@
1
+ class AddDisplayNameTranslationsToCarrierType < ActiveRecord::Migration[5.2]
2
+ def change
3
+ [
4
+ :agent_relationship_types,
5
+ :agent_types,
6
+ :carrier_types,
7
+ :content_types,
8
+ :create_types,
9
+ :form_of_works,
10
+ :frequencies,
11
+ :languages,
12
+ :licenses,
13
+ :manifestation_relationship_types,
14
+ :medium_of_performances,
15
+ :produce_types,
16
+ :realize_types
17
+ ].each do |table|
18
+ add_column table, :display_name_translations, :jsonb, default: {}, null: false
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,5 @@
1
+ class AddProfileIdToUser < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_reference :users, :profile, foreign_key: true
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddFullNameTranslationsToProfile < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :profiles, :full_name_translations, :jsonb, default: {}, null: false
4
+ end
5
+ end