-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env ruby | ||
Check notice Code scanning / Rubocop Add the frozen_string_literal comment to the top of files to help transition to frozen string literals by default. Note
Style/FrozenStringLiteralComment: Missing frozen string literal comment.
|
||
|
||
# (The MIT License) | ||
# Copyright (c) 2012 Chad Humphries, David Chelimsky, Myron Marston | ||
# Copyright (c) 2009 Chad Humphries, David Chelimsky | ||
# Copyright (c) 2006 David Chelimsky, The RSpec Development Team | ||
# Copyright (c) 2005 Steven Baker | ||
|
||
require 'rspec/core' | ||
RSpec::Core::Runner.invoke |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env ruby | ||
Check notice Code scanning / Rubocop Add the frozen_string_literal comment to the top of files to help transition to frozen string literals by default. Note
Style/FrozenStringLiteralComment: Missing frozen string literal comment.
|
||
|
||
# (The MIT License) | ||
# Copyright (c) 2012 Chad Humphries, David Chelimsky, Myron Marston | ||
# Copyright (c) 2009 Chad Humphries, David Chelimsky | ||
# Copyright (c) 2006 David Chelimsky, The RSpec Development Team | ||
# Copyright (c) 2005 Steven Baker | ||
|
||
# Turn on verbose to make sure we not generating any ruby warning | ||
$VERBOSE = true | ||
|
||
# So our "did they run the rspec command?" detection logic thinks | ||
# that we run `rspec`. | ||
$0 = "rspec" | ||
Check notice Code scanning / Rubocop Checks if uses of quotes match the configured preference. Note
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
||
|
||
# This is necessary for when `--standalone` is being used. | ||
$:.unshift File.expand_path '../../bundle', __FILE__ | ||
Check notice Code scanning / Rubocop Avoid Perl-style global variables. Note
Style/SpecialGlobalVars: Prefer $LOAD\_PATH over $:.
Check notice Code scanning / Rubocop Use `expand_path(__dir__)` instead of `expand_path('..', __FILE__)`. Note
Style/ExpandPathArguments: Use expand\_path('../bundle', \_\_dir\_\_) instead of expand\_path('../../bundle', \_\_FILE\_\_).
|
||
|
||
# For the travis build we put the bundle directory up a directory | ||
# so it can be shared among the repos for faster bundle installs. | ||
$:.unshift File.expand_path '../../../bundle', __FILE__ | ||
Check notice Code scanning / Rubocop Avoid Perl-style global variables. Note
Style/SpecialGlobalVars: Prefer $LOAD\_PATH over $:.
Check notice Code scanning / Rubocop Use `expand_path(__dir__)` instead of `expand_path('..', __FILE__)`. Note
Style/ExpandPathArguments: Use expand\_path('../../bundle', \_\_dir\_\_) instead of expand\_path('../../../bundle', \_\_FILE\_\_).
|
||
|
||
require 'bundler/setup' | ||
|
||
# To use simplecov while running rspec-core's test suite, we must | ||
# load simplecov _before_ loading any of rspec-core's files. | ||
# So, this executable exists purely as a wrapper script that | ||
# first loads simplecov, and then loads rspec. | ||
begin | ||
# Simplecov emits some ruby warnings when loaded, so silence them. | ||
old_verbose, $VERBOSE = $VERBOSE, false | ||
Check notice Code scanning / Rubocop Check for simple usages of parallel assignment. It will only warn when the number of variables matches on both sides of the assignment. Note
Style/ParallelAssignment: Do not use parallel assignment.
|
||
|
||
unless ENV['NO_COVERAGE'] || RUBY_VERSION < '1.9.3' | ||
require 'simplecov' | ||
|
||
SimpleCov.start do | ||
add_filter "./bundle/" | ||
Check notice Code scanning / Rubocop Checks if uses of quotes match the configured preference. Note
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
||
add_filter "./tmp/" | ||
Check notice Code scanning / Rubocop Checks if uses of quotes match the configured preference. Note
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
||
add_filter "./spec/" | ||
Check notice Code scanning / Rubocop Checks if uses of quotes match the configured preference. Note
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
||
minimum_coverage(RUBY_PLATFORM == 'java' ? 94 : 97) | ||
end | ||
end | ||
rescue LoadError | ||
Check warning Code scanning / Rubocop Don't suppress exceptions. Warning
Lint/SuppressedException: Do not suppress exceptions.
|
||
ensure | ||
$VERBOSE = old_verbose | ||
end | ||
|
||
load File.expand_path("../rspec", __FILE__) | ||
Check notice Code scanning / Rubocop Use `expand_path(__dir__)` instead of `expand_path('..', __FILE__)`. Note
Style/ExpandPathArguments: Use expand\_path('rspec', \_\_dir\_\_) instead of expand\_path('../rspec', \_\_FILE\_\_).
Check notice Code scanning / Rubocop Checks if uses of quotes match the configured preference. Note
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|