iqvoc 4.7.0 → 4.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/Gemfile +11 -11
  4. data/Gemfile.lock +178 -122
  5. data/README.md +39 -24
  6. data/{test/performance/browsing_test.rb → app/aides/inline_data_helper.rb} +23 -6
  7. data/app/aides/maker.rb +139 -0
  8. data/{lib → app/aides}/multi_logger.rb +0 -0
  9. data/app/aides/origin.rb +47 -0
  10. data/app/aides/rdfapi.rb +59 -0
  11. data/app/aides/skos_exporter.rb +151 -0
  12. data/app/aides/skos_importer.rb +348 -0
  13. data/app/assets/javascripts/iqvoc/entityselect.js.erb +7 -9
  14. data/app/controllers/application_controller.rb +1 -3
  15. data/app/controllers/collections/versions_controller.rb +1 -3
  16. data/app/controllers/concepts/versions_controller.rb +9 -3
  17. data/app/controllers/concerns/controller_extensions.rb +109 -0
  18. data/app/{concerns → controllers/concerns}/reverse_match_errors.rb +0 -0
  19. data/app/controllers/hierarchy_controller.rb +7 -3
  20. data/app/controllers/instance_configuration_controller.rb +1 -1
  21. data/app/controllers/pages_controller.rb +10 -0
  22. data/app/controllers/search_results_controller.rb +2 -2
  23. data/app/controllers/triplestore_sync_controller.rb +2 -4
  24. data/app/helpers/application_helper.rb +1 -1
  25. data/app/helpers/widget_helper.rb +3 -3
  26. data/app/jobs/export_job.rb +1 -3
  27. data/app/jobs/import_job.rb +1 -3
  28. data/app/models/ability.rb +59 -0
  29. data/app/models/abstract_user.rb +1 -1
  30. data/app/models/collection/base.rb +12 -3
  31. data/app/models/collection/member/skos/base.rb +1 -1
  32. data/app/models/concept/base.rb +15 -8
  33. data/app/models/concept/relation/base.rb +1 -1
  34. data/app/models/concept/relation/skos/base.rb +1 -1
  35. data/app/models/concept/skos/scheme.rb +1 -1
  36. data/app/models/concept/validations.rb +1 -1
  37. data/app/models/concerns/deep_cloning.rb +92 -0
  38. data/app/models/concerns/first_level_object_scopes.rb +9 -0
  39. data/app/{concerns → models/concerns}/first_level_object_validations.rb +9 -2
  40. data/app/models/concerns/rankable.rb +31 -0
  41. data/app/models/{search_extension.rb → concerns/search_extension.rb} +0 -0
  42. data/app/{concerns → models/concerns}/versioning.rb +0 -6
  43. data/app/models/configuration_setting.rb +1 -1
  44. data/app/models/labeling/skos/base.rb +2 -2
  45. data/app/models/match/skos/base.rb +2 -2
  46. data/app/models/note/skos/base.rb +7 -6
  47. data/app/models/note/skos/change_note.rb +1 -1
  48. data/{lib/iqvoc/rdf_sync.rb → app/services/rdf_sync_service.rb} +3 -3
  49. data/app/view_models/concept_view.rb +1 -1
  50. data/app/views/collections/_form.html.erb +2 -2
  51. data/app/views/concepts/scheme/edit.html.erb +1 -1
  52. data/app/views/pages/components.html.erb +45 -0
  53. data/app/views/pages/version.html.erb +6 -0
  54. data/app/views/partials/concept/_reverse_match_notice.html.erb +0 -1
  55. data/app/views/search_results/_sidebar.html.erb +3 -3
  56. data/config/application.rb +4 -1
  57. data/config/boot.rb +1 -2
  58. data/config/database.yml.postgresql +23 -0
  59. data/config/engine.rb +0 -2
  60. data/config/environments/heroku.rb +1 -1
  61. data/config/initializers/inflections.rb +9 -3
  62. data/config/initializers/iqvoc.rb +1 -7
  63. data/config/initializers/mime_types.rb +0 -1
  64. data/config/locales/de.yml +2 -1
  65. data/config/locales/en.yml +11 -10
  66. data/config/routes.rb +2 -0
  67. data/config/travis/database.yml.mysql +9 -0
  68. data/config/travis/database.yml.postgresql +7 -0
  69. data/config/travis/database.yml.sqlite +5 -0
  70. data/db/migrate/20141204151558_add_foreign_key_constraints.rb +23 -0
  71. data/iqvoc.gemspec +2 -2
  72. data/lib/generators/app/template.rb +15 -7
  73. data/lib/iqvoc.rb +2 -1
  74. data/lib/iqvoc/configuration/core.rb +18 -4
  75. data/lib/iqvoc/configuration/instance_configuration.rb +125 -0
  76. data/lib/iqvoc/configuration/navigation.rb +63 -0
  77. data/lib/iqvoc/environments/development.rb +4 -0
  78. data/lib/iqvoc/environments/production.rb +11 -12
  79. data/lib/iqvoc/environments/test.rb +4 -1
  80. data/lib/iqvoc/version.rb +2 -2
  81. data/lib/tasks/exporter.rake +1 -4
  82. data/lib/tasks/importer.rake +1 -5
  83. data/lib/tasks/sync.rake +1 -2
  84. data/test/controllers/concept_movement_test.rb +11 -11
  85. data/test/controllers/hierarchy_test.rb +83 -79
  86. data/test/controllers/reverse_match_test.rb +2 -2
  87. data/test/integration/alphabetical_test.rb +2 -3
  88. data/test/integration/browse_concepts_and_labels_test.rb +2 -2
  89. data/test/integration/collection_circularity_test.rb +6 -6
  90. data/test/integration/concept_scheme_browsing_test.rb +2 -2
  91. data/test/integration/edit_concepts_test.rb +1 -1
  92. data/test/integration/export_test.rb +5 -3
  93. data/test/integration/import_test.rb +4 -1
  94. data/test/integration/instance_configuration_browsing_test.rb +2 -2
  95. data/test/integration/navigation_test.rb +2 -2
  96. data/test/integration/note_annotations_test.rb +12 -11
  97. data/test/integration/reverse_match_job_test.rb +19 -10
  98. data/test/integration/search_test.rb +6 -6
  99. data/test/integration/tree_test.rb +3 -3
  100. data/test/integration/untranslated_test.rb +1 -1
  101. data/test/models/concept_test.rb +13 -14
  102. data/test/models/inline_data_test.rb +9 -9
  103. data/test/models/instance_configuration_test.rb +7 -3
  104. data/test/models/origin_test.rb +9 -59
  105. data/test/models/rdf_sync_test.rb +2 -4
  106. data/test/models/rdfapi_test.rb +0 -2
  107. data/test/models/skos_collection_import_test.rb +3 -4
  108. data/test/models/skos_export_test.rb +3 -5
  109. data/test/models/skos_import_test.rb +12 -10
  110. data/test/test_helper.rb +0 -1
  111. data/vendor/assets/stylesheets/{jquery-ui.css.scss → jquery-ui.scss} +0 -0
  112. data/vendor/assets/stylesheets/{jquery-ui.structure.css.scss → jquery-ui.structure.scss} +0 -0
  113. data/vendor/assets/stylesheets/{jquery-ui.theme.css.scss → jquery-ui.theme.scss} +0 -0
  114. metadata +34 -28
  115. data/lib/iqvoc/ability.rb +0 -60
  116. data/lib/iqvoc/controller_extensions.rb +0 -111
  117. data/lib/iqvoc/deep_cloning.rb +0 -90
  118. data/lib/iqvoc/inline_data_helper.rb +0 -45
  119. data/lib/iqvoc/instance_configuration.rb +0 -123
  120. data/lib/iqvoc/maker.rb +0 -141
  121. data/lib/iqvoc/navigation.rb +0 -61
  122. data/lib/iqvoc/origin.rb +0 -111
  123. data/lib/iqvoc/rankable.rb +0 -33
  124. data/lib/iqvoc/rdfapi.rb +0 -60
  125. data/lib/iqvoc/skos_exporter.rb +0 -153
  126. data/lib/iqvoc/skos_importer.rb +0 -337
