asperalm 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ac4cdeb8279fbbf1b54e7fba07bf77d696ce0dd3c88e1014003008c327fd51e
4
- data.tar.gz: d1c8b9f618fe5b448a17c394b16ecca0ca09ecfe2f38fd38c2506557c514c21d
3
+ metadata.gz: dab2b077a0a0ea129c730ed051d346b479298d58d205c0404315a5065d038e3d
4
+ data.tar.gz: e15d942c5df68ab1ca1a48597ebae733adf47d9359280bdfbf6f4bb9735ff087
5
5
  SHA512:
6
- metadata.gz: d6b3d66a06966d9012649a57bbe84af8870e9903fd05f246bc739083b067bbc907719d42f7a0dfd0d8e44dd1d91bc49067d07ff53fd4ae59c2be662e75671835
7
- data.tar.gz: a79fa782d13431ab32114c679cf03ca77df42a71847ab98b509c56f2b3d4516bc11afe5a3b8c08b47e1deac29c2e2b7ebbe68f8dc63ea3df1ae78ecc8082a96d
6
+ metadata.gz: cd505b7652d8b5cf484ce59dd4a1ab1ab8ea2ed958612086e1ccf3bd9b1468a897682885342b266466eb2a3be38d03f49546e66dbf023f4419d24aa67769e252
7
+ data.tar.gz: 9f850014d737f38686767cdee51e1defe94ff6b56bd38b426f926fc0da734759c41777182f73b4610be7d9445e85ed70d7a8b978c7b787725dd372fdae2bf5f8
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Asperalm - A Ruby library for Aspera transfers and "Amelia", the _Multi Layer IBM Aspera_ Command Line Tool
2
2
 
3
- Version : 0.9.3
3
+ Version : 0.9.4
4
4
 
5
5
 
6
6
  _Laurent/2016-2018_
@@ -37,7 +37,7 @@ Once the gem is installed, `mlia` shall be accessible:
37
37
 
38
38
  ```bash
39
39
  $ mlia --version
40
- 0.9.3
40
+ 0.9.4
41
41
  ```
42
42
 
43
43
  ## First use
@@ -905,12 +905,13 @@ mlia aspera admin resource workspace list
905
905
  mlia aspera admin resource workspace_membership list --fields=ALL --query=@json:'{"page":1,"per_page":50,"embed":"member","inherited":false,"workspace_id":11363,"sort":"name"}'
906
906
  mlia aspera admin set_client_key ERuzXGuPA @file:$(APIKEY)
907
907
  mlia aspera files browse /
908
+ mlia aspera files download --to-folder=sample_dest_folder --download=node --sources=@args /200KB.1
908
909
  mlia aspera files download --to-folder=sample_dest_folder --transfer=connect --sources=@args /200KB.1
909
- mlia aspera files download /200KB.1 --to-folder=sample_dest_folder --download=node
910
910
  mlia aspera files upload --to-folder=/ --sources=@args sample_file.bin
911
911
  mlia aspera packages list
912
912
  mlia aspera packages list --format=csv --fields=id|head -n 1)
913
- mlia aspera packages send --value=@json:'{"name":"my title","note":"my note"}' --recipient=laurent.martin.aspera@fr.ibm.com sample_file.bin
913
+ mlia aspera packages send --value=@json:'{"name":"my title","note":"my note"}' --recipient=laurent.martin.aspera@fr.ibm.com --sources=@args sample_file.bin
914
+ mlia aspera packages send --value=@json:'{"name":"my title"}' --recipient=laurent.martin.l+external@gmail.com --sources=@args sample_file.bin
914
915
  mlia ats access_key --id=testkey2 cluster
915
916
  mlia ats access_key --id=testkey2 delete
916
917
  mlia ats access_key --id=testkey2 node browse /
