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
437c0b30
Commit
437c0b30
authored
Sep 26, 2015
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bundle] Update RuboCop to 0.34
parent
f650a391
Show whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
76 additions
and
34 deletions
+76
-34
.rubocop_todo.yml
.rubocop_todo.yml
+34
-5
Gemfile.lock
Gemfile.lock
+8
-8
command.rb
lib/cocoapods/command.rb
+0
-0
add.rb
lib/cocoapods/command/repo/add.rb
+3
-1
spec.rb
lib/cocoapods/command/spec.rb
+3
-3
cat.rb
lib/cocoapods/command/spec/cat.rb
+1
-1
create.rb
lib/cocoapods/command/spec/create.rb
+2
-1
edit.rb
lib/cocoapods/command/spec/edit.rb
+1
-1
downloader.rb
lib/cocoapods/downloader.rb
+1
-1
request.rb
lib/cocoapods/downloader/request.rb
+0
-0
executable.rb
lib/cocoapods/executable.rb
+7
-4
acknowledgements.rb
lib/cocoapods/generator/acknowledgements.rb
+1
-1
pod_xcconfig.rb
lib/cocoapods/generator/xcconfig/pod_xcconfig.rb
+0
-0
xcconfig_helper.rb
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
+0
-0
hooks_manager.rb
lib/cocoapods/hooks_manager.rb
+1
-1
installer.rb
lib/cocoapods/installer.rb
+1
-1
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+1
-1
specs_state.rb
lib/cocoapods/installer/analyzer/specs_state.rb
+0
-0
resolver.rb
lib/cocoapods/resolver.rb
+0
-0
path_list.rb
lib/cocoapods/sandbox/path_list.rb
+0
-0
sources_manager.rb
lib/cocoapods/sources_manager.rb
+4
-2
user_interface.rb
lib/cocoapods/user_interface.rb
+2
-2
push_spec.rb
spec/functional/command/repo/push_spec.rb
+0
-0
spec_spec.rb
spec/functional/command/spec_spec.rb
+0
-0
xcodeproj_project_yaml.rb
spec/integration/xcodeproj_project_yaml.rb
+0
-0
hooks_manager_spec.rb
spec/unit/hooks_manager_spec.rb
+0
-0
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+0
-0
pre_install_hooks_context_spec.rb
spec/unit/installer/pre_install_hooks_context_spec.rb
+3
-1
aggregate_target_installer_spec.rb
...aller/target_installer/aggregate_target_installer_spec.rb
+0
-0
pod_target_installer_spec.rb
...t/installer/target_installer/pod_target_installer_spec.rb
+0
-0
xcconfig_integrator_spec.rb
..._integrator/target_integrator/xcconfig_integrator_spec.rb
+0
-0
target_integrator_spec.rb
...staller/user_project_integrator/target_integrator_spec.rb
+0
-0
user_project_integrator_spec.rb
spec/unit/installer/user_project_integrator_spec.rb
+0
-0
installer_spec.rb
spec/unit/installer_spec.rb
+3
-0
No files found.
.rubocop_todo.yml
View file @
437c0b30
# This configuration was generated by `rubocop --auto-gen-config`
# on 2015-03-15 18:04:06 -0700 using RuboCop version 0.29.1.
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2015-09-25 20:32:21 -0500 using RuboCop version 0.34.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: AlignWith, SupportedStyles, AutoCorrect.
Lint/EndAlignment
:
Enabled
:
false
# Offense count: 1
Lint/NonLocalExitFromIterator
:
Exclude
:
-
'
spec/unit/installer_spec.rb'
# Offense count: 3
Lint/UselessAccessModifier
:
Enabled
:
false
Exclude
:
-
'
lib/cocoapods/config.rb'
-
'
lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb'
# Offense count: 1
278
# Offense count: 1
511
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength
:
Max
:
292
Max
:
281
# Offense count: 12
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
Style/RegexpLiteral
:
Exclude
:
-
'
lib/cocoapods/installer/file_references_installer.rb'
-
'
lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb'
-
'
lib/cocoapods/sandbox/path_list.rb'
-
'
lib/cocoapods/sources_manager.rb'
-
'
lib/cocoapods/validator.rb'
-
'
spec/integration.rb'
-
'
spec/unit/external_sources/path_source_spec.rb'
-
'
spec/unit/external_sources/podspec_source_spec.rb'
-
'
spec/unit/resolver_spec.rb'
Gemfile.lock
View file @
437c0b30
...
...
@@ -106,9 +106,9 @@ GEM
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.6)
ast (2.
0
.0)
astrolabe (1.3.
0
)
parser (
>= 2.2.0.pre.3, < 3.0
)
ast (2.
1
.0)
astrolabe (1.3.
1
)
parser (
~> 2.2
)
awesome_print (1.6.1)
bacon (1.2.0)
clintegracon (0.6.1)
...
...
@@ -147,9 +147,9 @@ GEM
nap (1.0.0)
netrc (0.7.8)
notify (0.5.2)
parser (2.2.
0.3
)
parser (2.2.
2.6
)
ast (>= 1.1, < 3.0)
powerpack (0.1.
0
)
powerpack (0.1.
1
)
prettybacon (0.0.2)
bacon (~> 1.2)
pry (0.10.1)
...
...
@@ -163,14 +163,14 @@ GEM
ffi (>= 0.5.0)
rb-kqueue (0.2.3)
ffi (>= 0.5.0)
rubocop (0.
29.1
)
rubocop (0.
34.2
)
astrolabe (~> 1.3)
parser (>= 2.2.
0.1
, < 3.0)
parser (>= 2.2.
2.5
, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
ruby-prof (0.15.2)
ruby-progressbar (1.7.
1
)
ruby-progressbar (1.7.
5
)
safe_yaml (1.0.4)
slop (3.6.0)
sparkr (0.4.1)
...
...
lib/cocoapods/command.rb
View file @
437c0b30
lib/cocoapods/command/repo/add.rb
View file @
437c0b30
...
...
@@ -23,7 +23,9 @@ module Pod
def
initialize
(
argv
)
@shallow
=
argv
.
flag?
(
'shallow'
,
false
)
@name
,
@url
,
@branch
=
argv
.
shift_argument
,
argv
.
shift_argument
,
argv
.
shift_argument
@name
=
argv
.
shift_argument
@url
=
argv
.
shift_argument
@branch
=
argv
.
shift_argument
super
end
...
...
lib/cocoapods/command/spec.rb
View file @
437c0b30
...
...
@@ -48,7 +48,7 @@ module Pod
set
=
sets
.
find
{
|
s
|
s
.
name
==
spec
}
else
names
=
sets
.
map
(
&
:name
)
*
', '
raise
Informative
,
"More than one spec found for '
#{
spec
}
':
\n
#{
names
}
"
raise
Informative
,
"More than one spec found for '
#{
spec
}
':
\n
#{
names
}
"
end
unless
show_all
...
...
@@ -77,7 +77,7 @@ module Pod
versions
.
each
do
|
version
|
spec
=
source
.
specification
(
set
.
name
,
version
)
paths
+=
"
#{
pathname_from_spec
(
spec
,
source
)
}
\n
"
paths
+=
"
#{
pathname_from_spec
(
spec
,
source
)
}
\n
"
end
end
...
...
@@ -102,7 +102,7 @@ module Pod
end
if
!
best_source
||
!
best_version
raise
Informative
,
"Unable to locate highest known specification for `
#{
set
.
name
}
'"
raise
Informative
,
"Unable to locate highest known specification for `
#{
set
.
name
}
'"
end
[
best_source
.
specification
(
set
.
name
,
best_version
),
best_source
]
...
...
lib/cocoapods/command/spec/cat.rb
View file @
437c0b30
...
...
@@ -37,7 +37,7 @@ module Pod
query
=
@use_regex
?
@query
:
Regexp
.
escape
(
@query
)
filepath
=
if
@show_all
specs
=
get_path_of_spec
(
query
,
@show_all
).
split
(
/\n/
)
index
=
UI
.
choose_from_array
(
specs
,
"Which spec would you like to print [1-
#{
specs
.
count
}
]? "
)
index
=
UI
.
choose_from_array
(
specs
,
"Which spec would you like to print [1-
#{
specs
.
count
}
]? "
)
specs
[
index
]
else
get_path_of_spec
(
query
)
...
...
lib/cocoapods/command/spec/create.rb
View file @
437c0b30
...
...
@@ -15,7 +15,8 @@ module Pod
]
def
initialize
(
argv
)
@name_or_url
,
@url
=
argv
.
shift_argument
,
argv
.
shift_argument
@name_or_url
=
argv
.
shift_argument
@url
=
argv
.
shift_argument
super
end
...
...
lib/cocoapods/command/spec/edit.rb
View file @
437c0b30
...
...
@@ -45,7 +45,7 @@ module Pod
end
exec_editor
(
filepath
.
to_s
)
if
File
.
exist?
filepath
raise
Informative
,
"
#{
filepath
}
doesn't exist."
raise
Informative
,
"
#{
filepath
}
doesn't exist."
end
# Looks up an executable in the search paths
...
...
lib/cocoapods/downloader.rb
View file @
437c0b30
...
...
@@ -34,7 +34,7 @@ module Pod
result
=
cache
.
download_pod
(
request
)
else
require
'cocoapods/installer/pod_source_preparer'
result
,
_
=
download_request
(
request
,
target
)
result
,
=
download_request
(
request
,
target
)
Installer
::
PodSourcePreparer
.
new
(
result
.
spec
,
result
.
location
).
prepare!
end
...
...
lib/cocoapods/downloader/request.rb
View file @
437c0b30
lib/cocoapods/executable.rb
View file @
437c0b30
...
...
@@ -54,13 +54,16 @@ module Pod
if
Config
.
instance
.
verbose?
UI
.
message
(
"$
#{
full_command
}
"
)
stdout
,
stderr
=
Indenter
.
new
(
STDOUT
),
Indenter
.
new
(
STDERR
)
stdout
=
Indenter
.
new
(
STDOUT
)
stderr
=
Indenter
.
new
(
STDERR
)
else
stdout
,
stderr
=
Indenter
.
new
,
Indenter
.
new
stdout
=
Indenter
.
new
stderr
=
Indenter
.
new
end
status
=
popen3
(
bin
,
command
,
stdout
,
stderr
)
stdout
,
stderr
=
stdout
.
join
,
stderr
.
join
stdout
=
stdout
.
join
stderr
=
stderr
.
join
output
=
stdout
+
stderr
unless
status
.
success?
if
raise_on_failure
...
...
@@ -197,7 +200,7 @@ module Pod
#
def
<<
(
value
)
super
io
<<
"
#{
indent
}#{
value
}
"
if
io
io
<<
"
#{
indent
}#{
value
}
"
if
io
end
end
end
...
...
lib/cocoapods/generator/acknowledgements.rb
View file @
437c0b30
...
...
@@ -77,7 +77,7 @@ module Pod
if
license_file
.
exist?
text
=
IO
.
read
(
license_file
)
else
UI
.
warn
"Unable to read the license file `
#{
license_file
}
` "
\
UI
.
warn
"Unable to read the license file `
#{
license_file
}
` "
\
"for the spec `
#{
spec
}
`"
end
end
...
...
lib/cocoapods/generator/xcconfig/pod_xcconfig.rb
View file @
437c0b30
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
View file @
437c0b30
lib/cocoapods/hooks_manager.rb
View file @
437c0b30
...
...
@@ -105,7 +105,7 @@ module Pod
if
registrations
hooks
=
registrations
[
name
]
if
hooks
UI
.
message
"- Running
#{
name
.
to_s
.
gsub
(
'_'
,
' '
)
}
hooks"
do
UI
.
message
"- Running
#{
name
.
to_s
.
tr
(
'_'
,
' '
)
}
hooks"
do
hooks
.
each
do
|
hook
|
next
if
whitelisted_plugins
&&
!
whitelisted_plugins
.
key?
(
hook
.
plugin_name
)
UI
.
message
"-
#{
hook
.
plugin_name
||
'unknown plugin'
}
from "
\
...
...
lib/cocoapods/installer.rb
View file @
437c0b30
...
...
@@ -732,7 +732,7 @@ module Pod
# information in the lockfile.
#
def
integrate_user_project
UI
.
section
"Integrating client
#{
'project'
.
pluralize
(
aggregate_targets
.
map
(
&
:user_project_path
).
uniq
.
count
)
}
"
do
UI
.
section
"Integrating client
#{
'project'
.
pluralize
(
aggregate_targets
.
map
(
&
:user_project_path
).
uniq
.
count
)
}
"
do
installation_root
=
config
.
installation_root
integrator
=
UserProjectIntegrator
.
new
(
podfile
,
sandbox
,
installation_root
,
aggregate_targets
)
integrator
.
integrate!
...
...
lib/cocoapods/installer/analyzer.rb
View file @
437c0b30
...
...
@@ -293,7 +293,7 @@ module Pod
if
targets_by_distinctors
.
count
>
1
# There are different sets of subspecs or the spec is used across different platforms
targets_by_distinctors
.
map
do
|
distinctor
,
target_definitions
|
specs
,
_
=
*
distinctor
specs
,
=
*
distinctor
generate_pod_target
(
target_definitions
,
specs
,
:scoped
=>
true
)
end
else
...
...
lib/cocoapods/installer/analyzer/specs_state.rb
View file @
437c0b30
lib/cocoapods/resolver.rb
View file @
437c0b30
lib/cocoapods/sandbox/path_list.rb
View file @
437c0b30
lib/cocoapods/sources_manager.rb
View file @
437c0b30
...
...
@@ -252,7 +252,8 @@ module Pod
def
check_version_information
(
dir
)
versions
=
version_information
(
dir
)
unless
repo_compatible?
(
dir
)
min
,
max
=
versions
[
'min'
],
versions
[
'max'
]
min
=
versions
[
'min'
]
max
=
versions
[
'max'
]
version_msg
=
(
min
==
max
)
?
min
:
"
#{
min
}
-
#{
max
}
"
raise
Informative
,
"The `
#{
dir
.
basename
}
` repo requires "
\
"CocoaPods
#{
version_msg
}
(currently using
#{
Pod
::
VERSION
}
)
\n
"
.
red
+
...
...
@@ -293,7 +294,8 @@ module Pod
def
repo_compatible?
(
dir
)
versions
=
version_information
(
dir
)
min
,
max
=
versions
[
'min'
],
versions
[
'max'
]
min
=
versions
[
'min'
]
max
=
versions
[
'max'
]
bin_version
=
Gem
::
Version
.
new
(
Pod
::
VERSION
)
supports_min
=
!
min
||
bin_version
>=
Gem
::
Version
.
new
(
min
)
supports_max
=
!
max
||
bin_version
<=
Gem
::
Version
.
new
(
max
)
...
...
lib/cocoapods/user_interface.rb
View file @
437c0b30
...
...
@@ -298,14 +298,14 @@ module Pod
#
def
choose_from_array
(
array
,
message
)
array
.
each_with_index
do
|
item
,
index
|
UI
.
puts
"
#{
index
+
1
}
:
#{
item
}
"
UI
.
puts
"
#{
index
+
1
}
:
#{
item
}
"
end
UI
.
puts
message
index
=
UI
.
gets
.
chomp
.
to_i
-
1
if
index
<
0
||
index
>
array
.
count
-
1
raise
Informative
,
"
#{
index
+
1
}
is invalid [1-
#{
array
.
count
}
]"
raise
Informative
,
"
#{
index
+
1
}
is invalid [1-
#{
array
.
count
}
]"
else
index
end
...
...
spec/functional/command/repo/push_spec.rb
View file @
437c0b30
spec/functional/command/spec_spec.rb
View file @
437c0b30
spec/integration/xcodeproj_project_yaml.rb
View file @
437c0b30
spec/unit/hooks_manager_spec.rb
View file @
437c0b30
spec/unit/installer/analyzer_spec.rb
View file @
437c0b30
spec/unit/installer/pre_install_hooks_context_spec.rb
View file @
437c0b30
...
...
@@ -4,7 +4,9 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
describe
Installer
::
PreInstallHooksContext
do
it
'offers a convenience method to be generated'
do
sandbox
,
podfile
,
lockfile
=
stub
,
stub
,
stub
sandbox
=
stub
podfile
=
stub
lockfile
=
stub
result
=
Installer
::
PreInstallHooksContext
.
generate
(
sandbox
,
podfile
,
lockfile
)
result
.
class
.
should
==
Installer
::
PreInstallHooksContext
...
...
spec/unit/installer/target_installer/aggregate_target_installer_spec.rb
View file @
437c0b30
spec/unit/installer/target_installer/pod_target_installer_spec.rb
View file @
437c0b30
spec/unit/installer/user_project_integrator/target_integrator/xcconfig_integrator_spec.rb
View file @
437c0b30
spec/unit/installer/user_project_integrator/target_integrator_spec.rb
View file @
437c0b30
spec/unit/installer/user_project_integrator_spec.rb
View file @
437c0b30
spec/unit/installer_spec.rb
View file @
437c0b30
...
...
@@ -69,6 +69,7 @@ module Pod
def
@installer
.
run_podfile_pre_install_hooks
@hook_called
=
true
end
def
@installer
.
clean_pod_sources
@hook_called
.
should
.
be
.
true
end
...
...
@@ -87,6 +88,7 @@ module Pod
def
@installer
.
run_podfile_post_install_hooks
@hook_called
=
true
end
def
@installer
.
write_pod_project
@hook_called
.
should
.
be
.
true
end
...
...
@@ -102,6 +104,7 @@ module Pod
def
@installer
.
run_source_provider_hooks
@hook_called
=
true
end
def
@installer
.
analyze
(
*
)
@hook_called
.
should
.
be
.
true
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