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
356799ef
Commit
356799ef
authored
Feb 22, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up some comments and minor house keeping
parent
df587bcd
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
20 deletions
+30
-20
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+17
-4
validator.rb
lib/cocoapods/validator.rb
+5
-3
spec_spec.rb
spec/functional/command/spec_spec.rb
+1
-1
integration_2.rb
spec/integration_2.rb
+3
-5
spec_helper.rb
spec/spec_helper.rb
+0
-6
command.rb
spec/spec_helper/command.rb
+1
-1
user_interface.rb
spec/spec_helper/user_interface.rb
+3
-0
No files found.
lib/cocoapods/installer/analyzer.rb
View file @
356799ef
...
@@ -214,11 +214,24 @@ module Pod
...
@@ -214,11 +214,24 @@ module Pod
end
end
end
end
# If modifications to the sandbox are allowed external sources are
# Fetches the podspecs of external sources if modifications to the
# fetched. In update mode all the external sources are refreshed while in
# sandbox are allowed.
# normal mode they refreshed only if added or changed in the Podfile.
#
#
# TODO Specs, comments, and fix UI
# @note In update mode all the external sources are refreshed while in
# normal mode they are refreshed only if added or changed in the
# Podfile. Moreover, in normal specifications for unchanged Pods
# which are missing or are generated from an local source are
# fetched as well.
#
# @note It is possible to perform this step before the resolution
# process because external sources identify a single specific
# version (checkout). If the other dependencies are not
# compatible with the version reported by the podspec of the
# external source the resolver will raise.
#
# @return [void]
#
# TODO Specs
#
#
def
fetch_external_sources
def
fetch_external_sources
return
unless
allow_pre_downloads?
return
unless
allow_pre_downloads?
...
...
lib/cocoapods/validator.rb
View file @
356799ef
...
@@ -101,7 +101,9 @@ module Pod
...
@@ -101,7 +101,9 @@ module Pod
# @!group Configuration
# @!group Configuration
# @return [Boolean] TODO
# @return [Bool] Whether the validator should print the results of the
# validation. This is useful for clients which want to customize
# output.
#
#
attr_accessor
:disable_ui_output
attr_accessor
:disable_ui_output
...
@@ -127,7 +129,8 @@ module Pod
...
@@ -127,7 +129,8 @@ module Pod
attr_writer
:local
attr_writer
:local
def
local?
;
@local
;
end
def
local?
;
@local
;
end
# @return [Boolean] TODO
# @return [Bool] Whether the validator should fail only on errors or also
# on warnings.
#
#
attr_accessor
:only_errors
attr_accessor
:only_errors
...
@@ -221,7 +224,6 @@ module Pod
...
@@ -221,7 +224,6 @@ module Pod
end
end
def
tear_down_validation_environment
def
tear_down_validation_environment
# TODO
validation_dir
.
rmtree
unless
no_clean
validation_dir
.
rmtree
unless
no_clean
Config
.
instance
=
@original_config
Config
.
instance
=
@original_config
end
end
...
...
spec/functional/command/spec_spec.rb
View file @
356799ef
...
@@ -120,7 +120,7 @@ module Pod
...
@@ -120,7 +120,7 @@ module Pod
end
end
end
end
#
TODO
VCR is required in CocoaPods only for this test.
#
@todo
VCR is required in CocoaPods only for this test.
#
#
# it "lints a remote podspec" do
# it "lints a remote podspec" do
# Dir.chdir(fixture('spec-repos') + 'master/JSONKit/1.4/') do
# Dir.chdir(fixture('spec-repos') + 'master/JSONKit/1.4/') do
...
...
spec/integration_2.rb
View file @
356799ef
...
@@ -88,8 +88,6 @@ end
...
@@ -88,8 +88,6 @@ end
# environment.
# environment.
#
#
def
launch_binary
(
arguments
,
folder
)
def
launch_binary
(
arguments
,
folder
)
# TODO CP 0.16 doesn't offer the possibility to skip just the installation
# of the docs.
command
=
"
#{
POD_BINARY
}
#{
arguments
}
--verbose --no-color 2>&1"
command
=
"
#{
POD_BINARY
}
#{
arguments
}
--verbose --no-color 2>&1"
Dir
.
chdir
(
TMP_DIR
+
folder
)
do
Dir
.
chdir
(
TMP_DIR
+
folder
)
do
output
=
`
#{
command
}
`
output
=
`
#{
command
}
`
...
@@ -336,19 +334,19 @@ describe "Integration take 2" do
...
@@ -336,19 +334,19 @@ describe "Integration take 2" do
check
"install --no-update --no-doc"
,
"install_podspec"
check
"install --no-update --no-doc"
,
"install_podspec"
end
end
#
TODO
add tests for all the hooks API
#
@todo
add tests for all the hooks API
#
#
describe
"Runs the Podfile callbacks"
do
describe
"Runs the Podfile callbacks"
do
check
"install --no-update --no-doc"
,
"install_podfile_callbacks"
check
"install --no-update --no-doc"
,
"install_podfile_callbacks"
end
end
#
TODO
add tests for all the hooks API
#
@todo
add tests for all the hooks API
#
#
describe
"Runs the specification callbacks"
do
describe
"Runs the specification callbacks"
do
check
"install --no-update --no-doc"
,
"install_spec_callbacks"
check
"install --no-update --no-doc"
,
"install_spec_callbacks"
end
end
#
TODO:
requires CocoaPods 0.17
#
@todo
requires CocoaPods 0.17
#
#
# describe "Generates the documentation of Pod during installation" do
# describe "Generates the documentation of Pod during installation" do
# check "install --no-update --no-doc", "install_docs"
# check "install --no-update --no-doc", "install_docs"
...
...
spec/spec_helper.rb
View file @
356799ef
...
@@ -92,12 +92,6 @@ def fixture_file_accessor(name, platform = :ios)
...
@@ -92,12 +92,6 @@ def fixture_file_accessor(name, platform = :ios)
Pod
::
Sandbox
::
FileAccessor
.
new
(
path_list
,
spec
.
consumer
(
platform
))
Pod
::
Sandbox
::
FileAccessor
.
new
(
path_list
,
spec
.
consumer
(
platform
))
end
end
# TODO This should not be needed anymore
def
copy_fixture_to_pod
(
name
,
pod
)
path
=
SpecHelper
::
Fixture
.
fixture
(
name
)
FileUtils
.
cp_r
(
path
,
pod
.
root
)
end
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
SpecHelper
::
Fixture
.
fixture
(
'banana-lib'
)
# ensure it exists
SpecHelper
::
Fixture
.
fixture
(
'banana-lib'
)
# ensure it exists
...
...
spec/spec_helper/command.rb
View file @
356799ef
...
@@ -12,7 +12,7 @@ module SpecHelper
...
@@ -12,7 +12,7 @@ module SpecHelper
def
run_command
(
*
args
)
def
run_command
(
*
args
)
Dir
.
chdir
(
SpecHelper
.
temporary_directory
)
do
Dir
.
chdir
(
SpecHelper
.
temporary_directory
)
do
Pod
::
UI
.
output
=
''
Pod
::
UI
.
output
=
''
#
TODO: r
emove this once all cocoapods has
#
@todo R
emove this once all cocoapods has
# been converted to use the UI.puts
# been converted to use the UI.puts
config_silent
=
config
.
silent?
config_silent
=
config
.
silent?
config
.
silent
=
false
config
.
silent
=
false
...
...
spec/spec_helper/user_interface.rb
View file @
356799ef
...
@@ -10,6 +10,9 @@ module Pod
...
@@ -10,6 +10,9 @@ module Pod
attr_accessor
:output
attr_accessor
:output
attr_accessor
:warnings
attr_accessor
:warnings
# @todo Allow to specify whether the text should be wrapped with an
# environment variable and remove the new feed replacement.
def
puts
(
message
=
''
)
def
puts
(
message
=
''
)
# Wrapping can bite in tests.
# Wrapping can bite in tests.
@output
<<
"
#{
message
}
"
.
gsub
(
/\n/
,
''
)
@output
<<
"
#{
message
}
"
.
gsub
(
/\n/
,
''
)
...
...
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