Class: Pod::SPM::Config
- Inherits:
-
Object
show all
- Includes:
- PathMixn
- Defined in:
- lib/cocoapods-spm/config.rb,
lib/cocoapods-spm/config/pod.rb,
lib/cocoapods-spm/config/spm.rb,
lib/cocoapods-spm/config/project.rb
Defined Under Namespace
Modules: Mixin, PodConfigMixin, ProjectConfigMixin, SPMConfigMixin
Classes: ProjectConfig
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from PathMixn
#prepare_dir
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
31
32
33
34
35
36
37
|
# File 'lib/cocoapods-spm/config/spm.rb', line 31
def initialize
@dsl_config = {
:dont_prebuild_macros => false,
:dont_prebuild_macros_if_exist => true,
}
@cli_config = {}
end
|
Instance Attribute Details
#cli_config ⇒ Object
Returns the value of attribute cli_config.
29
30
31
|
# File 'lib/cocoapods-spm/config/spm.rb', line 29
def cli_config
@cli_config
end
|
#dsl_config ⇒ Object
Returns the value of attribute dsl_config.
29
30
31
|
# File 'lib/cocoapods-spm/config/spm.rb', line 29
def dsl_config
@dsl_config
end
|
Class Method Details
39
40
41
|
# File 'lib/cocoapods-spm/config/spm.rb', line 39
def self.instance
@instance ||= Config.new
end
|
Instance Method Details
#all_macros ⇒ Object
59
60
61
|
# File 'lib/cocoapods-spm/config/spm.rb', line 59
def all_macros
@all_macros ||= Pod::Config.instance.podfile.macro_pods.keys
end
|
#dont_prebuild_macros? ⇒ Boolean
47
48
49
|
# File 'lib/cocoapods-spm/config/spm.rb', line 47
def dont_prebuild_macros?
merged_config[:dont_prebuild_macros]
end
|
#dont_prebuild_macros_if_exist? ⇒ Boolean
51
52
53
|
# File 'lib/cocoapods-spm/config/spm.rb', line 51
def dont_prebuild_macros_if_exist?
merged_config[:dont_prebuild_macros_if_exist]
end
|
#macro_config ⇒ Object
55
56
57
|
# File 'lib/cocoapods-spm/config/spm.rb', line 55
def macro_config
merged_config[:config] || merged_config[:default_macro_config] || "debug"
end
|
#macro_downloaded_root_dir ⇒ Object
79
80
81
|
# File 'lib/cocoapods-spm/config/spm.rb', line 79
def macro_downloaded_root_dir
macro_root_dir / ".downloaded"
end
|
#macro_downloaded_sandbox ⇒ Object
87
88
89
|
# File 'lib/cocoapods-spm/config/spm.rb', line 87
def macro_downloaded_sandbox
@macro_downloaded_sandbox ||= Sandbox.new(macro_downloaded_root_dir)
end
|
#macro_prebuilt_root_dir ⇒ Object
83
84
85
|
# File 'lib/cocoapods-spm/config/spm.rb', line 83
def macro_prebuilt_root_dir
macro_root_dir / ".prebuilt"
end
|
#macro_root_dir ⇒ Object
75
76
77
|
# File 'lib/cocoapods-spm/config/spm.rb', line 75
def macro_root_dir
@macro_root_dir ||= prepare_dir(root_dir / "macros")
end
|
63
64
65
|
# File 'lib/cocoapods-spm/config/spm.rb', line 63
def macros
merged_config[:all] ? all_macros : (merged_config[:macros] || [])
end
|
#merged_config ⇒ Object
43
44
45
|
# File 'lib/cocoapods-spm/config/spm.rb', line 43
def merged_config
@dsl_config.merge(@cli_config)
end
|
#pkg_artifacts_dir ⇒ Object
99
100
101
|
# File 'lib/cocoapods-spm/config/spm.rb', line 99
def pkg_artifacts_dir
pkg_umbrella_dir / ".build" / "artifacts"
end
|
#pkg_checkouts_dir ⇒ Object
95
96
97
|
# File 'lib/cocoapods-spm/config/spm.rb', line 95
def pkg_checkouts_dir
pkg_umbrella_dir / ".build" / "checkouts"
end
|
103
104
105
|
# File 'lib/cocoapods-spm/config/spm.rb', line 103
def pkg_metadata_dir
@pkg_metadata_dir ||= prepare_dir(pkg_root_dir / "metadata")
end
|
#pkg_root_dir ⇒ Object
71
72
73
|
# File 'lib/cocoapods-spm/config/spm.rb', line 71
def pkg_root_dir
@pkg_root_dir ||= prepare_dir(root_dir / "packages")
end
|
#pkg_umbrella_dir ⇒ Object
91
92
93
|
# File 'lib/cocoapods-spm/config/spm.rb', line 91
def pkg_umbrella_dir
@pkg_umbrella_dir ||= prepare_dir(pkg_root_dir / ".umbrella")
end
|
67
68
69
|
# File 'lib/cocoapods-spm/config/spm.rb', line 67
def root_dir
@root_dir ||= prepare_dir(Pod::Config.instance.installation_root / ".spm.pods")
end
|