@@ -0,0 +1,9 @@
1
+ module FirstLevelObjectScopes
2
+ extend ActiveSupport::Concern
3
+
4
+ module ClassMethods
5
+ def ordered_by_pref_label
6
+ includes(:pref_labels).order('labels.value ASC')
7
+ end
8
+ end
9
+ end
@@ -5,6 +5,13 @@ module FirstLevelObjectValidations
5
5
 
6
6
  included do
7
7
  validate :distinct_versions, on: :create # FIXME: on: :create?
8
+ validate :origin_has_to_be_escaped
9
+ end
10
+
11
+ def origin_has_to_be_escaped
12
+ unless Origin.new(origin).valid?
13
+ errors.add :origin, I18n.t('txt.models.concept.origin_error')
14
+ end
8
15
  end
9
16
 
10
17
  def distinct_versions
@@ -13,8 +20,8 @@ module FirstLevelObjectValidations
13
20
  if existing_total >= 2
14
21
  errors.add :base, I18n.t('txt.models.concept.version_error', origin: origin)
15
22
  elsif existing_total == 1
16
- unless (query.published.count == 0 and published?) or
17
- (query.published.count == 1 and not published?)
23
+ unless (query.published.count == 0 && published?) or
24
+ (query.published.count == 1 && !published?)
18
25
  errors.add :base, I18n.t('txt.models.concept.version_error', origin: origin)
