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
6aa0bb76
Commit
6aa0bb76
authored
Sep 14, 2014
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor change for edge case, more intuitive empty line generating
parent
fdfca014
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
header.rb
lib/cocoapods/generator/header.rb
+4
-4
prefix_header.rb
lib/cocoapods/generator/prefix_header.rb
+0
-2
header_spec.rb
spec/unit/generator/header_spec.rb
+2
-1
No files found.
lib/cocoapods/generator/header.rb
View file @
6aa0bb76
...
@@ -35,10 +35,10 @@ module Pod
...
@@ -35,10 +35,10 @@ module Pod
result
=
""
result
=
""
result
<<
generate_platform_import_header
result
<<
generate_platform_import_header
unless
imports
.
empty?
result
<<
"
\n
"
imports
.
each
do
|
import
|
result
<<
%|\n#import "#{import}"
|
imports
.
each
do
|
import
|
end
result
<<
%|#import "#{import}"\n|
end
end
result
result
...
...
lib/cocoapods/generator/prefix_header.rb
View file @
6aa0bb76
...
@@ -38,8 +38,6 @@ module Pod
...
@@ -38,8 +38,6 @@ module Pod
def
generate
def
generate
result
=
super
result
=
super
result
<<
"
\n
"
unique_prefix_header_contents
=
file_accessors
.
map
do
|
file_accessor
|
unique_prefix_header_contents
=
file_accessors
.
map
do
|
file_accessor
|
file_accessor
.
spec_consumer
.
prefix_header_contents
file_accessor
.
spec_consumer
.
prefix_header_contents
end
.
compact
.
uniq
end
.
compact
.
uniq
...
...
spec/unit/generator/header_spec.rb
View file @
6aa0bb76
...
@@ -9,7 +9,7 @@ module Pod
...
@@ -9,7 +9,7 @@ module Pod
it
'includes the imports'
do
it
'includes the imports'
do
@gen
.
imports
<<
'header.h'
@gen
.
imports
<<
'header.h'
@gen
.
generate
.
should
==
<<-
EOS
.
strip_heredoc
.
chomp
@gen
.
generate
.
should
==
<<-
EOS
.
strip_heredoc
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#import "header.h"
#import "header.h"
...
@@ -31,6 +31,7 @@ module Pod
...
@@ -31,6 +31,7 @@ module Pod
@gen
.
save_as
(
path
)
@gen
.
save_as
(
path
)
path
.
read
.
should
==
<<-
EOS
.
strip_heredoc
path
.
read
.
should
==
<<-
EOS
.
strip_heredoc
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
EOS
EOS
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