iqvoc 4.2.0 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/Gemfile +15 -12
  4. data/Gemfile.lock +124 -90
  5. data/README.md +17 -1
  6. data/app/assets/images/iqvoc_logo.svg +41 -0
  7. data/app/assets/javascripts/framework.js +1 -1
  8. data/app/assets/javascripts/iqvoc/concept_mapper.js +62 -0
  9. data/app/assets/javascripts/iqvoc/concept_mapping_manager.js +137 -0
  10. data/app/assets/javascripts/iqvoc/entityselect.js.erb +51 -19
  11. data/app/assets/javascripts/iqvoc/federated_concept_mapper.js +75 -0
  12. data/app/assets/javascripts/iqvoc/iqvoc.js +16 -4
  13. data/app/assets/javascripts/iqvoc/label_resolver.js +23 -0
  14. data/app/assets/javascripts/iqvoc/manifest.js +4 -0
  15. data/app/assets/javascripts/iqvoc/onebox.js.erb +4 -4
  16. data/app/assets/javascripts/iqvoc/quicksearch.js +1 -1
  17. data/app/assets/stylesheets/framework.css.scss +2 -1
  18. data/app/assets/stylesheets/iqvoc/_settings.css.scss +12 -0
  19. data/app/assets/stylesheets/iqvoc/components/_components.css.scss +237 -0
  20. data/app/assets/stylesheets/iqvoc/{entity_select.css.scss → components/_entity_select.css.scss} +0 -2
  21. data/app/assets/stylesheets/iqvoc/{forms.css.scss → components/_forms.css.scss} +0 -0
  22. data/app/assets/stylesheets/iqvoc/{note.css.scss → components/_notes.css.scss} +2 -10
  23. data/app/assets/stylesheets/iqvoc/{panel.css.scss → components/_panels.css.scss} +3 -5
  24. data/app/assets/stylesheets/iqvoc/{sidebar.css.scss → components/_sidebars.css.scss} +0 -0
  25. data/app/assets/stylesheets/iqvoc/{visualization.css.scss → components/_visualization.css.scss} +0 -0
  26. data/app/assets/stylesheets/iqvoc/{bootstrap_extensions.css.scss → hacks/_bootstrap_extensions.css.scss} +0 -0
  27. data/app/assets/stylesheets/iqvoc/{hacks.css.scss → hacks/_hacks.css.scss} +0 -0
  28. data/app/assets/stylesheets/iqvoc/{jquery-ui_extensions.css.scss → hacks/_jquery-ui_extensions.css.scss} +0 -0
  29. data/app/assets/stylesheets/iqvoc/manifest.css.scss +10 -10
  30. data/app/controllers/concepts/alphabetical_controller.rb +23 -9
  31. data/app/controllers/concepts/scheme_controller.rb +19 -0
  32. data/app/controllers/concepts_controller.rb +13 -1
  33. data/app/controllers/concerns/dataset_initialization.rb +18 -0
  34. data/app/controllers/dashboard_controller.rb +17 -0
  35. data/app/controllers/hierarchy_controller.rb +65 -6
  36. data/app/controllers/{import_controller.rb → imports_controller.rb} +14 -11
  37. data/app/controllers/rdf_controller.rb +6 -0
  38. data/app/controllers/remote_labels_controller.rb +31 -0
  39. data/app/controllers/search_results_controller.rb +95 -14
  40. data/app/helpers/application_helper.rb +6 -4
  41. data/app/helpers/dashboard_helper.rb +3 -3
  42. data/app/helpers/link_helper.rb +14 -0
  43. data/app/helpers/search_results_helper.rb +5 -1
  44. data/app/jobs/import_job.rb +19 -0
  45. data/app/models/concept/base.rb +2 -2
  46. data/app/models/dataset/adaptors/iqvoc/alphabetical_search_adaptor.rb +38 -0
  47. data/app/models/dataset/adaptors/iqvoc/http_adaptor.rb +39 -0
  48. data/app/models/dataset/adaptors/iqvoc/label_adaptor.rb +15 -0
  49. data/app/models/dataset/adaptors/iqvoc/search_adaptor.rb +60 -0
  50. data/app/models/dataset/iqvoc_dataset.rb +39 -0
  51. data/app/models/import.rb +16 -0
  52. data/app/models/labeling/skos/base.rb +2 -1
  53. data/app/models/note/base.rb +2 -2
  54. data/app/models/note/skos/change_note.rb +3 -2
  55. data/app/presenters/alphabetical_search_result.rb +33 -0
  56. data/app/presenters/alphabetical_search_result_remote.rb +37 -0
  57. data/app/presenters/search_result.rb +33 -0
  58. data/app/presenters/search_result_collection.rb +8 -0
  59. data/app/presenters/search_result_remote.rb +52 -0
  60. data/app/views/collections/_sidebar.html.erb +3 -3
  61. data/app/views/concepts/_form.html.erb +1 -1
  62. data/app/views/concepts/alphabetical/_search_result.html.erb +16 -0
  63. data/app/views/concepts/alphabetical/_search_result_remote.html.erb +14 -0
  64. data/app/views/concepts/alphabetical/index.html.erb +5 -3
  65. data/app/views/concepts/expired/index.html.erb +5 -2
  66. data/app/views/concepts/scheme/_sidebar.html.erb +3 -3
  67. data/app/views/concepts/sidebars/_singular.html.erb +4 -4
  68. data/app/views/dashboard/_sidebar.html.erb +7 -4
  69. data/app/views/dashboard/index.html.erb +1 -1
  70. data/app/views/dashboard/reset.html.erb +6 -0
  71. data/app/views/imports/index.html.erb +44 -0
  72. data/app/views/imports/show.html.erb +7 -0
  73. data/app/views/layouts/application.html.erb +7 -1
  74. data/app/views/partials/labeling/skos/_search_result.html.erb +12 -16
  75. data/app/views/partials/match/_edit_base.html.erb +1 -1
  76. data/app/views/partials/note/_search_result.html.erb +8 -5
  77. data/app/views/partials/note/skos/change_note/_search_result.html.erb +7 -10
  78. data/app/views/partials/note/skos/definition/_search_result.html.erb +5 -5
  79. data/app/views/rdf/dataset.iqrdf +9 -0
  80. data/app/views/search_results/_search_result_remote.html.erb +13 -0
  81. data/app/views/search_results/_sidebar.html.erb +3 -3
  82. data/app/views/search_results/index.html.erb +4 -4
  83. data/app/views/search_results/index.iqrdf +7 -7
  84. data/app/views/search_results/sections/_datasets.html.erb +17 -0
  85. data/app/views/search_results/sections/_klass.html.erb +2 -2
  86. data/app/views/search_results/sections/_languages.html.erb +3 -3
  87. data/app/views/users/_sidebar.html.erb +1 -1
  88. data/config/application.rb +0 -2
  89. data/config/engine.rb +5 -0
  90. data/config/environments/heroku.rb +62 -16
  91. data/config/initializers/apipie.rb +17 -0
  92. data/config/initializers/secret_token.rb +25 -9
  93. data/config/locales/activerecord.de.yml +5 -0
  94. data/config/locales/activerecord.en.yml +5 -0
  95. data/config/locales/de.yml +14 -0
  96. data/config/locales/en.yml +14 -0
  97. data/config/locales/pt.yml +1 -0
  98. data/config/routes.rb +7 -4
  99. data/db/migrate/20131220134356_create_delayed_jobs.rb +22 -0
  100. data/db/migrate/20131220144601_create_imports.rb +11 -0
  101. data/db/schema.rb +26 -1
  102. data/iqvoc.gemspec +12 -3
  103. data/lib/iqvoc/ability.rb +2 -0
  104. data/lib/iqvoc/configuration/core.rb +36 -9
  105. data/lib/iqvoc/controller_extensions.rb +4 -0
  106. data/lib/iqvoc/environments/production.rb +1 -1
  107. data/lib/iqvoc/skos_importer.rb +31 -19
  108. data/lib/iqvoc/version.rb +1 -1
  109. data/lib/tasks/importer.rake +10 -2
  110. data/lib/tasks/release.rake +1 -1
  111. data/public/404.html +43 -11
  112. data/public/422.html +43 -11
  113. data/public/500.html +43 -12
  114. data/test/functional/{rdf_test.rb → rdf_rendering_test.rb} +1 -1
  115. data/test/integration/alphabetical_test.rb +5 -5
  116. data/test/integration/search_test.rb +16 -16
  117. data/test/unit/skos_import_test.rb +9 -9
  118. data/vendor/assets/images/animated-overlay.gif +0 -0
  119. data/vendor/assets/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  120. data/vendor/assets/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
  121. data/vendor/assets/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  122. data/vendor/assets/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  123. data/vendor/assets/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  124. data/vendor/assets/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  125. data/vendor/assets/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  126. data/vendor/assets/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  127. data/vendor/assets/images/ui-icons_217bc0_256x240.png +0 -0
  128. data/vendor/assets/images/ui-icons_2e83ff_256x240.png +0 -0
  129. data/vendor/assets/images/ui-icons_469bdd_256x240.png +0 -0
  130. data/vendor/assets/images/ui-icons_6da8d5_256x240.png +0 -0
  131. data/vendor/assets/images/ui-icons_cd0a0a_256x240.png +0 -0
  132. data/vendor/assets/images/ui-icons_d8e7f3_256x240.png +0 -0
  133. data/vendor/assets/images/ui-icons_f9bd01_256x240.png +0 -0
  134. data/vendor/assets/javascripts/jquery-ui.custom.js +4538 -0
  135. data/vendor/assets/stylesheets/jquery-ui-1.10.3.custom.css.scss +724 -0
  136. metadata +214 -64
  137. data/app/assets/images/arrow_down.gif +0 -0
  138. data/app/assets/images/arrow_up.gif +0 -0
  139. data/app/assets/images/iqvoc_logo.png +0 -0
  140. data/app/assets/images/spinner_16x16.gif +0 -0
  141. data/app/assets/images/spinner_24x24.gif +0 -0
  142. data/app/assets/stylesheets/iqvoc/components.css.scss +0 -155
  143. data/app/assets/stylesheets/iqvoc/layout.css.scss +0 -0
  144. data/app/views/concepts/alphabetical/_pref_labeling.html.erb +0 -19
  145. data/app/views/import/import.html.erb +0 -7
  146. data/app/views/import/index.html.erb +0 -17
  147. data/vendor/assets/javascripts/jquery-ui-1.8.23.custom.js +0 -3399
  148. data/vendor/assets/stylesheets/jquery-ui-1.8.23.custom.css.scss +0 -405
