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
908327e6
Commit
908327e6
authored
Apr 29, 2012
by
Will Pragnell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed Local_pod license method to license_text and added fallback to file if no text specified
parent
6ec5ea89
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
+13
-11
acknowledgements.rb
lib/cocoapods/generator/acknowledgements.rb
+3
-3
local_pod.rb
lib/cocoapods/local_pod.rb
+8
-2
local_pod_spec.rb
spec/unit/local_pod_spec.rb
+2
-6
No files found.
lib/cocoapods/generator/acknowledgements.rb
View file @
908327e6
...
...
@@ -31,14 +31,14 @@ module Pod
end
def
hash_for_pod
(
pod
)
if
(
license
=
pod
.
license
)
if
(
license
=
pod
.
license
_text
)
{
:Type
=>
"PSGroupSpecifier"
,
:Title
=>
pod
.
name
,
:FooterText
=>
license
[
:text
]
:FooterText
=>
license
}
else
puts
"[!] No licen
c
e for
#{
pod
.
name
}
"
puts
"[!] No licen
s
e for
#{
pod
.
name
}
"
end
end
...
...
lib/cocoapods/local_pod.rb
View file @
908327e6
...
...
@@ -75,8 +75,14 @@ module Pod
source_files
.
select
{
|
f
|
f
.
extname
==
'.h'
}
end
def
license
specification
.
license
def
license_text
if
(
license_hash
=
specification
.
license
)
if
(
result
=
license_hash
[
:text
])
result
elsif
(
filename
=
license_hash
[
:file
])
result
=
IO
.
read
(
root
+
filename
)
end
end
end
def
link_headers
...
...
spec/unit/local_pod_spec.rb
View file @
908327e6
...
...
@@ -49,12 +49,8 @@ describe Pod::LocalPod do
@pod
.
header_files
.
should
==
[
Pathname
.
new
(
"BananaLib/Classes/Banana.h"
)]
end
it
'returns a license'
do
@pod
.
license
.
should
==
{
:type
=>
"MIT"
,
:file
=>
"LICENSE"
,
:text
=>
"Permission is hereby granted ..."
}
it
'returns some license text'
do
@pod
.
license_text
.
should
==
"Permission is hereby granted ..."
end
it
'can clean up after itself'
do
...
...
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