Module: CLI

Included in:
LaunchAgent, PluginsUpdater, XcodeUnsigner
Defined in:
lib/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.codesign_exists?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/cli.rb', line 30

def self.codesign_exists?
  `which codesign` && $CHILD_STATUS.exitstatus == 0
end

.dry_run?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/cli.rb', line 2

def self.dry_run?
  ARGV.include?('-d') || ARGV.include?('--dry-run')
end

.install_launch_agent?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/cli.rb', line 6

def self.install_launch_agent?
  ARGV.include?('--install-launch-agent')
end

.no_colors?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/cli.rb', line 22

def self.no_colors?
  ARGV.include?('--no-colors')
end

.non_interactive?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/cli.rb', line 26

def self.non_interactive?
  ARGV.include?('--non-interactive')
end

.uninstall_launch_agent?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/cli.rb', line 10

def self.uninstall_launch_agent?
  ARGV.include?('--uninstall-launch-agent')
end

.unsafe_unsign_xcode?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/cli.rb', line 18

def self.unsafe_unsign_xcode?
  ARGV.include?('--unsafe-unsign')
end

.unsign_xcode?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/cli.rb', line 14

def self.unsign_xcode?
  ARGV.include?('--unsign') || ARGV.include?('--unsafe-unsign')
end

Instance Method Details

#separatorObject



48
49
50
# File 'lib/cli.rb', line 48

def separator
  puts
end