iqvoc_similar_terms 2.7.0 → 2.11.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ci.yml +67 -0
  3. data/.gitignore +7 -0
  4. data/Gemfile +14 -15
  5. data/Gemfile.lock +483 -314
  6. data/README.md +5 -6
  7. data/app/assets/javascripts/manifest.js +2 -0
  8. data/app/assets/stylesheets/manifest.scss +3 -0
  9. data/app/controllers/similar_terms_controller.rb +27 -11
  10. data/app/models/services/similar_terms_service.rb +141 -0
  11. data/app/views/similar_terms/_form.html.erb +21 -0
  12. data/app/views/similar_terms/new.html.erb +21 -0
  13. data/app/views/similar_terms/show.html.erb +32 -28
  14. data/bin/bundle +3 -0
  15. data/bin/rails +3 -9
  16. data/bin/rake +3 -6
  17. data/bin/setup +33 -0
  18. data/bin/update +31 -0
  19. data/bin/yarn +17 -0
  20. data/config/application.rb +30 -48
  21. data/config/boot.rb +3 -5
  22. data/config/cable.yml +10 -0
  23. data/config/database.yml.postgresql +26 -0
  24. data/config/environment.rb +4 -4
  25. data/config/initializers/content_security_policy.rb +25 -0
  26. data/config/initializers/filter_parameter_logging.rb +8 -0
  27. data/config/initializers/inflections.rb +16 -0
  28. data/config/initializers/iqvoc.rb +5 -4
  29. data/config/initializers/new_framework_defaults_6_1.rb +67 -0
  30. data/config/initializers/permissions_policy.rb +11 -0
  31. data/config/locales/de.yml +6 -0
  32. data/config/locales/en.yml +6 -0
  33. data/config/routes.rb +2 -2
  34. data/config/storage.yml +34 -0
  35. data/config.ru +4 -2
  36. data/faucet.config.js +46 -0
  37. data/iqvoc_similar_terms.gemspec +1 -1
  38. data/lib/iqvoc/similar_terms/version.rb +1 -1
  39. data/lib/iqvoc/similar_terms.rb +12 -97
  40. data/lib/iqvoc_similar_terms.rb +1 -0
  41. data/package-lock.json +1486 -0
  42. data/package.json +29 -0
  43. data/test/concept_test.nt +5 -0
  44. data/test/concept_test.ttl +8 -1
  45. data/test/controllers/similar_terms_controller_test.rb +167 -0
  46. data/test/models/entity_resolution_test.rb +6 -6
  47. data/test/models/results_test.rb +43 -17
  48. metadata +31 -23
  49. data/.travis.yml +0 -30
  50. data/bin/spring +0 -18
  51. data/config/initializers/iqvoc_similiar_terms.rb +0 -1
  52. data/config/initializers/wrap_parameters.rb +0 -14
  53. data/test/controllers/api_test.rb +0 -58
  54. 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