@@ -1006,7 +1007,7 @@ mlia sync start --parameters=@json:'{"sessions":[{"name":"test","reset":true,"re
1006
1007
  ```bash
1007
1008
  $ mlia -h
1008
1009
  NAME
1009
- mlia -- a command line tool for Aspera Applications (v0.9.3)
1010
+ mlia -- a command line tool for Aspera Applications (v0.9.4)
1010
1011
 
1011
1012
  SYNOPSIS
1012
1013
  mlia COMMANDS [OPTIONS] [ARGS]
@@ -1041,7 +1042,7 @@ OPTIONS: global
1041
1042
  --config-file=VALUE read parameters from file in YAML format, current=/Users/laurent/.aspera/mlia/config.yaml
1042
1043
  -N, --no-default do not load default configuration for plugin
1043
1044
  --ui=ENUM method to start browser: text, graphical
1044
- --log-level=ENUM Log level: info, error, fatal, unknown, debug, warn
1045
+ --log-level=ENUM Log level: info, warn, error, fatal, unknown, debug
1045
1046
  --logger=ENUM log method: stderr, stdout, syslog
1046
1047
  --format=ENUM output format: table, ruby, json, jsonpp, yaml, csv
1047
1048
  -P, --presetVALUE load the named option preset from current config file
@@ -1554,16 +1555,27 @@ $ mlia aspera admin res workspace_membership list --fields=member_type,manager,m
1554
1555
  :.............:.........:..................................:
1555
1556
  ```
1556
1557
 
1557
- ### Package
1558
+ ### Send a Package
1558
1559
 
1559
- send a package:
1560
+ Send a package:
1560
1561
 
1561
1562
  ```
1562
- $ mlia aspera packages send --value=@json:'{"name":"my title","note":"my note"}' --recipient=laurent.martin.aspera@fr.ibm.com,other@example.com my_file.dat
1563
+ $ mlia aspera packages send --value=@json:'{"name":"my title","note":"my note"}' --recipient=laurent.martin.aspera@fr.ibm.com,other@example.com --sources=@args my_file.dat
1563
1564
  ```
1564
1565
 
1565
- Note that `value` parameter can contain any supported package creation parameter.
1566
- Refer to the API, or display an existing package.
1566
+ Notes:
1567
+
1568
+ * the `value` parameter can contain any supported package creation parameter.
1569
+ * Refer to the API, or display an existing package.
1570
+ * if the recipient is not already registered and the workspace allows external users, then the package is sent to an external user. (with a link with passcode)
1571
+
1572
+ ### Download Files
1573
+
1574
+ Download of files is straightforward with a specific syntax for the `aspera files download` action: Like other commands the source file list is provided as a list with the `sources` option. Nevertheless, consider this:
1575
+
1576
+ * if only one source is provided, it is downloaded
1577
+ * if multiple sources must be downloaded, then the first in list is the path of the source folder, and the remaining items are the file names in this folder (without path).
1578
+
1567
1579
 
1568
1580
  ## Aspera Node (Transfer Server)
1569
1581
 
@@ -2221,6 +2233,12 @@ Gems, or remove your ed25519 key from your `.ssh` folder to solve the issue.
2221
2233
 
2222
2234
  # Release Notes
2223
2235
 
2236
+ * version 0.9.4
2237
+
2238
+ * Breaking change: onCloud file list follow --source convention as well (plus specific case for download when first path is source folder, and other are source file names).
2239
+ * AoC Package send supports external users
2240
+ * new command to export AoC config to Aspera CLI config
2241
+
2224
2242
  * version 0.9.3
2225
2243
 
2226
2244
  * REST error message show host and code
@@ -1 +1 @@
1
- 0.9.3
1
+ 0.9.4
@@ -1,4 +1,5 @@
1
1
  require 'asperalm/rest'
2
+ require 'asperalm/cli/plugin'
2
3
 
3
4
  module Asperalm
4
5
  module Cli
@@ -511,7 +511,7 @@ module Asperalm
511
511
  # find plugins, shall be after parse! ?
