Class: Configuration
- Inherits:
-
Object
- Object
- Configuration
- Defined in:
- lib/configuration.rb
Defined Under Namespace
Classes: UserConfig
Constant Summary collapse
- @@user_config =
UserConfig.new
Instance Attribute Summary collapse
-
#carthage_dependencies ⇒ Object
readonly
Returns the value of attribute carthage_dependencies.
-
#server_uri ⇒ Object
readonly
Returns the value of attribute server_uri.
-
#swift_version ⇒ Object
readonly
Returns the value of attribute swift_version.
-
#xcodebuild_version ⇒ Object
readonly
Returns the value of attribute xcodebuild_version.
Class Method Summary collapse
Instance Method Summary collapse
- #all_framework_names ⇒ Object
-
#initialize(shell) ⇒ Configuration
constructor
A new instance of Configuration.
- #to_s ⇒ Object
Constructor Details
#initialize(shell) ⇒ Configuration
Returns a new instance of Configuration.
20 21 22 23 |
# File 'lib/configuration.rb', line 20 def initialize(shell) initialize_env(shell) initialize_cartrcfile end |
Instance Attribute Details
#carthage_dependencies ⇒ Object (readonly)
Returns the value of attribute carthage_dependencies.
14 15 16 |
# File 'lib/configuration.rb', line 14 def carthage_dependencies @carthage_dependencies end |
#server_uri ⇒ Object (readonly)
Returns the value of attribute server_uri.
14 15 16 |
# File 'lib/configuration.rb', line 14 def server_uri @server_uri end |
#swift_version ⇒ Object (readonly)
Returns the value of attribute swift_version.
14 15 16 |
# File 'lib/configuration.rb', line 14 def swift_version @swift_version end |
#xcodebuild_version ⇒ Object (readonly)
Returns the value of attribute xcodebuild_version.
14 15 16 |
# File 'lib/configuration.rb', line 14 def xcodebuild_version @xcodebuild_version end |
Class Method Details
.new_with_defaults ⇒ Object
16 17 18 |
# File 'lib/configuration.rb', line 16 def self.new_with_defaults Configuration.new(ShellWrapper.new) end |
.setup {|@@user_config| ... } ⇒ Object
10 11 12 |
# File 'lib/configuration.rb', line 10 def self.setup yield(@@user_config) end |
Instance Method Details
#all_framework_names ⇒ Object
25 26 27 |
# File 'lib/configuration.rb', line 25 def all_framework_names version_files.flat_map { |vf| vf.framework_names }.uniq.sort end |
#to_s ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/configuration.rb', line 29 def to_s " Xcodebuild: \#{@xcodebuild_version}\n ---\n Swift: \#{@swift_version}\n ---\n Server: \#{@server_uri.to_s}\n ---\n Cartfile.resolved:\n \#{@carthage_dependencies.join(\"\\n\")}\n ---\n Local Build Frameworks:\n \#{framework_names_with_platforms.join(\"\\n\")}\n EOS\nend\n" |