geoblacklight 3.2.0 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +142 -0
  3. data/.gitignore +8 -0
  4. data/.rubocop.yml +9 -10
  5. data/.rubocop_todo.yml +356 -26
  6. data/README.md +2 -2
  7. data/Rakefile +12 -4
  8. data/app/assets/images/favicon.ico +0 -0
  9. data/app/assets/javascripts/geoblacklight/geoblacklight.js +18 -1
  10. data/app/assets/javascripts/geoblacklight/modules/bookmarks.js +43 -0
  11. data/app/assets/javascripts/geoblacklight/modules/metadata_download_button.js +6 -1
  12. data/app/assets/javascripts/geoblacklight/modules/results.js +7 -8
  13. data/app/assets/javascripts/geoblacklight/modules/util.js +5 -0
  14. data/app/assets/javascripts/geoblacklight/viewers/esri.js +1 -1
  15. data/app/assets/javascripts/geoblacklight/viewers/index_map.js +1 -1
  16. data/app/assets/javascripts/geoblacklight/viewers/map.js +12 -2
  17. data/app/assets/javascripts/geoblacklight/viewers/tms.js +10 -0
  18. data/app/assets/javascripts/geoblacklight/viewers/wms.js +1 -1
  19. data/app/assets/stylesheets/geoblacklight/modules/results.scss +1 -1
  20. data/app/helpers/geoblacklight_helper.rb +13 -1
  21. data/app/models/concerns/geoblacklight/solr_document.rb +8 -13
  22. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +3 -3
  23. data/app/views/catalog/_document_split.html.erb +1 -1
  24. data/app/views/catalog/_index_split_default.html.erb +1 -1
  25. data/app/views/catalog/_show_default_viewer_container.html.erb +1 -1
  26. data/app/views/download/hgl.html.erb +13 -11
  27. data/app/views/relation/_ancestors.html.erb +2 -2
  28. data/app/views/relation/_descendants.html.erb +2 -2
  29. data/babel.config.json +4 -0
  30. data/config/initializers/new_gbl_settings_defaults_3_3.yml +10 -0
  31. data/config/initializers/rails_config.rb +4 -0
  32. data/config/locales/geoblacklight.en.yml +4 -0
  33. data/geoblacklight.gemspec +4 -2
  34. data/jest.config.js +25 -0
  35. data/lib/generators/geoblacklight/install_generator.rb +1 -1
  36. data/lib/generators/geoblacklight/templates/catalog_controller.rb +1 -1
  37. data/lib/generators/geoblacklight/templates/settings.yml +20 -11
  38. data/lib/geoblacklight.rb +1 -2
  39. data/lib/geoblacklight/bounding_box.rb +1 -1
  40. data/lib/geoblacklight/constants.rb +1 -0
  41. data/lib/geoblacklight/download/kmz_download.rb +1 -1
  42. data/lib/geoblacklight/geometry.rb +70 -0
  43. data/lib/geoblacklight/item_viewer.rb +5 -1
  44. data/lib/geoblacklight/metadata/base.rb +1 -7
  45. data/lib/geoblacklight/relation/ancestors.rb +2 -2
  46. data/lib/geoblacklight/relation/descendants.rb +1 -1
  47. data/lib/geoblacklight/version.rb +1 -1
  48. data/lib/geoblacklight/wms_layer.rb +1 -4
  49. data/lib/tasks/geoblacklight.rake +5 -0
  50. data/package.json +17 -1
  51. data/setupJest.js +14 -0
  52. data/solr/conf/schema.xml +1 -3
  53. data/spec/config/initializers/rails_config_spec.rb +14 -0
  54. data/spec/controllers/catalog_controller_spec.rb +6 -6
  55. data/spec/features/download_layer_spec.rb +1 -1
  56. data/spec/features/relations_spec.rb +1 -1
  57. data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
  58. data/spec/features/split_view.html.erb_spec.rb +1 -1
  59. data/spec/features/tms_spec.rb +10 -0
  60. data/spec/fixtures/solr_documents/public_iiif_princeton.json +1 -1
  61. data/spec/fixtures/solr_documents/tms.json +29 -0
  62. data/spec/helpers/geoblacklight_helper_spec.rb +30 -4
  63. data/spec/javascripts/geoblacklight_spec.js +0 -6
  64. data/spec/javascripts/metadata_download_button_spec.js +5 -3
  65. data/spec/javascripts/util_spec.js +2 -4
  66. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +2 -2
  67. data/spec/lib/geoblacklight/download_spec.rb +1 -1
  68. data/spec/lib/geoblacklight/geometry_spec.rb +48 -0
  69. data/spec/lib/geoblacklight/item_viewer_spec.rb +12 -0
  70. data/spec/lib/geoblacklight/references_spec.rb +1 -1
  71. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +1 -1
  72. data/spec/lib/geoblacklight/relation/descendants_spec.rb +1 -1
  73. data/spec/test_app_templates/Gemfile.extra +1 -0
  74. data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -7
  75. data/spec/views/catalog/_document_split.html.erb_spec.rb +1 -1
  76. data/spec/views/catalog/_index_split.html.erb_spec.rb +1 -1
  77. data/template.rb +1 -0
  78. metadata +62 -26
  79. data/.circleci/config.yml +0 -256
  80. data/spec/javascripts/geoblacklight/viewers/esri/tiled_map_layer_spec.js +0 -12
  81. data/spec/javascripts/spec_helper.js +0 -32
  82. data/spec/lib/geoblacklight/controller_override_spec.rb +0 -2
  83. data/spec/teaspoon_env.rb +0 -214
