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
a0d280f6
Commit
a0d280f6
authored
Oct 16, 2013
by
Marin Usalj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed ConfigManager to Manager and ConfigEnvironment to Environment
parent
2f9df10d
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
29 additions
and
40 deletions
+29
-40
sandbox-pod
bin/sandbox-pod
+3
-3
command.rb
lib/cocoapods/command.rb
+1
-1
config.rb
lib/cocoapods/command/config.rb
+1
-1
config.rb
lib/cocoapods/config.rb
+8
-13
config_manager.rb
lib/cocoapods/config/config_manager.rb
+2
-2
environment.rb
lib/cocoapods/config/environment.rb
+1
-1
executable.rb
lib/cocoapods/executable.rb
+1
-1
installer.rb
lib/cocoapods/installer.rb
+1
-2
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+1
-2
sources_manager.rb
lib/cocoapods/sources_manager.rb
+1
-2
user_interface.rb
lib/cocoapods/user_interface.rb
+1
-2
validator.rb
lib/cocoapods/validator.rb
+1
-2
config_spec.rb
spec/functional/command/config_spec.rb
+1
-1
spec_helper.rb
spec/spec_helper.rb
+1
-2
config_manager_spec.rb
spec/unit/config/config_manager_spec.rb
+3
-3
environment_spec.rb
spec/unit/config/environment_spec.rb
+2
-2
No files found.
bin/sandbox-pod
View file @
a0d280f6
...
@@ -81,7 +81,7 @@ PROFILE_ERB_TEMPLATE = <<-EOS
...
@@ -81,7 +81,7 @@ PROFILE_ERB_TEMPLATE = <<-EOS
#"^<%= ruby_prefix %>"
#"^<%= ruby_prefix %>"
#"^<%= pod_prefix %>"
#"^<%= pod_prefix %>"
#"^<%= xcode_app_path %>"
#"^<%= xcode_app_path %>"
#"^<%= Pod::Config::
ConfigEnvironment
.repos_dir %>"
#"^<%= Pod::Config::
Environment.instance
.repos_dir %>"
<% prefixes.each do |prefix| %>
<% prefixes.each do |prefix| %>
#"^<%= prefix %>/*"
#"^<%= prefix %>/*"
<% end %>
<% end %>
...
@@ -94,8 +94,8 @@ PROFILE_ERB_TEMPLATE = <<-EOS
...
@@ -94,8 +94,8 @@ PROFILE_ERB_TEMPLATE = <<-EOS
"/dev/null"
"/dev/null"
)
)
(regex
(regex
#"^<%= Pod::Config::
Config
Environment.instance.project_root %>"
#"^<%= Pod::Config::Environment.instance.project_root %>"
#"^<%= Pod::Config::
Config
Environment.instance.repos_dir %>"
#"^<%= Pod::Config::Environment.instance.repos_dir %>"
#"^/Users/[^.]+/Library/Caches/CocoaPods/*"
#"^/Users/[^.]+/Library/Caches/CocoaPods/*"
#"^/dev/tty"
#"^/dev/tty"
#"^/private/var"
#"^/private/var"
...
...
lib/cocoapods/command.rb
View file @
a0d280f6
...
@@ -23,7 +23,7 @@ module Pod
...
@@ -23,7 +23,7 @@ module Pod
require
'cocoapods/command/spec'
require
'cocoapods/command/spec'
require
'cocoapods/command/init'
require
'cocoapods/command/init'
include
Pod
::
Config
::
Manager
include
Pod
::
Config
self
.
abstract_command
=
true
self
.
abstract_command
=
true
self
.
default_subcommand
=
'install'
self
.
default_subcommand
=
'install'
...
...
lib/cocoapods/command/config.rb
View file @
a0d280f6
...
@@ -17,7 +17,7 @@ module Pod
...
@@ -17,7 +17,7 @@ module Pod
#
#
class
Config
<
Command
class
Config
<
Command
include
Pod
::
Config
::
Manager
include
Pod
::
Config
self
.
summary
=
'Something like `bundle config` ... but better.'
self
.
summary
=
'Something like `bundle config` ... but better.'
self
.
description
=
<<-
DESC
self
.
description
=
<<-
DESC
...
...
lib/cocoapods/config.rb
View file @
a0d280f6
...
@@ -9,32 +9,27 @@ module Pod
...
@@ -9,32 +9,27 @@ module Pod
#
#
module
Config
module
Config
autoload
:ConfigManager
,
'cocoapods/config/config_manager'
autoload
:Manager
,
'cocoapods/config/config_manager'
autoload
:ConfigEnvironment
,
'cocoapods/config/environment'
autoload
:Environment
,
'cocoapods/config/environment'
# Provides support for accessing the configuration manager
# Provides support for accessing the configuration manager
# instance in other scopes.
# instance in other scopes.
#
#
module
Manager
def
config
def
config
Manager
.
instance
ConfigManager
.
instance
end
end
end
# Provides support for accessing the environment instance in other
# Provides support for accessing the environment instance in other
# scopes.
# scopes.
#
#
module
Environment
def
environment
def
environment
Environment
.
instance
ConfigEnvironment
.
instance
end
end
end
public
public
extend
Environment
#
extend Environment
extend
Manager
#
extend Manager
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
# @!group Dependency Injection
# @!group Dependency Injection
...
...
lib/cocoapods/config/config_manager.rb
View file @
a0d280f6
...
@@ -7,7 +7,7 @@ module Pod
...
@@ -7,7 +7,7 @@ module Pod
# The config manager is responsible for reading and writing the config.yaml
# The config manager is responsible for reading and writing the config.yaml
# file.
# file.
#
#
class
Config
Manager
class
Manager
# The default settings for the configuration.
# The default settings for the configuration.
...
@@ -106,7 +106,7 @@ module Pod
...
@@ -106,7 +106,7 @@ module Pod
# @return [Pathname] The path of the file which contains the user settings.
# @return [Pathname] The path of the file which contains the user settings.
#
#
def
global_config_filepath
def
global_config_filepath
Config
::
Config
Environment
.
instance
.
home_dir
+
"config.yaml"
Config
::
Environment
.
instance
.
home_dir
+
"config.yaml"
end
end
def
local_config_filepath
def
local_config_filepath
...
...
lib/cocoapods/config/environment.rb
View file @
a0d280f6
...
@@ -7,7 +7,7 @@ module Pod
...
@@ -7,7 +7,7 @@ module Pod
# The config manager is responsible for reading and writing the config.yaml
# The config manager is responsible for reading and writing the config.yaml
# file.
# file.
#
#
class
Config
Environment
class
Environment
# @!group Singleton
# @!group Singleton
...
...
lib/cocoapods/executable.rb
View file @
a0d280f6
...
@@ -13,7 +13,7 @@ module Pod
...
@@ -13,7 +13,7 @@ module Pod
#
#
module
Executable
module
Executable
extend
Pod
::
Config
::
Manager
extend
Pod
::
Config
# Creates the methods for the executable with the given name.
# Creates the methods for the executable with the given name.
#
#
...
...
lib/cocoapods/installer.rb
View file @
a0d280f6
...
@@ -36,8 +36,7 @@ module Pod
...
@@ -36,8 +36,7 @@ module Pod
autoload
:PodTargetInstaller
,
'cocoapods/installer/target_installer/pod_target_installer'
autoload
:PodTargetInstaller
,
'cocoapods/installer/target_installer/pod_target_installer'
autoload
:UserProjectIntegrator
,
'cocoapods/installer/user_project_integrator'
autoload
:UserProjectIntegrator
,
'cocoapods/installer/user_project_integrator'
include
Config
::
Manager
include
Config
include
Config
::
Environment
# @return [Sandbox] The sandbox where the Pods should be installed.
# @return [Sandbox] The sandbox where the Pods should be installed.
...
...
lib/cocoapods/installer/analyzer.rb
View file @
a0d280f6
...
@@ -6,8 +6,7 @@ module Pod
...
@@ -6,8 +6,7 @@ module Pod
#
#
class
Analyzer
class
Analyzer
include
Config
::
Manager
include
Config
include
Config
::
Environment
autoload
:SandboxAnalyzer
,
'cocoapods/installer/analyzer/sandbox_analyzer'
autoload
:SandboxAnalyzer
,
'cocoapods/installer/analyzer/sandbox_analyzer'
...
...
lib/cocoapods/sources_manager.rb
View file @
a0d280f6
...
@@ -6,8 +6,7 @@ module Pod
...
@@ -6,8 +6,7 @@ module Pod
class
<<
self
class
<<
self
include
Config
::
Manager
include
Config
include
Config
::
Environment
# @return [Source::Aggregate] the aggregate of all the sources known to
# @return [Source::Aggregate] the aggregate of all the sources known to
# this installation of CocoaPods.
# this installation of CocoaPods.
...
...
lib/cocoapods/user_interface.rb
View file @
a0d280f6
...
@@ -17,8 +17,7 @@ module Pod
...
@@ -17,8 +17,7 @@ module Pod
class
<<
self
class
<<
self
include
Config
::
Manager
include
Config
include
Config
::
Environment
attr_accessor
:indentation_level
attr_accessor
:indentation_level
attr_accessor
:title_level
attr_accessor
:title_level
...
...
lib/cocoapods/validator.rb
View file @
a0d280f6
...
@@ -11,8 +11,7 @@ module Pod
...
@@ -11,8 +11,7 @@ module Pod
#
#
class
Validator
class
Validator
include
Config
::
Manager
include
Config
include
Config
::
Environment
# @return [Specification::Linter] the linter instance from CocoaPods
# @return [Specification::Linter] the linter instance from CocoaPods
# Core.
# Core.
...
...
spec/functional/command/config_spec.rb
View file @
a0d280f6
...
@@ -15,7 +15,7 @@ module Pod
...
@@ -15,7 +15,7 @@ module Pod
before
do
before
do
FileUtils
.
rm_rf
(
@config_file_path
)
FileUtils
.
rm_rf
(
@config_file_path
)
@subject
=
Config
::
Config
Manager
.
new
@subject
=
Config
::
Manager
.
new
# TODO: stub the file accessor
# TODO: stub the file accessor
end
end
...
...
spec/spec_helper.rb
View file @
a0d280f6
...
@@ -79,8 +79,7 @@ Bacon.summary_at_exit
...
@@ -79,8 +79,7 @@ Bacon.summary_at_exit
module
Bacon
module
Bacon
class
Context
class
Context
include
Pod
::
Config
::
Manager
include
Pod
::
Config
include
Pod
::
Config
::
Environment
include
SpecHelper
::
Fixture
include
SpecHelper
::
Fixture
include
SpecHelper
::
Command
include
SpecHelper
::
Command
...
...
spec/unit/config/config_manager_spec.rb
View file @
a0d280f6
...
@@ -3,7 +3,7 @@ require 'yaml'
...
@@ -3,7 +3,7 @@ require 'yaml'
module
Pod
module
Pod
describe
Config
::
Config
Manager
do
describe
Config
::
Manager
do
describe
"global"
do
describe
"global"
do
...
@@ -11,11 +11,11 @@ module Pod
...
@@ -11,11 +11,11 @@ module Pod
before
do
before
do
FileUtils
.
rm_rf
(
@config_file_path
)
FileUtils
.
rm_rf
(
@config_file_path
)
@subject
=
Config
::
Config
Manager
.
new
@subject
=
Config
::
Manager
.
new
end
end
it
"has a singleton"
do
it
"has a singleton"
do
Config
::
ConfigManager
.
instance
.
should
===
Config
::
Config
Manager
.
instance
Config
::
Manager
.
instance
.
should
===
Config
::
Manager
.
instance
end
end
it
"creates a global config file if one didn't exist"
do
it
"creates a global config file if one didn't exist"
do
...
...
spec/unit/config/environment_spec.rb
View file @
a0d280f6
...
@@ -2,9 +2,9 @@ require File.expand_path('../../../spec_helper', __FILE__)
...
@@ -2,9 +2,9 @@ require File.expand_path('../../../spec_helper', __FILE__)
module
Pod
module
Pod
describe
Config
::
Config
Environment
do
describe
Config
::
Environment
do
before
do
before
do
@sut
=
Config
::
Config
Environment
.
new
@sut
=
Config
::
Environment
.
new
end
end
describe
"In general"
do
describe
"In general"
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