FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
travis-api/Rakefile at master · feicc/travis-api · GitHub
feicc
/
travis-api
Public
forked from
travis-ci/travis-api
Notifications
You must be signed in to change notification settings
Fork
1
Star
0
Code
Pull requests
32
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
travis-api
/
Rakefile
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (22 loc) · 734 Bytes
Breadcrumbs
travis-api
/
Rakefile
Copy path
File metadata and controls
27 lines (22 loc) · 734 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require
"knapsack"
namespace
:db
do
env
=
ENV
[
"ENV"
]
||
'test'
abort
"Cannot run rake db:create in production."
if
env
==
'production'
url
=
"https://raw.githubusercontent.com/travis-ci/travis-migrations/master/db/main/structure.sql"
file
=
'db/structure.sql'
system
"curl -fs
#{
url
}
-o
#{
file
}
--create-dirs"
abort
"failed to download
#{
url
}
"
unless
File
.
exist?
(
file
)
desc
"Create and migrate the
#{
env
}
database"
task
:create
do
sh
"createdb travis_
#{
env
}
"
rescue
nil
sh
"psql -q travis_
#{
env
}
<
#{
file
}
"
end
end
namespace
:spec
do
desc
'Run all specs'
task
:all
do
sh
'bundle exec rspec -r spec_helper spec'
end
end
task
:default
=>
:'spec:all'
Knapsack
.
load_tasks
if
defined?
(
Knapsack
)
Back
|
FazBrowse Home
|
New Git URL