@@ -0,0 +1,22 @@
1
+ class CreateDelayedJobs < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :delayed_jobs, :force => true do |table|
4
+ table.integer :priority, :default => 0, :null => false # Allows some jobs to jump to the front of the queue
5
+ table.integer :attempts, :default => 0, :null => false # Provides for retries, but still fail eventually.
6
+ table.text :handler, :null => false # YAML-encoded string of the object that will do work
7
+ table.text :last_error # reason for last failure (See Note below)
8
+ table.datetime :run_at # When to run. Could be Time.zone.now for immediately, or sometime in the future.
9
+ table.datetime :locked_at # Set when a client is working on this object
10
+ table.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead)
11
+ table.string :locked_by # Who is working on this object (if locked)
12
+ table.string :queue # The name of the queue this job is in
13
+ table.timestamps
14
+ end
15
+
16
+ add_index :delayed_jobs, [:priority, :run_at], :name => 'delayed_jobs_priority'
17
+ end
18
+
19
+ def self.down
20
+ drop_table :delayed_jobs
21
+ end
22
+ end
@@ -0,0 +1,11 @@
1
+ class CreateImports < ActiveRecord::Migration
2
+ def change
3
+ create_table :imports do |t|
4
+ t.references :user
5
+ t.text :output
6
+ t.boolean :success, :default => false
7
+ t.timestamps
8
+ t.timestamp :finished_at
9
+ end
10
+ end
11
+ end
data/db/schema.rb CHANGED
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20130508103137) do
14
+ ActiveRecord::Schema.define(version: 20131220144601) do
15
15
 
