Module: AppPermissionStatistics::Helper::Utils
Instance Method Summary collapse
- #defalut_store_path(app_identifier) ⇒ Object
- #entitlements_yaml_name(v, app_identifier, path: nil) ⇒ Object
- #report_file_name(path: nil) ⇒ Object
- #versions_yaml_name(app_identifier, path: nil) ⇒ Object
Instance Method Details
#defalut_store_path(app_identifier) ⇒ Object
16 17 18 19 20 |
# File 'lib/app_permission_statistics/helper.rb', line 16 def defalut_store_path(app_identifier) root_path = "#{Dir.home}/appInfo-#{app_identifier}" FileUtils.mkdir_p(root_path) unless File.exists?(root_path) root_path end |
#entitlements_yaml_name(v, app_identifier, path: nil) ⇒ Object
22 23 24 25 26 |
# File 'lib/app_permission_statistics/helper.rb', line 22 def entitlements_yaml_name(v,app_identifier,path: nil) dir_path = path ? "#{path}-#{app_identifier}" : defalut_store_path(app_identifier) yaml_name = "#{dir_path}/entitlements_#{v}.yml"; yaml_name end |
#report_file_name(path: nil) ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/app_permission_statistics/helper.rb', line 34 def report_file_name(path: nil) path = path ? "#{path}/entitlements" : nil if !path.nil? FileUtils.mkdir_p(path) unless File.exists?(path) end file_name = path ? "#{path}/analyze_report" : "analyze_report"; file_name end |
#versions_yaml_name(app_identifier, path: nil) ⇒ Object
28 29 30 31 32 |
# File 'lib/app_permission_statistics/helper.rb', line 28 def versions_yaml_name(app_identifier,path: nil) dir_path = path ? "#{path}-#{app_identifier}" : defalut_store_path(app_identifier) yaml_name = "#{dir_path}/entitlements_versions.yml"; yaml_name end |