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
34e598ac
Commit
34e598ac
authored
Nov 05, 2014
by
Kyle Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Rakefile] Rubocop fixes
parent
2be30b3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
Rakefile
Rakefile
+11
-12
No files found.
Rakefile
View file @
34e598ac
...
...
@@ -4,8 +4,8 @@ REQUIRED_COMMANDS = %w[ git hg ]
#-----------------------------------------------------------------------------#
desc
'Verifies that the required third-party commands are available'
task
:check_requirements
do
has_all_requirements
=
REQUIRED_COMMANDS
.
inject
(
true
)
do
|
has_requirements
,
required_command
|
result
=
has_
required_binary?
(
required_command
)
has_all_requirements
=
REQUIRED_COMMANDS
.
reduce
(
true
)
do
|
has_requirements
,
required_command
|
result
=
required_binary?
(
required_command
)
puts
red
(
"Missing required command:
#{
required_command
}
. You may need to install it."
)
unless
result
has_requirements
&&
result
end
...
...
@@ -16,7 +16,7 @@ end
#-----------------------------------------------------------------------------#
desc
"Initializes your working copy to run the specs"
task
:bootstrap
,
[
:use_bundle_dir?
]
=>
[
:check_requirements
]
do
|
t
,
args
|
task
:bootstrap
,
[
:use_bundle_dir?
]
=>
[
:check_requirements
]
do
|
_
t
,
args
|
title
"Environment bootstrap"
puts
"Updating submodules"
...
...
@@ -129,7 +129,7 @@ begin
#--------------------------------------#
desc
"Run the functional specs"
task
:functional
,
[
:spec
]
=>
:unpack_fixture_tarballs
do
|
t
,
args
|
task
:functional
,
[
:spec
]
=>
:unpack_fixture_tarballs
do
|
_
t
,
args
|
args
.
with_defaults
(
:spec
=>
'**/*'
)
sh
"bundle exec bacon
#{
specs
(
"functional/
#{
args
[
:spec
]
}
"
)
}
"
end
...
...
@@ -138,7 +138,7 @@ begin
desc
"Run the integration spec"
task
:integration
=>
:check_requirements
do
unless
File
.
exist
s
?
(
'spec/cocoapods-integration-specs'
)
unless
File
.
exist?
(
'spec/cocoapods-integration-specs'
)
$stderr
.
puts
red
(
"Integration files not checked out. Run `rake bootstrap`"
)
exit
1
end
...
...
@@ -157,10 +157,10 @@ begin
puts
"
\033
[0;32mUsing
#{
`ruby --version`
}
\033
[0m"
title
'Running the specs'
sh
"bundle exec bacon
#{
specs
(
'**/*'
)
}
"
sh
"bundle exec bacon
#{
specs
(
'**/*'
)
}
"
title
'Running Integration tests'
sh
"bundle exec bacon spec/integration.rb"
sh
"bundle exec bacon spec/integration.rb"
title
'Running examples'
Rake
::
Task
[
'examples:build'
].
invoke
...
...
@@ -203,8 +203,8 @@ begin
title
'Storing fixtures'
# Copy the files to the files produced by the specs to the after folders
FileList
[
'tmp/*'
].
each
do
|
source
|
destination
=
"spec/cocoapods-integration-specs/
#{
source
.
gsub
(
'tmp/'
,
''
)
}
/after"
if
File
.
exist
s
?
(
destination
)
destination
=
"spec/cocoapods-integration-specs/
#{
source
.
gsub
(
'tmp/'
,
''
)
}
/after"
if
File
.
exist?
(
destination
)
sh
"rm -rf
#{
destination
}
"
sh
"mv
#{
source
}
#{
destination
}
"
end
...
...
@@ -282,7 +282,7 @@ begin
require
'rubocop/rake_task'
RuboCop
::
RakeTask
.
new
(
:rubocop
)
do
|
task
|
task
.
patterns
=
[
'lib'
,
'spec'
,
'Rakefile'
]
task
.
patterns
=
%w(lib spec Rakefile)
end
rescue
LoadError
,
NameError
=>
e
...
...
@@ -325,8 +325,7 @@ def red(string)
"
\033
[0;31m
#{
string
}
\e
[0m"
end
def
has_
required_binary?
(
name
)
def
required_binary?
(
name
)
`which
#{
name
}
`
$?
.
success?
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