Class: Ree::CLI::Licensing::Obfuscate

Inherits:
Object
  • Object
show all
Defined in:
lib/ree/cli/licensing/obfuscate.rb

Class Method Summary collapse

Class Method Details

.run(source_path:, target_path:, client_id:, expires_at:, exclude_files: "", clients_dir: Dir.pwd, stdout: $stdout) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ree/cli/licensing/obfuscate.rb', line 8

def run(source_path:, target_path:, client_id:, expires_at:, exclude_files: "", clients_dir: Dir.pwd, stdout: $stdout)
  exclude_list = exclude_files.to_s.split(',').map(&:strip).reject(&:empty?)

  Ree::Licensing::Obfuscator.run(
    source_path: source_path,
    target_path: target_path,
    client_id: client_id,
    expires_at: expires_at,
    clients_dir: clients_dir,
    exclude_files: exclude_list,
    stdout: stdout
  )
rescue Ree::Error => e
  stdout.puts "Error: #{e.message}"
end