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
4fec429f
Commit
4fec429f
authored
May 31, 2016
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 1-0-stable
parents
34efacd8
0407b396
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
5 deletions
+30
-5
CHANGELOG.md
CHANGELOG.md
+5
-0
Gemfile.lock
Gemfile.lock
+1
-1
init.rb
lib/cocoapods/command/init.rb
+1
-1
init_spec.rb
spec/functional/command/init_spec.rb
+23
-3
No files found.
CHANGELOG.md
View file @
4fec429f
...
@@ -43,6 +43,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -43,6 +43,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
William Entriken
](
https://github.com/fulldecent
)
[
William Entriken
](
https://github.com/fulldecent
)
[
CocoaPods/pod-template#69
](
https://github.com/CocoaPods/pod-template/issues/69
)
[
CocoaPods/pod-template#69
](
https://github.com/CocoaPods/pod-template/issues/69
)
*
Use target product types to determine whether a target is a test target when
running
`pod init`
.
[
Samuel Giddins
](
https://github.com/segiddins
)
[
#5378
](
https://github.com/CocoaPods/CocoaPods/issues/5378
)
## 1.0.0 (2016-05-10)
## 1.0.0 (2016-05-10)
...
...
Gemfile.lock
View file @
4fec429f
...
@@ -24,7 +24,7 @@ GIT
...
@@ -24,7 +24,7 @@ GIT
GIT
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
remote: https://github.com/CocoaPods/Xcodeproj.git
revision:
480e2f99e5e9315b8032854a9530aa500761e13
8
revision:
cd03f259381c2b6317e60f088adff6b6e2b01d6
8
branch: master
branch: master
specs:
specs:
xcodeproj (1.0.0)
xcodeproj (1.0.0)
...
...
lib/cocoapods/command/init.rb
View file @
4fec429f
...
@@ -63,7 +63,7 @@ module Pod
...
@@ -63,7 +63,7 @@ module Pod
# Split out the targets into app and test targets
# Split out the targets into app and test targets
test_targets
,
app_targets
=
project
.
native_targets
.
test_targets
,
app_targets
=
project
.
native_targets
.
sort_by
{
|
t
|
t
.
name
.
downcase
}.
sort_by
{
|
t
|
t
.
name
.
downcase
}.
partition
{
|
t
|
t
.
name
=~
/test/i
}
partition
(
&
:test_target_type?
)
app_targets
.
each
do
|
app_target
|
app_targets
.
each
do
|
app_target
|
test_targets_for_app
=
test_targets
.
select
do
|
target
|
test_targets_for_app
=
test_targets
.
select
do
|
target
|
...
...
spec/functional/command/init_spec.rb
View file @
4fec429f
...
@@ -90,8 +90,8 @@ module Pod
...
@@ -90,8 +90,8 @@ module Pod
Dir
.
chdir
(
temporary_directory
)
do
Dir
.
chdir
(
temporary_directory
)
do
project
=
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test.xcodeproj'
)
project
=
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test.xcodeproj'
)
project
.
new_target
(
:application
,
'App'
,
:ios
)
project
.
new_target
(
:application
,
'App'
,
:ios
)
project
.
new_target
(
:
application
,
'AppTests'
,
:ios
)
project
.
new_target
(
:
unit_test_bundle
,
'AppTests'
,
:ios
)
project
.
new_target
(
:
application
,
'AppFeatureTests'
,
:ios
)
project
.
new_target
(
:
ui_test_bundle
,
'AppFeatureTests'
,
:ios
)
project
.
new_target
(
:application
,
'Swifty App'
,
:osx
,
nil
,
nil
,
:swift
)
project
.
new_target
(
:application
,
'Swifty App'
,
:osx
,
nil
,
nil
,
:swift
)
project
.
save
project
.
save
...
@@ -142,7 +142,7 @@ module Pod
...
@@ -142,7 +142,7 @@ module Pod
project
=
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test.xcodeproj'
)
project
=
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test.xcodeproj'
)
project
.
new_target
(
:application
,
'App'
,
:ios
)
project
.
new_target
(
:application
,
'App'
,
:ios
)
project
.
new_target
(
:
application
,
'AppTests'
,
:ios
)
project
.
new_target
(
:
unit_test_bundle
,
'AppTests'
,
:ios
)
project
.
save
project
.
save
run_command
(
'init'
)
run_command
(
'init'
)
...
@@ -152,6 +152,26 @@ module Pod
...
@@ -152,6 +152,26 @@ module Pod
end
end
end
end
it
'does not treat non-test targets as test targets'
do
Dir
.
chdir
(
temporary_directory
)
do
tmp_templates_dir
=
Pathname
.
pwd
+
'templates_dir'
tmp_templates_dir
.
mkpath
config
.
stubs
(
:templates_dir
).
returns
(
tmp_templates_dir
)
open
(
config
.
default_test_podfile_path
,
'w'
)
{
|
f
|
f
<<
"pod 'Kiwi'"
}
project
=
Xcodeproj
::
Project
.
new
(
temporary_directory
+
'test.xcodeproj'
)
project
.
new_target
(
:application
,
'Test'
,
:ios
)
project
.
new_target
(
:application
,
'Test Test Test'
,
:ios
)
project
.
save
run_command
(
'init'
)
config
.
podfile
.
target_definitions
[
'Test'
].
dependencies
.
should
.
be
.
empty
config
.
podfile
.
target_definitions
[
'Test Test Test'
].
dependencies
.
should
.
be
.
empty
end
end
it
'does not include default test pods if there are no test targets'
do
it
'does not include default test pods if there are no test targets'
do
Dir
.
chdir
(
temporary_directory
)
do
Dir
.
chdir
(
temporary_directory
)
do
tmp_templates_dir
=
Pathname
.
pwd
+
'templates_dir'
tmp_templates_dir
=
Pathname
.
pwd
+
'templates_dir'
...
...
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