16
16
  create_table "collection_members", force: true do |t|
17
17
  t.integer "collection_id"
@@ -56,6 +56,31 @@ ActiveRecord::Schema.define(version: 20130508103137) do
56
56
  t.string "value"
57
57
  end
58
58
 
59
+ create_table "delayed_jobs", force: true do |t|
60
+ t.integer "priority", default: 0, null: false
61
+ t.integer "attempts", default: 0, null: false
62
+ t.text "handler", null: false
63
+ t.text "last_error"
64
+ t.datetime "run_at"
65
+ t.datetime "locked_at"
66
+ t.datetime "failed_at"
67
+ t.string "locked_by"
68
+ t.string "queue"
69
+ t.datetime "created_at"
70
+ t.datetime "updated_at"
71
+ end
72
+
73
+ add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree
74
+
75
+ create_table "imports", force: true do |t|
76
+ t.integer "user_id"
77
+ t.text "output"
78
+ t.boolean "success", default: false
79
+ t.datetime "created_at"
80
+ t.datetime "updated_at"
81
+ t.datetime "finished_at"
82
+ end
83
+
59
84
  create_table "labelings", force: true do |t|
60
85
  t.string "type"
61
86
  t.integer "owner_id"
data/iqvoc.gemspec CHANGED
@@ -18,18 +18,27 @@ Gem::Specification.new do |s|
18
18
  s.add_dependency 'kaminari', '0.13.0'