512
512
  add_plugins_from_lookup_folders
513
513
  # declare generic options
514
- Plugin.declare_options
514
+ Plugin.declare_entity_options
515
515
  # help requested without command ? (plugins must be known here)
516
516
  exit_with_usage(true) if @option_help and @opt_mgr.command_or_arg_empty?
517
517
  # load global default options and process
@@ -13,7 +13,7 @@ module Asperalm
13
13
  INSTANCE_OPS=[:modify,:delete,:show]
14
14
  ALL_OPS=[GLOBAL_OPS,INSTANCE_OPS].flatten
15
15
 
16
- def self.declare_options
16
+ def self.declare_entity_options
17
17
  Main.instance.options.add_opt_simple(:value,"extended value for create, update, list filter")
18
18
  Main.instance.options.add_opt_simple(:id,"resource identifier (#{INSTANCE_OPS.join(",")})")
19
19
  end
@@ -74,22 +74,26 @@ module Asperalm
74
74
  result=node_api.delete("files/#{file_id}")[:data]
75
75
  return Main.result_status("deleted: #{thepath}")
76
76
  when :upload
77
- filelist = Main.instance.options.get_next_argument("file list",:multiple)
78
- Log.log.debug("file list=#{filelist}")
79
77
  node_info,file_id = api_files.find_nodeinfo_and_fileid(home_node_id,home_file_id,Main.instance.destination_folder('send'))
80
- return Main.instance.start_transfer_wait_result(*api_files.tr_spec('files','send',node_info,file_id,{'paths'=>filelist.map{|i|{'source'=>i}}}))
78
+ return Main.instance.start_transfer_wait_result(*api_files.tr_spec('files','send',node_info,file_id,{}))
81
79
  when :download
82
- source_file=Main.instance.options.get_next_argument('source')
80
+ source_paths=TransferAgent.instance.transfer_paths_from_options
81
+ source_folder=source_paths.shift['source']
82
+ if source_paths.empty?
83
+ source_folder=source_folder.split(FilesApi::PATH_SEPARATOR)
84
+ source_paths=[{'source'=>source_folder.pop}]
85
+ source_folder=source_folder.join(FilesApi::PATH_SEPARATOR)
86
+ end
83
87
  case Main.instance.options.get_option(:download_mode,:mandatory)
84
88
  when :fasp
85
- file_path = source_file.split(FilesApi::PATH_SEPARATOR)
86
- file_name = file_path.pop
87
- node_info,file_id = api_files.find_nodeinfo_and_fileid(home_node_id,home_file_id,file_path.join(FilesApi::PATH_SEPARATOR))
88
- return Main.instance.start_transfer_wait_result(*api_files.tr_spec('files','receive',node_info,file_id,{'paths'=>[{'source'=>file_name}]}))
89
+ node_info,file_id = api_files.find_nodeinfo_and_fileid(home_node_id,home_file_id,source_folder)
90
+ # override paths with just filename
91
+ return Main.instance.start_transfer_wait_result(
92
+ *api_files.tr_spec('files','receive',node_info,file_id,{'paths'=>source_paths}))
89
93
  when :node_http
90
- file_path = source_file.split(FilesApi::PATH_SEPARATOR)
91
- file_name = file_path.last
92
- node_info,file_id = api_files.find_nodeinfo_and_fileid(home_node_id,home_file_id,source_file)
94
+ raise CliBadArgument,"one file at a time only in HTTP mode" if source_paths.length > 1
95
+ file_name = source_paths.first['source']
96
+ node_info,file_id = api_files.find_nodeinfo_and_fileid(home_node_id,home_file_id,File.join(source_folder,file_name))
93
97
  node_api=api_files.get_files_node_api(node_info,FilesApi::SCOPE_NODE_USER)
94
98
  node_api.call({:operation=>'GET',:subpath=>"files/#{file_id}/content",:save_to_file=>File.join(Main.instance.destination_folder('receive'),file_name)})
