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
44d6c041
Commit
44d6c041
authored
Sep 10, 2015
by
Boris Bügling
Committed by
Samuel Giddins
Sep 26, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `tvos` as a new platform.
parent
f650a391
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
6 deletions
+24
-6
create.rb
lib/cocoapods/command/spec/create.rb
+1
-0
copy_resources_script.rb
lib/cocoapods/generator/copy_resources_script.rb
+1
-0
installer.rb
lib/cocoapods/installer.rb
+2
-0
post_install_hooks_context.rb
lib/cocoapods/installer/post_install_hooks_context.rb
+1
-1
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+1
-0
validator.rb
lib/cocoapods/validator.rb
+2
-0
push_spec.rb
spec/functional/command/repo/push_spec.rb
+2
-0
header_spec.rb
spec/unit/generator/header_spec.rb
+5
-0
validator_spec.rb
spec/unit/validator_spec.rb
+9
-5
No files found.
lib/cocoapods/command/spec/create.rb
View file @
44d6c041
...
@@ -177,6 +177,7 @@ Pod::Spec.new do |s|
...
@@ -177,6 +177,7 @@ Pod::Spec.new do |s|
# s.ios.deployment_target = "5.0"
# s.ios.deployment_target = "5.0"
# s.osx.deployment_target = "10.7"
# s.osx.deployment_target = "10.7"
# s.watchos.deployment_target = "2.0"
# s.watchos.deployment_target = "2.0"
# s.tvos.deployment_target = "9.0"
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
...
...
lib/cocoapods/generator/copy_resources_script.rb
View file @
44d6c041
...
@@ -52,6 +52,7 @@ module Pod
...
@@ -52,6 +52,7 @@ module Pod
:ios
=>
Version
.
new
(
'6.0'
),
:ios
=>
Version
.
new
(
'6.0'
),
:osx
=>
Version
.
new
(
'10.8'
),
:osx
=>
Version
.
new
(
'10.8'
),
:watchos
=>
Version
.
new
(
'2.0'
),
:watchos
=>
Version
.
new
(
'2.0'
),
:tvos
=>
Version
.
new
(
'9.0'
),
}
}
# @return [Bool] Whether the external strings file is supported by the
# @return [Bool] Whether the external strings file is supported by the
...
...
lib/cocoapods/installer.rb
View file @
44d6c041
...
@@ -569,10 +569,12 @@ module Pod
...
@@ -569,10 +569,12 @@ module Pod
osx_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:osx
}.
map
(
&
:deployment_target
).
min
osx_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:osx
}.
map
(
&
:deployment_target
).
min
ios_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:ios
}.
map
(
&
:deployment_target
).
min
ios_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:ios
}.
map
(
&
:deployment_target
).
min
watchos_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:watchos
}.
map
(
&
:deployment_target
).
min
watchos_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:watchos
}.
map
(
&
:deployment_target
).
min
tvos_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:tvos
}.
map
(
&
:deployment_target
).
min
@pods_project
.
build_configurations
.
each
do
|
build_configuration
|
@pods_project
.
build_configurations
.
each
do
|
build_configuration
|
build_configuration
.
build_settings
[
'MACOSX_DEPLOYMENT_TARGET'
]
=
osx_deployment_target
.
to_s
if
osx_deployment_target
build_configuration
.
build_settings
[
'MACOSX_DEPLOYMENT_TARGET'
]
=
osx_deployment_target
.
to_s
if
osx_deployment_target
build_configuration
.
build_settings
[
'IPHONEOS_DEPLOYMENT_TARGET'
]
=
ios_deployment_target
.
to_s
if
ios_deployment_target
build_configuration
.
build_settings
[
'IPHONEOS_DEPLOYMENT_TARGET'
]
=
ios_deployment_target
.
to_s
if
ios_deployment_target
build_configuration
.
build_settings
[
'WATCHOS_DEPLOYMENT_TARGET'
]
=
watchos_deployment_target
.
to_s
if
watchos_deployment_target
build_configuration
.
build_settings
[
'WATCHOS_DEPLOYMENT_TARGET'
]
=
watchos_deployment_target
.
to_s
if
watchos_deployment_target
build_configuration
.
build_settings
[
'TVOS_DEPLOYMENT_TARGET'
]
=
tvos_deployment_target
.
to_s
if
tvos_deployment_target
build_configuration
.
build_settings
[
'STRIP_INSTALLED_PRODUCT'
]
=
'NO'
build_configuration
.
build_settings
[
'STRIP_INSTALLED_PRODUCT'
]
=
'NO'
build_configuration
.
build_settings
[
'CLANG_ENABLE_OBJC_ARC'
]
=
'YES'
build_configuration
.
build_settings
[
'CLANG_ENABLE_OBJC_ARC'
]
=
'YES'
end
end
...
...
lib/cocoapods/installer/post_install_hooks_context.rb
View file @
44d6c041
...
@@ -66,7 +66,7 @@ module Pod
...
@@ -66,7 +66,7 @@ module Pod
#
#
attr_accessor
:specs
attr_accessor
:specs
# @return [Symbol] The platform (either `:ios`, `:watchos` or `:osx`).
# @return [Symbol] The platform (either `:ios`, `:watchos`
, `:tvos`
or `:osx`).
#
#
attr_accessor
:platform_name
attr_accessor
:platform_name
...
...
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
44d6c041
...
@@ -199,6 +199,7 @@ module Pod
...
@@ -199,6 +199,7 @@ module Pod
:ios
=>
Version
.
new
(
'6'
),
:ios
=>
Version
.
new
(
'6'
),
:osx
=>
Version
.
new
(
'10.8'
),
:osx
=>
Version
.
new
(
'10.8'
),
:watchos
=>
Version
.
new
(
'2.0'
),
:watchos
=>
Version
.
new
(
'2.0'
),
:tvos
=>
Version
.
new
(
'9.0'
),
}
}
# Returns the compiler flags for the source files of the given specification.
# Returns the compiler flags for the source files of the given specification.
...
...
lib/cocoapods/validator.rb
View file @
44d6c041
...
@@ -94,6 +94,8 @@ module Pod
...
@@ -94,6 +94,8 @@ module Pod
platform_message
=
'[OSX] '
platform_message
=
'[OSX] '
elsif
result
.
platforms
==
[
:watchos
]
elsif
result
.
platforms
==
[
:watchos
]
platform_message
=
'[watchOS] '
platform_message
=
'[watchOS] '
elsif
result
.
platforms
==
[
:tvos
]
platform_message
=
'[tvOS] '
end
end
subspecs_message
=
''
subspecs_message
=
''
...
...
spec/functional/command/repo/push_spec.rb
View file @
44d6c041
...
@@ -141,6 +141,7 @@ module Pod
...
@@ -141,6 +141,7 @@ module Pod
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
true
).
times
(
3
)
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
true
).
times
(
3
)
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
true
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
true
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
true
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
true
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:tvos
,
nil
,
true
).
twice
cmd
=
command
(
'repo'
,
'push'
,
'master'
)
cmd
=
command
(
'repo'
,
'push'
,
'master'
)
Dir
.
chdir
(
temporary_directory
)
{
cmd
.
run
}
Dir
.
chdir
(
temporary_directory
)
{
cmd
.
run
}
...
@@ -150,6 +151,7 @@ module Pod
...
@@ -150,6 +151,7 @@ module Pod
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
false
).
times
(
3
)
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
false
).
times
(
3
)
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
false
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
false
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
false
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
false
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:tvos
,
nil
,
false
).
twice
cmd
=
command
(
'repo'
,
'push'
,
'master'
,
'--use-libraries'
)
cmd
=
command
(
'repo'
,
'push'
,
'master'
,
'--use-libraries'
)
Dir
.
chdir
(
temporary_directory
)
{
cmd
.
run
}
Dir
.
chdir
(
temporary_directory
)
{
cmd
.
run
}
...
...
spec/unit/generator/header_spec.rb
View file @
44d6c041
...
@@ -40,6 +40,11 @@ module Pod
...
@@ -40,6 +40,11 @@ module Pod
@gen
.
generate
.
should
.
include?
(
'#import <Foundation/Foundation.h>'
)
@gen
.
generate
.
should
.
include?
(
'#import <Foundation/Foundation.h>'
)
end
end
it
'imports Foundation for tvOS platforms'
do
@gen
.
stubs
(
:platform
).
returns
(
Pod
::
Platform
.
tvos
)
@gen
.
generate
.
should
.
include?
(
'#import <Foundation/Foundation.h>'
)
end
it
'writes the header file to the disk'
do
it
'writes the header file to the disk'
do
path
=
temporary_directory
+
'Test.h'
path
=
temporary_directory
+
'Test.h'
@gen
.
save_as
(
path
)
@gen
.
save_as
(
path
)
...
...
spec/unit/validator_spec.rb
View file @
44d6c041
...
@@ -268,9 +268,9 @@ module Pod
...
@@ -268,9 +268,9 @@ module Pod
file
=
write_podspec
(
stub_podspec
)
file
=
write_podspec
(
stub_podspec
)
validator
=
Validator
.
new
(
file
,
SourcesManager
.
master
.
map
(
&
:url
))
validator
=
Validator
.
new
(
file
,
SourcesManager
.
master
.
map
(
&
:url
))
validator
.
stubs
(
:validate_url
)
validator
.
stubs
(
:validate_url
)
validator
.
expects
(
:install_pod
).
times
(
3
)
validator
.
expects
(
:install_pod
).
times
(
4
)
validator
.
expects
(
:build_pod
).
times
(
3
)
validator
.
expects
(
:build_pod
).
times
(
4
)
validator
.
expects
(
:check_file_patterns
).
times
(
3
)
validator
.
expects
(
:check_file_patterns
).
times
(
4
)
validator
.
validate
validator
.
validate
end
end
...
@@ -314,6 +314,7 @@ module Pod
...
@@ -314,6 +314,7 @@ module Pod
validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
'7.0'
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
'7.0'
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:tvos
,
nil
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
nil
).
once
validator
.
send
(
:perform_extensive_analysis
,
validator
.
spec
)
validator
.
send
(
:perform_extensive_analysis
,
validator
.
spec
)
end
end
...
@@ -385,7 +386,7 @@ module Pod
...
@@ -385,7 +386,7 @@ module Pod
validator
.
stubs
(
:validate_url
)
validator
.
stubs
(
:validate_url
)
git
=
Executable
.
which
(
:git
)
git
=
Executable
.
which
(
:git
)
Executable
.
stubs
(
:which
).
with
(
'git'
).
returns
(
git
)
Executable
.
stubs
(
:which
).
with
(
'git'
).
returns
(
git
)
Executable
.
expects
(
:which
).
with
(
'xcodebuild'
).
times
(
3
).
returns
(
'/usr/bin/xcodebuild'
)
Executable
.
expects
(
:which
).
with
(
'xcodebuild'
).
times
(
4
).
returns
(
'/usr/bin/xcodebuild'
)
status
=
mock
status
=
mock
status
.
stubs
(
:success?
).
returns
(
false
)
status
.
stubs
(
:success?
).
returns
(
false
)
validator
.
stubs
(
:_xcodebuild
).
returns
([
'Output'
,
status
])
validator
.
stubs
(
:_xcodebuild
).
returns
([
'Output'
,
status
])
...
@@ -402,7 +403,7 @@ module Pod
...
@@ -402,7 +403,7 @@ module Pod
validator
.
stubs
(
:validate_url
)
validator
.
stubs
(
:validate_url
)
git
=
Executable
.
which
(
:git
)
git
=
Executable
.
which
(
:git
)
Executable
.
stubs
(
:which
).
with
(
'git'
).
returns
(
git
)
Executable
.
stubs
(
:which
).
with
(
'git'
).
returns
(
git
)
Executable
.
expects
(
:which
).
with
(
'xcodebuild'
).
times
(
3
).
returns
(
'/usr/bin/xcodebuild'
)
Executable
.
expects
(
:which
).
with
(
'xcodebuild'
).
times
(
4
).
returns
(
'/usr/bin/xcodebuild'
)
command
=
'xcodebuild clean build -target Pods'
command
=
'xcodebuild clean build -target Pods'
validator
.
expects
(
:`
).
with
(
"
#{
command
}
2>&1"
).
once
.
returns
(
''
)
validator
.
expects
(
:`
).
with
(
"
#{
command
}
2>&1"
).
once
.
returns
(
''
)
validator
.
expects
(
:`
).
with
(
"
#{
command
}
CODE_SIGN_IDENTITY=- -sdk iphonesimulator 2>&1"
).
once
.
returns
(
''
)
validator
.
expects
(
:`
).
with
(
"
#{
command
}
CODE_SIGN_IDENTITY=- -sdk iphonesimulator 2>&1"
).
once
.
returns
(
''
)
...
@@ -536,6 +537,7 @@ module Pod
...
@@ -536,6 +537,7 @@ module Pod
@validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
true
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
true
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
true
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
true
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:tvos
,
nil
,
true
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
true
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
true
).
once
@validator
.
send
(
:perform_extensive_analysis
,
@validator
.
spec
)
@validator
.
send
(
:perform_extensive_analysis
,
@validator
.
spec
)
end
end
...
@@ -547,6 +549,7 @@ module Pod
...
@@ -547,6 +549,7 @@ module Pod
@validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
false
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
false
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
false
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
false
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:tvos
,
nil
,
false
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
false
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
false
).
once
@validator
.
send
(
:perform_extensive_analysis
,
@validator
.
spec
)
@validator
.
send
(
:perform_extensive_analysis
,
@validator
.
spec
)
end
end
...
@@ -601,6 +604,7 @@ module Pod
...
@@ -601,6 +604,7 @@ module Pod
validator
=
test_swiftpod
validator
=
test_swiftpod
p
validator
.
results
validator
.
results
.
count
.
should
==
0
validator
.
results
.
count
.
should
==
0
end
end
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