19
26
  end
20
27
  end
@@ -0,0 +1,31 @@
1
+ require 'active_support/concern'
2
+
3
+ module Rankable
4
+ extend ActiveSupport::Concern
5
+
6
+ def build_rdf(document, subject, suppress_extra_labels = false)
7
+ super
8
+ if self.class.rankable?
9
+ predicate = "ranked#{rdf_predicate.titleize}"
10
+
11
+ subject.Schema.build_predicate(predicate) do |blank_node|
12
+ blank_node.Schema.relationWeight(rank)
13
+ blank_node.Schema.relationTarget(IqRdf.build_uri(target.origin))
14
+ end
15
+ end
16
+ end
17
+
18
+ module ClassMethods
19
+ def rankable?
20
+ true
21
+ end
22
+
23
+ def partial_name(obj)
24
+ 'partials/concept/relation/ranked'
25
+ end
26
+
27
+ def edit_partial_name(obj)
28
+ 'partials/concept/relation/edit_ranked'
29
+ end
30
+ end
31
+ end
@@ -96,12 +96,6 @@ module Versioning
96
96
  new_version.increment(:rev)
97
97
  new_version.published_version_id = self.id
98
98
  new_version.unpublish
99
- new_version.send(:"#{Iqvoc.change_note_class_name.to_relation_name}").build(
100
- language: I18n.locale.to_s,
101
- annotations_attributes: [
102
- { namespace: 'dct', predicate: 'creator', value: user.name },
103
- { namespace: 'dct', predicate: 'modified', value: DateTime.now.to_s }
104
- ])
105
99
  new_version
106
100
  end
107
101
 
@@ -14,7 +14,7 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
 
17
- # NB: not to be used directly, but only through Iqvoc::InstanceConfiguration
17
+ # NB: not to be used directly, but only through InstanceConfiguration
18
18
  class ConfigurationSetting < ActiveRecord::Base # TODO: make private, somehow?
19
19
  validates :key, uniqueness: true
20
20
  end
@@ -94,7 +94,7 @@ class Labeling::SKOS::Base < Labeling::Base
94
94
  raise "#{self.name}#build_from_rdf: Subject (#{rdf_subject}) must be a Concept."
95
95
  end
96
96
 
