iqvoc_compound_forms 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -2
- data/Gemfile.lock +47 -48
- data/app/models/compound_form/base.rb +1 -1
- data/app/models/compound_form/content/base.rb +1 -1
- data/config/environments/development.rb +4 -50
- data/config/environments/production.rb +3 -59
- data/config/environments/test.rb +4 -41
- data/config/initializers/iqvoc.rb +1 -1
- data/iqvoc_compound_forms.gemspec +3 -3
- data/lib/iqvoc/compound_forms/label_extensions.rb +22 -23
- data/lib/iqvoc/compound_forms/version.rb +1 -1
- metadata +13 -13
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,35 +1,34 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
actionmailer (3.1
|
5
|
-
actionpack (= 3.1
|
6
|
-
mail (~> 2.
|
7
|
-
actionpack (3.1
|
8
|
-
activemodel (= 3.1
|
9
|
-
activesupport (= 3.1
|
4
|
+
actionmailer (3.2.1)
|
5
|
+
actionpack (= 3.2.1)
|
6
|
+
mail (~> 2.4.0)
|
7
|
+
actionpack (3.2.1)
|
8
|
+
activemodel (= 3.2.1)
|
9
|
+
activesupport (= 3.2.1)
|
10
10
|
builder (~> 3.0.0)
|
11
11
|
erubis (~> 2.7.0)
|
12
|
-
|
13
|
-
rack (~> 1.
|
12
|
+
journey (~> 1.0.1)
|
13
|
+
rack (~> 1.4.0)
|
14
14
|
rack-cache (~> 1.1)
|
15
|
-
rack-mount (~> 0.8.2)
|
16
15
|
rack-test (~> 0.6.1)
|
17
|
-
sprockets (~> 2.
|
18
|
-
activemodel (3.1
|
19
|
-
activesupport (= 3.1
|
16
|
+
sprockets (~> 2.1.2)
|
17
|
+
activemodel (3.2.1)
|
18
|
+
activesupport (= 3.2.1)
|
20
19
|
builder (~> 3.0.0)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
arel (~> 2.2.1)
|
20
|
+
activerecord (3.2.1)
|
21
|
+
activemodel (= 3.2.1)
|
22
|
+
activesupport (= 3.2.1)
|
23
|
+
arel (~> 3.0.0)
|
26
24
|
tzinfo (~> 0.3.29)
|
27
|
-
activeresource (3.1
|
28
|
-
activemodel (= 3.1
|
29
|
-
activesupport (= 3.1
|
30
|
-
activesupport (3.1
|
25
|
+
activeresource (3.2.1)
|
26
|
+
activemodel (= 3.2.1)
|
27
|
+
activesupport (= 3.2.1)
|
28
|
+
activesupport (3.2.1)
|
29
|
+
i18n (~> 0.6)
|
31
30
|
multi_json (~> 1.0)
|
32
|
-
arel (
|
31
|
+
arel (3.0.0)
|
33
32
|
authlogic (3.1.0)
|
34
33
|
activerecord (>= 3.0.7)
|
35
34
|
activerecord (>= 3.0.7)
|
@@ -38,55 +37,54 @@ GEM
|
|
38
37
|
erubis (2.7.0)
|
39
38
|
hike (1.2.1)
|
40
39
|
i18n (0.6.0)
|
41
|
-
iq_rdf (0.1.
|
40
|
+
iq_rdf (0.1.2)
|
42
41
|
builder
|
43
42
|
bundler
|
44
|
-
iqvoc (3.
|
43
|
+
iqvoc (3.5.1)
|
45
44
|
authlogic
|
46
45
|
bundler
|
47
46
|
cancan
|
48
|
-
iq_rdf (~> 0.1.
|
47
|
+
iq_rdf (~> 0.1.2)
|
49
48
|
json
|
50
49
|
kaminari
|
51
|
-
rails (~> 3.1
|
50
|
+
rails (~> 3.2.1)
|
52
51
|
rails_autolink
|
53
|
-
iqvoc_skosxl (1.
|
52
|
+
iqvoc_skosxl (1.2.0)
|
54
53
|
bundler
|
55
|
-
iqvoc
|
54
|
+
iqvoc (~> 3.5.1)
|
55
|
+
journey (1.0.1)
|
56
56
|
json (1.6.5)
|
57
57
|
kaminari (0.13.0)
|
58
58
|
actionpack (>= 3.0.0)
|
59
59
|
activesupport (>= 3.0.0)
|
60
60
|
railties (>= 3.0.0)
|
61
|
-
mail (2.
|
61
|
+
mail (2.4.1)
|
62
62
|
i18n (>= 0.4.0)
|
63
63
|
mime-types (~> 1.16)
|
64
64
|
treetop (~> 1.4.8)
|
65
65
|
mime-types (1.17.2)
|
66
66
|
multi_json (1.0.4)
|
67
67
|
polyglot (0.3.3)
|
68
|
-
rack (1.
|
68
|
+
rack (1.4.1)
|
69
69
|
rack-cache (1.1)
|
70
70
|
rack (>= 0.4)
|
71
|
-
rack-mount (0.8.3)
|
72
|
-
rack (>= 1.0.0)
|
73
71
|
rack-ssl (1.3.2)
|
74
72
|
rack
|
75
73
|
rack-test (0.6.1)
|
76
74
|
rack (>= 1.0)
|
77
|
-
rails (3.1
|
78
|
-
actionmailer (= 3.1
|
79
|
-
actionpack (= 3.1
|
80
|
-
activerecord (= 3.1
|
81
|
-
activeresource (= 3.1
|
82
|
-
activesupport (= 3.1
|
75
|
+
rails (3.2.1)
|
76
|
+
actionmailer (= 3.2.1)
|
77
|
+
actionpack (= 3.2.1)
|
78
|
+
activerecord (= 3.2.1)
|
79
|
+
activeresource (= 3.2.1)
|
80
|
+
activesupport (= 3.2.1)
|
83
81
|
bundler (~> 1.0)
|
84
|
-
railties (= 3.1
|
85
|
-
rails_autolink (1.0.
|
86
|
-
rails (
|
87
|
-
railties (3.1
|
88
|
-
actionpack (= 3.1
|
89
|
-
activesupport (= 3.1
|
82
|
+
railties (= 3.2.1)
|
83
|
+
rails_autolink (1.0.5)
|
84
|
+
rails (~> 3.1)
|
85
|
+
railties (3.2.1)
|
86
|
+
actionpack (= 3.2.1)
|
87
|
+
activesupport (= 3.2.1)
|
90
88
|
rack-ssl (~> 1.3.2)
|
91
89
|
rake (>= 0.8.7)
|
92
90
|
rdoc (~> 3.4)
|
@@ -94,10 +92,10 @@ GEM
|
|
94
92
|
rake (0.9.2.2)
|
95
93
|
rdoc (3.12)
|
96
94
|
json (~> 1.4)
|
97
|
-
spork (0.9.0
|
95
|
+
spork (0.9.0)
|
98
96
|
spork-testunit (0.0.7)
|
99
97
|
spork (>= 0.6.0)
|
100
|
-
sprockets (2.
|
98
|
+
sprockets (2.1.2)
|
101
99
|
hike (~> 1.2)
|
102
100
|
rack (~> 1.0)
|
103
101
|
tilt (~> 1.1, != 1.3.0)
|
@@ -114,8 +112,9 @@ PLATFORMS
|
|
114
112
|
ruby
|
115
113
|
|
116
114
|
DEPENDENCIES
|
117
|
-
iqvoc (~> 3.
|
118
|
-
iqvoc_skosxl (~> 1.
|
115
|
+
iqvoc (~> 3.5.1)
|
116
|
+
iqvoc_skosxl (~> 1.2.0)
|
117
|
+
rails (~> 3.2.1)
|
119
118
|
spork (~> 0.9.0.rc)
|
120
119
|
spork-testunit
|
121
120
|
sqlite3
|
@@ -5,7 +5,7 @@ class CompoundForm::Base < ActiveRecord::Base
|
|
5
5
|
self.rdf_namespace = 'umt'
|
6
6
|
self.rdf_predicate = 'compoundForm'
|
7
7
|
|
8
|
-
|
8
|
+
self.table_name ='compound_forms'
|
9
9
|
|
10
10
|
belongs_to :domain, :class_name => 'Label::Base', :foreign_key => 'domain_id'
|
11
11
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
class CompoundForm::Content::Base < ActiveRecord::Base
|
4
4
|
|
5
|
-
|
5
|
+
self.table_name ='compound_form_contents'
|
6
6
|
|
7
7
|
belongs_to :compound_form, :class_name => 'CompoundForm::Base', :foreign_key => 'compound_form_id'
|
8
8
|
belongs_to :label, :class_name => 'Label::Base', :foreign_key => 'label_id'
|
@@ -1,55 +1,9 @@
|
|
1
|
+
require 'debug'
|
2
|
+
require 'iqvoc/environments/development'
|
3
|
+
|
1
4
|
if Iqvoc::CompoundForms.const_defined?(:Application)
|
2
5
|
Iqvoc::CompoundForms::Application.configure do
|
3
6
|
# Settings specified here will take precedence over those in config/environment.rb
|
4
|
-
|
5
|
-
# In the development environment your application's code is reloaded on
|
6
|
-
# every request. This slows down response time but is perfect for development
|
7
|
-
# since you don't have to restart the web server when you make code changes.
|
8
|
-
config.cache_classes = false
|
9
|
-
|
10
|
-
# Log error messages when you accidentally call methods on nil.
|
11
|
-
config.whiny_nils = true
|
12
|
-
|
13
|
-
# Show full error reports and disable caching
|
14
|
-
config.consider_all_requests_local = true
|
15
|
-
config.action_controller.perform_caching = false
|
16
|
-
|
17
|
-
# Don't care if the mailer can't send
|
18
|
-
config.action_mailer.raise_delivery_errors = false
|
19
|
-
|
20
|
-
# Print deprecation notices to the Rails logger
|
21
|
-
config.active_support.deprecation = :log
|
22
|
-
|
23
|
-
# Only use best-standards-support built into browsers
|
24
|
-
config.action_dispatch.best_standards_support = :builtin
|
25
|
-
|
26
|
-
# The default URI prefix for RDF data. This will be followed by a document-
|
27
|
-
# specific snippet like (specimenType) and the id.
|
28
|
-
|
29
|
-
# Do not compress assets
|
30
|
-
config.assets.compress = false
|
31
|
-
|
32
|
-
# Expands the lines which load the assets
|
33
|
-
config.assets.debug = false
|
34
|
-
|
35
|
-
# The JDBC driver URL for the connection to the virtuoso triple store.
|
36
|
-
# Login credentials have to be stored here too. See
|
37
|
-
# http://docs.openlinksw.com/virtuoso/VirtuosoDriverJDBC.html#jdbcurl4mat for
|
38
|
-
# more details.
|
39
|
-
# Example: "jdbc:virtuoso://localhost:1111/UID=dba/PWD=dba"
|
40
|
-
# Use nil to disable virtuoso triple synchronization
|
41
|
-
# Rails.application.config.virtuoso_jdbc_driver_url = "jdbc:virtuoso://virtuoso.dyndns.org:1111/UID=iqvoc/PWD=vocpass!/charset=UTF-8"
|
42
|
-
config.virtuoso_jdbc_driver_url = nil
|
43
|
-
|
44
|
-
# Set up the virtuoso synchronization (which is a triggered pull from the
|
45
|
-
# virtuoso server) to be run in a new thread.
|
46
|
-
# This is needed in environments where the web server only runs in a single
|
47
|
-
# process/thread (mostly in development environments).
|
48
|
-
# When a synchronization would be triggered e.g. from a running
|
49
|
-
# update action in the UPB, the update would trigger virtuoso to do a HTTP GET
|
50
|
-
# back to the UPB to fetch the RDF data. But the only process in the UPB would be
|
51
|
-
# blocked by the update... => Deadlock. You can avoid this by using the threaded
|
52
|
-
# mode.
|
53
|
-
config.virtuoso_sync_threaded = false
|
7
|
+
Iqvoc::Environments.setup_development(config)
|
54
8
|
end
|
55
9
|
end
|
@@ -1,64 +1,8 @@
|
|
1
|
+
require 'iqvoc/environments/production'
|
2
|
+
|
1
3
|
if Iqvoc::CompoundForms.const_defined?(:Application)
|
2
4
|
Iqvoc::CompoundForms::Application.configure do
|
3
5
|
# Settings specified here will take precedence over those in config/environment.rb
|
4
|
-
|
5
|
-
# The production environment is meant for finished, "live" apps.
|
6
|
-
# Code is not reloaded between requests
|
7
|
-
config.cache_classes = true
|
8
|
-
|
9
|
-
# Full error reports are disabled and caching is turned on
|
10
|
-
config.consider_all_requests_local = false
|
11
|
-
config.action_controller.perform_caching = true
|
12
|
-
|
13
|
-
# Specifies the header that your server uses for sending files
|
14
|
-
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
15
|
-
|
16
|
-
# For nginx:
|
17
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
18
|
-
|
19
|
-
# If you have no front-end server that supports something like X-Sendfile,
|
20
|
-
# just comment this out and Rails will serve the files
|
21
|
-
|
22
|
-
# See everything in the log (default is :info)
|
23
|
-
# config.log_level = :debug
|
24
|
-
|
25
|
-
# Use a different logger for distributed setups
|
26
|
-
# config.logger = SyslogLogger.new
|
27
|
-
|
28
|
-
# Use a different cache store in production
|
29
|
-
# config.cache_store = :mem_cache_store
|
30
|
-
|
31
|
-
# Disable Rails's static asset server
|
32
|
-
# In production, Apache or nginx will already do this
|
33
|
-
config.serve_static_assets = false
|
34
|
-
|
35
|
-
# Enable serving of images, stylesheets, and javascripts from an asset server
|
36
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
37
|
-
|
38
|
-
# Disable delivery errors, bad email addresses will be ignored
|
39
|
-
# config.action_mailer.raise_delivery_errors = false
|
40
|
-
|
41
|
-
# Enable threaded mode
|
42
|
-
# config.threadsafe!
|
43
|
-
|
44
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
45
|
-
# the I18n.default_locale when a translation can not be found)
|
46
|
-
config.i18n.fallbacks = true
|
47
|
-
|
48
|
-
# Send deprecation notices to registered listeners
|
49
|
-
config.active_support.deprecation = :notify
|
50
|
-
|
51
|
-
# Disable Rails's static asset server
|
52
|
-
# In production, Apache or nginx will already do this
|
53
|
-
config.serve_static_assets = false
|
54
|
-
|
55
|
-
# Compress JavaScripts and CSS
|
56
|
-
config.assets.compress = true
|
57
|
-
|
58
|
-
# Don't fallback to assets pipeline if a precompiled asset is missed
|
59
|
-
config.assets.compile = false
|
60
|
-
|
61
|
-
# Generate digests for assets URLs
|
62
|
-
config.assets.digest = true
|
6
|
+
Iqvoc::Environments.setup_production(config)
|
63
7
|
end
|
64
8
|
end
|
data/config/environments/test.rb
CHANGED
@@ -1,46 +1,9 @@
|
|
1
|
+
require 'debug'
|
2
|
+
require 'iqvoc/environments/test'
|
3
|
+
|
1
4
|
if Iqvoc::CompoundForms.const_defined?(:Application)
|
2
5
|
Iqvoc::CompoundForms::Application.configure do
|
3
6
|
# Settings specified here will take precedence over those in config/environment.rb
|
4
|
-
|
5
|
-
config.autoload_paths += [Rails.root.join("test")]
|
6
|
-
|
7
|
-
# The test environment is used exclusively to run your application's
|
8
|
-
# test suite. You never need to work with it otherwise. Remember that
|
9
|
-
# your test database is "scratch space" for the test suite and is wiped
|
10
|
-
# and recreated between test runs. Don't rely on the data there!
|
11
|
-
config.cache_classes = true
|
12
|
-
|
13
|
-
# Log error messages when you accidentally call methods on nil.
|
14
|
-
config.whiny_nils = true
|
15
|
-
|
16
|
-
# Show full error reports and disable caching
|
17
|
-
config.consider_all_requests_local = true
|
18
|
-
config.action_controller.perform_caching = false
|
19
|
-
|
20
|
-
# Raise exceptions instead of rendering exception templates
|
21
|
-
config.action_dispatch.show_exceptions = false
|
22
|
-
|
23
|
-
# Disable request forgery protection in test environment
|
24
|
-
config.action_controller.allow_forgery_protection = false
|
25
|
-
|
26
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
27
|
-
# The :test delivery method accumulates sent emails in the
|
28
|
-
# ActionMailer::Base.deliveries array.
|
29
|
-
config.action_mailer.delivery_method = :test
|
30
|
-
|
31
|
-
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
32
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
33
|
-
# like if you have constraints or database-specific column types
|
34
|
-
# config.active_record.schema_format = :sql
|
35
|
-
|
36
|
-
# Print deprecation notices to the stderr
|
37
|
-
config.active_support.deprecation = :stderr
|
38
|
-
|
39
|
-
# Configure static asset server for tests with Cache-Control for performance
|
40
|
-
config.serve_static_assets = true
|
41
|
-
config.static_cache_control = "public, max-age=3600"
|
42
|
-
|
43
|
-
# Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
|
44
|
-
config.assets.allow_debugging = true
|
7
|
+
Iqvoc::Environments.setup_test(config)
|
45
8
|
end
|
46
9
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'iqvoc/xllabel' # XXX: this basically duplicates iqvoc_skosxl's initializer - but is required to ensure correct loading order!?
|
4
4
|
|
5
|
-
Iqvoc.title
|
5
|
+
Iqvoc.config.register_setting("title", "iQvoc Compound Forms")
|
6
6
|
|
7
7
|
Iqvoc::XLLabel.additional_association_class_names.
|
8
8
|
merge!("CompoundForm::Base" => "domain_id",
|
@@ -15,9 +15,9 @@ Gem::Specification.new do |s|
|
|
15
15
|
|
16
16
|
s.rubyforge_project = "iqvoc_compound_forms"
|
17
17
|
|
18
|
-
s.add_dependency "rails", "~> 3.1
|
19
|
-
s.add_dependency "iqvoc"
|
20
|
-
s.add_dependency "iqvoc_skosxl"
|
18
|
+
s.add_dependency "rails", "~> 3.2.1"
|
19
|
+
s.add_dependency "iqvoc", "~> 3.5.1"
|
20
|
+
s.add_dependency "iqvoc_skosxl", "~> 1.2.0"
|
21
21
|
|
22
22
|
s.files = `git ls-files`.split("\n")
|
23
23
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
@@ -37,36 +37,35 @@ module Iqvoc::CompoundForms::LabelExtensions
|
|
37
37
|
validate :compound_form_contents_size
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
end
|
40
|
+
def compound_in
|
41
|
+
CompoundForm::Base.joins(:compound_form_contents).
|
42
|
+
where(:compound_form_contents => { :label_id => id }).
|
43
|
+
includes(:domain).map(&:domain)
|
44
|
+
end
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
46
|
+
# Serialized setters and getters (\r\n or , separated)
|
47
|
+
def inline_compound_form_origins
|
48
|
+
@inline_compound_form_origins || []
|
49
|
+
end
|
51
50
|
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
def inline_compound_form_origins=(value_collection)
|
52
|
+
# write to instance variable and write it on after_safe
|
53
|
+
@inline_compound_form_origins = []
|
55
54
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
end
|
55
|
+
value_collection.reject(&:blank?).each do |value|
|
56
|
+
@inline_compound_form_origins << value.split(/\r\n|, */).map(&:strip). # XXX: use Iqvoc::InlineDataHelper?
|
57
|
+
reject(&:blank?).uniq
|
60
58
|
end
|
59
|
+
end
|
61
60
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
end
|
61
|
+
def compound_form_contents_size
|
62
|
+
if @full_validation
|
63
|
+
compound_forms.each do |cf|
|
64
|
+
if cf.compound_form_contents.count < 2
|
65
|
+
errors.add :base, I18n.t("txt.models.label.compound_form_contents_error")
|
68
66
|
end
|
69
67
|
end
|
70
68
|
end
|
71
69
|
end
|
70
|
+
|
72
71
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iqvoc_compound_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,41 +11,41 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-01
|
14
|
+
date: 2012-02-01 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
18
|
-
requirement: &
|
18
|
+
requirement: &70106648761580 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 3.1
|
23
|
+
version: 3.2.1
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *70106648761580
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: iqvoc
|
29
|
-
requirement: &
|
29
|
+
requirement: &70106648759840 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ~>
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
34
|
+
version: 3.5.1
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *70106648759840
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: iqvoc_skosxl
|
40
|
-
requirement: &
|
40
|
+
requirement: &70106648758380 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
|
-
- -
|
43
|
+
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
45
|
+
version: 1.2.0
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
|
-
version_requirements: *
|
48
|
+
version_requirements: *70106648758380
|
49
49
|
description: ''
|
50
50
|
email:
|
51
51
|
- robert.glaser@innoq.com
|