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
733d6aa6
Commit
733d6aa6
authored
Oct 10, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[UI] Support for running CocoaPods without a terminal.
Closes #577. Closes #575.
parent
5c10da1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
CHANGELOG.md
CHANGELOG.md
+9
-2
user_interface.rb
lib/cocoapods/user_interface.rb
+7
-2
No files found.
CHANGELOG.md
View file @
733d6aa6
...
@@ -4,11 +4,18 @@
...
@@ -4,11 +4,18 @@
###### Enhancements
###### Enhancements
-
The git cache now always uses a barebone repo.
[
#581
](
https://github.com/CocoaPods/CocoaPods/pull/581
)
-
Added support for
`.hh`
headers.
-
Added support for
`.hh`
headers.
[
#576
](
https://github.com/CocoaPods/CocoaPods/pull/576
)
[
#576
](
https://github.com/CocoaPods/CocoaPods/pull/576
)
###### Bug fixes
-
Restored support for not running CocoaPods in a terminal.
[
#575
](
https://github.com/CocoaPods/CocoaPods/pull/575
)
[
#577
](
https://github.com/CocoaPods/CocoaPods/pull/577
)
-
The git cache now always uses a barebone repo preventing a number of related issues.
[
#581
](
https://github.com/CocoaPods/CocoaPods/pull/581
)
[
#569
](
https://github.com/CocoaPods/CocoaPods/pull/569
)
## 0.15.1
## 0.15.1
[
CocoaPods
](
https://github.com/CocoaPods/CocoaPods/compare/0.15.0...0.15.1
)
[
CocoaPods
](
https://github.com/CocoaPods/CocoaPods/compare/0.15.0...0.15.1
)
...
...
lib/cocoapods/user_interface.rb
View file @
733d6aa6
...
@@ -196,8 +196,9 @@ module Pod
...
@@ -196,8 +196,9 @@ module Pod
# @!group Helpers
# @!group Helpers
# Wraps a string taking into account the width of the terminal and an
# @return [String] Wraps a string taking into account the width of the
# option indent. Adapted from http://blog.macromates.com/2006/wrapping-text-with-regular-expressions/
# terminal and an option indent. Adapted from
# http://blog.macromates.com/2006/wrapping-text-with-regular-expressions/
#
#
# @param [String] txt The string to wrap
# @param [String] txt The string to wrap
#
#
...
@@ -205,8 +206,12 @@ module Pod
...
@@ -205,8 +206,12 @@ module Pod
#
#
# @return [String] The formatted string.
# @return [String] The formatted string.
#
#
# @note If CocoaPods is not being run in a terminal or the width of the
# terminal is too small a width of 80 is assumed.
#
def
wrap_string
(
txt
,
indent
=
''
)
def
wrap_string
(
txt
,
indent
=
''
)
width
=
`stty size`
.
split
(
' '
)[
1
].
to_i
-
indent
.
length
width
=
`stty size`
.
split
(
' '
)[
1
].
to_i
-
indent
.
length
width
=
80
unless
width
>=
10
txt
.
strip
.
gsub
(
/(.{1,
#{
width
}
})( +|$)\n?|(.{
#{
width
}
})/
,
indent
+
"
\\
1
\\
3
\n
"
)
txt
.
strip
.
gsub
(
/(.{1,
#{
width
}
})( +|$)\n?|(.{
#{
width
}
})/
,
indent
+
"
\\
1
\\
3
\n
"
)
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