iqvoc_similar_terms 2.7.0 → 2.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +67 -0
- data/.gitignore +7 -0
- data/Gemfile +14 -15
- data/Gemfile.lock +483 -314
- data/README.md +5 -6
- data/app/assets/javascripts/manifest.js +2 -0
- data/app/assets/stylesheets/manifest.scss +3 -0
- data/app/controllers/similar_terms_controller.rb +27 -11
- data/app/models/services/similar_terms_service.rb +141 -0
- data/app/views/similar_terms/_form.html.erb +21 -0
- data/app/views/similar_terms/new.html.erb +21 -0
- data/app/views/similar_terms/show.html.erb +32 -28
- data/bin/bundle +3 -0
- data/bin/rails +3 -9
- data/bin/rake +3 -6
- data/bin/setup +33 -0
- data/bin/update +31 -0
- data/bin/yarn +17 -0
- data/config/application.rb +30 -48
- data/config/boot.rb +3 -5
- data/config/cable.yml +10 -0
- data/config/database.yml.postgresql +26 -0
- data/config/environment.rb +4 -4
- data/config/initializers/content_security_policy.rb +25 -0
- data/config/initializers/filter_parameter_logging.rb +8 -0
- data/config/initializers/inflections.rb +16 -0
- data/config/initializers/iqvoc.rb +5 -4
- data/config/initializers/new_framework_defaults_6_1.rb +67 -0
- data/config/initializers/permissions_policy.rb +11 -0
- data/config/locales/de.yml +6 -0
- data/config/locales/en.yml +6 -0
- data/config/routes.rb +2 -2
- data/config/storage.yml +34 -0
- data/config.ru +4 -2
- data/faucet.config.js +46 -0
- data/iqvoc_similar_terms.gemspec +1 -1
- data/lib/iqvoc/similar_terms/version.rb +1 -1
- data/lib/iqvoc/similar_terms.rb +12 -97
- data/lib/iqvoc_similar_terms.rb +1 -0
- data/package-lock.json +2333 -0
- data/package.json +29 -0
- data/test/concept_test.nt +5 -0
- data/test/concept_test.ttl +8 -1
- data/test/controllers/similar_terms_controller_test.rb +167 -0
- data/test/models/entity_resolution_test.rb +6 -6
- data/test/models/results_test.rb +43 -17
- metadata +31 -23
- data/.travis.yml +0 -30
- data/bin/spring +0 -18
- data/config/initializers/iqvoc_similiar_terms.rb +0 -1
- data/config/initializers/wrap_parameters.rb +0 -14
- data/test/controllers/api_test.rb +0 -58
- data/test/controllers/onebox_test.rb +0 -37
@@ -1,37 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
require File.join(File.expand_path(File.dirname(__FILE__)), '../test_helper')
|
4
|
-
|
5
|
-
class OneBoxTest < ActionController::TestCase
|
6
|
-
|
7
|
-
setup do
|
8
|
-
@controller = SimilarTermsController.new
|
9
|
-
|
10
|
-
load_test_data
|
11
|
-
end
|
12
|
-
|
13
|
-
test "XML representation" do
|
14
|
-
get :show, :lang => "en", :format => "xml", :terms => "foo"
|
15
|
-
assert_response 200
|
16
|
-
assert @response.body.starts_with?(<<-EOS.strip)
|
17
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
18
|
-
<OneBoxResults xmlns:xlink="http://www.w3.org/1999/xlink">
|
19
|
-
<resultCode>success</resultCode>
|
20
|
-
<totalResults>0</totalResults>
|
21
|
-
<urlText>Similar Terms</urlText>
|
22
|
-
<urlLink>http://test.host/en/similar.xml?terms=foo#</urlLink>
|
23
|
-
EOS
|
24
|
-
assert !@response.body.include?("<MODULE_RESULT>")
|
25
|
-
|
26
|
-
get :show, :lang => "en", :format => "xml", :terms => "forest"
|
27
|
-
assert_response 200
|
28
|
-
assert @response.body.include?("<totalResults>2</totalResults>")
|
29
|
-
assert @response.body.include?(<<-EOS.strip)
|
30
|
-
<MODULE_RESULT>
|
31
|
-
<title>similar terms for 'forest'</title>
|
32
|
-
EOS
|
33
|
-
assert @response.body.include? '<Field name="forest">forest</Field>'
|
34
|
-
assert @response.body.include? '<Field name="woods">woods</Field>'
|
35
|
-
end
|
36
|
-
|
37
|
-
end
|