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
2220774b
Commit
2220774b
authored
Aug 10, 2012
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More cleanup using ActiveSupport's Oxford comma styling of a list.
parent
21bc6d45
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
12 deletions
+10
-12
cocoa_pod.rb
lib/cocoapods/command/presenter/cocoa_pod.rb
+3
-8
documentation.rb
lib/cocoapods/generator/documentation.rb
+2
-1
set.rb
lib/cocoapods/specification/set.rb
+3
-1
documentation_spec.rb
spec/unit/generator/documentation_spec.rb
+2
-2
No files found.
lib/cocoapods/command/presenter/cocoa_pod.rb
View file @
2220774b
require
'active_support/core_ext/array/conversions'
module
Pod
module
Pod
class
Command
class
Command
class
Presenter
class
Presenter
...
@@ -27,7 +29,7 @@ module Pod
...
@@ -27,7 +29,7 @@ module Pod
end
end
def
authors
def
authors
oxfordify
spec
.
authors
.
keys
spec
.
authors
.
keys
.
to_sentence
end
end
def
homepage
def
homepage
...
@@ -89,13 +91,6 @@ module Pod
...
@@ -89,13 +91,6 @@ module Pod
end
end
private
private
def
oxfordify
words
if
words
.
size
<
3
words
.
join
' and '
else
"
#{
words
[
0
..-
2
].
join
(
', '
)
}
, and
#{
words
.
last
}
"
end
end
def
distance_from_now_in_words
(
from_time
)
def
distance_from_now_in_words
(
from_time
)
return
nil
unless
from_time
return
nil
unless
from_time
...
...
lib/cocoapods/generator/documentation.rb
View file @
2220774b
require
'escape'
require
'escape'
require
'active_support/core_ext/array/conversions'
module
Pod
module
Pod
module
Generator
module
Generator
...
@@ -23,7 +24,7 @@ module Pod
...
@@ -23,7 +24,7 @@ module Pod
def
company
def
company
if
@specification
.
authors
if
@specification
.
authors
@specification
.
authors
.
keys
.
sort
.
join
(
', '
)
@specification
.
authors
.
keys
.
sort
.
to_sentence
else
else
'no-company'
'no-company'
end
end
...
...
lib/cocoapods/specification/set.rb
View file @
2220774b
require
'active_support/core_ext/array/conversions'
module
Pod
module
Pod
class
Specification
class
Specification
class
Set
class
Set
...
@@ -18,7 +20,7 @@ module Pod
...
@@ -18,7 +20,7 @@ module Pod
# TODO add graph that shows which dependencies led to this.
# TODO add graph that shows which dependencies led to this.
raise
Informative
,
"
#{
specification
}
tries to activate `
#{
dependency
}
', "
\
raise
Informative
,
"
#{
specification
}
tries to activate `
#{
dependency
}
', "
\
"but already activated version `
#{
required_version
}
' "
\
"but already activated version `
#{
required_version
}
' "
\
"by
#{
@required_by
.
join
(
', '
)
}
."
"by
#{
@required_by
.
to_sentence
}
."
end
end
@specification
=
nil
@specification
=
nil
@required_by
<<
specification
@required_by
<<
specification
...
...
spec/unit/generator/documentation_spec.rb
View file @
2220774b
...
@@ -26,8 +26,8 @@ describe Pod::Generator::Documentation do
...
@@ -26,8 +26,8 @@ describe Pod::Generator::Documentation do
@doc_installer
.
appledoc_options
.
should
==
[
@doc_installer
.
appledoc_options
.
should
==
[
'--project-name'
,
'BananaLib 1.0'
,
'--project-name'
,
'BananaLib 1.0'
,
'--docset-desc'
,
'Full of chunky bananas.'
,
'--docset-desc'
,
'Full of chunky bananas.'
,
'--project-company'
,
'Banana Corp
,
Monkey Boy'
,
'--project-company'
,
'Banana Corp
and
Monkey Boy'
,
'--docset-copyright'
,
'Banana Corp
,
Monkey Boy'
,
'--docset-copyright'
,
'Banana Corp
and
Monkey Boy'
,
'--company-id'
,
'org.cocoapods'
,
'--company-id'
,
'org.cocoapods'
,
'--ignore'
,
'.m'
,
'--ignore'
,
'.m'
,
'--keep-undocumented-objects'
,
'--keep-undocumented-objects'
,
...
...
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