95
99
  return Main.result_status("downloaded: #{file_name}")
@@ -293,14 +297,16 @@ module Asperalm
293
297
  package_creation['workspace_id']=@workspace_id
294
298
 
295
299
  # list of files to include in package
296
- filelist=Main.instance.options.get_next_argument('file list',:multiple)
297
- package_creation['file_names']=filelist
300
+ package_creation['file_names']=TransferAgent.instance.transfer_paths_from_options.map{|i|File.basename(i['source'])}
298
301
 
299
302
  # lookup users
300
303
  package_creation['recipients']=Main.instance.options.get_option(:recipient,:mandatory).split(',').map do |recipient|
301
304
  user_lookup=@api_files_user.read('contacts',{'current_workspace_id'=>@workspace_id,'q'=>recipient})[:data]
302
- raise CliBadArgument,"no such user: #{recipient}" unless !user_lookup.nil? and user_lookup.length == 1
303
- recipient_user_id=user_lookup.first
305
+ case user_lookup.length
306
+ when 1; recipient_user_id=user_lookup.first
307
+ when 0; recipient_user_id=@api_files_user.create('contacts',{'current_workspace_id'=>@workspace_id,'email'=>recipient,'package_contact'=>true})[:data]
308
+ else raise CliBadArgument,"multiple match for: #{recipient}"
309
+ end
304
310
  {'id'=>recipient_user_id['source_id'],'type'=>recipient_user_id['source_type']}
305
311
  end
306
312
 
@@ -311,10 +317,9 @@ module Asperalm
311
317
  node_info=@api_files_user.read("nodes/#{the_package['node_id']}")[:data]
312
318
 
313
319
  # tell Aspera what to expect in package: 1 transfer (can also be done after transfer)
314
- resp=@api_files_user.update("packages/#{the_package['id']}",{"sent"=>true,"transfers_expected"=>1})[:data]
320
+ resp=@api_files_user.update("packages/#{the_package['id']}",{'sent'=>true,'transfers_expected'=>1})[:data]
315
321
  return Main.instance.start_transfer_wait_result(*@api_files_user.tr_spec('packages','send',node_info,the_package['contents_file_id'],{
316
- 'tags'=>{'aspera'=>{'files'=>{"package_id"=>the_package['id'],"package_operation"=>"upload"}}},
317
- 'paths'=>filelist.map{|i|{'source'=>i}}
322
+ 'tags'=>{'aspera'=>{'files'=>{'package_id'=>the_package['id'],'package_operation'=>'upload'}}},
318
323
  }))
319
324
  when :recv
320
325
  package_id=Main.instance.options.get_option(:id,:mandatory)
@@ -1,5 +1,7 @@
1
- require 'asperalm/cli/plugin'
1
+ require 'asperalm/cli/basic_auth_plugin'
2
+ require 'asperalm/fasp/installation'
2
3
  require 'singleton'
4
+ require 'xmlsimple'
3
5
 
4
6
  module Asperalm
5
7
  module Cli
@@ -117,10 +119,10 @@ module Asperalm
117
119
  # convert possible keys located in config folder
118
120
  @config_presets.values.select{|p|p.is_a?(Hash)}.each do |preset|
119
121
  preset.values.select{|v|v.is_a?(String) and v.include?(old_subpath)}.each do |value|
120
- old_val=value.clone
121
- value.gsub!(old_subpath,new_subpath)
122
- Log.log.warn("Converted copnfig value: #{old_val} -> #{value}")
123
- save_required=true
122
+ old_val=value.clone
123
+ value.gsub!(old_subpath,new_subpath)
124
+ Log.log.warn("Converted copnfig value: #{old_val} -> #{value}")
125
+ save_required=true
124
126
  end
125
127
  end
126
128
  end
@@ -142,11 +144,11 @@ module Asperalm
142
144
 
143
145
  # "config" plugin
