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
Show 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
namespace
:teaspoon
do
desc
'GitLab | Teaspoon | Generate fixtures for JavaScript tests'
desc
'GitLab | Teaspoon | Generate fixtures for JavaScript tests'
RSpec
::
Core
::
RakeTask
.
new
(
:fixtures
)
do
|
t
|
RSpec
::
Core
::
RakeTask
.
new
(
:fixtures
)
do
|
t
|
ENV
[
'NO_KNAPSACK'
]
=
'true'
ENV
[
'NO_KNAPSACK'
]
=
'true'
...
@@ -14,10 +15,11 @@ namespace :teaspoon do
...
@@ -14,10 +15,11 @@ namespace :teaspoon do
options
=
{}
options
=
{}
abort
(
'rake teaspoon:tests failed'
)
if
Teaspoon
::
Console
.
new
(
options
).
failures?
abort
(
'rake teaspoon:tests failed'
)
if
Teaspoon
::
Console
.
new
(
options
).
failures?
end
end
end
end
desc
'GitLab | Teaspoon | Shortcut for teaspoon:fixtures and teaspoon:tests'
desc
'GitLab | Teaspoon | Shortcut for teaspoon:fixtures and teaspoon:tests'
task
:teaspoon
do
task
:teaspoon
do
Rake
::
Task
[
'teaspoon:fixtures'
].
invoke
Rake
::
Task
[
'teaspoon:fixtures'
].
invoke
Rake
::
Task
[
'teaspoon:tests'
].
invoke
Rake
::
Task
[
'teaspoon:tests'
].
invoke
end
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