97
- unless rdf_object =~ Iqvoc::RDFAPI::LITERAL_REGEXP
97
+ unless rdf_object =~ RDFAPI::LITERAL_REGEXP
98
98
  raise InvalidStringLiteralError, "#{self.name}#build_from_rdf: Object (#{rdf_object}) must be a string literal"
99
99
  end
100
100
 
@@ -105,7 +105,7 @@ class Labeling::SKOS::Base < Labeling::Base
105
105
  $1
106
106
  end
107
107
 
108
- predicate_class = Iqvoc::RDFAPI::PREDICATE_DICTIONARY[rdf_predicate] || self
108
+ predicate_class = RDFAPI::PREDICATE_DICTIONARY[rdf_predicate] || self
109
109
  predicate_class.new(target: self.label_class.new(value: value, language: lang)).tap do |labeling|
110
110
  rdf_subject.send(predicate_class.name.to_relation_name) << labeling
111
111
  end
@@ -18,11 +18,11 @@ class Match::SKOS::Base < Match::Base
18
18
  self.rdf_namespace = 'skos'
19
19
 
20
20
  def self.build_from_rdf(rdf_subject, rdf_predicate, rdf_object)
21
- raise "#{self.class}#build_from_rdf: Subject (#{rdf_subject}) must be able to receive this kind of match (#{self.name} => #{self.name.to_relation_name})." unless rdf_subject.class.reflections.include?(self.name.to_relation_name)
21
+ raise "#{self.class}#build_from_rdf: Subject (#{rdf_subject}) must be able to receive this kind of match (#{self.name} => #{self.name.to_relation_name})." unless rdf_subject.class.reflections.include?(self.name.to_relation_name.to_s)
22
22
  raise "#{self.class}#build_from_rdf: Object (#{rdf_object}) must be a URI" unless rdf_object =~ /^<(.+)>$/ # XXX: this assumes nt-format, right?
23
23
  uri = $1
24
24
 
25
- match_class = Iqvoc::RDFAPI::PREDICATE_DICTIONARY[rdf_predicate] || self
25
+ match_class = RDFAPI::PREDICATE_DICTIONARY[rdf_predicate] || self
26
26
  match_class.new(value: uri).tap do |match|
27
27
  rdf_subject.send(self.name.to_relation_name) << match
28
28
  end
@@ -18,14 +18,15 @@ class Note::SKOS::Base < Note::Base
18
18
  self.rdf_namespace = 'skos'
19
19
 
20
20
  def self.build_from_rdf(rdf_subject, rdf_predicate, rdf_object)
21
- unless rdf_subject.class.reflections.include?(self.name.to_relation_name)
22
- raise "#{self.name}#build_from_rdf: Subject (#{rdf_subject}) must be able to receive this kind of note (#{self.name} => #{self.name.to_relation_name})."
21
+ # https://github.com/rails/rails/issues/16928
22
+ unless rdf_subject.class.reflections.include?(self.name.to_relation_name.to_s)
23
+ raise "#{self.name}#build_from_rdf: Subject (#{rdf_subject}) must be able to receive this kind of note (#{self.name} => #{self.name.to_relation_name.to_s})."
23
24
  end
24
25
 
25
- target_class = Iqvoc::RDFAPI::PREDICATE_DICTIONARY[rdf_predicate] || self
26
+ target_class = RDFAPI::PREDICATE_DICTIONARY[rdf_predicate] || self
26
27
  case rdf_object
27
28
  when String # Literal
28
- unless rdf_object =~ Iqvoc::RDFAPI::LITERAL_REGEXP
29
+ unless rdf_object =~ RDFAPI::LITERAL_REGEXP
29
30
  raise "#{self.name}#build_from_rdf: Object (#{rdf_object}) must be a string literal"
30
31
  end
31
32
  lang = $3
@@ -50,9 +51,9 @@ class Note::SKOS::Base < Note::Base
50
51
  if annotations.any?
