Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
5a69f7ce
Commit
5a69f7ce
authored
Apr 16, 2015
by
Marius Rackwitz
Committed by
Samuel E. Giddins
Apr 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Rakefile] Move tasks for fixture tarballs into separate namespace
parent
efd19fd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
19 deletions
+23
-19
Rakefile
Rakefile
+23
-19
No files found.
Rakefile
View file @
5a69f7ce
...
@@ -91,19 +91,19 @@ begin
...
@@ -91,19 +91,19 @@ begin
unit_specs_command
=
"bundle exec bacon
#{
specs
(
'unit/**/*'
)
}
"
unit_specs_command
=
"bundle exec bacon
#{
specs
(
'unit/**/*'
)
}
"
desc
'Run the unit specs'
desc
'Run the unit specs'
task
:unit
=>
:unpack_fixture_tarballs
do
task
:unit
=>
'fixture_tarballs:unpack'
do
sh
unit_specs_command
sh
unit_specs_command
end
end
desc
'Run the unit specs quietly (fail fast, display only one failure)'
desc
'Run the unit specs quietly (fail fast, display only one failure)'
task
:unit_quiet
=>
:unpack_fixture_tarballs
do
task
:unit_quiet
=>
'fixture_tarballs:unpack'
do
sh
"
#{
unit_specs_command
}
-q"
sh
"
#{
unit_specs_command
}
-q"
end
end
#--------------------------------------#
#--------------------------------------#
desc
'Run the functional specs'
desc
'Run the functional specs'
task
:functional
,
[
:spec
]
=>
:unpack_fixture_tarballs
do
|
_t
,
args
|
task
:functional
,
[
:spec
]
=>
'fixture_tarballs:unpack'
do
|
_t
,
args
|
args
.
with_defaults
(
:spec
=>
'**/*'
)
args
.
with_defaults
(
:spec
=>
'**/*'
)
sh
"bundle exec bacon
#{
specs
(
"functional/
#{
args
[
:spec
]
}
"
)
}
"
sh
"bundle exec bacon
#{
specs
(
"functional/
#{
args
[
:spec
]
}
"
)
}
"
end
end
...
@@ -126,7 +126,7 @@ begin
...
@@ -126,7 +126,7 @@ begin
# The specs helper interfere with the integration 2 specs and thus they need
# The specs helper interfere with the integration 2 specs and thus they need
# to be run separately.
# to be run separately.
#
#
task
:all
=>
:unpack_fixture_tarballs
do
task
:all
=>
'fixture_tarballs:unpack'
do
ENV
[
'GENERATE_COVERAGE'
]
=
'true'
ENV
[
'GENERATE_COVERAGE'
]
=
'true'
puts
"
\033
[0;32mUsing
#{
`ruby --version`
}
\033
[0m"
puts
"
\033
[0;32mUsing
#{
`ruby --version`
}
\033
[0m"
...
@@ -143,22 +143,26 @@ begin
...
@@ -143,22 +143,26 @@ begin
Rake
::
Task
[
'rubocop'
].
invoke
Rake
::
Task
[
'rubocop'
].
invoke
end
end
desc
'Rebuild all the fixture tarballs'
namespace
:fixture_tarballs
do
task
:rebuild_fixture_tarballs
do
task
:default
=>
:unpack
tarballs
=
FileList
[
'spec/fixtures/**/*.tar.gz'
]
tarballs
.
each
do
|
tarball
|
desc
'Rebuild all the fixture tarballs'
basename
=
File
.
basename
(
tarball
)
task
:rebuild
do
sh
"cd
#{
File
.
dirname
(
tarball
)
}
&& rm
#{
basename
}
&& env COPYFILE_DISABLE=1 tar -zcf
#{
basename
}
#{
basename
[
0
..-
8
]
}
"
tarballs
=
FileList
[
'spec/fixtures/**/*.tar.gz'
]
tarballs
.
each
do
|
tarball
|
basename
=
File
.
basename
(
tarball
)
sh
"cd
#{
File
.
dirname
(
tarball
)
}
&& rm
#{
basename
}
&& env COPYFILE_DISABLE=1 tar -zcf
#{
basename
}
#{
basename
[
0
..-
8
]
}
"
end
end
end
end
desc
'Unpacks all the fixture tarballs'
desc
'Unpacks all the fixture tarballs'
task
:unpack_fixture_tarballs
do
task
:unpack
do
tarballs
=
FileList
[
'spec/fixtures/**/*.tar.gz'
]
tarballs
=
FileList
[
'spec/fixtures/**/*.tar.gz'
]
tarballs
.
each
do
|
tarball
|
tarballs
.
each
do
|
tarball
|
basename
=
File
.
basename
(
tarball
)
basename
=
File
.
basename
(
tarball
)
Dir
.
chdir
(
File
.
dirname
(
tarball
))
do
Dir
.
chdir
(
File
.
dirname
(
tarball
))
do
sh
"rm -rf
#{
basename
[
0
..-
8
]
}
&& tar zxf
#{
basename
}
"
sh
"rm -rf
#{
basename
[
0
..-
8
]
}
&& tar zxf
#{
basename
}
"
end
end
end
end
end
end
end
...
@@ -201,7 +205,7 @@ begin
...
@@ -201,7 +205,7 @@ begin
puts
'Integration fixtures updated, commit and push in the `spec/cocoapods-integration-specs` submodule'
puts
'Integration fixtures updated, commit and push in the `spec/cocoapods-integration-specs` submodule'
end
end
task
:clean_env
=>
[
:clean_vcr
,
:unpack_fixture_tarballs
,
'ext:cleanbuild'
]
task
:clean_env
=>
[
:clean_vcr
,
'fixture_tarballs:unpack'
,
'ext:cleanbuild'
]
end
end
# Examples
# Examples
...
...
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