Class: Pod::SPM::Config
- Inherits:
-
Object
show all
- 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
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
16
17
18
19
20
21
22
|
# File 'lib/cocoapods-spm/config/spm.rb', line 16
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.
14
15
16
|
# File 'lib/cocoapods-spm/config/spm.rb', line 14
def cli_config
@cli_config
end
|
#dsl_config ⇒ Object
Returns the value of attribute dsl_config.
14
15
16
|
# File 'lib/cocoapods-spm/config/spm.rb', line 14
def dsl_config
@dsl_config
end
|
Class Method Details
24
25
26
|
# File 'lib/cocoapods-spm/config/spm.rb', line 24
def self.instance
@instance ||= Config.new
end
|
Instance Method Details
#all_macros ⇒ Object
44
45
46
|
# File 'lib/cocoapods-spm/config/spm.rb', line 44
def all_macros
@all_macros ||= Pod::Config.instance.podfile.macro_pods.keys
end
|
#dont_prebuild_macros? ⇒ Boolean
32
33
34
|
# File 'lib/cocoapods-spm/config/spm.rb', line 32
def dont_prebuild_macros?
merged_config[:dont_prebuild_macros]
end
|
#dont_prebuild_macros_if_exist? ⇒ Boolean
36
37
38
|
# File 'lib/cocoapods-spm/config/spm.rb', line 36
def dont_prebuild_macros_if_exist?
merged_config[:dont_prebuild_macros_if_exist]
end
|
#macro_config ⇒ Object
40
41
42
|
# File 'lib/cocoapods-spm/config/spm.rb', line 40
def macro_config
merged_config[:config] || merged_config[:default_macro_config] || "debug"
end
|
#macro_downloaded_root_dir ⇒ Object
64
65
66
|
# File 'lib/cocoapods-spm/config/spm.rb', line 64
def macro_downloaded_root_dir
macro_root_dir / ".downloaded"
end
|
#macro_downloaded_sandbox ⇒ Object
68
69
70
|
# File 'lib/cocoapods-spm/config/spm.rb', line 68
def macro_downloaded_sandbox
@macro_downloaded_sandbox ||= Sandbox.new(macro_downloaded_root_dir)
end
|
#macro_root_dir ⇒ Object
60
61
62
|
# File 'lib/cocoapods-spm/config/spm.rb', line 60
def macro_root_dir
root_dir
end
|
48
49
50
|
# File 'lib/cocoapods-spm/config/spm.rb', line 48
def macros
merged_config[:all] ? all_macros : (merged_config[:macros] || [])
end
|
#merged_config ⇒ Object
28
29
30
|
# File 'lib/cocoapods-spm/config/spm.rb', line 28
def merged_config
@dsl_config.merge(@cli_config)
end
|
#pkg_artifacts_dir ⇒ Object
80
81
82
|
# File 'lib/cocoapods-spm/config/spm.rb', line 80
def pkg_artifacts_dir
pkg_umbrella_dir / ".build" / "artifacts"
end
|
#pkg_checkouts_dir ⇒ Object
76
77
78
|
# File 'lib/cocoapods-spm/config/spm.rb', line 76
def pkg_checkouts_dir
pkg_umbrella_dir / ".build" / "checkouts"
end
|
84
85
86
|
# File 'lib/cocoapods-spm/config/spm.rb', line 84
def pkg_metadata_dir
@pkg_metadata_dir ||= prepare_dir(pkg_root_dir / "metadata")
end
|
#pkg_root_dir ⇒ Object
56
57
58
|
# File 'lib/cocoapods-spm/config/spm.rb', line 56
def pkg_root_dir
@pkg_root_dir ||= prepare_dir(root_dir / "packages")
end
|
#pkg_umbrella_dir ⇒ Object
72
73
74
|
# File 'lib/cocoapods-spm/config/spm.rb', line 72
def pkg_umbrella_dir
@pkg_umbrella_dir ||= prepare_dir(root_dir / ".umbrella")
end
|
52
53
54
|
# File 'lib/cocoapods-spm/config/spm.rb', line 52
def root_dir
@root_dir ||= Pathname(".spm.pods")
end
|