51
52
  subject.send(rdf_namespace).build_predicate(rdf_predicate) do |blank_node|
52
53
  blank_node.Rdfs::comment(value, lang: language || nil) if value
53
- annotations.each do |annotation|
54
+ annotations.order(:namespace, :predicate).each do |annotation|
54
55
  if IqRdf::Namespace.find_namespace_class(annotation.namespace)
55
- val = if annotation.value =~ Iqvoc::RDFAPI::URI_REGEXP
56
+ val = if annotation.value =~ RDFAPI::URI_REGEXP
56
57
  # Fall back to plain value literal if URI is not parseable
57
58
  URI.parse(annotation.value) rescue annotation.value
58
59
  else
@@ -36,7 +36,7 @@ class Note::SKOS::ChangeNote < Note::SKOS::Base
36
36
  def build_rdf(document, subject)
37
37
  subject.send(self.rdf_namespace).build_predicate(self.rdf_predicate) do |blank_node|
38
38
  blank_node.Rdfs::comment(self.value, lang: self.language || nil) if self.value
39
- self.annotations.each do |annotation|
39
+ self.annotations.order(:namespace, :predicate).each do |annotation|
40
40
  if (IqRdf::Namespace.find_namespace_class(annotation.namespace))
41
41
  blank_node.send(annotation.namespace.camelcase).send(annotation.predicate, annotation.value)
42
42
  else
@@ -1,6 +1,6 @@
1
1
  # encoding: UTF-8
2
2
 
3
- class Iqvoc::RDFSync
3
+ class RDFSyncService
4
4
  delegate :url_helpers, to: 'Rails.application.routes'
5
5
 
