Commit a0d280f6 authored by Marin Usalj's avatar Marin Usalj

renamed ConfigManager to Manager and ConfigEnvironment to Environment

parent 2f9df10d
......@@ -81,7 +81,7 @@ PROFILE_ERB_TEMPLATE = <<-EOS
#"^<%= ruby_prefix %>"
#"^<%= pod_prefix %>"
#"^<%= xcode_app_path %>"
#"^<%= Pod::Config::ConfigEnvironment.repos_dir %>"
#"^<%= Pod::Config::Environment.instance.repos_dir %>"
<% prefixes.each do |prefix| %>
#"^<%= prefix %>/*"
<% end %>
......@@ -94,8 +94,8 @@ PROFILE_ERB_TEMPLATE = <<-EOS
"/dev/null"
)
(regex
#"^<%= Pod::Config::ConfigEnvironment.instance.project_root %>"
#"^<%= Pod::Config::ConfigEnvironment.instance.repos_dir %>"
#"^<%= Pod::Config::Environment.instance.project_root %>"
#"^<%= Pod::Config::Environment.instance.repos_dir %>"
#"^/Users/[^.]+/Library/Caches/CocoaPods/*"
#"^/dev/tty"
#"^/private/var"
......
......@@ -23,7 +23,7 @@ module Pod
require 'cocoapods/command/spec'
require 'cocoapods/command/init'
include Pod::Config::Manager
include Pod::Config
self.abstract_command = true
self.default_subcommand = 'install'
......
......@@ -17,7 +17,7 @@ module Pod
#
class Config < Command
include Pod::Config::Manager
include Pod::Config
self.summary = 'Something like `bundle config` ... but better.'
self.description = <<-DESC
......
......@@ -9,32 +9,27 @@ module Pod
#
module Config
autoload :ConfigManager, 'cocoapods/config/config_manager'
autoload :ConfigEnvironment, 'cocoapods/config/environment'
autoload :Manager, 'cocoapods/config/config_manager'
autoload :Environment, 'cocoapods/config/environment'
# Provides support for accessing the configuration manager
# instance in other scopes.
#
module Manager
def config
ConfigManager.instance
end
def config
Manager.instance
end
# Provides support for accessing the environment instance in other
# scopes.
#
module Environment
def environment
ConfigEnvironment.instance
end
def environment
Environment.instance
end
public
extend Environment
extend Manager
#extend Environment
#extend Manager
#-------------------------------------------------------------------------#
# @!group Dependency Injection
......
......@@ -7,7 +7,7 @@ module Pod
# The config manager is responsible for reading and writing the config.yaml
# file.
#
class ConfigManager
class Manager
# The default settings for the configuration.
......@@ -106,7 +106,7 @@ module Pod
# @return [Pathname] The path of the file which contains the user settings.
#
def global_config_filepath
Config::ConfigEnvironment.instance.home_dir + "config.yaml"
Config::Environment.instance.home_dir + "config.yaml"
end
def local_config_filepath
......
......@@ -7,7 +7,7 @@ module Pod
# The config manager is responsible for reading and writing the config.yaml
# file.
#
class ConfigEnvironment
class Environment
# @!group Singleton
......
......@@ -13,7 +13,7 @@ module Pod
#
module Executable
extend Pod::Config::Manager
extend Pod::Config
# Creates the methods for the executable with the given name.
#
......
......@@ -36,8 +36,7 @@ module Pod
autoload :PodTargetInstaller, 'cocoapods/installer/target_installer/pod_target_installer'
autoload :UserProjectIntegrator, 'cocoapods/installer/user_project_integrator'
include Config::Manager
include Config::Environment
include Config
# @return [Sandbox] The sandbox where the Pods should be installed.
......
......@@ -6,8 +6,7 @@ module Pod
#
class Analyzer
include Config::Manager
include Config::Environment
include Config
autoload :SandboxAnalyzer, 'cocoapods/installer/analyzer/sandbox_analyzer'
......
......@@ -6,8 +6,7 @@ module Pod
class << self
include Config::Manager
include Config::Environment
include Config
# @return [Source::Aggregate] the aggregate of all the sources known to
# this installation of CocoaPods.
......
......@@ -17,8 +17,7 @@ module Pod
class << self
include Config::Manager
include Config::Environment
include Config
attr_accessor :indentation_level
attr_accessor :title_level
......
......@@ -11,8 +11,7 @@ module Pod
#
class Validator
include Config::Manager
include Config::Environment
include Config
# @return [Specification::Linter] the linter instance from CocoaPods
# Core.
......
......@@ -15,7 +15,7 @@ module Pod
before do
FileUtils.rm_rf(@config_file_path)
@subject = Config::ConfigManager.new
@subject = Config::Manager.new
# TODO: stub the file accessor
end
......
......@@ -79,8 +79,7 @@ Bacon.summary_at_exit
module Bacon
class Context
include Pod::Config::Manager
include Pod::Config::Environment
include Pod::Config
include SpecHelper::Fixture
include SpecHelper::Command
......
......@@ -3,7 +3,7 @@ require 'yaml'
module Pod
describe Config::ConfigManager do
describe Config::Manager do
describe "global" do
......@@ -11,11 +11,11 @@ module Pod
before do
FileUtils.rm_rf(@config_file_path)
@subject = Config::ConfigManager.new
@subject = Config::Manager.new
end
it "has a singleton" do
Config::ConfigManager.instance.should === Config::ConfigManager.instance
Config::Manager.instance.should === Config::Manager.instance
end
it "creates a global config file if one didn't exist" do
......
......@@ -2,9 +2,9 @@ require File.expand_path('../../../spec_helper', __FILE__)
module Pod
describe Config::ConfigEnvironment do
describe Config::Environment do
before do
@sut = Config::ConfigEnvironment.new
@sut = Config::Environment.new
end
describe "In general" do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment