iqvoc 4.7.0 → 4.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/Gemfile +11 -11
- data/Gemfile.lock +178 -122
- data/README.md +39 -24
- data/{test/performance/browsing_test.rb → app/aides/inline_data_helper.rb} +23 -6
- data/app/aides/maker.rb +139 -0
- data/{lib → app/aides}/multi_logger.rb +0 -0
- data/app/aides/origin.rb +47 -0
- data/app/aides/rdfapi.rb +59 -0
- data/app/aides/skos_exporter.rb +151 -0
- data/app/aides/skos_importer.rb +348 -0
- data/app/assets/javascripts/iqvoc/entityselect.js.erb +7 -9
- data/app/controllers/application_controller.rb +1 -3
- data/app/controllers/collections/versions_controller.rb +1 -3
- data/app/controllers/concepts/versions_controller.rb +9 -3
- data/app/controllers/concerns/controller_extensions.rb +109 -0
- data/app/{concerns → controllers/concerns}/reverse_match_errors.rb +0 -0
- data/app/controllers/hierarchy_controller.rb +7 -3
- data/app/controllers/instance_configuration_controller.rb +1 -1
- data/app/controllers/pages_controller.rb +10 -0
- data/app/controllers/search_results_controller.rb +2 -2
- data/app/controllers/triplestore_sync_controller.rb +2 -4
- data/app/helpers/application_helper.rb +1 -1
- data/app/helpers/widget_helper.rb +3 -3
- data/app/jobs/export_job.rb +1 -3
- data/app/jobs/import_job.rb +1 -3
- data/app/models/ability.rb +59 -0
- data/app/models/abstract_user.rb +1 -1
- data/app/models/collection/base.rb +12 -3
- data/app/models/collection/member/skos/base.rb +1 -1
- data/app/models/concept/base.rb +15 -8
- data/app/models/concept/relation/base.rb +1 -1
- data/app/models/concept/relation/skos/base.rb +1 -1
- data/app/models/concept/skos/scheme.rb +1 -1
- data/app/models/concept/validations.rb +1 -1
- data/app/models/concerns/deep_cloning.rb +92 -0
- data/app/models/concerns/first_level_object_scopes.rb +9 -0
- data/app/{concerns → models/concerns}/first_level_object_validations.rb +9 -2
- data/app/models/concerns/rankable.rb +31 -0
- data/app/models/{search_extension.rb → concerns/search_extension.rb} +0 -0
- data/app/{concerns → models/concerns}/versioning.rb +0 -6
- data/app/models/configuration_setting.rb +1 -1
- data/app/models/labeling/skos/base.rb +2 -2
- data/app/models/match/skos/base.rb +2 -2
- data/app/models/note/skos/base.rb +7 -6
- data/app/models/note/skos/change_note.rb +1 -1
- data/{lib/iqvoc/rdf_sync.rb → app/services/rdf_sync_service.rb} +3 -3
- data/app/view_models/concept_view.rb +1 -1
- data/app/views/collections/_form.html.erb +2 -2
- data/app/views/concepts/scheme/edit.html.erb +1 -1
- data/app/views/pages/components.html.erb +45 -0
- data/app/views/pages/version.html.erb +6 -0
- data/app/views/partials/concept/_reverse_match_notice.html.erb +0 -1
- data/app/views/search_results/_sidebar.html.erb +3 -3
- data/config/application.rb +4 -1
- data/config/boot.rb +1 -2
- data/config/database.yml.postgresql +23 -0
- data/config/engine.rb +0 -2
- data/config/environments/heroku.rb +1 -1
- data/config/initializers/inflections.rb +9 -3
- data/config/initializers/iqvoc.rb +1 -7
- data/config/initializers/mime_types.rb +0 -1
- data/config/locales/de.yml +2 -1
- data/config/locales/en.yml +11 -10
- data/config/routes.rb +2 -0
- data/config/travis/database.yml.mysql +9 -0
- data/config/travis/database.yml.postgresql +7 -0
- data/config/travis/database.yml.sqlite +5 -0
- data/db/migrate/20141204151558_add_foreign_key_constraints.rb +23 -0
- data/iqvoc.gemspec +2 -2
- data/lib/generators/app/template.rb +15 -7
- data/lib/iqvoc.rb +2 -1
- data/lib/iqvoc/configuration/core.rb +18 -4
- data/lib/iqvoc/configuration/instance_configuration.rb +125 -0
- data/lib/iqvoc/configuration/navigation.rb +63 -0
- data/lib/iqvoc/environments/development.rb +4 -0
- data/lib/iqvoc/environments/production.rb +11 -12
- data/lib/iqvoc/environments/test.rb +4 -1
- data/lib/iqvoc/version.rb +2 -2
- data/lib/tasks/exporter.rake +1 -4
- data/lib/tasks/importer.rake +1 -5
- data/lib/tasks/sync.rake +1 -2
- data/test/controllers/concept_movement_test.rb +11 -11
- data/test/controllers/hierarchy_test.rb +83 -79
- data/test/controllers/reverse_match_test.rb +2 -2
- data/test/integration/alphabetical_test.rb +2 -3
- data/test/integration/browse_concepts_and_labels_test.rb +2 -2
- data/test/integration/collection_circularity_test.rb +6 -6
- data/test/integration/concept_scheme_browsing_test.rb +2 -2
- data/test/integration/edit_concepts_test.rb +1 -1
- data/test/integration/export_test.rb +5 -3
- data/test/integration/import_test.rb +4 -1
- data/test/integration/instance_configuration_browsing_test.rb +2 -2
- data/test/integration/navigation_test.rb +2 -2
- data/test/integration/note_annotations_test.rb +12 -11
- data/test/integration/reverse_match_job_test.rb +19 -10
- data/test/integration/search_test.rb +6 -6
- data/test/integration/tree_test.rb +3 -3
- data/test/integration/untranslated_test.rb +1 -1
- data/test/models/concept_test.rb +13 -14
- data/test/models/inline_data_test.rb +9 -9
- data/test/models/instance_configuration_test.rb +7 -3
- data/test/models/origin_test.rb +9 -59
- data/test/models/rdf_sync_test.rb +2 -4
- data/test/models/rdfapi_test.rb +0 -2
- data/test/models/skos_collection_import_test.rb +3 -4
- data/test/models/skos_export_test.rb +3 -5
- data/test/models/skos_import_test.rb +12 -10
- data/test/test_helper.rb +0 -1
- data/vendor/assets/stylesheets/{jquery-ui.css.scss → jquery-ui.scss} +0 -0
- data/vendor/assets/stylesheets/{jquery-ui.structure.css.scss → jquery-ui.structure.scss} +0 -0
- data/vendor/assets/stylesheets/{jquery-ui.theme.css.scss → jquery-ui.theme.scss} +0 -0
- metadata +34 -28
- data/lib/iqvoc/ability.rb +0 -60
- data/lib/iqvoc/controller_extensions.rb +0 -111
- data/lib/iqvoc/deep_cloning.rb +0 -90
- data/lib/iqvoc/inline_data_helper.rb +0 -45
- data/lib/iqvoc/instance_configuration.rb +0 -123
- data/lib/iqvoc/maker.rb +0 -141
- data/lib/iqvoc/navigation.rb +0 -61
- data/lib/iqvoc/origin.rb +0 -111
- data/lib/iqvoc/rankable.rb +0 -33
- data/lib/iqvoc/rdfapi.rb +0 -60
- data/lib/iqvoc/skos_exporter.rb +0 -153
- data/lib/iqvoc/skos_importer.rb +0 -337
data/config/routes.rb
CHANGED
@@ -79,6 +79,8 @@ Rails.application.routes.draw do
|
|
79
79
|
get 'search' => 'search_results#index', as: 'search'
|
80
80
|
|
81
81
|
get 'help' => 'pages#help', as: 'help'
|
82
|
+
get 'version' => 'pages#version', as: 'version'
|
83
|
+
get 'components' => 'pages#components', as: 'components'
|
82
84
|
|
83
85
|
get '/' => 'frontpage#index'
|
84
86
|
# root to: 'frontpage#index', format: nil
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class AddForeignKeyConstraints < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
# user foreign keys
|
4
|
+
add_foreign_key :concepts, :users, column: 'locked_by', on_delete: :nullify, on_update: :cascade
|
5
|
+
add_foreign_key :exports, :users, column: 'user_id', on_delete: :nullify, on_update: :cascade
|
6
|
+
add_foreign_key :imports, :users, column: 'user_id', on_delete: :nullify, on_update: :cascade
|
7
|
+
|
8
|
+
# concept/collection foreign keys
|
9
|
+
add_foreign_key :concept_relations, :concepts, column: 'owner_id', on_update: :cascade
|
10
|
+
add_foreign_key :concept_relations, :concepts, column: 'target_id', on_update: :cascade
|
11
|
+
add_foreign_key :collection_members, :concepts, column: 'collection_id', on_update: :cascade
|
12
|
+
add_foreign_key :collection_members, :concepts, column: 'target_id', on_update: :cascade
|
13
|
+
add_foreign_key :labelings, :concepts, column: 'owner_id', on_update: :cascade
|
14
|
+
add_foreign_key :matches, :concepts, column: 'concept_id', on_delete: :cascade, on_update: :cascade
|
15
|
+
add_foreign_key :notations, :concepts, column: 'concept_id', on_update: :cascade
|
16
|
+
|
17
|
+
# labels
|
18
|
+
add_foreign_key :labelings, :labels, column: 'target_id', on_delete: :cascade, on_update: :cascade
|
19
|
+
|
20
|
+
# note annotations foreign keys
|
21
|
+
add_foreign_key :note_annotations, :notes, column: 'note_id', on_delete: :cascade, on_update: :cascade
|
22
|
+
end
|
23
|
+
end
|
data/iqvoc.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.description = 'iQvoc - a SKOS(-XL) vocabulary management system built on the Semantic Web'
|
14
14
|
s.license = 'Apache License 2.0'
|
15
15
|
|
16
|
-
s.add_dependency 'rails', '~> 4.
|
16
|
+
s.add_dependency 'rails', '~> 4.2.0'
|
17
17
|
s.add_dependency 'bundler'
|
18
18
|
s.add_dependency 'kaminari'
|
19
19
|
s.add_dependency 'kaminari-bootstrap', '~> 3.0.1'
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.add_dependency 'rails_autolink'
|
25
25
|
s.add_dependency 'faraday'
|
26
26
|
s.add_dependency 'faraday_middleware'
|
27
|
-
s.add_dependency 'sass-rails', '~>
|
27
|
+
s.add_dependency 'sass-rails', '~> 5.0.0'
|
28
28
|
s.add_dependency 'bootstrap-sass', '~> 3.3.1.0'
|
29
29
|
s.add_dependency 'bootstrap_form', '~> 2.2.0'
|
30
30
|
s.add_dependency 'iq_triplestorage'
|
@@ -29,13 +29,23 @@ end
|
|
29
29
|
EOF
|
30
30
|
end
|
31
31
|
|
32
|
+
create_file "lib/#{namespaced_app_name.to_s.underscore}/version.rb", <<-EOF
|
33
|
+
module #{namespaced_app_name}
|
34
|
+
VERSION = '0.0.1'
|
35
|
+
end
|
36
|
+
EOF
|
37
|
+
|
32
38
|
initializer 'iqvoc.rb', <<-EOF
|
39
|
+
require '#{namespaced_app_name.to_s.underscore}/version'
|
40
|
+
|
33
41
|
Iqvoc.config do |config|
|
34
42
|
config.register_settings({
|
35
43
|
"title" => "#{app_const_base.titleize}"
|
36
44
|
})
|
37
45
|
end
|
38
46
|
|
47
|
+
Iqvoc.host_namespace = #{namespaced_app_name}
|
48
|
+
|
39
49
|
# Iqvoc::Concept.base_class_name = "MyConceptClass"
|
40
50
|
# Iqvoc::Concept.pref_labeling_class_name = "MyLabelingClass"
|
41
51
|
# Iqvoc::Concept.further_relation_class_names << "MyConceptRelationClass"
|
@@ -55,15 +65,13 @@ EOF
|
|
55
65
|
create_file "app/assets/javascripts/#{app_path}/manifest.js"
|
56
66
|
|
57
67
|
remove_file 'app/assets/stylesheets/application.css'
|
58
|
-
create_file 'app/assets/stylesheets/manifest.css', <<-EOF
|
59
|
-
|
60
|
-
|
61
|
-
|
68
|
+
create_file 'app/assets/stylesheets/manifest.css.scss', <<-EOF
|
69
|
+
@import 'framework';
|
70
|
+
@import 'iqvoc/manifest';
|
71
|
+
@import '#{app_path}/manifest';
|
62
72
|
|
63
|
-
*= require #{app_path}/manifest
|
64
|
-
*/
|
65
73
|
EOF
|
66
|
-
create_file "app/assets/stylesheets/#{app_path}/
|
74
|
+
create_file "app/assets/stylesheets/#{app_path}/_manifest.scss"
|
67
75
|
|
68
76
|
remove_file 'public/index.html'
|
69
77
|
remove_file 'app/controllers/application_controller.rb'
|
data/lib/iqvoc.rb
CHANGED
@@ -15,7 +15,8 @@
|
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
17
|
require 'string'
|
18
|
-
require 'iqvoc/instance_configuration'
|
18
|
+
require 'iqvoc/configuration/instance_configuration'
|
19
|
+
require 'iqvoc/configuration/navigation'
|
19
20
|
require 'iqvoc/configuration/core'
|
20
21
|
require 'iqvoc/configuration/concept'
|
21
22
|
require 'iqvoc/configuration/collection'
|
@@ -20,7 +20,8 @@ module Iqvoc
|
|
20
20
|
:search_sections,
|
21
21
|
:export_path,
|
22
22
|
:upload_path,
|
23
|
-
:truncation_blacklist
|
23
|
+
:truncation_blacklist,
|
24
|
+
:host_namespace
|
24
25
|
|
25
26
|
self.localized_routes = [] # routing extensibility hook
|
26
27
|
|
@@ -93,6 +94,9 @@ module Iqvoc
|
|
93
94
|
}, {
|
94
95
|
text: proc { t('txt.views.navigation.about') },
|
95
96
|
href: 'http://iqvoc.net/'
|
97
|
+
}, {
|
98
|
+
text: proc { t('txt.views.navigation.version') },
|
99
|
+
href: proc { version_path }
|
96
100
|
}]
|
97
101
|
}]
|
98
102
|
|
@@ -123,7 +127,7 @@ module Iqvoc
|
|
123
127
|
|
124
128
|
self.first_level_class_configuration_modules = [] # Will be set in the modules
|
125
129
|
|
126
|
-
self.ability_class_name = '
|
130
|
+
self.ability_class_name = 'Ability'
|
127
131
|
|
128
132
|
self.search_sections = [
|
129
133
|
'klass',
|
@@ -158,7 +162,7 @@ module Iqvoc
|
|
158
162
|
# ************** instance configuration **************
|
159
163
|
|
160
164
|
def config(&block)
|
161
|
-
cfg = InstanceConfiguration.instance
|
165
|
+
cfg = Iqvoc::Configuration::InstanceConfiguration.instance
|
162
166
|
if block
|
163
167
|
block.call(cfg)
|
164
168
|
else
|
@@ -203,8 +207,12 @@ module Iqvoc
|
|
203
207
|
self.config.register_setting('title', value)
|
204
208
|
end
|
205
209
|
|
210
|
+
def engine?
|
211
|
+
Iqvoc.const_defined?(:Engine)
|
212
|
+
end
|
213
|
+
|
206
214
|
def root
|
207
|
-
if
|
215
|
+
if engine?
|
208
216
|
Iqvoc::Engine.root
|
209
217
|
else
|
210
218
|
Rails.root
|
@@ -217,6 +225,12 @@ module Iqvoc
|
|
217
225
|
return params[:lang].to_s =~ /^#{langs}$/
|
218
226
|
end
|
219
227
|
end
|
228
|
+
|
229
|
+
def host_version
|
230
|
+
if Iqvoc.host_namespace
|
231
|
+
Iqvoc.host_namespace::VERSION
|
232
|
+
end
|
233
|
+
end
|
220
234
|
end
|
221
235
|
end
|
222
236
|
end
|
@@ -0,0 +1,125 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
# Copyright 2011-2013 innoQ Deutschland GmbH
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
require 'singleton'
|
18
|
+
|
19
|
+
# provides the interface to configuration settings
|
20
|
+
module Iqvoc
|
21
|
+
module Configuration
|
22
|
+
class InstanceConfiguration
|
23
|
+
include Singleton
|
24
|
+
|
25
|
+
attr_reader :defaults # XXX: dangerous (mutable object)
|
26
|
+
|
27
|
+
class UnregisteredSetting < ArgumentError
|
28
|
+
def to_s
|
29
|
+
'A setting needs to be registered with register_setting before it can be used.'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def initialize
|
34
|
+
@defaults = {} # default settings
|
35
|
+
@records = {} # customized (non-default) settings
|
36
|
+
@settings = {} # current settings, using defaults as fallback
|
37
|
+
# NB: cannot cache immediately because defaults need to be registered first
|
38
|
+
end
|
39
|
+
|
40
|
+
# convenience wrapper for `register_setting` batch operations
|
41
|
+
# accepts a hash of key / default value pairs
|
42
|
+
def register_settings(settings)
|
43
|
+
settings.each do |key, default_value|
|
44
|
+
register_setting(key, default_value)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# create or update a default setting
|
49
|
+
def register_setting(key, default_value)
|
50
|
+
self.class.validate_value(default_value)
|
51
|
+
|
52
|
+
@defaults[key] = default_value
|
53
|
+
|
54
|
+
# update cache
|
55
|
+
@settings[key] = @records[key] || default_value
|
56
|
+
end
|
57
|
+
|
58
|
+
# remove a default setting
|
59
|
+
# returns nil if setting does not exist
|
60
|
+
# NB: does *not* delete configuration settings from the database
|
61
|
+
def deregister_setting(key)
|
62
|
+
res = @defaults.delete(key)
|
63
|
+
|
64
|
+
# update cache
|
65
|
+
@settings.delete(key)
|
66
|
+
|
67
|
+
return res
|
68
|
+
end
|
69
|
+
|
70
|
+
# retrieve individual setting, using default value as fallback
|
71
|
+
def [](key)
|
72
|
+
initialize_cache unless @initialized
|
73
|
+
return @settings[key]
|
74
|
+
end
|
75
|
+
|
76
|
+
# store individual customized setting
|
77
|
+
def []=(key, value)
|
78
|
+
raise UnregisteredSetting unless @defaults.include?(key)
|
79
|
+
self.class.validate_value(value)
|
80
|
+
|
81
|
+
json = JSON.dump([value])[1..-2] # temporary array wrapper ensures valid JSON text
|
82
|
+
if setting = ConfigurationSetting.find_by_key(key)
|
83
|
+
setting.update_attributes(value: json)
|
84
|
+
else
|
85
|
+
ConfigurationSetting.create(key: key, value: json)
|
86
|
+
end
|
87
|
+
|
88
|
+
# update cache
|
89
|
+
@records[key] = value
|
90
|
+
@settings[key] = value
|
91
|
+
|
92
|
+
return value
|
93
|
+
end
|
94
|
+
|
95
|
+
# populate settings caches
|
96
|
+
# (subsequent updates will happen automatically via the respective setters)
|
97
|
+
def initialize_cache
|
98
|
+
return false unless ConfigurationSetting.table_exists? # pre-migration
|
99
|
+
|
100
|
+
# cache customized settings
|
101
|
+
ConfigurationSetting.all.each do |setting|
|
102
|
+
@records[setting.key] = JSON.load("[#{setting.value}]")[0] # temporary array wrapper ensures valid JSON text
|
103
|
+
end
|
104
|
+
|
105
|
+
# cache current settings
|
106
|
+
@defaults.each do |key, default_value|
|
107
|
+
value = @records[key]
|
108
|
+
@settings[key] = value.nil? ? default_value : value
|
109
|
+
end
|
110
|
+
|
111
|
+
@initialized = true
|
112
|
+
end
|
113
|
+
|
114
|
+
# checks whether value type is supported
|
115
|
+
def self.validate_value(value) # TODO: compare type to default's? (cf. controller)
|
116
|
+
if value == nil
|
117
|
+
raise TypeError, 'nil values not supported'
|
118
|
+
end
|
119
|
+
unless [TrueClass, FalseClass, String, Fixnum, Float, Array].include?(value.class)
|
120
|
+
raise TypeError, 'complex values not supported'
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
# Copyright 2011-2013 innoQ Deutschland GmbH
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
##
|
18
|
+
# Provides a basic API wrapping low-level iQvoc config operations
|
19
|
+
# on Iqvoc.navigation_items
|
20
|
+
|
21
|
+
module Iqvoc
|
22
|
+
module Configuration
|
23
|
+
class Navigation
|
24
|
+
def self.items
|
25
|
+
Iqvoc.navigation_items
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.add(item, position = nil)
|
29
|
+
if position
|
30
|
+
items.insert(position, item)
|
31
|
+
else
|
32
|
+
items << item
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.add_grouped(item, position = nil)
|
37
|
+
index = setup_extension_group(position)
|
38
|
+
items[index][:items] << item
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
# Setup an empty navigation group for extensions
|
43
|
+
# Returns index for the new (or existing) group, so add_grouped
|
44
|
+
# can use the index to insert it's item under the group
|
45
|
+
def self.setup_extension_group(position)
|
46
|
+
group = {
|
47
|
+
text: proc { t('txt.views.navigation.extensions') },
|
48
|
+
items: []
|
49
|
+
}
|
50
|
+
|
51
|
+
if position && !items[position][:items]
|
52
|
+
items.insert(position, group)
|
53
|
+
elsif position && items[position][:items]
|
54
|
+
return position
|
55
|
+
else
|
56
|
+
items << group
|
57
|
+
end
|
58
|
+
|
59
|
+
items.index(group)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -60,6 +60,10 @@ module Iqvoc::Environments
|
|
60
60
|
# number of complex assets.
|
61
61
|
config.assets.debug = true
|
62
62
|
|
63
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
64
|
+
# yet still be able to expire them through the digest params.
|
65
|
+
config.assets.digest = true
|
66
|
+
|
63
67
|
# Adds additional error checking when serving assets at runtime.
|
64
68
|
# Checks for improperly declared sprockets dependencies.
|
65
69
|
# Raises helpful error messages.
|
@@ -19,11 +19,12 @@ module Iqvoc::Environments
|
|
19
19
|
|
20
20
|
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
21
21
|
# Add `rack-cache` to your Gemfile before enabling this.
|
22
|
-
# For large-scale production use, consider using a caching reverse proxy like
|
22
|
+
# For large-scale production use, consider using a caching reverse proxy like
|
23
|
+
# NGINX, varnish or squid.
|
23
24
|
# config.action_dispatch.rack_cache = true
|
24
25
|
|
25
|
-
# Disable Rails's static asset server (Apache or
|
26
|
-
config.
|
26
|
+
# Disable Rails's static asset server (Apache or NGINX will already do this).
|
27
|
+
config.serve_static_files = false
|
27
28
|
|
28
29
|
# Compress JavaScripts and CSS.
|
29
30
|
config.assets.js_compressor = :uglifier
|
@@ -32,21 +33,22 @@ module Iqvoc::Environments
|
|
32
33
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
33
34
|
config.assets.compile = false
|
34
35
|
|
35
|
-
#
|
36
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
37
|
+
# yet still be able to expire them through the digest params.
|
36
38
|
config.assets.digest = true
|
37
39
|
|
38
40
|
# Version of your assets, change this if you want to expire all your assets.
|
39
41
|
config.assets.version = '1.0'
|
40
42
|
|
41
43
|
# Specifies the header that your server uses for sending files.
|
42
|
-
# config.action_dispatch.x_sendfile_header =
|
43
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for
|
44
|
+
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
45
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
44
46
|
|
45
47
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
46
48
|
# config.force_ssl = true
|
47
49
|
|
48
|
-
#
|
49
|
-
config.log_level = :
|
50
|
+
# Decrease the log volume.
|
51
|
+
config.log_level = :debug
|
50
52
|
|
51
53
|
# Prepend all log lines with the following tags.
|
52
54
|
# config.log_tags = [ :subdomain, :uuid ]
|
@@ -58,7 +60,7 @@ module Iqvoc::Environments
|
|
58
60
|
# config.cache_store = :mem_cache_store
|
59
61
|
|
60
62
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
61
|
-
# config.action_controller.asset_host =
|
63
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
62
64
|
|
63
65
|
# Ignore bad email addresses and do not raise email delivery errors.
|
64
66
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
@@ -71,9 +73,6 @@ module Iqvoc::Environments
|
|
71
73
|
# Send deprecation notices to registered listeners.
|
72
74
|
config.active_support.deprecation = :notify
|
73
75
|
|
74
|
-
# Disable automatic flushing of the log to improve performance.
|
75
|
-
# config.autoflush_log = false
|
76
|
-
|
77
76
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
78
77
|
config.log_formatter = ::Logger::Formatter.new
|
79
78
|
|