data/.circleci/config.yml DELETED
@@ -1,256 +0,0 @@
1
- ---
2
- version: 2.1
3
- commands:
4
- restore_bundle_cache:
5
- description: "Restore gems installed by bundler"
6
- parameters:
7
- # Use this parameter to bust the cache, if needed
8
- cache_prefix:
9
- type: string
10
- default: "8-6-2020-A"
11
- ruby_version:
12
- type: string
13
- default: '2.7.2'
14
- rails_version:
15
- type: string
16
- default: '6.0.3.4'
17
- steps:
18
- - restore_cache:
19
- keys:
20
- - << parameters.cache_prefix >>-{{ checksum "geoblacklight.gemspec" }}-{{ checksum "Gemfile" }}-<< parameters.ruby_version >>-<< parameters.rails_version >>
21
- paths:
22
- - /home/circleci/geoblacklight/vendor/bundle
23
- save_bundle_cache:
24
- description: "Save gems installed by bundler"
25
- parameters:
26
- # Use this parameter to bust the cache, if needed
27
- cache_prefix:
28
- type: string
29
- default: "8-6-2020-A"
30
- ruby_version:
31
- type: string
32
- default: '2.7.2'
33
- rails_version:
34
- type: string
35
- default: '6.0.3.4'
36
- steps:
37
- - save_cache:
38
- key: << parameters.cache_prefix >>-{{ checksum "geoblacklight.gemspec" }}-{{ checksum "Gemfile" }}-<< parameters.ruby_version >>-<< parameters.rails_version >>
39
- paths:
40
- - /home/circleci/geoblacklight/vendor/bundle
41
- jobs:
42
- build:
43
- working_directory: ~/geoblacklight
44
- parameters:
45
- ruby_version:
46
- type: string
47
- default: '2.7.2'
48
- solr_port:
49
- type: string
50
- default: '8983'
51
- rails_version:
52
- type: string
53
- default: '6.0.3.4'
54
- coverage:
55
- type: boolean
56
- default: false
57
- docker:
58
- - image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
59
- - image: solr:7-alpine
60
- command: bin/solr -cloud -noprompt -f -p <<parameters.solr_port>>
61
- environment:
62
- GEM_HOME: /home/circleci/geoblacklight/vendor/bundle
63
- BUNDLE_PATH: /home/circleci/geoblacklight/vendor/bundle
64
- BUNDLE_JOBS: 4
65
- BUNDLE_RETRY: 3
66
- RAILS_ENV: test
67
- RACK_ENV: test
68
- RAILS_VERSION: <<parameters.rails_version>>
69
- steps:
70
- - checkout
71
- - restore_bundle_cache:
72
- ruby_version: << parameters.ruby_version >>
73
- rails_version: << parameters.rails_version >>
74
- # Install gems
75
- - run: bundle check || bundle install
76
- # Generate the internal test app
77
- - run:
78
- name: Generate test app
79
- command: |
80
- [ -e ./.internal_test_app ] || bundle exec rake engine_cart:generate
81
- - save_bundle_cache:
82
- ruby_version: << parameters.ruby_version >>
83
- rails_version: << parameters.rails_version >>
84
- - run:
85
- name: Wait for Solr
86
- command: dockerize -wait tcp://localhost:<<parameters.solr_port>> -timeout 1m
87
- - run:
88
- name: Load config into solr
89
- command: |
90
- cd .internal_test_app/solr/conf
91
- zip -1 -r solr_config.zip ./*
92
- curl -H "Content-type:application/octet-stream" --data-binary @solr_config.zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=solrconfig"
93
- curl -H 'Content-type: application/json' http://localhost:<<parameters.solr_port>>/api/collections/ -d '{create: {name: blacklight-core, config: solrconfig, numShards: 1}}'
94
- - run:
95
- name: Seed Solr
96
- command: |
97
- cd .internal_test_app
98
- bundle check || bundle install
99
- bundle exec rake geoblacklight:index:seed
100
- bundle exec rake geoblacklight:downloads:mkdir
101
- - when:
102
- condition: <<parameters.coverage>>
103
- steps:
104
- - run:
105
- name: Ensure simplecov is installed
106
- command: gem install simplecov
107
- - run:
108
- name: Run the RSpec test suites
109
- command: bundle exec rspec
110
- - run:
111
- name: Stash Coverage Results
112
- command: |
113
- cp -R coverage/ coverage_results/
114
- cp -R coverage/ /tmp/coverage_results/
115
- - persist_to_workspace:
116
- root: '~/geoblacklight'
117
- paths: 'coverage_results'
118
- - store_artifacts:
119
- path: /tmp/coverage_results/
120
- - unless:
121
- condition: <<parameters.coverage>>
122
- steps:
123
- - run:
124
- name: Run the RSpec test suites
125
- command: bundle exec rspec
126
- - run:
127
- name: Run the Teaspoon test suites
128
- command: bundle exec rake teaspoon
129
-
130
- rubocop:
131
- working_directory: ~/geoblacklight
132
- parameters:
133
- ruby_version:
134
- type: string
135
- default: '2.7.2'
136
- rails_version:
137
- type: string
138
- default: '6.0.3.4'
139
- docker:
140
- - image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
141
- environment:
142
- GEM_HOME: /home/circleci/geoblacklight/vendor/bundle
143
- BUNDLE_PATH: /home/circleci/geoblacklight/vendor/bundle
144
- BUNDLE_JOBS: 4
145
- BUNDLE_RETRY: 3
146
- RAILS_ENV: test
147
- RACK_ENV: test
148
- RAILS_VERSION: <<parameters.rails_version>>
149
- steps:
150
- - checkout
151
- - restore_bundle_cache:
152
- ruby_version: << parameters.ruby_version >>
153
- rails_version: << parameters.rails_version >>
154
- # Install gems and run rubocop
155
- - run: bundle check || bundle install
156
- - run: bundle exec rake rubocop
157
-
158
- coverage_report:
159
- working_directory: ~/geoblacklight
160
- parameters:
161
- ruby_version:
162
- type: string
163
- default: '2.7.2'
164
- rails_version:
165
- type: string
166
- default: '6.0.3.4'
167
- docker:
168
- - image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
169
- environment:
170
- GEM_HOME: /home/circleci/geoblacklight/vendor/bundle
171
- BUNDLE_PATH: /home/circleci/geoblacklight/vendor/bundle
172
- BUNDLE_JOBS: 4
173
- BUNDLE_RETRY: 3
174
- RAILS_ENV: test
175
- RACK_ENV: test
176
- RAILS_VERSION: <<parameters.rails_version>>
177
- steps:
178
- - checkout
179
- - attach_workspace:
180
- at: '~/geoblacklight'
181
- - restore_bundle_cache:
182
- ruby_version: << parameters.ruby_version >>
183
- rails_version: << parameters.rails_version >>
184
- # Install gems and check coverage
185
- - run: bundle check || bundle install
186
- - run:
187
- name: Merge and check coverage
188
- command: |
189
- RAILS_ENV=test bundle exec ruby ./bin/coverage.rb
190
- - store_artifacts:
191
- path: ~/geoblacklight/coverage
192
- destination: coverage
193
-
194
- workflows:
195
- version: 2.1
196
- build:
197
- jobs:
198
- - build:
199
- ruby_version: 2.7.2
200
- rails_version: 6.1.0
201
- name: "ruby2-7_rails6-1"
202
- - build:
203
- ruby_version: 2.7.2
204
- rails_version: 6.0.3.4
205
- coverage: true
206
- name: "ruby2-7_rails6-0"
207
- - build:
208
- ruby_version: 2.6.6
209
- rails_version: 6.0.3.4
210
- name: "ruby2-6_rails6-0"
211
- - build:
212
- ruby_version: 2.7.2
213
- rails_version: 5.2.4.4
214
- name: "ruby2-7_rails5-2"
215
- - build:
216
- ruby_version: 2.6.6
217
- rails_version: 5.2.4.4
218
- name: "ruby2-6_rails5-2"
219
- - rubocop:
220
- requires:
221
- - ruby2-7_rails6-0
222
- - coverage_report:
223
- requires:
224
- - ruby2-7_rails6-0
225
- nightly:
226
- triggers:
227
- - schedule:
228
- cron: "0 0 * * *"
229
- filters:
230
- branches:
231
- only:
232
- - master
233
- jobs:
234
- - build:
235
- ruby_version: 2.7.2
236
- rails_version: 6.0.3.4
237
- coverage: true
238
- name: "ruby2-7_rails6-0"
239
- - build:
240
- ruby_version: 2.6.6
241
- rails_version: 6.0.3.4
242
- name: "ruby2-6_rails6-0"
243
- - build:
244
- ruby_version: 2.7.2
245
- rails_version: 5.2.4.4
246
- name: "ruby2-7_rails5-2"
247
- - build:
248
- ruby_version: 2.6.6
249
- rails_version: 5.2.4.4
250
- name: "ruby2-6_rails5-2"
251
- - rubocop:
252
- requires:
253
- - ruby2-7_rails6-0
254
- - coverage_report:
255
- requires:
256
- - ruby2-7_rails6-0
@@ -1,12 +0,0 @@
1
- //= require geoblacklight
2
-
3
- describe('setupInspection', function() {
4
- describe('Inspect attribute on the map', function() {
5
- it('identifyFeatures is defined', function() {
6
- expect(L.esri.identifyFeatures).toBeDefined();
7
- });
8
- it('Tasks is not defined', function() {
9
- expect(L.esri.Tasks).toBeUndefined();
10
- });
11
- });
12
- });
@@ -1,32 +0,0 @@
1
- // Teaspoon includes some support files, but you can use anything from your own support path too.
2
- // require support/jasmine-jquery-1.7.0
3
- // require support/jasmine-jquery-2.0.0
4
- // require support/jasmine-jquery-2.1.0
5
- // require support/sinon
6
- // require support/your-support-file
7
- //
8
- // PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion.
9
- // Use this polyfill to avoid the confusion.
10
- //= require support/bind-poly
11
- //
12
- // You can require your own javascript files here. By default this will include everything in application, however you
13
- // may get better load performance if you require the specific files that are being used in the spec that tests them.
14
- //= require application
15
- //
16
- // Deferring execution
17
- // If you're using CommonJS, RequireJS or some other asynchronous library you can defer execution. Call
18
- // Teaspoon.execute() after everything has been loaded. Simple example of a timeout:
19
- //
20
- // Teaspoon.defer = true
21
- // setTimeout(Teaspoon.execute, 1000)
22
- //
23
- // Matching files
24
- // By default Teaspoon will look for files that match _spec.{js,js.coffee,.coffee}. Add a filename_spec.js file in your
25
- // spec path and it'll be included in the default suite automatically. If you want to customize suites, check out the
26
- // configuration in teaspoon_env.rb
27
- //
28
- // Manifest
29
- // If you'd rather require your spec files manually (to control order for instance) you can disable the suite matcher in
30
- // the configuration and use this file as a manifest.
31
- //
32
- // For more information: http://github.com/modeset/teaspoon
@@ -1,2 +0,0 @@
1
- # frozen_string_literal: true
2
- require 'spec_helper'
data/spec/teaspoon_env.rb DELETED
@@ -1,214 +0,0 @@
1
- # frozen_string_literal: true
2
- unless defined?(Rails)
3
- ENV['RAILS_ROOT'] = File.expand_path('../../', __FILE__)
4
- require File.expand_path('../../config/environment', __FILE__)
5
- end
6
-
7
- # Teaspoon doesn't allow you to pass client driver options to the Selenium WebDriver. This monkey patch
8
- # is a temporary fix until this PR is merged: https://github.com/jejacks0n/teaspoon/pull/519.
9
- require 'teaspoon/driver/selenium'
10
-
11
- Teaspoon::Driver::Selenium.class_eval do
12
- def run_specs(runner, url)
13
- driver = ::Selenium::WebDriver.for(
14
- driver_options[:client_driver],
15
- **driver_options[:selenium_options].to_hash.to_options
16
- )
17
- driver.navigate.to(url)
18
-
19
- ::Selenium::WebDriver::Wait.new(driver_options).until do
20
- done = driver.execute_script('return window.Teaspoon && window.Teaspoon.finished')
21
- driver.execute_script('return window.Teaspoon && window.Teaspoon.getMessages() || []').each do |line|
22
- runner.process("#{line}\n")
23
- end
24
- done
25
- end
26
- ensure
27
- driver&.quit
28
- end
29
- end
30
-
31
- Teaspoon.configure do |config|
32
- # Determines where the Teaspoon routes will be mounted. Changing this to "/jasmine" would allow you to browse to
33
- # `http://localhost:3000/jasmine` to run your tests.
34
- config.mount_at = '/teaspoon'
35
-
36
- # Specifies the root where Teaspoon will look for files. If you're testing an engine using a dummy application it can
37
- # be useful to set this to your engines root (e.g. `Teaspoon::Engine.root`).
38
- # Note: Defaults to `Rails.root` if nil.
39
- config.root = Geoblacklight::Engine.root
40
-
41
- # Paths that will be appended to the Rails assets paths
42
- # Note: Relative to `config.root`.
43
- config.asset_paths = ['spec/javascripts', 'spec/javascripts/stylesheets']
44
-
45
- # Fixtures are rendered through a controller, which allows using HAML, RABL/JBuilder, etc. Files in these paths will
46
- # be rendered as fixtures.
47
- config.fixture_paths = ['spec/javascripts/fixtures']
48
-
49
- # SUITES
50
- #
51
- # You can modify the default suite configuration and create new suites here. Suites are isolated from one another.
52
- #
53
- # When defining a suite you can provide a name and a block. If the name is left blank, :default is assumed. You can
54
- # omit various directives and the ones defined in the default suite will be used.
55
- #
56
- # To run a specific suite
57
- # - in the browser: http://localhost/teaspoon/[suite_name]
58
- # - with the rake task: rake teaspoon suite=[suite_name]
59
- # - with the cli: teaspoon --suite=[suite_name]
60
- config.suite do |suite|
61
- # Specify the framework you would like to use. This allows you to select versions, and will do some basic setup for
62
- # you -- which you can override with the directives below. This should be specified first, as it can override other
63
- # directives.
64
- # Note: If no version is specified, the latest is assumed.
65
- #
66
- # Versions: 1.3.1, 2.0.3, 2.1.3, 2.2.0
67
- suite.use_framework :jasmine, '2.2.0'
68
-
69
- # Specify a file matcher as a regular expression and all matching files will be loaded when the suite is run. These
70
- # files need to be within an asset path. You can add asset paths using the `config.asset_paths`.
71
- suite.matcher = '{spec/javascripts,app/assets}/**/*_spec.{js,js.coffee,coffee}'
72
-
73
- # Load additional JS files, but requiring them in your spec helper is the preferred way to do this.
74
- # suite.javascripts = []
75
-
76
- # You can include your own stylesheets if you want to change how Teaspoon looks.
77
- # Note: Spec related CSS can and should be loaded using fixtures.
78
- # suite.stylesheets = ["teaspoon"]
79
-
80
- # This suites spec helper, which can require additional support files. This file is loaded before any of your test
81
- # files are loaded.
82
- suite.helper = 'spec_helper'
83
-
84
- # Partial to be rendered in the head tag of the runner. You can use the provided ones or define your own by creating
85
- # a `_boot.html.erb` in your fixtures path, and adjust the config to `"/boot"` for instance.
86
- #
87
- # Available: boot, boot_require_js
88
- suite.boot_partial = 'boot'
89
-
90
- # Partial to be rendered in the body tag of the runner. You can define your own to create a custom body structure.
91
- suite.body_partial = 'body'
92
-
93
- # Hooks allow you to use `Teaspoon.hook("fixtures")` before, after, or during your spec run. This will make a
94
- # synchronous Ajax request to the server that will call all of the blocks you've defined for that hook name.
95
- # suite.hook :fixtures, &proc{}
96
-
97
- # Determine whether specs loaded into the test harness should be embedded as individual script tags or concatenated
98
- # into a single file. Similar to Rails' asset `debug: true` and `config.assets.debug = true` options. By default,
99
- # Teaspoon expands all assets to provide more valuable stack traces that reference individual source files.
100
- # suite.expand_assets = true
101
- end
102
-
103
- # Example suite. Since we're just filtering to files already within the root test/javascripts, these files will also
104
- # be run in the default suite -- but can be focused into a more specific suite.
105
- # config.suite :targeted do |suite|
106
- # suite.matcher = "spec/javascripts/targeted/*_spec.{js,js.coffee,coffee}"
107
- # end
108
-
109
- # CONSOLE RUNNER SPECIFIC
110
- #
111
- # These configuration directives are applicable only when running via the rake task or command line interface. These
112
- # directives can be overridden using the command line interface arguments or with ENV variables when using the rake
113
- # task.
114
- #
115
- # Command Line Interface:
116
- # teaspoon --driver=phantomjs --server-port=31337 --fail-fast=true --format=junit --suite=my_suite /spec/file_spec.js
117
- #
118
- # Rake:
119
- # teaspoon DRIVER=phantomjs SERVER_PORT=31337 FAIL_FAST=true FORMATTERS=junit suite=my_suite
120
-
121
- # Specify which headless driver to use. Supports PhantomJS and Selenium Webdriver.
122
- #
123
- # Available: :phantomjs, :selenium, :capybara_webkit
124
- # PhantomJS: https://github.com/modeset/teaspoon/wiki/Using-PhantomJS
125
- # Selenium Webdriver: https://github.com/modeset/teaspoon/wiki/Using-Selenium-WebDriver
126
- # Capybara Webkit: https://github.com/modeset/teaspoon/wiki/Using-Capybara-Webkit
127
- config.driver = :selenium
128
- config.driver_options = {
129
- client_driver: :chrome,
130
- selenium_options: {
131
- options: Selenium::WebDriver::Chrome::Options.new(args: ['headless', 'disable-gpu'])
132
- }
133
- }
134
-
135
- # Specify additional options for the driver.
136
- #
137
- # PhantomJS: https://github.com/modeset/teaspoon/wiki/Using-PhantomJS
138
- # Selenium Webdriver: https://github.com/modeset/teaspoon/wiki/Using-Selenium-WebDriver
139
- # Capybara Webkit: https://github.com/modeset/teaspoon/wiki/Using-Capybara-Webkit
140
- # config.driver_options = nil
141
-
142
- # Specify the timeout for the driver. Specs are expected to complete within this time frame or the run will be
143
- # considered a failure. This is to avoid issues that can arise where tests stall.
144
- # config.driver_timeout = 180
145
-
146
- # Specify a server to use with Rack (e.g. thin, mongrel). If nil is provided Rack::Server is used.
147
- # config.server = nil
148
-
149
- # Specify a port to run on a specific port, otherwise Teaspoon will use a random available port.
150
- # config.server_port = nil
151
-
152
- # Timeout for starting the server in seconds. If your server is slow to start you may have to bump this, or you may
153
- # want to lower this if you know it shouldn't take long to start.
154
- # config.server_timeout = 20
155
-
156
- # Force Teaspoon to fail immediately after a failing suite. Can be useful to make Teaspoon fail early if you have
157
- # several suites, but in environments like CI this may not be desirable.
158
- # config.fail_fast = true
159
-
160
- # Specify the formatters to use when outputting the results.
161
- # Note: Output files can be specified by using `"junit>/path/to/output.xml"`.
162
- #
163
- # Available: :dot, :clean, :documentation, :json, :junit, :pride, :rspec_html, :snowday, :swayze_or_oprah, :tap, :tap_y, :teamcity
164
- # config.formatters = [:dot]
165
-
166
- # Specify if you want color output from the formatters.
167
- # config.color = true
168
-
169
- # Teaspoon pipes all console[log/debug/error] to $stdout. This is useful to catch places where you've forgotten to
170
- # remove them, but in verbose applications this may not be desirable.
171
- # config.suppress_log = false
172
-
173
- # COVERAGE REPORTS / THRESHOLD ASSERTIONS
174
- #
175
- # Coverage reports requires Istanbul (https://github.com/gotwarlost/istanbul) to add instrumentation to your code and
176
- # display coverage statistics.
177
- #
178
- # Coverage configurations are similar to suites. You can define several, and use different ones under different
179
- # conditions.
180
- #
181
- # To run with a specific coverage configuration
182
- # - with the rake task: rake teaspoon USE_COVERAGE=[coverage_name]
183
- # - with the cli: teaspoon --coverage=[coverage_name]
184
-
185
- # Specify that you always want a coverage configuration to be used. Otherwise, specify that you want coverage
186
- # on the CLI.
187
- # Set this to "true" or the name of your coverage config.
188
- # config.use_coverage = nil
189
-
190
- # You can have multiple coverage configs by passing a name to config.coverage.
191
- # e.g. config.coverage :ci do |coverage|
192
- # The default coverage config name is :default.
193
- config.coverage do |coverage|
194
- # Which coverage reports Istanbul should generate. Correlates directly to what Istanbul supports.
195
- #
196
- # Available: text-summary, text, html, lcov, lcovonly, cobertura, teamcity
197
- # coverage.reports = ["text-summary", "html"]
198
-
199
- # The path that the coverage should be written to - when there's an artifact to write to disk.
200
- # Note: Relative to `config.root`.
201
- # coverage.output_path = "coverage"
202
-
203
- # Assets to be ignored when generating coverage reports. Accepts an array of filenames or regular expressions. The
204
- # default excludes assets from vendor, gems and support libraries.
205
- # coverage.ignore = [%r{/lib/ruby/gems/}, %r{/vendor/assets/}, %r{/support/}, %r{/(.+)_helper.}]
206
-
207
- # Various thresholds requirements can be defined, and those thresholds will be checked at the end of a run. If any
208
- # aren't met the run will fail with a message. Thresholds can be defined as a percentage (0-100), or nil.
209
- # coverage.statements = nil
210
- # coverage.functions = nil
211
- # coverage.branches = nil
212
- # coverage.lines = nil
213
- end
214
- end