19
19
  s.add_dependency 'authlogic'
20
20
  s.add_dependency 'cancan'
21
- s.add_dependency 'iq_rdf', '~> 0.1.2'
21
+ s.add_dependency 'iq_rdf', '>= 0.1.13'
22
22
  s.add_dependency 'json'
23
23
  s.add_dependency 'rails_autolink'
24
+ s.add_dependency 'faraday'
24
25
  s.add_dependency 'simple_form'
25
26
  s.add_dependency 'sass-rails', '~> 4.0.0'
26
27
  s.add_dependency 'bootstrap-sass', '~> 2.3.1.3'
27
28
  s.add_dependency 'iq_triplestorage'
29
+ s.add_dependency 'nokogiri'
30
+ s.add_dependency 'linkeddata'
28
31
  s.add_dependency 'protected_attributes', '>= 1.0.5'
32
+ s.add_dependency 'font-awesome-rails'
33
+ s.add_dependency 'uglifier', '>= 1.3.0'
34
+ s.add_dependency 'apipie-rails'
35
+ s.add_dependency 'maruku'
36
+ s.add_dependency 'database_cleaner'
37
+ s.add_dependency 'delayed_job_active_record', '~> 4.0.0'
29
38
 
30
39
  s.files = %w(LICENSE README.md CHANGELOG.md Gemfile Gemfile.lock Rakefile iqvoc.gemspec) +
31
40
  Dir.glob("{app,config,db,public,lib,test,vendor}/**/*")
32
- s.test_files = Dir.glob("{test}/**/*")
33
- s.executables = Dir.glob("{bin}/**/*")
41
+ s.test_files = s.files.grep(%r{^test/})
42
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
34
43
  s.require_paths = ["lib"]
35
44
  end
data/lib/iqvoc/ability.rb CHANGED
@@ -43,6 +43,8 @@ module Iqvoc
43
43
  can :update, Iqvoc::Concept.root_class.instance
44
44
 
45
45
  can :use, :administration
46
+
47
+ can :reset, :thesaurus
46
48
  end
47
49
  else # no user
48
50
  can :create, UserSession
@@ -28,6 +28,14 @@ module Iqvoc
28
28
  iqvoc/ie_fixes.css
29
29
  bootstrap/bootstrap.js
30
30
  html5.js
31
+ *.png
32
+ *.jpg
33
+ *.jpeg
34
+ *.gif
35
+ *.svg
36
+ *.ttf
37
+ *.woff
38
+ *.eof
31
39
  )
32
40
 
33
41
  self.navigation_items = [{
@@ -84,11 +92,12 @@ module Iqvoc
84
92
  }]
85
93
  }]
86
94
 
87
- self.searchable_class_names = [
88
- "Labeling::SKOS::Base",
89
- "Labeling::SKOS::PrefLabel",
90
- "Note::Base"
91
- ]
95
+ self.searchable_class_names = {
96
+ "Labeling::SKOS::Base" => "labels",
97
+ "Labeling::SKOS::PrefLabel" => "pref_labels",
98
+ "Note::Base" => "notes"
99
+ }
100
+
92
101
  self.unlimited_search_results = false
93
102
 
94
103
  self.default_rdf_namespace_helper_methods = [:iqvoc_default_rdf_namespaces]
@@ -99,7 +108,9 @@ module Iqvoc
99
108
  :owl => "http://www.w3.org/2002/07/owl#",
100
109
  :skos => "http://www.w3.org/2004/02/skos/core#",
101
110
  :dct => "http://purl.org/dc/terms/",
102
- :foaf => "http://xmlns.com/foaf/spec/"
111
+ :foaf => "http://xmlns.com/foaf/spec/",
112
+ :void => "http://rdfs.org/ns/void#",
113
+ :iqvoc => "http://try.iqvoc.net/schema#"
103
114
  }
104
115
 
105
116
  # The class to use for automatic generation of change notes on every save
@@ -109,7 +120,15 @@ module Iqvoc
109
120
 
