iqvoc_compound_forms 2.8.0 → 2.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +67 -0
- data/.gitignore +9 -0
- data/Gemfile +12 -8
- data/Gemfile.lock +501 -313
- data/README.md +3 -4
- data/app/assets/images/.gitkeep +0 -0
- data/app/assets/javascripts/iqvoc_compound_forms/manifest.js +1 -1
- data/app/assets/javascripts/manifest.js +4 -4
- data/app/assets/stylesheets/manifest.scss +1 -0
- data/app/models/application_record.rb +3 -0
- data/app/models/compound_form/base.rb +8 -5
- data/app/models/compound_form/content/base.rb +2 -2
- data/app/models/concerns/compound_forms_label_extensions.rb +8 -6
- data/app/views/partials/compound_form/_compound_form.html.erb +3 -3
- data/app/views/partials/compound_form/content/_base.html.erb +2 -2
- data/app/views/partials/compound_form/content/_base_no_header.html.erb +15 -0
- data/bin/bundle +3 -0
- data/bin/rails +3 -5
- data/bin/rake +3 -2
- data/bin/setup +33 -0
- data/bin/update +31 -0
- data/bin/yarn +17 -0
- data/config/application.rb +29 -48
- data/config/boot.rb +3 -12
- data/config/cable.yml +10 -0
- data/config/database.yml.postgresql +26 -0
- data/config/environment.rb +4 -4
- data/config/initializers/content_security_policy.rb +25 -0
- data/config/initializers/filter_parameter_logging.rb +8 -0
- data/config/initializers/inflections.rb +16 -0
- data/config/initializers/permissions_policy.rb +11 -0
- data/config/locales/de.yml +2 -0
- data/config/locales/en.yml +2 -0
- data/config/storage.yml +34 -0
- data/config.ru +4 -2
- data/db/migrate/20120112100000_create_compound_forms.rb +1 -1
- data/db/migrate/20150108153131_add_fk_constraints_iqvoc_compound_forms.rb +1 -1
- data/faucet.config.js +49 -0
- data/iqvoc_compound_forms.gemspec +12 -12
- data/lib/iqvoc/compound_forms/version.rb +1 -1
- data/package-lock.json +1495 -0
- data/package.json +32 -0
- data/public/favicon.ico +0 -0
- data/test/integration/compound_form_ui_test.rb +2 -2
- metadata +30 -18
- data/.travis.yml +0 -35
data/README.md
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
|
1
|
+
# Compound forms for iQvoc
|
2
2
|
|
3
|
-
|
3
|
+
![CI](https://github.com/innoq/iqvoc_compound_forms/workflows/CI/badge.svg)
|
4
4
|
|
5
|
-
Getting Started
|
6
|
-
===============
|
5
|
+
## Getting Started
|
7
6
|
|
8
7
|
1. Initialize database:
|
9
8
|
|
File without changes
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
import './compound_forms';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
import '../../../node_modules/iqvoc/app/assets/javascripts/framework';
|
2
|
+
import '../../../node_modules/iqvoc/app/assets/javascripts/iqvoc/manifest';
|
3
|
+
import '../../../node_modules/iqvoc_skosxl/app/assets/javascripts/iqvoc_skosxl/manifest';
|
4
|
+
import './iqvoc_compound_forms/manifest';
|
@@ -0,0 +1 @@
|
|
1
|
+
@import 'iqvoc_skosxl/app/assets/stylesheets/manifest';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
|
3
|
-
class CompoundForm::Base <
|
3
|
+
class CompoundForm::Base < ApplicationRecord
|
4
4
|
class_attribute :rdf_namespace, :rdf_predicate
|
5
5
|
self.rdf_namespace = 'iqvoc'
|
6
6
|
self.rdf_predicate = 'compoundFrom'
|
@@ -10,9 +10,10 @@ class CompoundForm::Base < ActiveRecord::Base
|
|
10
10
|
belongs_to :domain, :class_name => 'Label::Base', :foreign_key => 'domain_id'
|
11
11
|
|
12
12
|
has_many :compound_form_contents,
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
class_name: 'CompoundForm::Content::Base',
|
14
|
+
foreign_key: 'compound_form_id',
|
15
|
+
dependent: :destroy,
|
16
|
+
inverse_of: :compound_form
|
16
17
|
|
17
18
|
def self.published
|
18
19
|
includes(:domain).references(:labels).merge(Label::Base.published)
|
@@ -61,7 +62,9 @@ class CompoundForm::Base < ActiveRecord::Base
|
|
61
62
|
end
|
62
63
|
|
63
64
|
def build_rdf(document, subject)
|
64
|
-
|
65
|
+
if compound_form_contents.any?
|
66
|
+
subject.send(rdf_namespace).send(rdf_predicate, compound_form_contents.map {|cfc| IqRdf::build_uri(cfc.label.origin) })
|
67
|
+
end
|
65
68
|
end
|
66
69
|
|
67
70
|
private
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
|
3
|
-
class CompoundForm::Content::Base <
|
3
|
+
class CompoundForm::Content::Base < ApplicationRecord
|
4
4
|
|
5
5
|
self.table_name ='compound_form_contents'
|
6
6
|
|
@@ -38,7 +38,7 @@ class CompoundForm::Content::Base < ActiveRecord::Base
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def self.edit_partial_name(obj)
|
41
|
-
"partials/compound_form/content/
|
41
|
+
"partials/compound_form/content/base_no_header" # Show data only
|
42
42
|
end
|
43
43
|
|
44
44
|
def build_rdf(document, subject)
|
@@ -29,14 +29,16 @@ module CompoundFormsLabelExtensions
|
|
29
29
|
end
|
30
30
|
|
31
31
|
has_many :compound_forms,
|
32
|
-
:
|
33
|
-
:
|
34
|
-
:
|
32
|
+
class_name: "CompoundForm::Base",
|
33
|
+
foreign_key: "domain_id",
|
34
|
+
dependent: :destroy,
|
35
|
+
inverse_of: :domain
|
36
|
+
|
35
37
|
|
36
38
|
has_many :compound_form_contents,
|
37
|
-
:
|
38
|
-
:
|
39
|
-
:
|
39
|
+
through: :compound_forms,
|
40
|
+
class_name: "CompoundForm::Content::Base",
|
41
|
+
dependent: :destroy
|
40
42
|
|
41
43
|
validate :compound_form_contents_size
|
42
44
|
validate :compound_form_contents_languages
|
@@ -3,7 +3,7 @@
|
|
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][]" %>
|
6
|
-
<%= f.form_group nil, :label => { :text => t('txt.
|
6
|
+
<%= f.form_group nil, :label => { :text => t('txt.views.labels.compound_from') } do %>
|
7
7
|
<%= text_field_tag fieldname, items.map(&:origin).join(InlineDataHelper::JOINER),
|
8
8
|
:class => "entity_select",
|
9
9
|
:"data-query-url" => labels_path(:format => :json),
|
@@ -11,7 +11,7 @@
|
|
11
11
|
:"data-entities" => (not compound_form) ? nil : items.
|
12
12
|
map { |l| label_widget_data(l) }.to_json %>
|
13
13
|
|
14
|
-
<input type="button" class="btn btn-
|
15
|
-
<input type="button" class="btn btn-
|
14
|
+
<input type="button" class="btn btn-outline-secondary add-compound-form" value="<%= t("txt.common.add_note") %>">
|
15
|
+
<input type="button" class="btn btn-outline-secondary rm-compound-form" value="<%= t("txt.common.delete") %>">
|
16
16
|
<% end %>
|
17
17
|
</div>
|
@@ -3,11 +3,11 @@
|
|
3
3
|
<div class="relation-body">
|
4
4
|
<% compound_in = label.compound_in %>
|
5
5
|
<% if compound_in.any? %>
|
6
|
-
<
|
6
|
+
<ul class="list-unstyled">
|
7
7
|
<% compound_in.each do |label| %>
|
8
8
|
<li><%= link_to(label.value, label_path(:id => label)) %></li>
|
9
9
|
<% end %>
|
10
|
-
</
|
10
|
+
</ul>
|
11
11
|
<% end %>
|
12
12
|
</div>
|
13
13
|
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% compound_in = label.compound_in %>
|
2
|
+
<div class="relation panel">
|
3
|
+
<h2><%= t('txt.views.compound_in') %></h2>
|
4
|
+
<div class="relation-body">
|
5
|
+
<ul>
|
6
|
+
<% if compound_in.any? %>
|
7
|
+
<% compound_in.each do |label| %>
|
8
|
+
<li><%= link_to(label.value, label_path(:id => label)) %></span></li>
|
9
|
+
<% end %>
|
10
|
+
<% else %>
|
11
|
+
<li><%= t('txt.views.labels.no_compound_forms') %></li>
|
12
|
+
<% end %>
|
13
|
+
</ul>
|
14
|
+
</div>
|
15
|
+
</div>
|
data/bin/bundle
ADDED
data/bin/rails
CHANGED
@@ -1,6 +1,4 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
require File.expand_path('../../config/boot', __FILE__)
|
6
|
-
require 'rails/commands'
|
2
|
+
APP_PATH = File.expand_path("../config/application", __dir__)
|
3
|
+
require_relative "../config/boot"
|
4
|
+
require "rails/commands"
|
data/bin/rake
CHANGED
data/bin/setup
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "fileutils"
|
3
|
+
|
4
|
+
# path to your application root.
|
5
|
+
APP_ROOT = File.expand_path("..", __dir__)
|
6
|
+
|
7
|
+
def system!(*args)
|
8
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
9
|
+
end
|
10
|
+
|
11
|
+
FileUtils.chdir APP_ROOT do
|
12
|
+
# This script is a way to set up or update your development environment automatically.
|
13
|
+
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
|
14
|
+
# Add necessary setup steps to this file.
|
15
|
+
|
16
|
+
puts "== Installing dependencies =="
|
17
|
+
system! "gem install bundler --conservative"
|
18
|
+
system("bundle check") || system!("bundle install")
|
19
|
+
|
20
|
+
# puts "\n== Copying sample files =="
|
21
|
+
# unless File.exist?("config/database.yml")
|
22
|
+
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
|
23
|
+
# end
|
24
|
+
|
25
|
+
puts "\n== Preparing database =="
|
26
|
+
system! "bin/rails db:prepare"
|
27
|
+
|
28
|
+
puts "\n== Removing old logs and tempfiles =="
|
29
|
+
system! "bin/rails log:clear tmp:clear"
|
30
|
+
|
31
|
+
puts "\n== Restarting application server =="
|
32
|
+
system! "bin/rails restart"
|
33
|
+
end
|
data/bin/update
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'fileutils'
|
3
|
+
include FileUtils
|
4
|
+
|
5
|
+
# path to your application root.
|
6
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
7
|
+
|
8
|
+
def system!(*args)
|
9
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
10
|
+
end
|
11
|
+
|
12
|
+
chdir APP_ROOT do
|
13
|
+
# This script is a way to update your development environment automatically.
|
14
|
+
# Add necessary update steps to this file.
|
15
|
+
|
16
|
+
puts '== Installing dependencies =='
|
17
|
+
system! 'gem install bundler --conservative'
|
18
|
+
system('bundle check') || system!('bundle install')
|
19
|
+
|
20
|
+
# Install JavaScript dependencies if using Yarn
|
21
|
+
# system('bin/yarn')
|
22
|
+
|
23
|
+
puts "\n== Updating database =="
|
24
|
+
system! 'bin/rails db:migrate'
|
25
|
+
|
26
|
+
puts "\n== Removing old logs and tempfiles =="
|
27
|
+
system! 'bin/rails log:clear tmp:clear'
|
28
|
+
|
29
|
+
puts "\n== Restarting application server =="
|
30
|
+
system! 'bin/rails restart'
|
31
|
+
end
|
data/bin/yarn
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
3
|
+
Dir.chdir(APP_ROOT) do
|
4
|
+
yarn = ENV["PATH"].split(File::PATH_SEPARATOR).
|
5
|
+
select { |dir| File.expand_path(dir) != __dir__ }.
|
6
|
+
product(["yarn", "yarn.cmd", "yarn.ps1"]).
|
7
|
+
map { |dir, file| File.expand_path(file, dir) }.
|
8
|
+
find { |file| File.executable?(file) }
|
9
|
+
|
10
|
+
if yarn
|
11
|
+
exec yarn, *ARGV
|
12
|
+
else
|
13
|
+
$stderr.puts "Yarn executable was not detected in the system."
|
14
|
+
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
15
|
+
exit 1
|
16
|
+
end
|
17
|
+
end
|
data/config/application.rb
CHANGED
@@ -1,56 +1,37 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
require_relative "boot"
|
2
|
+
|
3
|
+
# Pick the frameworks you want:
|
4
|
+
require "active_model/railtie"
|
5
|
+
require "active_job/railtie"
|
6
|
+
require "active_record/railtie"
|
7
|
+
require "active_storage/engine"
|
8
|
+
require "action_controller/railtie"
|
9
|
+
require "action_mailer/railtie"
|
10
|
+
require "action_mailbox/engine"
|
11
|
+
require "action_text/engine"
|
12
|
+
require "action_view/railtie"
|
13
|
+
require "action_cable/engine"
|
14
|
+
# require "sprockets/railtie"
|
15
|
+
require "rails/test_unit/railtie"
|
16
|
+
|
17
|
+
# Require the gems listed in Gemfile, including any gems
|
18
|
+
# you've limited to :test, :development, or :production.
|
19
|
+
Bundler.require(*Rails.groups)
|
11
20
|
|
12
21
|
module Iqvoc::CompoundForms
|
13
22
|
class Application < Rails::Application
|
23
|
+
# Initialize configuration defaults for originally generated Rails version.
|
24
|
+
config.load_defaults 7.0
|
25
|
+
|
26
|
+
# Configuration for the application, engines, and railties goes here.
|
27
|
+
#
|
28
|
+
# These settings can be overridden in specific environments using the files
|
29
|
+
# in config/environments, which are processed later.
|
30
|
+
#
|
31
|
+
# config.time_zone = "Central Time (US & Canada)"
|
32
|
+
# config.eager_load_paths << Rails.root.join("extras")
|
14
33
|
|
15
34
|
# This has to be here because iqvoc_compound_forms.rb needs to know if it runs as app or as engine
|
16
35
|
require 'iqvoc_compound_forms'
|
17
|
-
|
18
|
-
# Settings in config/environments/* take precedence over those specified here.
|
19
|
-
# Application configuration should go into files in config/initializers
|
20
|
-
# -- all .rb files in that directory are automatically loaded.
|
21
|
-
|
22
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
23
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
24
|
-
|
25
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
26
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
27
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
28
|
-
|
29
|
-
# Activate observers that should always be running.
|
30
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
31
|
-
|
32
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
33
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
34
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
35
|
-
|
36
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
37
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
38
|
-
config.i18n.default_locale = :de
|
39
|
-
# config.i18n.available_locales = [:de, :en]
|
40
|
-
|
41
|
-
# JavaScript files you want as :defaults (application.js is always included).
|
42
|
-
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
43
|
-
|
44
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
45
|
-
config.encoding = "utf-8"
|
46
|
-
|
47
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
48
|
-
config.filter_parameters += [:password, :password_confirmation]
|
49
|
-
|
50
|
-
# Enable the asset pipeline
|
51
|
-
config.assets.enabled = true
|
52
|
-
|
53
|
-
# Version of your assets, change this if you want to expire all your assets
|
54
|
-
config.assets.version = "1.0.1"
|
55
36
|
end
|
56
37
|
end
|
data/config/boot.rb
CHANGED
@@ -1,13 +1,4 @@
|
|
1
|
-
|
1
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
2
2
|
|
3
|
-
# Set up gems listed in the Gemfile.
|
4
|
-
|
5
|
-
begin
|
6
|
-
ENV['BUNDLE_GEMFILE'] = gemfile
|
7
|
-
require 'bundler'
|
8
|
-
Bundler.setup
|
9
|
-
rescue Bundler::GemNotFound => e
|
10
|
-
STDERR.puts e.message
|
11
|
-
STDERR.puts "Try running `bundle install`."
|
12
|
-
exit!
|
13
|
-
end if File.exist?(gemfile)
|
3
|
+
require "bundler/setup" # Set up gems listed in the Gemfile.
|
4
|
+
require "bootsnap/setup" # Speed up boot time by caching expensive operations.
|
data/config/cable.yml
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
development:
|
2
|
+
adapter: postgresql
|
3
|
+
host: localhost
|
4
|
+
encoding: unicode
|
5
|
+
database: <%= ENV["POSTGRES_DB"] || 'iqvoc_compound_forms_development' %>
|
6
|
+
pool: 5
|
7
|
+
username: <%= ENV["POSTGRES_USER"] || 'postgres' %>
|
8
|
+
password: <%= ENV["POSTGRES_PASSWORD"] || 'postgres' %>
|
9
|
+
|
10
|
+
test:
|
11
|
+
adapter: postgresql
|
12
|
+
host: localhost
|
13
|
+
encoding: unicode
|
14
|
+
database: <%= ENV["POSTGRES_DB"] || 'iqvoc_compound_forms_test' %>
|
15
|
+
pool: 5
|
16
|
+
username: <%= ENV["POSTGRES_USER"] || 'postgres' %>
|
17
|
+
password: <%= ENV["POSTGRES_PASSWORD"] || 'postgres' %>
|
18
|
+
|
19
|
+
production:
|
20
|
+
adapter: postgresql
|
21
|
+
host: localhost
|
22
|
+
encoding: unicode
|
23
|
+
database: <%= ENV["POSTGRES_DB"] || 'iqvoc_compound_forms_production' %>
|
24
|
+
pool: 5
|
25
|
+
username: <%= ENV["POSTGRES_USER"] || 'postgres' %>
|
26
|
+
password: <%= ENV["POSTGRES_PASSWORD"] || 'postgres' %>
|
data/config/environment.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
# Load the Rails application
|
2
|
-
|
1
|
+
# Load the Rails application.
|
2
|
+
require_relative "application"
|
3
3
|
|
4
|
-
# Initialize the Rails application
|
5
|
-
|
4
|
+
# Initialize the Rails application.
|
5
|
+
Rails.application.initialize!
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Define an application-wide content security policy.
|
4
|
+
# See the Securing Rails Applications Guide for more information:
|
5
|
+
# https://guides.rubyonrails.org/security.html#content-security-policy-header
|
6
|
+
|
7
|
+
# Rails.application.configure do
|
8
|
+
# config.content_security_policy do |policy|
|
9
|
+
# policy.default_src :self, :https
|
10
|
+
# policy.font_src :self, :https, :data
|
11
|
+
# policy.img_src :self, :https, :data
|
12
|
+
# policy.object_src :none
|
13
|
+
# policy.script_src :self, :https
|
14
|
+
# policy.style_src :self, :https
|
15
|
+
# # Specify URI for violation reports
|
16
|
+
# # policy.report_uri "/csp-violation-report-endpoint"
|
17
|
+
# end
|
18
|
+
#
|
19
|
+
# # Generate session nonces for permitted importmap and inline scripts
|
20
|
+
# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
|
21
|
+
# config.content_security_policy_nonce_directives = %w(script-src)
|
22
|
+
#
|
23
|
+
# # Report violations without enforcing the policy.
|
24
|
+
# # config.content_security_policy_report_only = true
|
25
|
+
# end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Configure parameters to be filtered from the log file. Use this to limit dissemination of
|
4
|
+
# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
|
5
|
+
# notations and behaviors.
|
6
|
+
Rails.application.config.filter_parameters += [
|
7
|
+
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
8
|
+
]
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, "\\1en"
|
8
|
+
# inflect.singular /^(ox)en/i, "\\1"
|
9
|
+
# inflect.irregular "person", "people"
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym "RESTful"
|
16
|
+
# end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# 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 |f|
|
5
|
+
# f.camera :none
|
6
|
+
# f.gyroscope :none
|
7
|
+
# f.microphone :none
|
8
|
+
# f.usb :none
|
9
|
+
# f.fullscreen :self
|
10
|
+
# f.payment :self, "https://secure.example.com"
|
11
|
+
# end
|
data/config/locales/de.yml
CHANGED
@@ -7,6 +7,7 @@ de:
|
|
7
7
|
compound_form_contents_self_reference_error: Eine Zusammensetzung darf nicht auf das Haupt-Label verweisen.
|
8
8
|
views:
|
9
9
|
labels:
|
10
|
+
no_compound_forms: Nicht in Zusammensetzungen verwendet
|
10
11
|
compound_from: Zusammengesetzt aus
|
11
12
|
compound_in: Zusammengesetzt in
|
12
13
|
widget:
|
@@ -15,3 +16,4 @@ de:
|
|
15
16
|
layouts:
|
16
17
|
sections:
|
17
18
|
compound_forms: Zusammensetzungen
|
19
|
+
compound_in: Teil von
|
data/config/locales/en.yml
CHANGED
@@ -7,6 +7,7 @@ en:
|
|
7
7
|
compound_form_contents_self_reference_error: A composition must not refer the main label.
|
8
8
|
views:
|
9
9
|
labels:
|
10
|
+
no_compound_forms: "Not used in compound forms"
|
10
11
|
compound_from: Compound from
|
11
12
|
compound_in: Compound in
|
12
13
|
widget:
|
@@ -15,3 +16,4 @@ en:
|
|
15
16
|
layouts:
|
16
17
|
sections:
|
17
18
|
compound_forms: Compound Forms
|
19
|
+
compound_in: Part of
|
data/config/storage.yml
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
test:
|
2
|
+
service: Disk
|
3
|
+
root: <%= Rails.root.join("tmp/storage") %>
|
4
|
+
|
5
|
+
local:
|
6
|
+
service: Disk
|
7
|
+
root: <%= Rails.root.join("storage") %>
|
8
|
+
|
9
|
+
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
|
10
|
+
# amazon:
|
11
|
+
# service: S3
|
12
|
+
# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
|
13
|
+
# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
|
14
|
+
# region: us-east-1
|
15
|
+
# bucket: your_own_bucket
|
16
|
+
|
17
|
+
# Remember not to checkin your GCS keyfile to a repository
|
18
|
+
# google:
|
19
|
+
# service: GCS
|
20
|
+
# project: your_project
|
21
|
+
# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
|
22
|
+
# bucket: your_own_bucket
|
23
|
+
|
24
|
+
# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
|
25
|
+
# microsoft:
|
26
|
+
# service: AzureStorage
|
27
|
+
# storage_account_name: your_account_name
|
28
|
+
# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
|
29
|
+
# container: your_container_name
|
30
|
+
|
31
|
+
# mirror:
|
32
|
+
# service: Mirror
|
33
|
+
# primary: local
|
34
|
+
# mirrors: [ amazon, google, microsoft ]
|
data/config.ru
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
# This file is used by Rack-based servers to start the application.
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
require_relative "config/environment"
|
4
|
+
|
5
|
+
run Rails.application
|
6
|
+
Rails.application.load_server
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class AddFkConstraintsIqvocCompoundForms < ActiveRecord::Migration
|
1
|
+
class AddFkConstraintsIqvocCompoundForms < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
add_foreign_key :compound_forms, :labels, column: 'domain_id', on_update: :cascade, on_delete: :cascade
|
4
4
|
add_foreign_key :compound_form_contents, :compound_forms, column: 'compound_form_id', on_update: :cascade, on_delete: :cascade
|
data/faucet.config.js
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
module.exports = {
|
2
|
+
js: [
|
3
|
+
{
|
4
|
+
source: "./node_modules/jquery/dist/jquery.js",
|
5
|
+
target: "./public/assets/javascripts/jquery.js",
|
6
|
+
exports: "jQuery",
|
7
|
+
compact: "mangle"
|
8
|
+
},
|
9
|
+
{
|
10
|
+
source: "./app/assets/javascripts/manifest.js",
|
11
|
+
target: "./public/assets/javascripts/manifest.js",
|
12
|
+
externals: { jquery: "jQuery" },
|
13
|
+
},
|
14
|
+
{
|
15
|
+
source: "./node_modules/bootstrap/dist/js/bootstrap.bundle.min.js",
|
16
|
+
target: "./public/assets/javascripts/bootstrap.bundle.min.js",
|
17
|
+
externals: { jquery: "jQuery" },
|
18
|
+
compact: "minify"
|
19
|
+
}
|
20
|
+
],
|
21
|
+
sass: [{
|
22
|
+
source: "./app/assets/stylesheets/manifest.scss",
|
23
|
+
target: "./public/assets/stylesheets/manifest.css"
|
24
|
+
}],
|
25
|
+
static: [{
|
26
|
+
source: "./app/assets/images",
|
27
|
+
target: "./public/assets/images"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
source: "./node_modules/iqvoc/app/assets/images",
|
31
|
+
target: "./public/assets/images"
|
32
|
+
},
|
33
|
+
{
|
34
|
+
source: "./node_modules/iqvoc/app/assets/fonts",
|
35
|
+
target: "./public/assets/fonts"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
source: "./node_modules/font-awesome/fonts",
|
39
|
+
target: "./public/assets/fonts",
|
40
|
+
fingerprint: false
|
41
|
+
}
|
42
|
+
],
|
43
|
+
manifest: {
|
44
|
+
target: "./public/assets/manifest.json",
|
45
|
+
key: "short",
|
46
|
+
webRoot: "./public"
|
47
|
+
},
|
48
|
+
watchDirs: ["./app/assets"]
|
49
|
+
};
|