144
146
  def execute_action
145
- action=Main.instance.options.get_next_argument('action',[:genkey,:plugins,:flush_tokens,:list,:overview,:open,:echo,:id,:documentation,:wizard])
147
+ action=Main.instance.options.get_next_command([:genkey,:plugins,:flush_tokens,:list,:overview,:open,:echo,:id,:documentation,:wizard,:export_to_cli,:detect])
146
148
  case action
147
149
  when :id
148
150
  config_name=Main.instance.options.get_next_argument('config name')
149
- action=Main.instance.options.get_next_argument('action',[:show,:delete,:set,:unset,:initialize,:update,:ask])
151
+ action=Main.instance.options.get_next_command([:show,:delete,:set,:unset,:initialize,:update,:ask])
150
152
  case action
151
153
  when :show
152
154
  raise "no such config: #{config_name}" unless @config_presets.has_key?(config_name)
@@ -283,6 +285,43 @@ module Asperalm
283
285
  save_presets_to_config_file
284
286
  return Main.result_status("Done. You can test with:\n#{Main.instance.program_name} aspera user info show")
285
287
  # TODO: update documentation
288
+ when :export_to_cli
289
+ require 'asperalm/cli/plugins/aspera'
290
+ # need url / username
291
+ Plugins::Aspera.instance.declare_options
292
+ Main.instance.options.parse_options!
293
+ appli=Main.instance.options.get_next_command([:aoc])
294
+ cli_conf_file=Fasp::Installation.instance.cli_conf_file
295
+ data=JSON.parse(File.read(cli_conf_file))
296
+ url=Main.instance.options.get_option(:url,:mandatory)
297
+ organization,instance_domain=FilesApi.parse_url(url)
298
+ key_basename='org_'+organization+'.pem'
299
+ key_file=File.join(File.dirname(File.dirname(cli_conf_file)),'etc',key_basename)
300
+ File.write(key_file,Main.instance.options.get_option(:private_key,:mandatory))
301
+ new_conf={
302
+ 'organization' => organization,
303
+ 'hostname' => [organization,instance_domain].join('.'),
304
+ 'clientId' => Main.instance.options.get_option(:client_id,:mandatory),
305
+ 'clientSecret' => Main.instance.options.get_option(:client_secret,:mandatory),
306
+ 'privateKeyFilename' => key_basename,
307
+ 'username' => Main.instance.options.get_option(:username,:mandatory)
308
+ }
309
+ entry=data['AoCAccounts'].select{|i|i['organization'].eql?(organization)}.first
310
+ if entry.nil?
311
+ data['AoCAccounts'].push(new_conf)
312
+ Main.instance.display_status("Creating new aoc entry: #{organization}")
313
+ else
314
+ Main.instance.display_status("Updating existing aoc entry: #{organization}")
315
+ entry.merge!(new_conf)
316
+ end
317
+ File.write(cli_conf_file,JSON.pretty_generate(data))
318
+ return Main.result_status("updated: #{cli_conf_file}")
319
+ when :detect
320
+ # need url / username
321
+ BasicAuthPlugin.new.declare_options
322
+ Main.instance.options.parse_options!
323
+ return Main.result_status("found: #{discover_product(Main.instance.options.get_option(:url,:mandatory))}")
324
+ else raise "error"
286
325
  end
287
326
  end
288
327
 
@@ -313,6 +352,31 @@ module Asperalm
313
352
  return nil
314
353
  end
315
354
 