110
121
  self.ability_class_name = "Iqvoc::Ability"
111
122
 
112
- self.search_sections = ["klass", "mode", "terms", "type", "collection", "languages"]
123
+ self.search_sections = [
124
+ "klass",
125
+ "mode",
126
+ "terms",
127
+ "type",
128
+ "collection",
129
+ "languages",
130
+ "datasets"
131
+ ]
113
132
 
114
133
  # initialize
115
134
  self.config.register_settings({
@@ -117,7 +136,8 @@ module Iqvoc
117
136
  "languages.pref_labeling" => ["en", "de"],
118
137
  "languages.further_labelings.Labeling::SKOS::AltLabel" => ["en", "de"],
119
138
  "languages.notes" => ["en", "de"],
120
- "performance.unbounded_hierarchy" => false
139
+ "performance.unbounded_hierarchy" => false,
140
+ "sources.iqvoc" => [""]
121
141
  })
122
142
  end
123
143
 
@@ -157,7 +177,7 @@ module Iqvoc
157
177
  end
158
178
 
159
179
  def searchable_classes
160
- searchable_class_names.map(&:constantize)
180
+ searchable_class_names.keys.map(&:constantize)
161
181
  end
162
182
 
163
183
  def first_level_classes
@@ -189,6 +209,13 @@ module Iqvoc
189
209
  self.config.register_setting("title", value)
190
210
  end
191
211
 
212
+ def root
213
+ if Iqvoc.const_defined?(:Engine)
214
+ Iqvoc::Engine.root
215
+ else
216
+ Rails.root
217
+ end
218
+ end
192
219
  end
193
220
 
194
221
  end
@@ -95,5 +95,9 @@ module Iqvoc
95
95
  @current_user ||= current_user_session && current_user_session.user
96
96
  end
97
97
 
98
+ def with_layout?
99
+ !params[:layout]
100
+ end
101
+
98
102
  end
99
103
  end
@@ -63,7 +63,7 @@ module Iqvoc::Environments
63
63
 
64
64
  # Precompile additional assets.
65
65
  # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
66
- # config.assets.precompile += %w( search.js )
66
+ config.assets.precompile += Iqvoc.core_assets
67
67
 
68
68
  # Ignore bad email addresses and do not raise email delivery errors.
69
69
  # Set this to true and configure the email server for immediate delivery to raise delivery errors.
@@ -13,10 +13,13 @@ module Iqvoc
13
13
  [Iqvoc::Concept.root_class] +
14
14
  [Iqvoc::Collection.member_class]
15
15
 
16
- def initialize(file, default_namespace_url, logger = Rails.logger)
16
+ def initialize(file, default_namespace_url, logger = Rails.logger, publish = true)
17
+ @file = file
18
+ @publish = publish
19
+
17
20
  @logger = logger
18
21
 
19
- unless file.is_a?(File) || file.is_a?(Array)
22
+ unless @file.is_a?(File) || @file.is_a?(Array)
20
23
  raise "Iqvoc::SkosImporter#import: Parameter 'file' should be a File or an Array."
21
24
  end
22
25
 
@@ -56,8 +59,10 @@ module Iqvoc
56
59
  @existing_origins[thing.origin] = klass
57
60
  end
58
61
  end
62
+ end
59
63
 
60
- import file
64
+ def run
65
+ import @file
61
66
  end
62
67
 
63
68
  private
@@ -82,34 +87,41 @@ module Iqvoc
82
87
  import_second_level_objects(second_level_types, false, *extract_triple(line))
83
88
  end
84
89
 
85
- @logger.debug("Computing 'forward' defined triples...")
90
+ @logger.debug "Computing 'forward' defined triples..."
86
91
  @unknown_second_level_triples.each do |s, p, o|
87
92
  import_second_level_objects(second_level_types, true, s, p, o)
88
93
  end
89
94
 
90
95
  first_import_step_done = Time.now
91
- @logger.debug("Basic import done (took #{(first_import_step_done - start).to_i} seconds).")
96
+ @logger.debug "Basic import done (took #{(first_import_step_done - start).to_i} seconds)."
92
97
 
93
- @logger.debug("Publishing #{@new_subjects.count} new subjects...")
94
- published = 0
95
- @new_subjects.each do |subject|
96
- if subject.valid_with_full_validation?
97
- subject.publish
98
- subject.save!
99
- published += 1
100
- else
101
- @logger.warn "WARNING: Publishing failed! Subject ('#{subject.origin}') invalid: #{subject.errors.to_hash.inspect}"
102
- end
103
- end
98
+ published = publish
104
99
 
