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
3179483a
Commit
3179483a
authored
Jan 04, 2015
by
Kyle Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Rubocop] Enable Style/TrailingComma
parent
3b89da68
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
26 additions
and
32 deletions
+26
-32
.rubocop_todo.yml
.rubocop_todo.yml
+0
-6
cat.rb
lib/cocoapods/command/spec/cat.rb
+1
-1
edit.rb
lib/cocoapods/command/spec/edit.rb
+1
-1
aggregate_xcconfig.rb
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
+3
-3
target_integrator.rb
...ds/installer/user_project_integrator/target_integrator.rb
+1
-1
embed_frameworks_script_spec.rb
spec/unit/generator/embed_frameworks_script_spec.rb
+1
-1
xcconfig_helper_spec.rb
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
+6
-6
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+1
-1
xcconfig_integrator_spec.rb
..._integrator/target_integrator/xcconfig_integrator_spec.rb
+1
-1
target_integrator_spec.rb
...staller/user_project_integrator/target_integrator_spec.rb
+1
-1
resolver_spec.rb
spec/unit/resolver_spec.rb
+1
-1
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+8
-8
validator_spec.rb
spec/unit/validator_spec.rb
+1
-1
No files found.
.rubocop_todo.yml
View file @
3179483a
...
@@ -46,12 +46,6 @@ Style/GlobalVars:
...
@@ -46,12 +46,6 @@ Style/GlobalVars:
Style/RegexpLiteral
:
Style/RegexpLiteral
:
Enabled
:
false
Enabled
:
false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
Style/TrailingComma
:
Enabled
:
false
# Offense count: 1
# Offense count: 1
# Cop supports --auto-correct.
# Cop supports --auto-correct.
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist.
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist.
...
...
lib/cocoapods/command/spec/cat.rb
View file @
3179483a
...
@@ -15,7 +15,7 @@ module Pod
...
@@ -15,7 +15,7 @@ module Pod
def
self
.
options
def
self
.
options
[
[
[
'--regex'
,
'Interpret the `QUERY` as a regular expression'
],
[
'--regex'
,
'Interpret the `QUERY` as a regular expression'
],
[
'--show-all'
,
'Pick from all versions of the given podspec'
]
[
'--show-all'
,
'Pick from all versions of the given podspec'
]
,
].
concat
(
super
)
].
concat
(
super
)
end
end
...
...
lib/cocoapods/command/spec/edit.rb
View file @
3179483a
...
@@ -15,7 +15,7 @@ module Pod
...
@@ -15,7 +15,7 @@ module Pod
def
self
.
options
def
self
.
options
[
[
[
'--regex'
,
'Interpret the `QUERY` as a regular expression'
],
[
'--regex'
,
'Interpret the `QUERY` as a regular expression'
],
[
'--show-all'
,
'Pick from all versions of the given podspec'
]
[
'--show-all'
,
'Pick from all versions of the given podspec'
]
,
].
concat
(
super
)
].
concat
(
super
)
end
end
...
...
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
3179483a
...
@@ -62,7 +62,7 @@ module Pod
...
@@ -62,7 +62,7 @@ module Pod
'PODS_FRAMEWORK_BUILD_PATH'
=>
target
.
configuration_build_dir
,
'PODS_FRAMEWORK_BUILD_PATH'
=>
target
.
configuration_build_dir
,
'FRAMEWORK_SEARCH_PATHS'
=>
'"$PODS_FRAMEWORK_BUILD_PATH"'
,
'FRAMEWORK_SEARCH_PATHS'
=>
'"$PODS_FRAMEWORK_BUILD_PATH"'
,
# Make headers discoverable by `import "…"`
# Make headers discoverable by `import "…"`
'OTHER_CFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
quote
(
header_search_paths
,
'-iquote'
)
'OTHER_CFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
quote
(
header_search_paths
,
'-iquote'
)
,
}
}
config
.
merge!
(
build_settings
)
config
.
merge!
(
build_settings
)
else
else
...
@@ -72,7 +72,7 @@ module Pod
...
@@ -72,7 +72,7 @@ module Pod
# by `#import "…"`
# by `#import "…"`
'HEADER_SEARCH_PATHS'
=>
XCConfigHelper
.
quote
(
header_search_paths
),
'HEADER_SEARCH_PATHS'
=>
XCConfigHelper
.
quote
(
header_search_paths
),
# by `#import <…>`
# by `#import <…>`
'OTHER_CFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
quote
(
header_search_paths
,
'-isystem'
)
'OTHER_CFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
quote
(
header_search_paths
,
'-isystem'
)
,
}
}
config
.
merge!
(
build_settings
)
config
.
merge!
(
build_settings
)
end
end
...
@@ -125,7 +125,7 @@ module Pod
...
@@ -125,7 +125,7 @@ module Pod
else
else
ld_runpath_search_paths
<<
[
ld_runpath_search_paths
<<
[
"'@executable_path/Frameworks'"
,
"'@executable_path/Frameworks'"
,
"'@loader_path/Frameworks'"
"'@loader_path/Frameworks'"
,
]
]
end
end
@xcconfig
.
merge!
(
'LD_RUNPATH_SEARCH_PATHS'
=>
ld_runpath_search_paths
.
join
(
' '
))
@xcconfig
.
merge!
(
'LD_RUNPATH_SEARCH_PATHS'
=>
ld_runpath_search_paths
.
join
(
' '
))
...
...
lib/cocoapods/installer/user_project_integrator/target_integrator.rb
View file @
3179483a
...
@@ -38,7 +38,7 @@ module Pod
...
@@ -38,7 +38,7 @@ module Pod
add_copy_resources_script_phase
add_copy_resources_script_phase
add_check_manifest_lock_script_phase
add_check_manifest_lock_script_phase
true
true
end
end
,
].
any?
].
any?
if
project_is_dirty
if
project_is_dirty
...
...
spec/unit/generator/embed_frameworks_script_spec.rb
View file @
3179483a
...
@@ -6,7 +6,7 @@ module Pod
...
@@ -6,7 +6,7 @@ module Pod
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
)
frameworks
=
{
frameworks
=
{
'Debug'
=>
%w(Loopback.framework Reveal.framework)
,
'Debug'
=>
%w(Loopback.framework Reveal.framework)
,
'Release'
=>
%w(CrashlyticsFramework.framework)
'Release'
=>
%w(CrashlyticsFramework.framework)
,
}
}
generator
=
Pod
::
Generator
::
EmbedFrameworksScript
.
new
(
target_definition
,
frameworks
)
generator
=
Pod
::
Generator
::
EmbedFrameworksScript
.
new
(
target_definition
,
frameworks
)
generator
.
send
(
:script
).
should
.
include
<<-
eos
.
strip_heredoc
generator
.
send
(
:script
).
should
.
include
<<-
eos
.
strip_heredoc
...
...
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
View file @
3179483a
...
@@ -53,7 +53,7 @@ module Pod
...
@@ -53,7 +53,7 @@ module Pod
:libraries
=>
[],
:libraries
=>
[],
:frameworks
=>
[],
:frameworks
=>
[],
:weak_frameworks
=>
[],
:weak_frameworks
=>
[],
:platform_name
=>
:ios
:platform_name
=>
:ios
,
)
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-framework "SenTestingKit"'
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-framework "SenTestingKit"'
...
@@ -66,7 +66,7 @@ module Pod
...
@@ -66,7 +66,7 @@ module Pod
:libraries
=>
[
'xml2'
],
:libraries
=>
[
'xml2'
],
:frameworks
=>
[],
:frameworks
=>
[],
:weak_frameworks
=>
[],
:weak_frameworks
=>
[],
:platform_name
=>
:ios
:platform_name
=>
:ios
,
)
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-l"xml2"'
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-l"xml2"'
...
@@ -79,7 +79,7 @@ module Pod
...
@@ -79,7 +79,7 @@ module Pod
:libraries
=>
[],
:libraries
=>
[],
:frameworks
=>
[
'CoreAnimation'
],
:frameworks
=>
[
'CoreAnimation'
],
:weak_frameworks
=>
[],
:weak_frameworks
=>
[],
:platform_name
=>
:ios
:platform_name
=>
:ios
,
)
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-framework "CoreAnimation"'
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-framework "CoreAnimation"'
...
@@ -92,7 +92,7 @@ module Pod
...
@@ -92,7 +92,7 @@ module Pod
:libraries
=>
[],
:libraries
=>
[],
:frameworks
=>
[],
:frameworks
=>
[],
:weak_frameworks
=>
[
'iAd'
],
:weak_frameworks
=>
[
'iAd'
],
:platform_name
=>
:ios
:platform_name
=>
:ios
,
)
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-weak_framework "iAd"'
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-weak_framework "iAd"'
...
@@ -105,7 +105,7 @@ module Pod
...
@@ -105,7 +105,7 @@ module Pod
:libraries
=>
[],
:libraries
=>
[],
:frameworks
=>
[
'SenTestingKit'
],
:frameworks
=>
[
'SenTestingKit'
],
:weak_frameworks
=>
[],
:weak_frameworks
=>
[],
:platform_name
=>
:ios
:platform_name
=>
:ios
,
)
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
.
include
(
'SDKROOT'
)
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
.
include
(
'SDKROOT'
)
...
@@ -119,7 +119,7 @@ module Pod
...
@@ -119,7 +119,7 @@ module Pod
:libraries
=>
[],
:libraries
=>
[],
:frameworks
=>
[
'SenTestingKit'
],
:frameworks
=>
[
'SenTestingKit'
],
:weak_frameworks
=>
[],
:weak_frameworks
=>
[],
:platform_name
=>
:osx
:platform_name
=>
:osx
,
)
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
.
include
(
'DEVELOPER_LIBRARY_DIR'
)
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
.
include
(
'DEVELOPER_LIBRARY_DIR'
)
...
...
spec/unit/installer/analyzer_spec.rb
View file @
3179483a
...
@@ -149,7 +149,7 @@ module Pod
...
@@ -149,7 +149,7 @@ module Pod
'AFNetworking/Reachability (2.4.0)'
,
'AFNetworking/Reachability (2.4.0)'
,
'AFNetworking/Security (2.4.0)'
,
'AFNetworking/Security (2.4.0)'
,
'AFNetworking/Serialization (2.4.0)'
,
'AFNetworking/Serialization (2.4.0)'
,
{
'AFNetworking/UIKit (2.4.0)'
=>
[
'AFNetworking/NSURLConnection'
,
'AFNetworking/NSURLSession'
]
}
{
'AFNetworking/UIKit (2.4.0)'
=>
[
'AFNetworking/NSURLConnection'
,
'AFNetworking/NSURLSession'
]
}
,
]
]
hash
[
'DEPENDENCIES'
]
=
[
'AFNetworkActivityLogger'
,
'AFNetworking (2.4.0)'
]
hash
[
'DEPENDENCIES'
]
=
[
'AFNetworkActivityLogger'
,
'AFNetworking (2.4.0)'
]
hash
[
'SPEC CHECKSUMS'
]
=
{}
hash
[
'SPEC CHECKSUMS'
]
=
{}
...
...
spec/unit/installer/user_project_integrator/target_integrator/xcconfig_integrator_spec.rb
View file @
3179483a
...
@@ -14,7 +14,7 @@ module Pod
...
@@ -14,7 +14,7 @@ module Pod
@pod_bundle
.
client_root
=
project_path
.
dirname
@pod_bundle
.
client_root
=
project_path
.
dirname
@pod_bundle
.
user_target_uuids
=
[
@target
.
uuid
]
@pod_bundle
.
user_target_uuids
=
[
@target
.
uuid
]
configuration
=
Xcodeproj
::
Config
.
new
(
configuration
=
Xcodeproj
::
Config
.
new
(
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
)
)
@pod_bundle
.
xcconfigs
[
'Debug'
]
=
configuration
@pod_bundle
.
xcconfigs
[
'Debug'
]
=
configuration
@pod_bundle
.
xcconfigs
[
'Test'
]
=
configuration
@pod_bundle
.
xcconfigs
[
'Test'
]
=
configuration
...
...
spec/unit/installer/user_project_integrator/target_integrator_spec.rb
View file @
3179483a
...
@@ -19,7 +19,7 @@ module Pod
...
@@ -19,7 +19,7 @@ module Pod
@pod_bundle
.
client_root
=
project_path
.
dirname
@pod_bundle
.
client_root
=
project_path
.
dirname
@pod_bundle
.
user_target_uuids
=
[
@target
.
uuid
]
@pod_bundle
.
user_target_uuids
=
[
@target
.
uuid
]
configuration
=
Xcodeproj
::
Config
.
new
(
configuration
=
Xcodeproj
::
Config
.
new
(
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
)
)
@pod_bundle
.
xcconfigs
[
'Debug'
]
=
configuration
@pod_bundle
.
xcconfigs
[
'Debug'
]
=
configuration
@pod_bundle
.
xcconfigs
[
'Release'
]
=
configuration
@pod_bundle
.
xcconfigs
[
'Release'
]
=
configuration
...
...
spec/unit/resolver_spec.rb
View file @
3179483a
...
@@ -283,7 +283,7 @@ module Pod
...
@@ -283,7 +283,7 @@ module Pod
resolver
=
Resolver
.
new
(
config
.
sandbox
,
@podfile
,
empty_graph
,
SourcesManager
.
all
)
resolver
=
Resolver
.
new
(
config
.
sandbox
,
@podfile
,
empty_graph
,
SourcesManager
.
all
)
specs
=
resolver
.
resolve
.
values
.
flatten
.
map
(
&
:to_s
).
sort
specs
=
resolver
.
resolve
.
values
.
flatten
.
map
(
&
:to_s
).
sort
specs
.
should
==
[
specs
.
should
==
[
'MainSpec (1.2.3-pre)'
'MainSpec (1.2.3-pre)'
,
]
]
end
end
...
...
spec/unit/target/pod_target_spec.rb
View file @
3179483a
...
@@ -68,46 +68,46 @@ module Pod
...
@@ -68,46 +68,46 @@ module Pod
describe
'Support files'
do
describe
'Support files'
do
it
'returns the absolute path of the xcconfig file'
do
it
'returns the absolute path of the xcconfig file'
do
@pod_target
.
xcconfig_path
(
'Release'
).
to_s
.
should
.
include?
(
@pod_target
.
xcconfig_path
(
'Release'
).
to_s
.
should
.
include?
(
'Pods/Target Support Files/Pods-BananaLib/Pods-BananaLib.release.xcconfig'
'Pods/Target Support Files/Pods-BananaLib/Pods-BananaLib.release.xcconfig'
,
)
)
end
end
it
'escapes the file separators in variant build configuration name in the xcconfig file'
do
it
'escapes the file separators in variant build configuration name in the xcconfig file'
do
@pod_target
.
xcconfig_path
(
"Release
#{
File
::
SEPARATOR
}
1"
).
to_s
.
should
.
include?
(
@pod_target
.
xcconfig_path
(
"Release
#{
File
::
SEPARATOR
}
1"
).
to_s
.
should
.
include?
(
'Pods/Target Support Files/Pods-BananaLib/Pods-BananaLib.release-1.xcconfig'
'Pods/Target Support Files/Pods-BananaLib/Pods-BananaLib.release-1.xcconfig'
,
)
)
end
end
it
'returns the absolute path of the target header file'
do
it
'returns the absolute path of the target header file'
do
@pod_target
.
target_environment_header_path
.
to_s
.
should
.
include?
(
@pod_target
.
target_environment_header_path
.
to_s
.
should
.
include?
(
'Pods/Target Support Files/Pods/Pods-environment.h'
'Pods/Target Support Files/Pods/Pods-environment.h'
,
)
)
end
end
it
'returns the absolute path of the prefix header file'
do
it
'returns the absolute path of the prefix header file'
do
@pod_target
.
prefix_header_path
.
to_s
.
should
.
include?
(
@pod_target
.
prefix_header_path
.
to_s
.
should
.
include?
(
'Pods/Target Support Files/Pods-BananaLib/Pods-BananaLib-prefix.pch'
'Pods/Target Support Files/Pods-BananaLib/Pods-BananaLib-prefix.pch'
,
)
)
end
end
it
'returns the absolute path of the bridge support file'
do
it
'returns the absolute path of the bridge support file'
do
@pod_target
.
bridge_support_path
.
to_s
.
should
.
include?
(
@pod_target
.
bridge_support_path
.
to_s
.
should
.
include?
(
'Pods/Target Support Files/Pods-BananaLib/Pods-BananaLib.bridgesupport'
'Pods/Target Support Files/Pods-BananaLib/Pods-BananaLib.bridgesupport'
,
)
)
end
end
it
'returns the absolute path of the info plist file'
do
it
'returns the absolute path of the info plist file'
do
@pod_target
.
info_plist_path
.
to_s
.
should
.
include?
(
@pod_target
.
info_plist_path
.
to_s
.
should
.
include?
(
'Pods/Target Support Files/Pods-BananaLib/Info.plist'
'Pods/Target Support Files/Pods-BananaLib/Info.plist'
,
)
)
end
end
it
'returns the absolute path of the public and private xcconfig files'
do
it
'returns the absolute path of the public and private xcconfig files'
do
@pod_target
.
xcconfig_path
.
to_s
.
should
.
include?
(
@pod_target
.
xcconfig_path
.
to_s
.
should
.
include?
(
'Pods/Target Support Files/Pods-BananaLib/Pods-BananaLib.xcconfig'
'Pods/Target Support Files/Pods-BananaLib/Pods-BananaLib.xcconfig'
,
)
)
@pod_target
.
xcconfig_private_path
.
to_s
.
should
.
include
(
@pod_target
.
xcconfig_private_path
.
to_s
.
should
.
include
(
'Pods/Target Support Files/Pods-BananaLib/Pods-BananaLib-Private.xcconfig'
'Pods/Target Support Files/Pods-BananaLib/Pods-BananaLib-Private.xcconfig'
,
)
)
end
end
...
...
spec/unit/validator_spec.rb
View file @
3179483a
...
@@ -175,7 +175,7 @@ module Pod
...
@@ -175,7 +175,7 @@ module Pod
stub_request
(
:head
,
'banana-corp.local/valid-image.png'
).
stub_request
(
:head
,
'banana-corp.local/valid-image.png'
).
to_return
(
to_return
(
:status
=>
200
,
:status
=>
200
,
:headers
=>
{
'Content-Type'
=>
'image/png'
}
:headers
=>
{
'Content-Type'
=>
'image/png'
}
,
)
)
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