355
+ def discover_product(url)
356
+ uri=URI.parse(url)
357
+ api=Rest.new({:base_url=>url})
358
+ begin
359
+ result=api.call({:operation=>'POST',:subpath=>'aspera/faspex',:headers=>{'Accept'=>'application/xrds+xml'},:text_body_params=>''})
360
+ res_s=XmlSimple.xml_in(result[:http].body, {"ForceArray" => false})
361
+ version=res_s['XRD']['application']['version']
362
+ #return JSON.pretty_generate(res_s)
363
+ return "Faspex #{version}"
364
+ rescue
365
+ Log.log.warn("not faspex")
366
+ end
367
+ begin
368
+ result=api.read('node_api/app')
369
+ return JSON.pretty_generate(result)
370
+ return "Faspex #{version}"
371
+ rescue RestCallError => e
372
+ if e.response.code.to_s.eql?('401') and e.response.body.eql?('{"error":{"user_message":"API user authentication failed"}}')
373
+ return "Shares"
374
+ end
375
+ Log.log.warn("not faspex: #{e.response.code} #{e.response.body}")
376
+ end
377
+ return "unknown"
378
+ end
379
+
316
380
  end
317
381
  end
318
382
  end
@@ -66,6 +66,7 @@ module Asperalm
66
66
  if @found_products.nil?
67
67
  @found_products=product_locations.select do |l|
68
68
  next false unless Dir.exist?(l[:app_root])
69
+ Log.log.debug("found #{l[:app_root]}")
69
70
  product_info_file="#{l[:app_root]}/#{PRODUCT_INFO}"
70
71
  if File.exist?(product_info_file)
71
72
  res_s=XmlSimple.xml_in(File.read(product_info_file),{"ForceArray"=>false})
@@ -86,14 +87,18 @@ module Asperalm
86
87
  return File.join(connect[:run_root],VARRUN_SUBFOLDER,'https.uri')
87
88
  end
88
89
 
90
+ def cli_conf_file
91
+ connect=get_product('Aspera CLI')
92
+ return File.join(connect[:app_root],BIN_SUBFOLDER,'.aspera_cli_conf')
93
+ end
89
94
  private
90
95
 
91
96
  def get_product(name)
92
- found=installed_products.select{|i|i[:name].eql?(name)}
97
+ found=installed_products.select{|i|i[:expected].eql?(name) or i[:name].eql?(name)}
93
98
  raise "Product: #{name} not found, please install." if found.empty?
94
99
  return found.first
95
100
  end
96
-
101
+
97
102
  def initialize
98
103
  @selected_product_paths=nil
99
104
  @found_products=nil
@@ -112,7 +117,7 @@ module Asperalm
112
117
  # :dsa=>'aspera_tokenauth_id_dsa'}
113
118
  def self.get_product_paths(p)
114
119
  exec_ext = OpenApplication.current_os_type.eql?(:windows) ? '.exe' : ''
115
- # default values
120
+ # set default values if specific ones not specified
116
121
  sub_bin = p[:sub_bin] || BIN_SUBFOLDER
117
122
  sub_keys = p[:sub_keys] || ETC_SUBFOLDER
