Class: PodAlexandria::CIPreInstallHook

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-alexandria/env_ci/pre_install.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(installer_context, user_options) ⇒ CIPreInstallHook

Returns a new instance of CIPreInstallHook.



5
6
7
8
# File 'lib/cocoapods-alexandria/env_ci/pre_install.rb', line 5

def initialize(installer_context, user_options)
  @podfile = installer_context.podfile
  @options = UserOptions.new(installer_context, user_options)
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/cocoapods-alexandria/env_ci/pre_install.rb', line 3

def options
  @options
end

#podfileObject (readonly)

Returns the value of attribute podfile.



3
4
5
# File 'lib/cocoapods-alexandria/env_ci/pre_install.rb', line 3

def podfile
  @podfile
end

Instance Method Details

#runObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/cocoapods-alexandria/env_ci/pre_install.rb', line 10

def run
  Pod::UI.puts "Cocoapods Alexandria running in CI mode."

  Pod::UI.title "Preparing environment..."
  podfile.prepare_for_xcodegen
  podfile.disable_integration
  delete_workspace

  Pod::UI.title "Continuing with normal CocoaPods"
end