pageflow-sitemap 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +25 -0
- data/.jshintrc +18 -0
- data/Gemfile +24 -0
- data/LICENSE.md +20 -0
- data/README.md +47 -0
- data/Rakefile +32 -0
- data/app/assets/images/pageflow/sitemap/.keep +0 -0
- data/app/assets/javascripts/pageflow/sitemap/.keep +0 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/controllers/abstract_controller.js +68 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/controllers/editor_mode_controller.js +301 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/controllers/fragment_parser.js +31 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/controllers/selection_mode_controller.js +37 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/controllers/selection_navigator.js +43 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/behaviors/mouse_wheel.js +43 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/behaviors/multi_drag.js +73 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/behaviors/scroll_and_zoom.js +286 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/behaviors/selection_rect.js +104 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/behaviors/tooltip_target.js +24 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/graph_view.js +277 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/layout/chapter_collision.js +33 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/layout/collision.js +116 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/layout/dragging_decorator.js +58 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/layout/grid.js +238 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/layout/link_dragging_decorator.js +42 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/layout.js +94 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/options.js +25 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/paths/follow_path.js +36 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/paths/linkpath.js +64 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/paths/successor_path.js +49 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/utils.js +33 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/view_model.js +202 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/add_button_view.js +28 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/chapter_placeholders_view.js +22 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/chapters_view.js +89 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/group_view.js +104 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/page_links_view.js +7 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/pages_view.js +112 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/selectable_links_view.js +104 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/storylines_view.js +86 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/successor_links_view.js +7 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/text_label_view.js +45 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/d3.js +20 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/feature.js +126 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/models/selection.js +41 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/templates/scroll_bar.jst.ejs +2 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/templates/sitemap.jst.ejs +85 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/views/scroll_bar_view.js +130 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/views/scroll_pane_view.js +73 -0
- data/app/assets/javascripts/pageflow/sitemap/editor/views/sitemap_view.js +137 -0
- data/app/assets/javascripts/pageflow/sitemap/editor.js +14 -0
- data/app/assets/javascripts/pageflow/sitemap/feature.js +3 -0
- data/app/assets/javascripts/pageflow/sitemap/scroll_navigator.js +112 -0
- data/app/assets/javascripts/pageflow/sitemap.js +5 -0
- data/app/assets/stylesheets/pageflow/sitemap/.keep +0 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor/add_button.scss +29 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor/chapter_placeholders.scss +14 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor/chapters.scss +62 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor/page_links.scss +19 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor/pages.scss +78 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor/scroll_bar.css.scss +33 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor/scroll_pane.scss +15 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor/selectable_links.scss +88 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor/selection_rect.scss +12 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor/storylines.scss +59 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor/successor_links.scss +42 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor/text_label.scss +23 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor/toolbar.css.scss +45 -0
- data/app/assets/stylesheets/pageflow/sitemap/editor.css.scss +96 -0
- data/config/locales/de.yml +16 -0
- data/config/locales/en.yml +48 -0
- data/config/locales/new/help_button.de.yml +7 -0
- data/config/locales/new/help_button.en.yml +7 -0
- data/config/locales/new/tooltips.de.yml +11 -0
- data/config/locales/new/tooltips.en.yml +11 -0
- data/config/routes.rb +7 -0
- data/config/spring.rb +1 -0
- data/exec/rails +12 -0
- data/exec/spring +18 -0
- data/exec/teaspoon +17 -0
- data/lib/pageflow/sitemap/engine.rb +10 -0
- data/lib/pageflow/sitemap/plugin.rb +11 -0
- data/lib/pageflow/sitemap/version.rb +5 -0
- data/lib/pageflow-sitemap.rb +9 -0
- data/pageflow-sitemap.gemspec +29 -0
- data/spec/d/r/.gitignore +16 -0
- data/spec/d/r/README.rdoc +28 -0
- data/spec/d/r/Rakefile +6 -0
- data/spec/d/r/app/admin/dashboard.rb +33 -0
- data/spec/d/r/app/assets/images/.keep +0 -0
- data/spec/d/r/app/assets/javascripts/active_admin.js.coffee +2 -0
- data/spec/d/r/app/assets/javascripts/application.js +16 -0
- data/spec/d/r/app/assets/javascripts/pageflow/application.js +1 -0
- data/spec/d/r/app/assets/javascripts/pageflow/editor.js +4 -0
- data/spec/d/r/app/assets/stylesheets/active_admin.css.scss +18 -0
- data/spec/d/r/app/assets/stylesheets/application.css +13 -0
- data/spec/d/r/app/assets/stylesheets/pageflow/application.css.scss +1 -0
- data/spec/d/r/app/assets/stylesheets/pageflow/editor.css.scss +1 -0
- data/spec/d/r/app/controllers/application_controller.rb +5 -0
- data/spec/d/r/app/controllers/concerns/.keep +0 -0
- data/spec/d/r/app/helpers/application_helper.rb +2 -0
- data/spec/d/r/app/mailers/.keep +0 -0
- data/spec/d/r/app/models/.keep +0 -0
- data/spec/d/r/app/models/ability.rb +12 -0
- data/spec/d/r/app/models/concerns/.keep +0 -0
- data/spec/d/r/app/models/user.rb +9 -0
- data/spec/d/r/app/views/layouts/application.html.erb +14 -0
- data/spec/d/r/bin/bundle +3 -0
- data/spec/d/r/bin/rails +4 -0
- data/spec/d/r/bin/rake +4 -0
- data/spec/d/r/config/application.rb +31 -0
- data/spec/d/r/config/boot.rb +4 -0
- data/spec/d/r/config/database.yml +39 -0
- data/spec/d/r/config/environment.rb +5 -0
- data/spec/d/r/config/environments/development.rb +29 -0
- data/spec/d/r/config/environments/production.rb +80 -0
- data/spec/d/r/config/environments/test.rb +37 -0
- data/spec/d/r/config/initializers/active_admin.rb +225 -0
- data/spec/d/r/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/d/r/config/initializers/devise.rb +252 -0
- data/spec/d/r/config/initializers/devise_async.rb +6 -0
- data/spec/d/r/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/d/r/config/initializers/friendly_id.rb +88 -0
- data/spec/d/r/config/initializers/inflections.rb +16 -0
- data/spec/d/r/config/initializers/mime_types.rb +5 -0
- data/spec/d/r/config/initializers/pageflow.rb +76 -0
- data/spec/d/r/config/initializers/resque.rb +4 -0
- data/spec/d/r/config/initializers/resque_enqueue_after_commit_patch.rb +25 -0
- data/spec/d/r/config/initializers/resque_logger.rb +16 -0
- data/spec/d/r/config/initializers/resque_mailer.rb +4 -0
- data/spec/d/r/config/initializers/secret_token.rb +12 -0
- data/spec/d/r/config/initializers/session_store.rb +3 -0
- data/spec/d/r/config/initializers/wrap_parameters.rb +14 -0
- data/spec/d/r/config/locales/devise.en.yml +59 -0
- data/spec/d/r/config/locales/en.yml +23 -0
- data/spec/d/r/config/routes.rb +59 -0
- data/spec/d/r/config.ru +4 -0
- data/spec/d/r/db/migrate/00000000000000_create_test_hosted_file.rb +7 -0
- data/spec/d/r/db/migrate/00000000000001_create_test_revision_component.rb +10 -0
- data/spec/d/r/db/migrate/20150209101518_create_active_admin_comments.rb +19 -0
- data/spec/d/r/db/migrate/20150209101524_devise_create_users.rb +46 -0
- data/spec/d/r/db/migrate/20150209101530_create_friendly_id_slugs.rb +15 -0
- data/spec/d/r/db/migrate/20150209101540_setup_schema.pageflow.rb +208 -0
- data/spec/d/r/db/migrate/20150209101541_add_attributes_to_users.pageflow.rb +16 -0
- data/spec/d/r/db/migrate/20150209101542_create_themings.pageflow.rb +16 -0
- data/spec/d/r/db/migrate/20150209101543_create_themings_for_existing_accounts.pageflow.rb +27 -0
- data/spec/d/r/db/migrate/20150209101544_change_theme_references_to_theming_references.pageflow.rb +46 -0
- data/spec/d/r/db/migrate/20150209101545_remove_attributes_from_themes.pageflow.rb +11 -0
- data/spec/d/r/db/migrate/20150209101546_create_accounts_themes_join_table.pageflow.rb +9 -0
- data/spec/d/r/db/migrate/20150209101547_move_cname_from_account_to_theming.pageflow.rb +22 -0
- data/spec/d/r/db/migrate/20150209101548_drop_themes.pageflow.rb +15 -0
- data/spec/d/r/db/migrate/20150209101549_add_confirmed_by_to_encoded_files.pageflow.rb +7 -0
- data/spec/d/r/db/migrate/20150209101550_add_home_url_attributes_to_themings_and_revisions.pageflow.rb +10 -0
- data/spec/d/r/db/migrate/20150209101551_create_widgets.pageflow.rb +12 -0
- data/spec/d/r/db/migrate/20150209101552_add_emphasize_chapter_beginning_to_revisions.pageflow.rb +6 -0
- data/spec/d/r/db/migrate/20150209101553_add_emphasize_new_pages_to_revisions.pageflow.rb +6 -0
- data/spec/d/r/db/migrate/20150209101554_add_sharing_image_to_revisions.pageflow.rb +8 -0
- data/spec/d/r/db/schema.rb +316 -0
- data/spec/d/r/db/seeds.rb +30 -0
- data/spec/d/r/lib/assets/.keep +0 -0
- data/spec/d/r/lib/tasks/.keep +0 -0
- data/spec/d/r/lib/tasks/resque.rake +7 -0
- data/spec/d/r/public/404.html +58 -0
- data/spec/d/r/public/422.html +58 -0
- data/spec/d/r/public/500.html +57 -0
- data/spec/d/r/public/favicon.ico +0 -0
- data/spec/d/r/public/javascripts/translations.js +2 -0
- data/spec/d/r/public/robots.txt +5 -0
- data/spec/d/r/vendor/assets/javascripts/.keep +0 -0
- data/spec/d/r/vendor/assets/stylesheets/.keep +0 -0
- data/spec/javascripts/.jshintrc +26 -0
- data/spec/javascripts/pageflow/sitemap/editor/controllers/selection_navigator_spec.js +52 -0
- data/spec/javascripts/pageflow/sitemap/editor/d3/layout/collision_spec.js +99 -0
- data/spec/javascripts/pageflow/sitemap/editor/d3/layout/dragging_decorator_spec.js +114 -0
- data/spec/javascripts/pageflow/sitemap/editor/d3/layout/grid_spec.js +183 -0
- data/spec/javascripts/pageflow/sitemap/editor/d3/layout_spec.js +31 -0
- data/spec/javascripts/pageflow/sitemap/editor/d3/view_model_spec.js +56 -0
- data/spec/javascripts/pageflow/sitemap/editor/models/selection_spec.js +62 -0
- data/spec/javascripts/pageflow/sitemap/scroll_navigator_spec.js +5 -0
- data/spec/javascripts/spec_helper.js +13 -0
- data/spec/javascripts/support/factories.js +81 -0
- data/spec/teaspoon_env.rb +182 -0
- data/vendor/assets/javascripts/d3.v3.js +9215 -0
- metadata +379 -0
@@ -0,0 +1,182 @@
|
|
1
|
+
# Set RAILS_ROOT and load the environment if it's not already loaded.
|
2
|
+
unless defined?(Rails)
|
3
|
+
ENV["RAILS_ROOT"] = File.expand_path("../dummy/rails-4.0.5/", __FILE__)
|
4
|
+
require File.expand_path("../dummy/rails-4.0.5/config/environment", __FILE__)
|
5
|
+
end
|
6
|
+
|
7
|
+
Teaspoon.configure do |config|
|
8
|
+
|
9
|
+
# Determines where the Teaspoon routes will be mounted. Changing this to "/jasmine" would allow you to browse to
|
10
|
+
# `http://localhost:3000/jasmine` to run your tests.
|
11
|
+
#config.mount_at = "/teaspoon"
|
12
|
+
|
13
|
+
# Specifies the root where Teaspoon will look for files. If you're testing an engine using a dummy application it can
|
14
|
+
# be useful to set this to your engines root (e.g. `Teaspoon::Engine.root`).
|
15
|
+
# Note: Defaults to `Rails.root` if nil.
|
16
|
+
config.root = Pageflow::Sitemap::Engine.root
|
17
|
+
|
18
|
+
# Paths that will be appended to the Rails assets paths
|
19
|
+
# Note: Relative to `config.root`.
|
20
|
+
#config.asset_paths = ["spec/javascripts", "spec/javascripts/stylesheets"]
|
21
|
+
|
22
|
+
# Fixtures are rendered through a controller, which allows using HAML, RABL/JBuilder, etc. Files in these paths will
|
23
|
+
# be rendered as fixtures.
|
24
|
+
#config.fixture_paths = ["spec/javascripts/fixtures"]
|
25
|
+
|
26
|
+
# SUITES
|
27
|
+
#
|
28
|
+
# You can modify the default suite configuration and create new suites here. Suites are isolated from one another.
|
29
|
+
#
|
30
|
+
# When defining a suite you can provide a name and a block. If the name is left blank, :default is assumed. You can
|
31
|
+
# omit various directives and the ones defined in the default suite will be used.
|
32
|
+
#
|
33
|
+
# To run a specific suite
|
34
|
+
# - in the browser: http://localhost/teaspoon/[suite_name]
|
35
|
+
# - with the rake task: rake teaspoon suite=[suite_name]
|
36
|
+
# - with the cli: teaspoon --suite=[suite_name]
|
37
|
+
config.suite do |suite|
|
38
|
+
|
39
|
+
# Specify the framework you would like to use. This allows you to select versions, and will do some basic setup for
|
40
|
+
# you -- which you can override with the directives below. This should be specified first, as it can override other
|
41
|
+
# directives.
|
42
|
+
# Note: If no version is specified, the latest is assumed.
|
43
|
+
#
|
44
|
+
# Available: jasmine[1.3.1], mocha[1.10.0, 1.17.1] qunit[1.12.0, 1.14.0]
|
45
|
+
suite.use_framework :mocha, "1.17.1"
|
46
|
+
|
47
|
+
# Specify a file matcher as a regular expression and all matching files will be loaded when the suite is run. These
|
48
|
+
# files need to be within an asset path. You can add asset paths using the `config.asset_paths`.
|
49
|
+
#suite.matcher = "{spec/javascripts,app/assets}/**/*_spec.{js,js.coffee,coffee}"
|
50
|
+
|
51
|
+
# This suites spec helper, which can require additional support files. This file is loaded before any of your test
|
52
|
+
# files are loaded.
|
53
|
+
#suite.helper = "spec_helper"
|
54
|
+
|
55
|
+
# The core Teaspoon javascripts. It's recommended to include only the base files here, as you can require support
|
56
|
+
# libraries from your spec helper.
|
57
|
+
# Note: For CoffeeScript files use `"teaspoon/jasmine"` etc.
|
58
|
+
#
|
59
|
+
# Available: teaspoon-jasmine, teaspoon-mocha, teaspoon-qunit
|
60
|
+
#suite.javascripts = ["jasmine/1.3.1", "teaspoon-jasmine"]
|
61
|
+
|
62
|
+
# You can include your own stylesheets if you want to change how Teaspoon looks.
|
63
|
+
# Note: Spec related CSS can and should be loaded using fixtures.
|
64
|
+
#suite.stylesheets = ["teaspoon"]
|
65
|
+
|
66
|
+
# Partial to be rendered in the head tag of the runner. You can use the provided ones or define your own by creating
|
67
|
+
# a `_boot.html.erb` in your fixtures path, and adjust the config to `"/boot"` for instance.
|
68
|
+
#
|
69
|
+
# Available: boot, boot_require_js
|
70
|
+
#suite.boot_partial = "boot"
|
71
|
+
|
72
|
+
# Partial to be rendered in the body tag of the runner. You can define your own to create a custom body structure.
|
73
|
+
#suite.body_partial = "body"
|
74
|
+
|
75
|
+
# Assets to be ignored when generating coverage reports. Accepts an array of filenames or regular expressions. The
|
76
|
+
# default excludes assets from vendor, gems and support libraries.<br/><br/>
|
77
|
+
#suite.no_coverage = [%r{/lib/ruby/gems/}, %r{/vendor/assets/}, %r{/support/}, %r{/(.+)_helper.}]
|
78
|
+
|
79
|
+
# Hooks allow you to use `Teaspoon.hook("fixtures")` before, after, or during your spec run. This will make a
|
80
|
+
# synchronous Ajax request to the server that will call all of the blocks you've defined for that hook name.
|
81
|
+
#suite.hook :fixtures, proc{ }
|
82
|
+
|
83
|
+
end
|
84
|
+
|
85
|
+
# Example suite. Since we're just filtering to files already within the root test/javascripts, these files will also
|
86
|
+
# be run in the default suite -- but can be focused into a more specific suite.
|
87
|
+
#config.suite :targeted do |suite|
|
88
|
+
# suite.matcher = "test/javascripts/targeted/*_test.{js,js.coffee,coffee}"
|
89
|
+
#end
|
90
|
+
|
91
|
+
# CONSOLE RUNNER SPECIFIC
|
92
|
+
#
|
93
|
+
# These configuration directives are applicable only when running via the rake task or command line interface. These
|
94
|
+
# directives can be overridden using the command line interface arguments or with ENV variables when using the rake
|
95
|
+
# task.
|
96
|
+
#
|
97
|
+
# Command Line Interface:
|
98
|
+
# teaspoon --driver=phantomjs --server-port=31337 --fail-fast=true --format=junit --suite=my_suite /spec/file_spec.js
|
99
|
+
#
|
100
|
+
# Rake:
|
101
|
+
# teaspoon DRIVER=phantomjs SERVER_PORT=31337 FAIL_FAST=true FORMATTERS=junit suite=my_suite
|
102
|
+
|
103
|
+
# Specify which headless driver to use. Supports PhantomJS and Selenium Webdriver.
|
104
|
+
#
|
105
|
+
# Available: phantomjs, selenium
|
106
|
+
# PhantomJS: https://github.com/modeset/teaspoon/wiki/Using-PhantomJS
|
107
|
+
# Selenium Webdriver: https://github.com/modeset/teaspoon/wiki/Using-Selenium-WebDriver
|
108
|
+
#config.driver = "phantomjs"
|
109
|
+
|
110
|
+
# Specify additional options for the driver.
|
111
|
+
#
|
112
|
+
# PhantomJS: https://github.com/modeset/teaspoon/wiki/Using-PhantomJS
|
113
|
+
# Selenium Webdriver: https://github.com/modeset/teaspoon/wiki/Using-Selenium-WebDriver
|
114
|
+
#config.driver_options = nil
|
115
|
+
|
116
|
+
# Specify the timeout for the driver. Specs are expected to complete within this time frame or the run will be
|
117
|
+
# considered a failure. This is to avoid issues that can arise where tests stall.
|
118
|
+
#config.driver_timeout = 180
|
119
|
+
|
120
|
+
# Specify a server to use with Rack (e.g. thin, mongrel). If nil is provided Rack::Server is used.
|
121
|
+
#config.server = nil
|
122
|
+
|
123
|
+
# Specify a port to run on a specific port, otherwise Teaspoon will use a random available port.
|
124
|
+
#config.server_port = nil
|
125
|
+
|
126
|
+
# Timeout for starting the server in seconds. If your server is slow to start you may have to bump this, or you may
|
127
|
+
# want to lower this if you know it shouldn't take long to start.
|
128
|
+
#config.server_timeout = 20
|
129
|
+
|
130
|
+
# Force Teaspoon to fail immediately after a failing suite. Can be useful to make Teaspoon fail early if you have
|
131
|
+
# several suites, but in environments like CI this may not be desirable.
|
132
|
+
#config.fail_fast = true
|
133
|
+
|
134
|
+
# Specify the formatters to use when outputting the results.
|
135
|
+
# Note: Output files can be specified by using `"junit>/path/to/output.xml"`.
|
136
|
+
#
|
137
|
+
# Available: dot, documentation, clean, json, junit, pride, snowday, swayze_or_oprah, tap, tap_y, teamcity
|
138
|
+
#config.formatters = ["dot"]
|
139
|
+
|
140
|
+
# Specify if you want color output from the formatters.
|
141
|
+
#config.color = true
|
142
|
+
|
143
|
+
# Teaspoon pipes all console[log/debug/error] to $stdout. This is useful to catch places where you've forgotten to
|
144
|
+
# remove them, but in verbose applications this may not be desirable.
|
145
|
+
#config.suppress_log = false
|
146
|
+
|
147
|
+
# COVERAGE REPORTS / THRESHOLD ASSERTIONS
|
148
|
+
#
|
149
|
+
# Coverage reports requires Istanbul (https://github.com/gotwarlost/istanbul) to add instrumentation to your code and
|
150
|
+
# display coverage statistics.
|
151
|
+
#
|
152
|
+
# Coverage configurations are similar to suites. You can define several, and use different ones under different
|
153
|
+
# conditions.
|
154
|
+
#
|
155
|
+
# To run with a specific coverage configuration
|
156
|
+
# - with the rake task: rake teaspoon USE_COVERAGE=[coverage_name]
|
157
|
+
# - with the cli: teaspoon --coverage=[coverage_name]
|
158
|
+
|
159
|
+
# Specify that you always want a coverage configuration to be used.
|
160
|
+
#config.use_coverage = nil
|
161
|
+
|
162
|
+
config.coverage do |coverage|
|
163
|
+
|
164
|
+
# Which coverage reports Istanbul should generate. Correlates directly to what Istanbul supports.
|
165
|
+
#
|
166
|
+
# Available: text-summary, text, html, lcov, lcovonly, cobertura, teamcity
|
167
|
+
#coverage.reports = ["text-summary", "html"]
|
168
|
+
|
169
|
+
# The path that the coverage should be written to - when there's an artifact to write to disk.
|
170
|
+
# Note: Relative to `config.root`.
|
171
|
+
#coverage.output_path = "coverage"
|
172
|
+
|
173
|
+
# Various thresholds requirements can be defined, and those thresholds will be checked at the end of a run. If any
|
174
|
+
# aren't met the run will fail with a message. Thresholds can be defined as a percentage (0-100), or nil.
|
175
|
+
#coverage.statements = nil
|
176
|
+
#coverage.functions = nil
|
177
|
+
#coverage.branches = nil
|
178
|
+
#coverage.lines = nil
|
179
|
+
|
180
|
+
end
|
181
|
+
|
182
|
+
end
|