6
6
  ADAPTORS = { # XXX: inappropriate?
@@ -105,11 +105,11 @@ class Iqvoc::RDFSync
105
105
  end
106
106
  end
107
107
 
108
- module Iqvoc::RDFSync::Helper # TODO: rename -- XXX: does not belong here!?
108
+ module RDFSyncService::Helper # TODO: rename -- XXX: does not belong here!?
109
109
  def triplestore_syncer
110
110
  base_url = root_url(lang: nil) # XXX: brittle in the face of future changes?
111
111
 
112
- return Iqvoc::RDFSync.new(base_url, Iqvoc.config['triplestore.url'],
112
+ return RDFSyncService.new(base_url, Iqvoc.config['triplestore.url'],
113
113
  username: Iqvoc.config['triplestore.username'].presence,
114
114
  password: Iqvoc.config['triplestore.password'].presence,
115
115
  view_context: view_context) # fugly, but necessary; cf. RDFSync#serialize
@@ -30,7 +30,7 @@ class ConceptView
30
30
  end
31
31
 
32
32
  def no_content?
33
- definition.blank? || alt_labels.none? || related.none? || collections.none?
33
+ definition.blank? && alt_labels.none? && related.none? && collections.none?
34
34
  end
35
35
 
36
36
  # returns a string
@@ -25,7 +25,7 @@
25
25
  <fieldset>
26
26
  <legend><%= Iqvoc::Concept.base_class.model_name.human(:count => 2) %></legend>
27
27
  <%= f.form_group :inline_member_concept_origins, :label => {:text => t('txt.common.type_to_search')} do %>
28
- <%= text_field_tag "concept[inline_member_concept_origins]", @collection.inline_member_concept_origins.join(Iqvoc::InlineDataHelper::JOINER),
28
+ <%= text_field_tag "concept[inline_member_concept_origins]", @collection.inline_member_concept_origins.join(InlineDataHelper::JOINER),
29
29
  :class => "entity_select",
30
30
  :"data-query-url" => concepts_path(:format => :json),
31
31
  :"data-entity-uri" => concept_path(:id => "{id}"),
@@ -37,7 +37,7 @@
37
37
  <fieldset>
38
38
  <legend><%= Iqvoc::Collection.base_class.model_name.human(:count => 2) %></legend>
39
39
  <%= f.form_group :inline_member_concept_origins, :label => {:text => t('txt.common.type_to_search')} do %>
40
- <%= text_field_tag "concept[inline_member_collection_origins]", @collection.inline_member_collection_origins.join(Iqvoc::InlineDataHelper::JOINER),
40
+ <%= text_field_tag "concept[inline_member_collection_origins]", @collection.inline_member_collection_origins.join(InlineDataHelper::JOINER),
41
41
  :class => "entity_select",
42
42
  :"data-query-url" => collections_path(:format => :json),
43
43
  :"data-entity-uri" => collection_path(:id => "{id}"),
@@ -17,7 +17,7 @@
17
17
  <fieldset>
18
18
  <legend><%= Iqvoc::Concept.base_class.model_name.human(:count => 2) %></legend>
19
19
  <%= f.form_group :inline_top_concept_origins, :label => { :text => t('txt.common.type_to_search') } do %>
20
- <%= text_field_tag "concept[inline_top_concept_origins]", @scheme.inline_top_concept_origins.join(Iqvoc::InlineDataHelper::JOINER),
20
+ <%= text_field_tag "concept[inline_top_concept_origins]", @scheme.inline_top_concept_origins.join(InlineDataHelper::JOINER),
21
21
  :class => "entity_select",
22
22
  :"data-query-url" => concepts_path(:format => :json),
23
23
  :"data-entity-uri" => concept_path(:id => "{id}"),
@@ -0,0 +1,45 @@
1
+ <%= page_header :title => "iQvoc Front-end Components" %>
2
+
3
+ <h2>Entity Selector</h2>
4
+
5
+ <p>multi-selection with auto-completion</p>
6
+
7
+ <p>
8
+ the selection is transmitted as comma-separated values via the original
9
+ <code class="language-html">input</code> field
10
+ </p>
11
+
12
+ <p>typically used for choosing associated concepts from the thesaurus</p>
13
+
14
+ <input type="text" class="entity_select"
15
+ data-query-url="<%= @concepts_uri %>"
16
+ data-entity-uri="<%= @concept_uri %>"
17
+ data-entities="<%= [{ id: "foo", name: "Foo" }, { id: "bar", name: "Bar" }].to_json %>"
18
+ data-no-results-msg="No results">
19
+
20
+ <p>
21
+ <code class="language-html">data-singular="true"</code> restricts selection to
22
+ a single item single item (e.g. for choosing a parent within mono hierarchies)
23
+ </p>
24
+
25
+ <input type="text" class="entity_select"
26
+ data-query-url="<%= @concepts_uri %>"
27
+ data-entity-uri="<%= @concept_uri %>"
28
+ data-singular="true"
29
+ data-no-results-msg="No results">
30
+
31
+ <p>
32
+ <code class="language-html">data-qualified="rank"</code> (with "rank" being an
33
+ arbitrary identifier) can be used to add an additional qualifier to selected
34
+ items, typically for ordering - these qualifiers are appended to the
35
+ respective value with a colon
36
+ </p>
37
+
38
+ <p>NB: requires <code class="language-javascript">QualifiedEntitySelector</code></p>
39
+
40
+ <input type="text" class="entity_select"
41
+ data-query-url="<%= @concepts_uri %>"
42
+ data-entity-uri="<%= @concept_uri %>"
43
+ data-entities="<%= [{ id: "foo", name: "Foo", rank: 100 }].to_json %>"
44
+ data-qualified="rank"
45
+ data-no-results-msg="No results">
@@ -0,0 +1,6 @@
1
+ <pre>
2
+ Iqvoc <%= Iqvoc::VERSION %>
3
+ <% if Iqvoc.host_version %>
4
+ <%= "#{Iqvoc.host_namespace} #{Iqvoc.host_version}" %>
5
+ <% end %>
6
+ </pre>
@@ -1,4 +1,3 @@
1
- <%# binding.pry %>
2
1
  <%= alert :warning, :header => t('txt.views.concepts.pending_jobs_header') + "." do %>
3
2
  <%= t("txt.views.concepts.pending_jobs_message") %>
4
3
  <ol>
@@ -1,8 +1,8 @@
1
1
  <% if results %>
2
2
  <%= sidebar do %>
3
3
  <%= sidebar_header t('txt.common.representations') %>
4
- <%= sidebar_item :icon => 'link', :text => 'RDF/XML', :path => rdf_search_path(request.query_parameters.merge(:format => :rdf, :lang => nil, :page => results.current_page, :only_path => false)), :id => 'rdf_link_xml' %>
5
- <%= sidebar_item :icon => 'link', :text => 'RDF/Turtle', :path => rdf_search_path(request.query_parameters.merge(:format => :ttl, :lang => nil, :page => @results.current_page, :only_path => false)), :id => 'rdf_link_ttl' %>
6
- <%= sidebar_item :icon => 'link', :text => 'RDF/NTriples', :path => rdf_search_path(request.query_parameters.merge(:format => :nt, :lang => nil, :page => @results.current_page, :only_path => false)), :id => 'rdf_link_nt' %>
4
+ <%= sidebar_item :icon => 'link', :text => 'RDF/XML', :path => rdf_search_path({:lang => nil, :page => results.current_page, :format => :rdf}.merge(request.query_parameters)), :id => 'rdf_link_xml' %>
5
+ <%= sidebar_item :icon => 'link', :text => 'RDF/Turtle', :path => rdf_search_path({:lang => nil, :page => @results.current_page, :format => :ttl}.merge(request.query_parameters)), :id => 'rdf_link_ttl' %>
6
+ <%= sidebar_item :icon => 'link', :text => 'RDF/NTriples', :path => rdf_search_path({:lang => nil, :page => @results.current_page, :format => :nt}.merge(request.query_parameters)), :id => 'rdf_link_nt' %>
7
7
  <% end %>
8
8
  <% end %>
@@ -1,6 +1,6 @@
1
1
  # encoding: UTF-8
2
2
 
3
- # Copyright 2011-2013 innoQ Deutschland GmbH
3
+ # Copyright 2011-2014 innoQ Deutschland GmbH
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -35,5 +35,8 @@ module Iqvoc
35
35
  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
36
36
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
37
37
  # config.i18n.default_locale = :de
38
+
39
+ # Do not swallow errors in after_commit/after_rollback callbacks.
40
+ config.active_record.raise_in_transactional_callbacks = true
38
41
  end
39
42
  end
@@ -14,7 +14,6 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
 
17
- # Set up gems listed in the Gemfile.
18
17
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
19
18
 
20
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
19
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -0,0 +1,23 @@
1
+ development:
2
+ adapter: postgresql
3
+ encoding: unicode
4
+ database: iqvoc_development
5
+ pool: 5
6
+ username: root
7
+ password:
8
+
9
+ test:
10
+ adapter: postgresql
11
+ encoding: unicode
12
+ database: iqvoc_test
13
+ pool: 5
14
+ username: root
15
+ password:
16
+
17
+ production:
18
+ adapter: postgresql
19
+ encoding: unicode
20
+ database: iqvoc_production
21
+ pool: 5
22
+ username: root
23
+ password:
@@ -20,8 +20,6 @@ require 'database_cleaner'
20
20
  require 'delayed_job_active_record'
21
21
  require 'carrierwave'
22
22
 
23
- require 'iqvoc/controller_extensions'
24
-
25
23
  module Iqvoc
26
24
  class Engine < Rails::Engine
27
25
  paths['lib/tasks'] << 'lib/engine_tasks'
@@ -37,7 +37,7 @@ if Iqvoc.const_defined?(:Application)
37
37
  # config.action_dispatch.rack_cache = true
38
38
 
39
39
  # Disable Rails's static asset server (Apache or nginx will already do this).
40
- config.serve_static_assets = true
40
+ config.serve_static_files = true
41
41
 
42
42
  # Compress JavaScripts and CSS.
43
43
  config.assets.js_compressor = :uglifier
@@ -16,11 +16,17 @@
16
16
 
17
17
  # Be sure to restart your server when you modify this file.
18
18
 
19
- # Add new inflection rules using the following format
20
- # (all these examples are active by default):
21
- # ActiveSupport::Inflector.inflections do |inflect|
19
+ # Add new inflection rules using the following format. Inflections
20
+ # are locale specific, and you may define rules for as many different
21
+ # locales as you wish. All of these examples are active by default:
22
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
22
23
  # inflect.plural /^(ox)$/i, '\1en'
23
24
  # inflect.singular /^(ox)en/i, '\1'
24
25
  # inflect.irregular 'person', 'people'
25
26
  # inflect.uncountable %w( fish sheep )
26
27
  # end
28
+
29
+ # These inflection rules are supported but not enabled by default:
30
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
31
+ # inflect.acronym 'RESTful'
32
+ # end
@@ -15,15 +15,9 @@
15
15
  # limitations under the License.
16
16
 
17
17
  require 'iqvoc'
18
- require 'iqvoc/origin'
19
- require 'iqvoc/inline_data_helper'
20
18
  require 'iqvoc/version'
21
- require 'iqvoc/deep_cloning'
22
- require 'iqvoc/rankable'
23
- require 'iqvoc/ability'
24
- require 'iqvoc/navigation'
25
19
 
26
- ActiveRecord::Base.send :include, Iqvoc::DeepCloning
20
+ ActiveRecord::Base.send :include, DeepCloning
27
21
 
28
22
  ##### INSTANCE SETTINGS #####
29
23
 
@@ -18,7 +18,6 @@
18
18
 
19
19
  # Add new mime types for use in respond_to blocks:
20
20
  # Mime::Type.register "text/richtext", :rtf
21
- # Mime::Type.register_alias "text/html", :iphone
22
21
 
23
22
  Mime::Type.register 'application/rdf+xml', :rdf
24
23
  Mime::Type.register 'text/turtle', :ttl
@@ -182,7 +182,8 @@ de:
182
182
  draft: "Bearbeitung"
183
183
  expired: "Abgelaufene"
184
184
  search: "Suche"
185
- about: "Über"
185
+ about: "Über iQvoc"
186
+ version: "Version"
186
187
  users: "Benutzer"
187
188
  collections: "Kollektionen"
188
189
  login: "Login"
@@ -106,15 +106,15 @@ en:
106
106
  triplestore: triplestore
107
107
  sources: Federation
108
108
  settings:
109
- title: site title
110
- languages_notes: languages for notes
111
- languages_pref_labeling: languages for preferred labels
112
- languages_further_labelings_Labeling::SKOS::AltLabel: languages for alternative labels
113
- performance_unbounded_hierarchy: unlimited hierarchy depth
114
- triplestore_url: triplestore URL
115
- triplestore_username: username for triplestore
116
- triplestore_password: password for triplestore
117
- triplestore_autosync: automatic triplestore synchronization
109
+ title: Site title
110
+ languages_notes: Languages for notes
111
+ languages_pref_labeling: Languages for preferred labels
112
+ languages_further_labelings_Labeling::SKOS::AltLabel: Languages for alternative labels
113
+ performance_unbounded_hierarchy: Unlimited hierarchy depth
114
+ triplestore_url: Triplestore URL
115
+ triplestore_username: Username for triplestore
116
+ triplestore_password: Password for triplestore
117
+ triplestore_autosync: Automatic triplestore synchronization
118
118
  sources_iqvoc: Sources (iQvoc)
119
119
  alphabetical_concepts:
120
120
  untranslated_concepts:
@@ -190,7 +190,8 @@ en:
190
190
  draft: "Draft"
191
191
  expired: "Expired"
192
192
  search: "Search"
193
- about: "About"
193
+ about: "About iQvoc"
194
+ version: "Version"
194
195
  users: "Users"
195
196
  collections: "Collections"
196
197
  login: "Login"