iqvoc_compound_forms 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 +15 -16
- data/app/assets/stylesheets/_manifest.scss +1 -0
- data/app/assets/stylesheets/application.scss +1 -0
- data/app/javascript/application.js +8 -0
- data/app/javascript/manifest.js +10 -0
- data/app/models/compound_form/base.rb +8 -5
- data/app/models/compound_form/content/base.rb +7 -2
- data/app/models/concerns/compound_forms_label_extensions.rb +2 -3
- data/app/views/partials/compound_form/_compound_form.html.erb +1 -1
- 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/engine_extensions.rb +1 -1
- data/config/initializers/filter_parameter_logging.rb +4 -4
- data/config/initializers/iqvoc.rb +10 -4
- data/config/initializers/permissions_policy.rb +11 -9
- data/config/puma.rb +42 -0
- data/iqvoc_compound_forms.gemspec +9 -9
- data/lib/iqvoc/compound_forms/version.rb +1 -1
- data/test/integration/compound_form_ui_test.rb +3 -3
- data/test/models/compound_form_test.rb +1 -1
- data/test/test_helper.rb +2 -2
- metadata +22 -36
- data/.github/workflows/ci.yml +0 -67
- data/.gitignore +0 -17
- data/Gemfile.lock +0 -555
- data/app/assets/javascripts/iqvoc_compound_forms/manifest.js +0 -1
- data/app/assets/javascripts/manifest.js +0 -4
- data/app/assets/stylesheets/manifest.scss +0 -1
- 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 -49
- data/package-lock.json +0 -2186
- data/package.json +0 -32
- data/public/favicon.ico +0 -0
- data/script/rails +0 -6
- /data/{public/.gitkeep → app/assets/builds/.keep} +0 -0
- /data/app/{assets/javascripts → javascript}/iqvoc_compound_forms/compound_forms.js +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 013d758add8a54e353426f0c20d1e9a1551fbf49d03c736de569773b67642680
|
|
4
|
+
data.tar.gz: 9a187dbf10318782f1a90c92015ead6efd022657116d0d6c30322bca7cd6ee1c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2f4e8dde59ae89411b42ee3162ae65136538803140b1691a603c1a90fd82676a21de5e7e767aa6233e48cdcb6a59c5dd9222e2344daeac87bf863f15413a6c46
|
|
7
|
+
data.tar.gz: a240829181a9c659654803e61d5684e14f374d10b0d2e704b01be3930c2645eb023090ff36313bbbff7ec2673ff78ae639dd689f88826a0664ca442aa1d2da21
|
data/Gemfile
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
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
|
-
|
|
16
|
-
gem 'capybara'
|
|
17
|
-
gem 'poltergeist'
|
|
18
|
-
end
|
|
18
|
+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
|
19
|
+
gem "debug", platforms: %i[ mri windows ]
|
|
20
|
+
end
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
platforms :jruby do
|
|
24
|
-
gem 'activerecord-jdbcpostgresql-adapter'
|
|
25
|
-
end
|
|
22
|
+
group :test do
|
|
23
|
+
gem 'capybara'
|
|
24
|
+
gem 'poltergeist'
|
|
26
25
|
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@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_compound_forms' own standalone use.
|
|
3
|
+
// Other gems importing 'iqvoc_compound_forms' 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,10 @@
|
|
|
1
|
+
// Central export of iqvoc_compound_forms' own JavaScript, for other
|
|
2
|
+
// apps/gems to import (via `import 'iqvoc_compound_forms'`, resolved
|
|
3
|
+
// through package.json's "main"). Does not start Rails/UJS - see
|
|
4
|
+
// application.js for that.
|
|
5
|
+
//
|
|
6
|
+
// iqvoc_skosxl's own manifest already pulls in iqvoc's, so importing it
|
|
7
|
+
// alone is enough - no need to also import 'iqvoc' directly.
|
|
8
|
+
import 'iqvoc_skosxl'
|
|
9
|
+
|
|
10
|
+
import './iqvoc_compound_forms/compound_forms'
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
class CompoundForm::Base < ApplicationRecord
|
|
4
4
|
class_attribute :rdf_namespace, :rdf_predicate
|
|
5
|
+
|
|
5
6
|
self.rdf_namespace = 'iqvoc'
|
|
6
7
|
self.rdf_predicate = 'compoundFrom'
|
|
7
8
|
|
|
8
9
|
self.table_name ='compound_forms'
|
|
9
10
|
|
|
10
|
-
belongs_to :domain,
|
|
11
|
+
belongs_to :domain,
|
|
12
|
+
class_name: 'Label::Base',
|
|
13
|
+
foreign_key: 'domain_id'
|
|
11
14
|
|
|
12
15
|
has_many :compound_form_contents,
|
|
13
16
|
class_name: 'CompoundForm::Content::Base',
|
|
@@ -44,11 +47,11 @@ class CompoundForm::Base < ApplicationRecord
|
|
|
44
47
|
end
|
|
45
48
|
|
|
46
49
|
def self.build_from_rdf(rdf_subject, rdf_predicate, rdf_object)
|
|
47
|
-
unless rdf_subject.is_a? Label::
|
|
48
|
-
raise "#{self.name}#build_from_rdf: Subject (#{rdf_subject}) must be a 'Label::
|
|
50
|
+
unless rdf_subject.is_a? Label::Skosxl::Base
|
|
51
|
+
raise "#{self.name}#build_from_rdf: Subject (#{rdf_subject}) must be a 'Label::Skosxl::Base'"
|
|
49
52
|
end
|
|
50
53
|
|
|
51
|
-
target_class =
|
|
54
|
+
target_class = RdfApi::PREDICATE_DICTIONARY[rdf_predicate] || self
|
|
52
55
|
|
|
53
56
|
ActiveRecord::Base.transaction do
|
|
54
57
|
begin
|
|
@@ -75,7 +78,7 @@ class CompoundForm::Base < ApplicationRecord
|
|
|
75
78
|
when String # normal
|
|
76
79
|
if obj.last =~ /^:(.*)$/
|
|
77
80
|
# we are responsible for this (e.g. :computer-de)
|
|
78
|
-
label = Iqvoc::
|
|
81
|
+
label = Iqvoc::Xllabel.base_class.by_origin(obj.last[1..-1]).last # find label by origin, strip out leading ':'
|
|
79
82
|
|
|
80
83
|
if label
|
|
81
84
|
CompoundForm::Content::Base.create(label: label, compound_form: compound_form)
|
|
@@ -4,8 +4,13 @@ class CompoundForm::Content::Base < ApplicationRecord
|
|
|
4
4
|
|
|
5
5
|
self.table_name ='compound_form_contents'
|
|
6
6
|
|
|
7
|
-
belongs_to :compound_form,
|
|
8
|
-
|
|
7
|
+
belongs_to :compound_form,
|
|
8
|
+
class_name: 'CompoundForm::Base',
|
|
9
|
+
foreign_key: 'compound_form_id'
|
|
10
|
+
|
|
11
|
+
belongs_to :label,
|
|
12
|
+
class_name: 'Label::Base',
|
|
13
|
+
foreign_key: 'label_id'
|
|
9
14
|
|
|
10
15
|
def self.label_published
|
|
11
16
|
includes(:label).references(:labels).merge(Label::Base.published)
|
|
@@ -16,7 +16,7 @@ module CompoundFormsLabelExtensions
|
|
|
16
16
|
@inline_compound_form_origins.each do |origin_collection|
|
|
17
17
|
compound_form_contents = []
|
|
18
18
|
origin_collection.each_with_index do |origin, index|
|
|
19
|
-
if label = Iqvoc::
|
|
19
|
+
if label = Iqvoc::Xllabel.base_class.editor_selectable.by_origin(origin).last
|
|
20
20
|
compound_form_contents << CompoundForm::Content::Base.new(:label => label, :order => index)
|
|
21
21
|
end
|
|
22
22
|
end
|
|
@@ -37,8 +37,7 @@ module CompoundFormsLabelExtensions
|
|
|
37
37
|
|
|
38
38
|
has_many :compound_form_contents,
|
|
39
39
|
through: :compound_forms,
|
|
40
|
-
class_name: "CompoundForm::Content::Base"
|
|
41
|
-
dependent: :destroy
|
|
40
|
+
class_name: "CompoundForm::Content::Base"
|
|
42
41
|
|
|
43
42
|
validate :compound_form_contents_size
|
|
44
43
|
validate :compound_form_contents_languages
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="compound-form">
|
|
2
|
-
<% items = Iqvoc::
|
|
2
|
+
<% items = Iqvoc::Xllabel.base_class.editor_selectable.
|
|
3
3
|
by_origin(compound_form.compound_form_contents.
|
|
4
4
|
map { |cfc| cfc.label.origin }).load %>
|
|
5
5
|
<% fieldname = "label[inline_compound_form_origins][]" %>
|
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::CompoundForms
|
|
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 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::CompoundForms.const_defined?(:Application)
|
|
4
4
|
Iqvoc::CompoundForms::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::CompoundForms.const_defined?(:Application)
|
|
4
4
|
Iqvoc::CompoundForms::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::CompoundForms.const_defined?(:Application)
|
|
4
4
|
Iqvoc::CompoundForms::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
|
]
|
|
@@ -6,11 +6,17 @@ require 'iqvoc/xllabel'
|
|
|
6
6
|
|
|
7
7
|
Iqvoc.config.register_setting("title", "iQvoc Compound Forms")
|
|
8
8
|
|
|
9
|
-
Iqvoc::
|
|
10
|
-
merge!("CompoundForm::Base" =>
|
|
11
|
-
|
|
9
|
+
Iqvoc::Xllabel.additional_association_class_names.
|
|
10
|
+
merge!("CompoundForm::Base" => {
|
|
11
|
+
foreign_key: "domain_id",
|
|
12
|
+
inverse_of: :domain,
|
|
13
|
+
# build_rdf reaches through the contents to their labels
|
|
14
|
+
preload: { compound_form_contents: :label }
|
|
15
|
+
},
|
|
16
|
+
# used for the reverse direction ("compound_in")
|
|
17
|
+
"CompoundForm::Content::Base" => { foreign_key: "label_id", inverse_of: :label })
|
|
12
18
|
|
|
13
|
-
Iqvoc::
|
|
19
|
+
Iqvoc::Xllabel.view_sections += ["compound_forms"]
|
|
14
20
|
|
|
15
21
|
ActiveSupport.on_load :skos_importer do
|
|
16
22
|
SkosImporter.second_level_object_classes.delete(CompoundForm::Content::Base)
|
|
@@ -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"]
|
|
@@ -7,18 +7,18 @@ Gem::Specification.new do |s|
|
|
|
7
7
|
s.name = 'iqvoc_compound_forms'
|
|
8
8
|
s.version = Iqvoc::CompoundForms::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_compound_forms'
|
|
14
|
+
s.summary = 'iQvoc compound forms extension'
|
|
15
|
+
s.description = 'Compound forms extension for iQvoc SKOS-XL 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_compound_forms.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
|
|
@@ -27,7 +27,7 @@ class CompoundFormUITest < ActionDispatch::IntegrationTest
|
|
|
27
27
|
'Luftreinhaltungskosten' => %w(Luft Reinhaltung Kosten)
|
|
28
28
|
)
|
|
29
29
|
|
|
30
|
-
label = Iqvoc::
|
|
30
|
+
label = Iqvoc::Xllabel.base_class.find_by(value: 'Luftreinhaltungskosten')
|
|
31
31
|
visit label_path(label, lang: 'en', format: 'html')
|
|
32
32
|
|
|
33
33
|
assert page.has_content? 'Luftreinhaltungskosten'
|
|
@@ -50,7 +50,7 @@ class CompoundFormUITest < ActionDispatch::IntegrationTest
|
|
|
50
50
|
'Abtrennung und Transmutation radioaktiven Abfalls' => %w(Abtrennung Transmutation radioaktiv Abfall)
|
|
51
51
|
)
|
|
52
52
|
|
|
53
|
-
label = Iqvoc::
|
|
53
|
+
label = Iqvoc::Xllabel.base_class.find_by(value: 'Abtrennung und Transmutation radioaktiven Abfalls')
|
|
54
54
|
visit label_path(label, lang: 'en', format: 'html')
|
|
55
55
|
|
|
56
56
|
assert page.has_content? 'Abtrennung und Transmutation radioaktiven Abfalls'
|
|
@@ -85,7 +85,7 @@ class CompoundFormUITest < ActionDispatch::IntegrationTest
|
|
|
85
85
|
'Hausmüllähnlicher Gewerbeabfall' => %w(Abfall hausmüllähnlich Gewerbe)
|
|
86
86
|
)
|
|
87
87
|
|
|
88
|
-
label = Iqvoc::
|
|
88
|
+
label = Iqvoc::Xllabel.base_class.find_by(value: 'Hausmüllähnlicher Gewerbeabfall')
|
|
89
89
|
visit label_path(label, lang: 'en', format: 'html')
|
|
90
90
|
|
|
91
91
|
assert page.has_content? 'Hausmüllähnlicher Gewerbeabfall'
|
|
@@ -48,7 +48,7 @@ class CompoundFormTest < ActiveSupport::TestCase
|
|
|
48
48
|
[term] + components
|
|
49
49
|
}.flatten
|
|
50
50
|
labels = terms.map { |term|
|
|
51
|
-
Iqvoc::
|
|
51
|
+
Iqvoc::Xllabel.base_class.create!(:value => term,
|
|
52
52
|
"language" => Iqvoc::Concept.pref_labeling_languages.first,
|
|
53
53
|
"published_at" => 2.days.ago)
|
|
54
54
|
}
|
data/test/test_helper.rb
CHANGED
|
@@ -7,13 +7,13 @@ require 'rails/test_help'
|
|
|
7
7
|
# }
|
|
8
8
|
def create_compound_form_label(compound_label_hash)
|
|
9
9
|
compound_label_hash.each do |term, components|
|
|
10
|
-
label = Iqvoc::
|
|
10
|
+
label = Iqvoc::Xllabel.base_class.create!(
|
|
11
11
|
value: term,
|
|
12
12
|
language: Iqvoc::Concept.pref_labeling_languages.first,
|
|
13
13
|
published_at: 2.days.ago)
|
|
14
14
|
|
|
15
15
|
label.compound_forms.create!(compound_form_contents: components.each_with_index.map { |cterm, i|
|
|
16
|
-
clabel = Iqvoc::
|
|
16
|
+
clabel = Iqvoc::Xllabel.base_class.create!(value: cterm,
|
|
17
17
|
language: Iqvoc::Concept.pref_labeling_languages.first,
|
|
18
18
|
published_at: 2.days.ago)
|
|
19
19
|
CompoundForm::Content::Base.new(:label => clabel, :order => i)
|
metadata
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: iqvoc_compound_forms
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.13.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Robert Glaser
|
|
8
8
|
- Till Schulte-Coerne
|
|
9
9
|
- Frederik Dohr
|
|
10
|
-
autorequire:
|
|
11
10
|
bindir: bin
|
|
12
11
|
cert_chain: []
|
|
13
|
-
date:
|
|
12
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
14
13
|
dependencies:
|
|
15
14
|
- !ruby/object:Gem::Dependency
|
|
16
15
|
name: iqvoc
|
|
@@ -18,46 +17,46 @@ dependencies:
|
|
|
18
17
|
requirements:
|
|
19
18
|
- - "~>"
|
|
20
19
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 4.
|
|
20
|
+
version: 4.17.0
|
|
22
21
|
type: :runtime
|
|
23
22
|
prerelease: false
|
|
24
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
24
|
requirements:
|
|
26
25
|
- - "~>"
|
|
27
26
|
- !ruby/object:Gem::Version
|
|
28
|
-
version: 4.
|
|
27
|
+
version: 4.17.0
|
|
29
28
|
- !ruby/object:Gem::Dependency
|
|
30
29
|
name: iqvoc_skosxl
|
|
31
30
|
requirement: !ruby/object:Gem::Requirement
|
|
32
31
|
requirements:
|
|
33
32
|
- - "~>"
|
|
34
33
|
- !ruby/object:Gem::Version
|
|
35
|
-
version: 2.
|
|
34
|
+
version: 2.13.0
|
|
36
35
|
type: :runtime
|
|
37
36
|
prerelease: false
|
|
38
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
39
38
|
requirements:
|
|
40
39
|
- - "~>"
|
|
41
40
|
- !ruby/object:Gem::Version
|
|
42
|
-
version: 2.
|
|
43
|
-
description:
|
|
41
|
+
version: 2.13.0
|
|
42
|
+
description: Compound forms extension for iQvoc SKOS-XL vocabulary management system
|
|
43
|
+
built on the Semantic Web
|
|
44
44
|
email:
|
|
45
45
|
- robert.glaser@innoq.com
|
|
46
46
|
executables: []
|
|
47
47
|
extensions: []
|
|
48
48
|
extra_rdoc_files: []
|
|
49
49
|
files:
|
|
50
|
-
- ".github/workflows/ci.yml"
|
|
51
|
-
- ".gitignore"
|
|
52
50
|
- Gemfile
|
|
53
|
-
- Gemfile.lock
|
|
54
51
|
- README.md
|
|
55
52
|
- Rakefile
|
|
53
|
+
- app/assets/builds/.keep
|
|
56
54
|
- app/assets/images/.gitkeep
|
|
57
|
-
- app/assets/
|
|
58
|
-
- app/assets/
|
|
59
|
-
- app/
|
|
60
|
-
- app/
|
|
55
|
+
- app/assets/stylesheets/_manifest.scss
|
|
56
|
+
- app/assets/stylesheets/application.scss
|
|
57
|
+
- app/javascript/application.js
|
|
58
|
+
- app/javascript/iqvoc_compound_forms/compound_forms.js
|
|
59
|
+
- app/javascript/manifest.js
|
|
61
60
|
- app/models/application_record.rb
|
|
62
61
|
- app/models/compound_form/base.rb
|
|
63
62
|
- app/models/compound_form/content/base.rb
|
|
@@ -67,16 +66,10 @@ files:
|
|
|
67
66
|
- app/views/partials/compound_form/_edit_base.html.erb
|
|
68
67
|
- app/views/partials/compound_form/content/_base.html.erb
|
|
69
68
|
- app/views/partials/compound_form/content/_base_no_header.html.erb
|
|
70
|
-
- bin/bundle
|
|
71
|
-
- bin/rails
|
|
72
|
-
- bin/rake
|
|
73
|
-
- bin/setup
|
|
74
|
-
- bin/update
|
|
75
|
-
- bin/yarn
|
|
76
|
-
- config.ru
|
|
77
69
|
- config/application.rb
|
|
78
70
|
- config/boot.rb
|
|
79
71
|
- config/cable.yml
|
|
72
|
+
- config/ci.rb
|
|
80
73
|
- config/database.mysql.yml
|
|
81
74
|
- config/database.sqlite.yml
|
|
82
75
|
- config/database.template.yml
|
|
@@ -97,32 +90,26 @@ files:
|
|
|
97
90
|
- config/locales/activerecord.en.yml
|
|
98
91
|
- config/locales/de.yml
|
|
99
92
|
- config/locales/en.yml
|
|
93
|
+
- config/puma.rb
|
|
100
94
|
- config/routes.rb
|
|
101
|
-
- config/secrets.yml
|
|
102
95
|
- config/storage.yml
|
|
103
96
|
- db/migrate/20120112100000_create_compound_forms.rb
|
|
104
97
|
- db/migrate/20150108153131_add_fk_constraints_iqvoc_compound_forms.rb
|
|
105
98
|
- db/seeds.rb
|
|
106
|
-
- faucet.config.js
|
|
107
99
|
- iqvoc_compound_forms.gemspec
|
|
108
100
|
- lib/engine_tasks/db.rake
|
|
109
101
|
- lib/iqvoc/compound_forms/version.rb
|
|
110
102
|
- lib/iqvoc_compound_forms.rb
|
|
111
|
-
- package-lock.json
|
|
112
|
-
- package.json
|
|
113
|
-
- public/.gitkeep
|
|
114
|
-
- public/favicon.ico
|
|
115
|
-
- script/rails
|
|
116
103
|
- test/fixtures/hobbies.nt
|
|
117
104
|
- test/integration/compound_form_ui_test.rb
|
|
118
105
|
- test/integration_test_helper.rb
|
|
119
106
|
- test/models/compound_form_test.rb
|
|
120
107
|
- test/models/import_test.rb
|
|
121
108
|
- test/test_helper.rb
|
|
122
|
-
homepage:
|
|
123
|
-
licenses:
|
|
109
|
+
homepage: https://github.com/innoq/iqvoc_compound_forms
|
|
110
|
+
licenses:
|
|
111
|
+
- Apache-2.0
|
|
124
112
|
metadata: {}
|
|
125
|
-
post_install_message:
|
|
126
113
|
rdoc_options: []
|
|
127
114
|
require_paths:
|
|
128
115
|
- lib
|
|
@@ -130,17 +117,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
130
117
|
requirements:
|
|
131
118
|
- - ">="
|
|
132
119
|
- !ruby/object:Gem::Version
|
|
133
|
-
version: '
|
|
120
|
+
version: '3.3'
|
|
134
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
122
|
requirements:
|
|
136
123
|
- - ">="
|
|
137
124
|
- !ruby/object:Gem::Version
|
|
138
125
|
version: '0'
|
|
139
126
|
requirements: []
|
|
140
|
-
rubygems_version:
|
|
141
|
-
signing_key:
|
|
127
|
+
rubygems_version: 4.0.20
|
|
142
128
|
specification_version: 4
|
|
143
|
-
summary:
|
|
129
|
+
summary: iQvoc compound forms extension
|
|
144
130
|
test_files:
|
|
145
131
|
- test/fixtures/hobbies.nt
|
|
146
132
|
- test/integration/compound_form_ui_test.rb
|