118
123
  result={
@@ -128,8 +133,8 @@ module Asperalm
128
133
  # server software (having asperanoded) has a different DSA filename
129
134
  server_dsa=File.join(p[:app_root],sub_keys,SERVER_DSA)
130
135
  result[:ssh_bypass_key_dsa][:path]=server_dsa if File.exist?(server_dsa)
131
-
132
136
  Log.log.debug "resources=#{result}"
137
+ # check required files
133
138
  notfound=[]
134
139
  result.each_pair do |k,v|
135
140
  notfound.push(k) if v[:type].eql?(:file) and v[:required] and ! File.exist?(v[:path])
@@ -145,10 +150,10 @@ module Asperalm
145
150
  # fields
146
151
  # :expected M app name is taken from the manifest if present, else defaults to this value
147
152
  # :app_root M main forlder for the application
148
- # :sub_bin O subfolder with executables, default : bin
149
- # :sub_keys O subfolder with keys, default : etc
150
153
  # :log_root O location of log files (Linux uses syslog)
151
154
  # :run_root O only for Connect Client, location of http port file
155
+ # :sub_bin O subfolder with executables, default : bin
156
+ # :sub_keys O subfolder with keys, default : etc
152
157
  def product_locations
153
158
  case OpenApplication.current_os_type
154
159
  when :windows; return [{
@@ -158,33 +163,39 @@ module Asperalm
158
163
  :run_root =>File.join(ENV['LOCALAPPDATA'],'Aspera','Aspera Connect')
159
164
  },{
160
165
  :expected =>'Aspera CLI',
161
- :app_root =>'C:\Program Files\Aspera\cli',
162
- :sub_keys =>'var',
163
- :log_root =>'C:\Program Files\Aspera\cli\var\log'
166
+ :app_root =>File.join('C:','Program Files','Aspera','cli'),
167
+ :log_root =>File.join('C:','Program Files','Aspera','cli','var','log'),
168
+ :sub_keys =>'var'
164
169
  },{
165
170
  :expected =>'Enterprise Server',
166
- :app_root =>'C:\Program Files\Aspera\Enterprise Server',
167
- :sub_keys =>'var',
168
- :log_root =>'C:\Program Files\Aspera\Enterprise Server\var\log'
171
+ :app_root =>File.join('C:','Program Files','Aspera','Enterprise Server'),
172
+ :log_root =>File.join('C:','Program Files','Aspera','Enterprise Server','var','log'),
173
+ :sub_keys =>'var'
169
174
  }]
170
175
  when :mac; return [{
171
176
  :expected =>'Aspera Connect',
172
177
  :app_root =>File.join(Dir.home,'Applications','Aspera Connect.app'),
173
- :sub_bin =>File.join('Contents','Resources'),
174
- :sub_keys =>File.join('Contents','Resources'),
175
178
  :log_root =>File.join(Dir.home,'Library','Logs','Aspera_Connect'),
176
- :run_root =>File.join(Dir.home,'Library','Application Support','Aspera','Aspera Connect')
179
+ :run_root =>File.join(Dir.home,'Library','Application Support','Aspera','Aspera Connect'),
180
+ :sub_bin =>File.join('Contents','Resources'),
181
+ :sub_keys =>File.join('Contents','Resources')
177
182
  },{
178
183
  :expected =>'Aspera CLI',
179
184
  :app_root =>File.join(Dir.home,'Applications','Aspera CLI'),
180
185
  :log_root =>File.join(Dir.home,'Library','Logs','Aspera')
181
186
  },{
182
187
  :expected =>'Enterprise Server',
183
- :app_root =>'/Library/Aspera',
184
- :sub_keys =>'var',
185
- :log_root =>File.join(Dir.home,'Library','Logs','Aspera')
188
+ :app_root =>File.join('','Library','Aspera'),
189
+ :log_root =>File.join(Dir.home,'Library','Logs','Aspera'),
190
+ :sub_keys =>'var'
191
+ },{
192
+ :expected =>'Aspera Drive',
193
+ :app_root =>File.join('','Applications','Aspera Drive.app'),
194
+ :log_root =>File.join(Dir.home,'Library','Logs','Aspera_Drive'),
195
+ :sub_bin =>File.join('Contents','Resources'),
196
+ :sub_keys =>File.join('Contents','Resources')
186
197
  }]
187
- else; return [{ # other: unix family
198
+ else; return [{ # other: Linux and unix family
188
199
  :expected =>'Aspera Connect',
189
200
  :app_root =>File.join(Dir.home,'.aspera','connect'),
190
201
  :run_root =>File.join(Dir.home,'.aspera','connect')
@@ -193,7 +204,7 @@ module Asperalm
193
204
  :app_root =>File.join(Dir.home,'.aspera','cli'),
194
205
  },{
195
206
  :expected =>'Enterprise Server',
196
- :app_root =>'/opt/aspera',
207
+ :app_root =>File.join('','opt','aspera'),
197
208
  :sub_keys =>'var'
198
209
  }]
199
210
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asperalm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-18 00:00:00.000000000 Z
11
+ date: 2018-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xml-simple