Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
18 deletions
+20
-18
lib/tasks/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