BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
8a9c7b1e
Commit
8a9c7b1e
authored
Oct 29, 2016
by
winniehell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore teaspoon tasks in production environment
parent
dcc699af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
18 deletions
+20
-18
teaspoon.rake
lib/tasks/teaspoon.rake
+20
-18
No files found.
lib/tasks/teaspoon.rake
View file @
8a9c7b1e
Rake
::
Task
[
'teaspoon'
].
clear
if
Rake
::
Task
.
task_defined?
(
'teaspoon'
)
unless
Rails
.
env
.
production?
Rake
::
Task
[
'teaspoon'
].
clear
if
Rake
::
Task
.
task_defined?
(
'teaspoon'
)
namespace
:teaspoon
do
desc
'GitLab | Teaspoon | Generate fixtures for JavaScript tests'
RSpec
::
Core
::
RakeTask
.
new
(
:fixtures
)
do
|
t
|
ENV
[
'NO_KNAPSACK'
]
=
'true'
t
.
pattern
=
'spec/javascripts/fixtures/*.rb'
t
.
rspec_opts
=
'--format documentation'
end
namespace
:teaspoon
do
desc
'GitLab | Teaspoon | Generate fixtures for JavaScript tests'
RSpec
::
Core
::
RakeTask
.
new
(
:fixtures
)
do
|
t
|
ENV
[
'NO_KNAPSACK'
]
=
'true'
t
.
pattern
=
'spec/javascripts/fixtures/*.rb'
t
.
rspec_opts
=
'--format documentation'
end
desc
'GitLab | Teaspoon | Run JavaScript tests'
task
:tests
do
require
"teaspoon/console"
options
=
{}
abort
(
'rake teaspoon:tests failed'
)
if
Teaspoon
::
Console
.
new
(
options
).
failures?
desc
'GitLab | Teaspoon | Run JavaScript tests'
task
:tests
do
require
"teaspoon/console"
options
=
{}
abort
(
'rake teaspoon:tests failed'
)
if
Teaspoon
::
Console
.
new
(
options
).
failures?
end
end
end
desc
'GitLab | Teaspoon | Shortcut for teaspoon:fixtures and teaspoon:tests'
task
:teaspoon
do
Rake
::
Task
[
'teaspoon:fixtures'
].
invoke
Rake
::
Task
[
'teaspoon:tests'
].
invoke
desc
'GitLab | Teaspoon | Shortcut for teaspoon:fixtures and teaspoon:tests'
task
:teaspoon
do
Rake
::
Task
[
'teaspoon:fixtures'
].
invoke
Rake
::
Task
[
'teaspoon:tests'
].
invoke
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment