Class: Match::Utils
- Inherits:
-
Object
- Object
- Match::Utils
- Defined in:
- lib/match/utils.rb
Class Method Summary collapse
- .environment_variable_name(params) ⇒ Object
-
.fill_environment(params, uuid) ⇒ Object
Fill in the UUID of the profiles in environment variables, much recycling.
- .import(item_path, keychain) ⇒ Object
Class Method Details
.environment_variable_name(params) ⇒ Object
20 21 22 |
# File 'lib/match/utils.rb', line 20 def self.environment_variable_name(params) ["sigh", params[:app_identifier], params[:type]].join("_") end |
.fill_environment(params, uuid) ⇒ Object
Fill in the UUID of the profiles in environment variables, much recycling
13 14 15 16 17 18 |
# File 'lib/match/utils.rb', line 13 def self.fill_environment(params, uuid) # instead we specify the UUID of the profiles key = environment_variable_name(params) UI.important "Setting environment variable '#{key}' to '#{uuid}'" if $verbose ENV[key] = uuid end |
.import(item_path, keychain) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/match/utils.rb', line 3 def self.import(item_path, keychain) command = "security import #{item_path.shellescape} -k ~/Library/Keychains/#{keychain.shellescape}" command << " -T /usr/bin/codesign" # to not be asked for permission when running a tool like `gym` command << " -T /usr/bin/security" command << "&> /dev/null" # we couldn't care less about the output Helper.backticks(command, print: $verbose) end |