105
100
  done = Time.now
106
- @logger.debug("Publishing of #{published} subjects done (took #{(done - first_import_step_done).to_i} seconds). #{@new_subjects.count - published} where invalid.")
107
- puts "Imported #{published} valid and #{@new_subjects.count - published} invalid subjects in #{(done - start).to_i} seconds."
108
- puts " First step took #{(first_import_step_done - start).to_i} seconds, publishing took #{(done - first_import_step_done).to_i} seconds."
101
+ @logger.debug "Publishing of #{published} subjects done (took #{(done - first_import_step_done).to_i} seconds). #{@new_subjects.count - published} are in draft state."
102
+ puts "Imported #{published} published and #{@new_subjects.count - published} draft subjects in #{(done - start).to_i} seconds."
103
+ puts " First step took #{(first_import_step_done - start).to_i} seconds, publishing took #{(done - first_import_step_done).to_i} seconds."
109
104
 
110
105
  ActiveSupport.run_load_hooks(:skos_importer_after_import, self)
111
106
  end
112
107
 
108
+ def publish
109
+ published = 0
110
+ if @publish
111
+ @logger.debug "Publishing #{@new_subjects.count} new subjects..."
112
+ @new_subjects.each do |subject|
113
+ if subject.valid_with_full_validation?
114
+ subject.publish
115
+ subject.save!
116
+ published += 1
117
+ else
118
+ @logger.warn "WARNING: Publishing failed! Subject ('#{subject.origin}') invalid: #{subject.errors.to_hash.inspect}"
119
+ end
120
+ end
121
+ end
122
+ published
123
+ end
124
+
113
125
  def identify_blank_nodes(subject, predicate, object)
114
126
  if blank_node?(subject)
115
127
  @blank_nodes[subject] ||= []
data/lib/iqvoc/version.rb CHANGED
@@ -15,5 +15,5 @@
15
15
  # limitations under the License.
16
16
 
17
17
  module Iqvoc
18
- VERSION = "4.2.0"
18
+ VERSION = "4.3.0"
19
19
  end
@@ -13,9 +13,17 @@ namespace :iqvoc do
13
13
 
14
14
  stdout_logger = Logger.new(STDOUT)
15
15
  stdout_logger.level = Logger::INFO
16
- Iqvoc::SkosImporter.new(open(URI.parse(ENV['URL']).to_s), URI.parse(ENV['NAMESPACE']).to_s, MultiLogger.new(stdout_logger, Rails.logger))
16
+
17
+ publish = if ENV['PUBLISH'].nil? || ENV['PUBLISH'] == "true"
18
+ true
19
+ else
20
+ false
21
+ end
22
+
23
+ importer = Iqvoc::SkosImporter.new(open(URI.parse(ENV['URL']).to_s), URI.parse(ENV['NAMESPACE']).to_s, MultiLogger.new(stdout_logger, Rails.logger), publish)
24
+ importer.run
17
25
  end
18
26
 
19
27
  end
20
28
 
21
- end
29
+ end
@@ -9,7 +9,7 @@ namespace :release do
9
9
  task :push => :environment do
10
10
  Rake::Task['release:build'].invoke
11
11
  system %(git tag `grep VERSION lib/iqvoc/version.rb | sed -e 's/.*= /v/' -e 's/"//g'`)
12
- system 'git push --tags'
12
+ system 'git push origin master --tags'
13
13
  system 'gem push iqvoc-*.gem'
14
14
  end
15
15
  end
data/public/404.html CHANGED
@@ -2,17 +2,48 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>The page you were looking for doesn't exist (404)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
16
47
  </style>
17
48
  </head>
18
49
 
@@ -22,5 +53,6 @@
22
53
  <h1>The page you were looking for doesn't exist.</h1>
23
54
  <p>You may have mistyped the address or the page may have moved.</p>
24
55
  </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
25
57
  </body>
26
58
  </html>
data/public/422.html CHANGED
@@ -2,17 +2,48 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>The change you wanted was rejected (422)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
16
47
  </style>
17
48
  </head>
18
49
 
@@ -22,5 +53,6 @@
22
53
  <h1>The change you wanted was rejected.</h1>
23
54
  <p>Maybe you tried to change something you didn't have access to.</p>
24
55
  </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
25
57
  </body>
26
58
  </html>