iqvoc_inflectionals 2.11.4 → 2.13.0
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/Gemfile +11 -12
- data/app/assets/stylesheets/_manifest.scss +4 -0
- data/app/assets/stylesheets/application.scss +1 -0
- data/app/javascript/application.js +8 -0
- data/app/javascript/manifest.js +9 -0
- data/app/models/concerns/inflectionable.rb +2 -2
- data/app/models/inflectional/base.rb +4 -4
- data/app/views/partials/inflectional/_base.html.erb +1 -1
- data/app/views/partials/inflectional/_search_result.html.erb +2 -2
- data/config/application.rb +9 -5
- data/config/ci.rb +20 -0
- data/config/environments/development.rb +1 -1
- data/config/environments/production.rb +1 -1
- data/config/environments/test.rb +1 -1
- data/config/initializers/content_security_policy.rb +6 -2
- data/config/initializers/filter_parameter_logging.rb +4 -4
- data/config/initializers/iqvoc.rb +3 -3
- data/config/initializers/new_framework_defaults_7_1.rb +280 -0
- data/config/initializers/permissions_policy.rb +11 -9
- data/config/puma.rb +42 -0
- data/iqvoc_inflectionals.gemspec +9 -9
- data/lib/iqvoc/inflectionals/version.rb +1 -1
- data/lib/tasks/inflectionals.rake +1 -1
- data/test/unit/import_test.rb +3 -3
- data/test/unit/inflectional_generation_test.rb +5 -5
- data/test/unit/inflectional_test.rb +2 -2
- metadata +22 -33
- data/.github/workflows/ci.yml +0 -56
- data/.gitignore +0 -16
- data/Gemfile.lock +0 -536
- data/app/assets/javascripts/manifest.js +0 -3
- data/app/assets/stylesheets/manifest.scss +0 -3
- data/bin/bundle +0 -3
- data/bin/rails +0 -4
- data/bin/rake +0 -4
- data/bin/setup +0 -33
- data/bin/update +0 -31
- data/bin/yarn +0 -17
- data/config/secrets.yml +0 -11
- data/config.ru +0 -6
- data/faucet.config.js +0 -46
- data/package-lock.json +0 -2229
- data/package.json +0 -32
- data/script/rails +0 -6
- /data/{public/.gitkeep → app/assets/builds/.keep} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 79a7ad73f619f46562d0505b7bcf8d0b14628b10eb6a6e802fb2b64617312480
|
|
4
|
+
data.tar.gz: 7e34e4033d7e23bf0f11fd302493fa736afcd9422419a1da8a9fb919170be1bf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1e9a4f2ed2fa70f1b358e2e425626485b21b7856a3973892eb44d465450608746f79305657afaec2af95aeffaa4f3fbc454058cb42c1d657ff448bd46e5b81b2
|
|
7
|
+
data.tar.gz: 5a304c0d87c3d5e6b0455db8da301f6805d6a6dc8db187154d9acf957e94253c37c160082b2b63f099e3c3a4f88435447c7a0a2179779a288e725fbad89a6ddf
|
data/Gemfile
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
|
-
gem 'iqvoc', '~> 4.
|
|
4
|
-
gem 'iqvoc_skosxl', '~> 2.
|
|
3
|
+
gem 'iqvoc', '~> 4.17.0', github: 'innoq/iqvoc'
|
|
4
|
+
gem 'iqvoc_skosxl', '~> 2.13.0', github: 'innoq/iqvoc_skosxl'
|
|
5
|
+
|
|
6
|
+
platforms :ruby do
|
|
7
|
+
gem 'pg'
|
|
8
|
+
end
|
|
9
|
+
platforms :jruby do
|
|
10
|
+
gem 'activerecord-jdbcpostgresql-adapter'
|
|
11
|
+
end
|
|
5
12
|
|
|
6
13
|
group :development do
|
|
7
|
-
gem 'better_errors'
|
|
8
14
|
gem 'web-console'
|
|
9
|
-
gem 'listen'
|
|
10
15
|
end
|
|
11
16
|
|
|
12
17
|
group :development, :test do
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
platforms :ruby do
|
|
16
|
-
gem 'pg'
|
|
17
|
-
end
|
|
18
|
-
platforms :jruby do
|
|
19
|
-
gem 'activerecord-jdbcpostgresql-adapter'
|
|
20
|
-
end
|
|
18
|
+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
|
19
|
+
gem "debug", platforms: %i[ mri windows ]
|
|
21
20
|
end
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// iqvoc_skosxl's own manifest already pulls in iqvoc's, so importing it
|
|
2
|
+
// alone is enough - importing both would duplicate every rule in the
|
|
3
|
+
// compiled output, since plain @import (unlike @use) isn't deduplicated.
|
|
4
|
+
@import 'iqvoc_skosxl/app/assets/stylesheets/manifest';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import 'manifest';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Entry point for the esbuild build script in package.json - this is what
|
|
2
|
+
// Propshaft actually serves for iqvoc_inflectionals' own standalone use.
|
|
3
|
+
// Other gems importing 'iqvoc_inflectionals' get ./manifest instead - the
|
|
4
|
+
// same content minus starting Rails/UJS.
|
|
5
|
+
import Rails from '@rails/ujs'
|
|
6
|
+
Rails.start()
|
|
7
|
+
|
|
8
|
+
import './manifest'
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Central export of iqvoc_inflectionals' own JavaScript, for other
|
|
2
|
+
// apps/gems to import (via `import 'iqvoc_inflectionals'`, resolved
|
|
3
|
+
// through package.json's "main"). Does not start Rails/UJS - see
|
|
4
|
+
// application.js for that.
|
|
5
|
+
//
|
|
6
|
+
// iqvoc_inflectionals has no JS of its own; it only depends on
|
|
7
|
+
// iqvoc_skosxl's models/views. iqvoc_skosxl's own manifest already pulls
|
|
8
|
+
// in iqvoc's, so importing it alone is enough here too.
|
|
9
|
+
import 'iqvoc_skosxl'
|
|
@@ -16,10 +16,10 @@ module Inflectionable
|
|
|
16
16
|
# overwrite class method to query labels by all existing inflectionals
|
|
17
17
|
# instead of basic xl-label value attribute
|
|
18
18
|
def self.by_query_value(query)
|
|
19
|
-
Iqvoc::
|
|
19
|
+
Iqvoc::Xllabel.base_class
|
|
20
20
|
.references(:inflectionals)
|
|
21
21
|
.joins(:inflectionals)
|
|
22
|
-
.where('inflectionals.value ILIKE ?', query.
|
|
22
|
+
.where('inflectionals.value ILIKE ?', query.to_s.downcase)
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -13,7 +13,7 @@ class Inflectional::Base < ActiveRecord::Base
|
|
|
13
13
|
validates :value, :presence => true
|
|
14
14
|
# validates :label_id, :presence => true
|
|
15
15
|
|
|
16
|
-
belongs_to :label, :
|
|
16
|
+
belongs_to :label, class_name: Iqvoc::Xllabel.base_class_name
|
|
17
17
|
|
|
18
18
|
def value=(str)
|
|
19
19
|
write_attribute(:value, str)
|
|
@@ -23,7 +23,7 @@ class Inflectional::Base < ActiveRecord::Base
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def self.build_from_rdf(subject, predicate, object)
|
|
26
|
-
unless object =~
|
|
26
|
+
unless object =~ RdfApi::LITERAL_REGEXP
|
|
27
27
|
raise InvalidStringLiteralError, "#{self.name}#build_from_rdf: Object (#{object}) must be a string literal"
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -290,7 +290,7 @@ class Inflectional::Base < ActiveRecord::Base
|
|
|
290
290
|
query_str = build_query_string(params)
|
|
291
291
|
|
|
292
292
|
scope = by_query_value(query_str).includes(:label)
|
|
293
|
-
scope = scope.references(:labels).merge(Iqvoc::
|
|
293
|
+
scope = scope.references(:labels).merge(Iqvoc::Xllabel.base_class.by_language(params[:languages].to_a).published.order("LENGTH(#{Label::Base.table_name}.value)"))
|
|
294
294
|
scope.map { |result| SearchResult.new(result) }
|
|
295
295
|
end
|
|
296
296
|
|
|
@@ -328,7 +328,7 @@ class Inflectional::Base < ActiveRecord::Base
|
|
|
328
328
|
end
|
|
329
329
|
|
|
330
330
|
def self.normalize(str)
|
|
331
|
-
Digest::MD5.hexdigest(str.to_s.
|
|
331
|
+
Digest::MD5.hexdigest(str.to_s.downcase)
|
|
332
332
|
end
|
|
333
333
|
|
|
334
334
|
def ==(other)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<%
|
|
8
8
|
all_inflectionals = Inflectional::Base.where(:value => labels_inflectionals_values).all
|
|
9
9
|
# subtract initial and current version from the inflectionals collection
|
|
10
|
-
inflectionals_labels = Iqvoc::
|
|
10
|
+
inflectionals_labels = Iqvoc::Xllabel.base_class.find(all_inflectionals.map(&:label_id)-[label.published_version_id, label.id].compact)
|
|
11
11
|
%>
|
|
12
12
|
|
|
13
13
|
<% if inflectionals_labels.present? %>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<dt>
|
|
2
2
|
<%= t("txt.views.search_results.search_term_in_results") %>: <%= result[:query] %><br>
|
|
3
3
|
Ergebnisse:<br>
|
|
4
|
-
<span
|
|
4
|
+
<span class="fw-normal">
|
|
5
5
|
<% if result[:result].blank? %>
|
|
6
6
|
<%= t("txt.views.search_results.no_results") %>
|
|
7
7
|
<% else %>
|
|
8
8
|
<% result[:result].group_by{|i| i.label}.each do |key, value| %>
|
|
9
|
-
<% concept = key.concepts_for_labeling_class(Labeling::
|
|
9
|
+
<% concept = key.concepts_for_labeling_class(Labeling::Skosxl::PrefLabel).try(:first) %>
|
|
10
10
|
<% concept_path = concept ? concept_path(:id => concept.origin) : '' %>
|
|
11
11
|
<%= link_to(key.value, label_path(:id => key), :data => { 'pref-label-for' => concept_path }) %> (<%= value.map(&:value).join(", ") %>)<br>
|
|
12
12
|
<% end %>
|
data/config/application.rb
CHANGED
|
@@ -4,14 +4,13 @@ require_relative "boot"
|
|
|
4
4
|
require "active_model/railtie"
|
|
5
5
|
require "active_job/railtie"
|
|
6
6
|
require "active_record/railtie"
|
|
7
|
-
require "active_storage/engine"
|
|
7
|
+
# require "active_storage/engine"
|
|
8
8
|
require "action_controller/railtie"
|
|
9
9
|
require "action_mailer/railtie"
|
|
10
|
-
require "action_mailbox/engine"
|
|
11
|
-
require "action_text/engine"
|
|
10
|
+
# require "action_mailbox/engine"
|
|
11
|
+
# require "action_text/engine"
|
|
12
12
|
require "action_view/railtie"
|
|
13
13
|
require "action_cable/engine"
|
|
14
|
-
# require "sprockets/railtie"
|
|
15
14
|
require "rails/test_unit/railtie"
|
|
16
15
|
|
|
17
16
|
# Require the gems listed in Gemfile, including any gems
|
|
@@ -21,7 +20,12 @@ Bundler.require(*Rails.groups)
|
|
|
21
20
|
module Iqvoc::Inflectionals
|
|
22
21
|
class Application < Rails::Application
|
|
23
22
|
# Initialize configuration defaults for originally generated Rails version.
|
|
24
|
-
config.load_defaults
|
|
23
|
+
config.load_defaults 8.1
|
|
24
|
+
|
|
25
|
+
# Please, add to the `ignore` list any other `lib` subdirectories that do
|
|
26
|
+
# not contain `.rb` files, or that should not be reloaded or eager loaded.
|
|
27
|
+
# Common ones are `templates`, `generators`, or `middleware`, for example.
|
|
28
|
+
config.autoload_lib(ignore: %w(assets tasks engine_tasks))
|
|
25
29
|
|
|
26
30
|
# Configuration for the application, engines, and railties goes here.
|
|
27
31
|
#
|
data/config/ci.rb
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Run using bin/ci
|
|
2
|
+
|
|
3
|
+
CI.run do
|
|
4
|
+
step "Setup", "bin/setup --skip-server"
|
|
5
|
+
|
|
6
|
+
# step "Security: Importmap vulnerability audit", "bin/importmap audit"
|
|
7
|
+
step "Tests: Rails", "bin/rails test"
|
|
8
|
+
step "Tests: Seeds", "env RAILS_ENV=test bin/rails db:seed:replant"
|
|
9
|
+
|
|
10
|
+
# Optional: Run system tests
|
|
11
|
+
# step "Tests: System", "bin/rails test:system"
|
|
12
|
+
|
|
13
|
+
# Optional: set a green GitHub commit status to unblock PR merge.
|
|
14
|
+
# Requires the `gh` CLI and `gh extension install basecamp/gh-signoff`.
|
|
15
|
+
# if success?
|
|
16
|
+
# step "Signoff: All systems go. Ready for merge and deploy.", "gh signoff"
|
|
17
|
+
# else
|
|
18
|
+
# failure "Signoff: CI failed. Do not merge or deploy.", "Fix the issues and try again."
|
|
19
|
+
# end
|
|
20
|
+
end
|
|
@@ -3,6 +3,6 @@ require 'iqvoc/environments/development'
|
|
|
3
3
|
if Iqvoc::Inflectionals.const_defined?(:Application)
|
|
4
4
|
Iqvoc::Inflectionals::Application.configure do
|
|
5
5
|
# Settings specified here will take precedence over those in config/environment.rb
|
|
6
|
-
Iqvoc::Environments.
|
|
6
|
+
Iqvoc::Environments::Development.setup(config)
|
|
7
7
|
end
|
|
8
8
|
end
|
|
@@ -3,6 +3,6 @@ require 'iqvoc/environments/production'
|
|
|
3
3
|
if Iqvoc::Inflectionals.const_defined?(:Application)
|
|
4
4
|
Iqvoc::Inflectionals::Application.configure do
|
|
5
5
|
# Settings specified here will take precedence over those in config/environment.rb
|
|
6
|
-
Iqvoc::Environments.
|
|
6
|
+
Iqvoc::Environments::Production.setup(config)
|
|
7
7
|
end
|
|
8
8
|
end
|
data/config/environments/test.rb
CHANGED
|
@@ -3,6 +3,6 @@ require 'iqvoc/environments/test'
|
|
|
3
3
|
if Iqvoc::Inflectionals.const_defined?(:Application)
|
|
4
4
|
Iqvoc::Inflectionals::Application.configure do
|
|
5
5
|
# Settings specified here will take precedence over those in config/environment.rb
|
|
6
|
-
Iqvoc::Environments.
|
|
6
|
+
Iqvoc::Environments::Test.setup(config)
|
|
7
7
|
end
|
|
8
8
|
end
|
|
@@ -16,9 +16,13 @@
|
|
|
16
16
|
# # policy.report_uri "/csp-violation-report-endpoint"
|
|
17
17
|
# end
|
|
18
18
|
#
|
|
19
|
-
# # Generate session nonces for permitted importmap and inline
|
|
19
|
+
# # Generate session nonces for permitted importmap, inline scripts, and inline styles.
|
|
20
20
|
# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
|
|
21
|
-
# config.content_security_policy_nonce_directives = %w(script-src)
|
|
21
|
+
# config.content_security_policy_nonce_directives = %w(script-src style-src)
|
|
22
|
+
#
|
|
23
|
+
# # Automatically add `nonce` to `javascript_tag`, `javascript_include_tag`, and `stylesheet_link_tag`
|
|
24
|
+
# # if the corresponding directives are specified in `content_security_policy_nonce_directives`.
|
|
25
|
+
# # config.content_security_policy_nonce_auto = true
|
|
22
26
|
#
|
|
23
27
|
# # Report violations without enforcing the policy.
|
|
24
28
|
# # config.content_security_policy_report_only = true
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
|
2
2
|
|
|
3
|
-
# Configure parameters to be filtered from the log file.
|
|
4
|
-
#
|
|
5
|
-
# notations and behaviors.
|
|
3
|
+
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
|
|
4
|
+
# Use this to limit dissemination of sensitive information.
|
|
5
|
+
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
|
|
6
6
|
Rails.application.config.filter_parameters += [
|
|
7
|
-
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
|
7
|
+
:passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc
|
|
8
8
|
]
|
|
@@ -9,6 +9,6 @@ Iqvoc.config.register_setting("title", "iQvoc Inflectionals")
|
|
|
9
9
|
# Application's responsibility!
|
|
10
10
|
# Iqvoc.searchable_class_names << "Inflectional::Base"
|
|
11
11
|
|
|
12
|
-
Iqvoc::
|
|
13
|
-
merge!("Inflectional::Base" => "label_id")
|
|
14
|
-
Iqvoc::
|
|
12
|
+
Iqvoc::Xllabel.additional_association_class_names.
|
|
13
|
+
merge!("Inflectional::Base" => { foreign_key: "label_id", inverse_of: :label })
|
|
14
|
+
Iqvoc::Xllabel.view_sections += ["inflectionals"]
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
#
|
|
3
|
+
# This file eases your Rails 7.1 framework defaults upgrade.
|
|
4
|
+
#
|
|
5
|
+
# Uncomment each configuration one by one to switch to the new default.
|
|
6
|
+
# Once your application is ready to run with all new defaults, you can remove
|
|
7
|
+
# this file and set the `config.load_defaults` to `7.1`.
|
|
8
|
+
#
|
|
9
|
+
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
|
10
|
+
# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
|
|
11
|
+
|
|
12
|
+
###
|
|
13
|
+
# No longer add autoloaded paths into `$LOAD_PATH`. This means that you won't be able
|
|
14
|
+
# to manually require files that are managed by the autoloader, which you shouldn't do anyway.
|
|
15
|
+
#
|
|
16
|
+
# This will reduce the size of the load path, making `require` faster if you don't use bootsnap, or reduce the size
|
|
17
|
+
# of the bootsnap cache if you use it.
|
|
18
|
+
#
|
|
19
|
+
# To set this configuration, add the following line to `config/application.rb` (NOT this file):
|
|
20
|
+
# config.add_autoload_paths_to_load_path = false
|
|
21
|
+
|
|
22
|
+
###
|
|
23
|
+
# Remove the default X-Download-Options headers since it is used only by Internet Explorer.
|
|
24
|
+
# If you need to support Internet Explorer, add back `"X-Download-Options" => "noopen"`.
|
|
25
|
+
#++
|
|
26
|
+
# Rails.application.config.action_dispatch.default_headers = {
|
|
27
|
+
# "X-Frame-Options" => "SAMEORIGIN",
|
|
28
|
+
# "X-XSS-Protection" => "0",
|
|
29
|
+
# "X-Content-Type-Options" => "nosniff",
|
|
30
|
+
# "X-Permitted-Cross-Domain-Policies" => "none",
|
|
31
|
+
# "Referrer-Policy" => "strict-origin-when-cross-origin"
|
|
32
|
+
# }
|
|
33
|
+
|
|
34
|
+
###
|
|
35
|
+
# Do not treat an `ActionController::Parameters` instance
|
|
36
|
+
# as equal to an equivalent `Hash` by default.
|
|
37
|
+
#++
|
|
38
|
+
# Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality = false
|
|
39
|
+
|
|
40
|
+
###
|
|
41
|
+
# Active Record Encryption now uses SHA-256 as its hash digest algorithm.
|
|
42
|
+
#
|
|
43
|
+
# There are 3 scenarios to consider.
|
|
44
|
+
#
|
|
45
|
+
# 1. If you have data encrypted with previous Rails versions, and you have
|
|
46
|
+
# +config.active_support.key_generator_hash_digest_class+ configured as SHA1 (the default
|
|
47
|
+
# before Rails 7.0), you need to configure SHA-1 for Active Record Encryption too:
|
|
48
|
+
#++
|
|
49
|
+
# Rails.application.config.active_record.encryption.hash_digest_class = OpenSSL::Digest::SHA1
|
|
50
|
+
#
|
|
51
|
+
# 2. If you have +config.active_support.key_generator_hash_digest_class+ configured as SHA256 (the new default
|
|
52
|
+
# in 7.0), then you need to configure SHA-256 for Active Record Encryption:
|
|
53
|
+
#++
|
|
54
|
+
# Rails.application.config.active_record.encryption.hash_digest_class = OpenSSL::Digest::SHA256
|
|
55
|
+
#
|
|
56
|
+
# 3. If you don't currently have data encrypted with Active Record encryption, you can disable this setting to
|
|
57
|
+
# configure the default behavior starting 7.1+:
|
|
58
|
+
#++
|
|
59
|
+
# Rails.application.config.active_record.encryption.support_sha1_for_non_deterministic_encryption = false
|
|
60
|
+
|
|
61
|
+
###
|
|
62
|
+
# No longer run after_commit callbacks on the first of multiple Active Record
|
|
63
|
+
# instances to save changes to the same database row within a transaction.
|
|
64
|
+
# Instead, run these callbacks on the instance most likely to have internal
|
|
65
|
+
# state which matches what was committed to the database, typically the last
|
|
66
|
+
# instance to save.
|
|
67
|
+
#++
|
|
68
|
+
# Rails.application.config.active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false
|
|
69
|
+
|
|
70
|
+
###
|
|
71
|
+
# Configures SQLite with a strict strings mode, which disables double-quoted string literals.
|
|
72
|
+
#
|
|
73
|
+
# SQLite has some quirks around double-quoted string literals.
|
|
74
|
+
# It first tries to consider double-quoted strings as identifier names, but if they don't exist
|
|
75
|
+
# it then considers them as string literals. Because of this, typos can silently go unnoticed.
|
|
76
|
+
# For example, it is possible to create an index for a non existing column.
|
|
77
|
+
# See https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted for more details.
|
|
78
|
+
#++
|
|
79
|
+
# Rails.application.config.active_record.sqlite3_adapter_strict_strings_by_default = true
|
|
80
|
+
|
|
81
|
+
###
|
|
82
|
+
# Disable deprecated singular associations names.
|
|
83
|
+
#++
|
|
84
|
+
# Rails.application.config.active_record.allow_deprecated_singular_associations_name = false
|
|
85
|
+
|
|
86
|
+
###
|
|
87
|
+
# Enable the Active Job `BigDecimal` argument serializer, which guarantees
|
|
88
|
+
# roundtripping. Without this serializer, some queue adapters may serialize
|
|
89
|
+
# `BigDecimal` arguments as simple (non-roundtrippable) strings.
|
|
90
|
+
#
|
|
91
|
+
# When deploying an application with multiple replicas, old (pre-Rails 7.1)
|
|
92
|
+
# replicas will not be able to deserialize `BigDecimal` arguments from this
|
|
93
|
+
# serializer. Therefore, this setting should only be enabled after all replicas
|
|
94
|
+
# have been successfully upgraded to Rails 7.1.
|
|
95
|
+
#++
|
|
96
|
+
# Rails.application.config.active_job.use_big_decimal_serializer = true
|
|
97
|
+
|
|
98
|
+
###
|
|
99
|
+
# Specify if an `ArgumentError` should be raised if `Rails.cache` `fetch` or
|
|
100
|
+
# `write` are given an invalid `expires_at` or `expires_in` time.
|
|
101
|
+
# Options are `true`, and `false`. If `false`, the exception will be reported
|
|
102
|
+
# as `handled` and logged instead.
|
|
103
|
+
#++
|
|
104
|
+
# Rails.application.config.active_support.raise_on_invalid_cache_expiration_time = true
|
|
105
|
+
|
|
106
|
+
###
|
|
107
|
+
# Specify whether Query Logs will format tags using the SQLCommenter format
|
|
108
|
+
# (https://open-telemetry.github.io/opentelemetry-sqlcommenter/), or using the legacy format.
|
|
109
|
+
# Options are `:legacy` and `:sqlcommenter`.
|
|
110
|
+
#++
|
|
111
|
+
# Rails.application.config.active_record.query_log_tags_format = :sqlcommenter
|
|
112
|
+
|
|
113
|
+
###
|
|
114
|
+
# Specify the default serializer used by `MessageEncryptor` and `MessageVerifier`
|
|
115
|
+
# instances.
|
|
116
|
+
#
|
|
117
|
+
# The legacy default is `:marshal`, which is a potential vector for
|
|
118
|
+
# deserialization attacks in cases where a message signing secret has been
|
|
119
|
+
# leaked.
|
|
120
|
+
#
|
|
121
|
+
# In Rails 7.1, the new default is `:json_allow_marshal` which serializes and
|
|
122
|
+
# deserializes with `ActiveSupport::JSON`, but can fall back to deserializing
|
|
123
|
+
# with `Marshal` so that legacy messages can still be read.
|
|
124
|
+
#
|
|
125
|
+
# In Rails 7.2, the default will become `:json` which serializes and
|
|
126
|
+
# deserializes with `ActiveSupport::JSON` only.
|
|
127
|
+
#
|
|
128
|
+
# Alternatively, you can choose `:message_pack` or `:message_pack_allow_marshal`,
|
|
129
|
+
# which serialize with `ActiveSupport::MessagePack`. `ActiveSupport::MessagePack`
|
|
130
|
+
# can roundtrip some Ruby types that are not supported by JSON, and may provide
|
|
131
|
+
# improved performance, but it requires the `msgpack` gem.
|
|
132
|
+
#
|
|
133
|
+
# For more information, see
|
|
134
|
+
# https://guides.rubyonrails.org/v7.1/configuring.html#config-active-support-message-serializer
|
|
135
|
+
#
|
|
136
|
+
# If you are performing a rolling deploy of a Rails 7.1 upgrade, wherein servers
|
|
137
|
+
# that have not yet been upgraded must be able to read messages from upgraded
|
|
138
|
+
# servers, first deploy without changing the serializer, then set the serializer
|
|
139
|
+
# in a subsequent deploy.
|
|
140
|
+
#++
|
|
141
|
+
# Rails.application.config.active_support.message_serializer = :json_allow_marshal
|
|
142
|
+
|
|
143
|
+
###
|
|
144
|
+
# Enable a performance optimization that serializes message data and metadata
|
|
145
|
+
# together. This changes the message format, so messages serialized this way
|
|
146
|
+
# cannot be read by older versions of Rails. However, messages that use the old
|
|
147
|
+
# format can still be read, regardless of whether this optimization is enabled.
|
|
148
|
+
#
|
|
149
|
+
# To perform a rolling deploy of a Rails 7.1 upgrade, wherein servers that have
|
|
150
|
+
# not yet been upgraded must be able to read messages from upgraded servers,
|
|
151
|
+
# leave this optimization off on the first deploy, then enable it on a
|
|
152
|
+
# subsequent deploy.
|
|
153
|
+
#++
|
|
154
|
+
# Rails.application.config.active_support.use_message_serializer_for_metadata = true
|
|
155
|
+
|
|
156
|
+
###
|
|
157
|
+
# Set the maximum size for Rails log files.
|
|
158
|
+
#
|
|
159
|
+
# `config.load_defaults 7.1` does not set this value for environments other than
|
|
160
|
+
# development and test.
|
|
161
|
+
#++
|
|
162
|
+
# if Rails.env.local?
|
|
163
|
+
# Rails.application.config.log_file_size = 100 * 1024 * 1024
|
|
164
|
+
# end
|
|
165
|
+
|
|
166
|
+
###
|
|
167
|
+
# Enable raising on assignment to attr_readonly attributes. The previous
|
|
168
|
+
# behavior would allow assignment but silently not persist changes to the
|
|
169
|
+
# database.
|
|
170
|
+
#++
|
|
171
|
+
# Rails.application.config.active_record.raise_on_assign_to_attr_readonly = true
|
|
172
|
+
|
|
173
|
+
###
|
|
174
|
+
# Enable validating only parent-related columns for presence when the parent is mandatory.
|
|
175
|
+
# The previous behavior was to validate the presence of the parent record, which performed an extra query
|
|
176
|
+
# to get the parent every time the child record was updated, even when parent has not changed.
|
|
177
|
+
#++
|
|
178
|
+
# Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false
|
|
179
|
+
|
|
180
|
+
###
|
|
181
|
+
# Enable precompilation of `config.filter_parameters`. Precompilation can
|
|
182
|
+
# improve filtering performance, depending on the quantity and types of filters.
|
|
183
|
+
#++
|
|
184
|
+
# Rails.application.config.precompile_filter_parameters = true
|
|
185
|
+
|
|
186
|
+
###
|
|
187
|
+
# Enable before_committed! callbacks on all enrolled records in a transaction.
|
|
188
|
+
# The previous behavior was to only run the callbacks on the first copy of a record
|
|
189
|
+
# if there were multiple copies of the same record enrolled in the transaction.
|
|
190
|
+
#++
|
|
191
|
+
# Rails.application.config.active_record.before_committed_on_all_records = true
|
|
192
|
+
|
|
193
|
+
###
|
|
194
|
+
# Disable automatic column serialization into YAML.
|
|
195
|
+
# To keep the historic behavior, you can set it to `YAML`, however it is
|
|
196
|
+
# recommended to explicitly define the serialization method for each column
|
|
197
|
+
# rather than to rely on a global default.
|
|
198
|
+
#++
|
|
199
|
+
# Rails.application.config.active_record.default_column_serializer = nil
|
|
200
|
+
|
|
201
|
+
###
|
|
202
|
+
# Enable a performance optimization that serializes Active Record models
|
|
203
|
+
# in a faster and more compact way.
|
|
204
|
+
#
|
|
205
|
+
# To perform a rolling deploy of a Rails 7.1 upgrade, wherein servers that have
|
|
206
|
+
# not yet been upgraded must be able to read caches from upgraded servers,
|
|
207
|
+
# leave this optimization off on the first deploy, then enable it on a
|
|
208
|
+
# subsequent deploy.
|
|
209
|
+
#++
|
|
210
|
+
# Rails.application.config.active_record.marshalling_format_version = 7.1
|
|
211
|
+
|
|
212
|
+
###
|
|
213
|
+
# Run `after_commit` and `after_*_commit` callbacks in the order they are defined in a model.
|
|
214
|
+
# This matches the behaviour of all other callbacks.
|
|
215
|
+
# In previous versions of Rails, they ran in the inverse order.
|
|
216
|
+
#++
|
|
217
|
+
# Rails.application.config.active_record.run_after_transaction_callbacks_in_order_defined = true
|
|
218
|
+
|
|
219
|
+
###
|
|
220
|
+
# Whether a `transaction` block is committed or rolled back when exited via `return`, `break` or `throw`.
|
|
221
|
+
#++
|
|
222
|
+
# Rails.application.config.active_record.commit_transaction_on_non_local_return = true
|
|
223
|
+
|
|
224
|
+
###
|
|
225
|
+
# Controls when to generate a value for <tt>has_secure_token</tt> declarations.
|
|
226
|
+
#++
|
|
227
|
+
# Rails.application.config.active_record.generate_secure_token_on = :initialize
|
|
228
|
+
|
|
229
|
+
###
|
|
230
|
+
# ** Please read carefully, this must be configured in config/application.rb **
|
|
231
|
+
#
|
|
232
|
+
# Change the format of the cache entry.
|
|
233
|
+
#
|
|
234
|
+
# Changing this default means that all new cache entries added to the cache
|
|
235
|
+
# will have a different format that is not supported by Rails 7.0
|
|
236
|
+
# applications.
|
|
237
|
+
#
|
|
238
|
+
# Only change this value after your application is fully deployed to Rails 7.1
|
|
239
|
+
# and you have no plans to rollback.
|
|
240
|
+
# When you're ready to change format, add this to `config/application.rb` (NOT
|
|
241
|
+
# this file):
|
|
242
|
+
# config.active_support.cache_format_version = 7.1
|
|
243
|
+
|
|
244
|
+
###
|
|
245
|
+
# Configure Action View to use HTML5 standards-compliant sanitizers when they are supported on your
|
|
246
|
+
# platform.
|
|
247
|
+
#
|
|
248
|
+
# `Rails::HTML::Sanitizer.best_supported_vendor` will cause Action View to use HTML5-compliant
|
|
249
|
+
# sanitizers if they are supported, else fall back to HTML4 sanitizers.
|
|
250
|
+
#
|
|
251
|
+
# In previous versions of Rails, Action View always used `Rails::HTML4::Sanitizer` as its vendor.
|
|
252
|
+
#++
|
|
253
|
+
# Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
|
|
254
|
+
|
|
255
|
+
###
|
|
256
|
+
# Configure Action Text to use an HTML5 standards-compliant sanitizer when it is supported on your
|
|
257
|
+
# platform.
|
|
258
|
+
#
|
|
259
|
+
# `Rails::HTML::Sanitizer.best_supported_vendor` will cause Action Text to use HTML5-compliant
|
|
260
|
+
# sanitizers if they are supported, else fall back to HTML4 sanitizers.
|
|
261
|
+
#
|
|
262
|
+
# In previous versions of Rails, Action Text always used `Rails::HTML4::Sanitizer` as its vendor.
|
|
263
|
+
#++
|
|
264
|
+
# Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
|
|
265
|
+
|
|
266
|
+
###
|
|
267
|
+
# Configure the log level used by the DebugExceptions middleware when logging
|
|
268
|
+
# uncaught exceptions during requests.
|
|
269
|
+
#++
|
|
270
|
+
# Rails.application.config.action_dispatch.debug_exception_log_level = :error
|
|
271
|
+
|
|
272
|
+
###
|
|
273
|
+
# Configure the test helpers in Action View, Action Dispatch, and rails-dom-testing to use HTML5
|
|
274
|
+
# parsers.
|
|
275
|
+
#
|
|
276
|
+
# Nokogiri::HTML5 isn't supported on JRuby, so JRuby applications must set this to :html4.
|
|
277
|
+
#
|
|
278
|
+
# In previous versions of Rails, these test helpers always used an HTML4 parser.
|
|
279
|
+
#++
|
|
280
|
+
# Rails.application.config.dom_testing_default_html_version = :html5
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
1
3
|
# Define an application-wide HTTP permissions policy. For further
|
|
2
|
-
# information see https://developers.google.com/web/updates/2018/06/feature-policy
|
|
3
|
-
|
|
4
|
-
# Rails.application.config.permissions_policy do |
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
4
|
+
# information see: https://developers.google.com/web/updates/2018/06/feature-policy
|
|
5
|
+
|
|
6
|
+
# Rails.application.config.permissions_policy do |policy|
|
|
7
|
+
# policy.camera :none
|
|
8
|
+
# policy.gyroscope :none
|
|
9
|
+
# policy.microphone :none
|
|
10
|
+
# policy.usb :none
|
|
11
|
+
# policy.fullscreen :self
|
|
12
|
+
# policy.payment :self, "https://secure.example.com"
|
|
11
13
|
# end
|
data/config/puma.rb
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# This configuration file will be evaluated by Puma. The top-level methods that
|
|
2
|
+
# are invoked here are part of Puma's configuration DSL. For more information
|
|
3
|
+
# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
|
|
4
|
+
#
|
|
5
|
+
# Puma starts a configurable number of processes (workers) and each process
|
|
6
|
+
# serves each request in a thread from an internal thread pool.
|
|
7
|
+
#
|
|
8
|
+
# You can control the number of workers using ENV["WEB_CONCURRENCY"]. You
|
|
9
|
+
# should only set this value when you want to run 2 or more workers. The
|
|
10
|
+
# default is already 1. You can set it to `auto` to automatically start a worker
|
|
11
|
+
# for each available processor.
|
|
12
|
+
#
|
|
13
|
+
# The ideal number of threads per worker depends both on how much time the
|
|
14
|
+
# application spends waiting for IO operations and on how much you wish to
|
|
15
|
+
# prioritize throughput over latency.
|
|
16
|
+
#
|
|
17
|
+
# As a rule of thumb, increasing the number of threads will increase how much
|
|
18
|
+
# traffic a given process can handle (throughput), but due to CRuby's
|
|
19
|
+
# Global VM Lock (GVL) it has diminishing returns and will degrade the
|
|
20
|
+
# response time (latency) of the application.
|
|
21
|
+
#
|
|
22
|
+
# The default is set to 3 threads as it's deemed a decent compromise between
|
|
23
|
+
# throughput and latency for the average Rails application.
|
|
24
|
+
#
|
|
25
|
+
# Any libraries that use a connection pool or another resource pool should
|
|
26
|
+
# be configured to provide at least as many connections as the number of
|
|
27
|
+
# threads. This includes Active Record's `pool` parameter in `database.yml`.
|
|
28
|
+
threads_count = ENV.fetch("RAILS_MAX_THREADS", 3)
|
|
29
|
+
threads threads_count, threads_count
|
|
30
|
+
|
|
31
|
+
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
|
32
|
+
port ENV.fetch("PORT", 3000)
|
|
33
|
+
|
|
34
|
+
# Allow puma to be restarted by `bin/rails restart` command.
|
|
35
|
+
plugin :tmp_restart
|
|
36
|
+
|
|
37
|
+
# Run the Solid Queue supervisor inside of Puma for single-server deployments.
|
|
38
|
+
plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"]
|
|
39
|
+
|
|
40
|
+
# Specify the PID file. Defaults to tmp/pids/server.pid in development.
|
|
41
|
+
# In other environments, only set the PID file if requested.
|
|
42
|
+
pidfile ENV["PIDFILE"] if ENV["PIDFILE"]
|
data/iqvoc_inflectionals.gemspec
CHANGED
|
@@ -7,18 +7,18 @@ Gem::Specification.new do |s|
|
|
|
7
7
|
s.name = 'iqvoc_inflectionals'
|
|
8
8
|
s.version = Iqvoc::Inflectionals::VERSION
|
|
9
9
|
s.platform = Gem::Platform::RUBY
|
|
10
|
+
s.required_ruby_version = '>= 3.3'
|
|
10
11
|
s.authors = ['Robert Glaser', 'Till Schulte-Coerne', 'Frederik Dohr']
|
|
11
12
|
s.email = ['robert.glaser@innoq.com']
|
|
12
|
-
s.homepage = ''
|
|
13
|
-
s.summary = '
|
|
14
|
-
s.description = '
|
|
13
|
+
s.homepage = 'https://github.com/innoq/iqvoc_inflectionals'
|
|
14
|
+
s.summary = 'iQvoc inflectionals extension'
|
|
15
|
+
s.description = 'Inflectionals extension for iQvoc vocabulary management system built on the Semantic Web'
|
|
16
|
+
s.license = 'Apache-2.0'
|
|
15
17
|
|
|
16
|
-
s.
|
|
18
|
+
s.add_dependency 'iqvoc', '~> 4.17.0'
|
|
19
|
+
s.add_dependency 'iqvoc_skosxl', '~> 2.13.0'
|
|
17
20
|
|
|
18
|
-
s.
|
|
19
|
-
s.
|
|
20
|
-
|
|
21
|
-
s.files = `git ls-files`.split("\n")
|
|
22
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
21
|
+
s.files = `git ls-files -z -- README.md Gemfile Rakefile iqvoc_inflectionals.gemspec app config db lib test`.split("\0")
|
|
22
|
+
s.test_files = s.files.grep(%r{^test/})
|
|
23
23
|
s.require_paths = ['lib']
|
|
24
24
|
end
|