fastlane-plugin-fivethree_ionic 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,65 +1,89 @@
1
1
  module Fastlane
2
- module Actions
3
- class FivSelectClientAction < Action
4
- def self.run(params)
5
- Dir.chdir "#{params[:clients_folder]}" do
6
- clients_folders = Dir.glob('*').sort.select {|f| File.directory? f}
7
- client = ENV["CLIENT"] || params[:client]
8
- if (client)
9
- if (clients_folders.include?(client))
10
- puts("
2
+ module Actions
3
+ class FivSelectClientAction < Action
4
+ def self.run(params)
5
+ Dir.chdir "#{params[:clients_folder]}" do
6
+ clients_folders = Dir.glob('*').sort.select { |f| File.directory? f }
7
+ client = ENV['CLIENT'] || params[:client]
8
+ if (client)
9
+ if (clients_folders.include?(client))
10
+ puts(
11
+ "
11
12
  ***********************************************
12
- Selected client: #{client}
13
+ Selected client: #{
14
+ client
15
+ }
13
16
  ***********************************************
14
- ")
15
- return client
16
- else
17
- UI.user_error!("Client #{client} is not available.")
18
- end
19
- end
20
-
21
- selected_client = UI.select("Select one client: ", clients_folders)
22
-
23
- puts("
17
+ "
18
+ )
19
+ return client
20
+ else
21
+ UI.user_error!("Client #{client} is not available.")
22
+ end
23
+ end
24
+
25
+ selected_client = UI.select('Select one client: ', clients_folders)
26
+
27
+ puts(
28
+ "
24
29
  ***********************************************
25
- Selected client: #{selected_client}
30
+ Selected client: #{
31
+ selected_client
32
+ }
26
33
  ***********************************************
27
- ")
28
- return selected_client
29
- end
30
- end
31
-
32
- def self.description
33
- "Select a client"
34
- end
35
-
36
- def self.available_options
37
- [
38
- FastlaneCore::ConfigItem.new(
39
- key: :clients_folder,
40
- env_name: "FIV_CLIENTS_FOLDER", # The name of the environment variable
41
- description: "Clients folder path for SelectClientAction", # a short description of this parameter
42
- default_value: "clients",
43
- is_string: true,
44
- verify_block: proc do |value|
45
- UI.user_error!("No client folder path for SelectClientAction given, pass using `client_folder: '../path_to_clients_folder'`") unless (value and not value.empty?)
46
- UI.user_error!("Couldn't find clients folder at path '#{value}'") unless File.directory?(value)
47
- end),
48
- FastlaneCore::ConfigItem.new(
49
- key: :client,
50
- env_name: "FIV_CLIENT", # The name of the environment variable
51
- description: "client to select", # a short description of this parameter"
52
- is_string: true)
53
- ]
54
- end
55
-
56
- def self.author
57
- "Marc"
58
- end
59
-
60
- def self.is_supported?(platform)
61
- [:ios, :mac, :android].include? platform
34
+ "
35
+ )
36
+ return selected_client
62
37
  end
63
38
  end
39
+
40
+ def self.description
41
+ 'Select a client'
42
+ end
43
+
44
+ def self.available_options
45
+ [
46
+ FastlaneCore::ConfigItem.new(
47
+ key: :clients_folder,
48
+ env_name: 'FIV_CLIENTS_FOLDER',
49
+ # The name of the environment variable
50
+ description: 'Clients folder path for SelectClientAction',
51
+ # a short description of this parameter
52
+ default_value: 'clients',
53
+ is_string: true,
54
+ verify_block:
55
+ proc do |value|
56
+ unless (value and not value.empty?)
57
+ UI.user_error!(
58
+ "No client folder path for SelectClientAction given, pass using `client_folder: '../path_to_clients_folder'`"
59
+ )
60
+ end
61
+ unless File.directory?(value)
62
+ UI.user_error!(
63
+ "Couldn't find clients folder at path '#{value}'"
64
+ )
65
+ end
66
+ end
67
+ ),
68
+ FastlaneCore::ConfigItem.new(
69
+ key: :client,
70
+ env_name: 'FIV_CLIENT',
71
+ # The name of the environment variable
72
+ description: 'client to select',
73
+ # a short description of this parameter"
74
+ is_string: true,
75
+ optional: true
76
+ )
77
+ ]
78
+ end
79
+
80
+ def self.author
81
+ 'Marc'
82
+ end
83
+
84
+ def self.is_supported?(platform)
85
+ %i[ios mac android].include? platform
86
+ end
64
87
  end
65
- end
88
+ end
89
+ end
@@ -1,74 +1,97 @@
1
1
  module Fastlane
2
- module Actions
3
- class FivSelectClientsAction < Action
4
- def self.run(params)
5
- clients = []
6
- Dir.chdir "#{params[:clients_folder]}" do
7
- clients_folders = Dir.glob('*').sort.select {|f| File.directory? f}
2
+ module Actions
3
+ class FivSelectClientsAction < Action
4
+ def self.run(params)
5
+ clients = []
6
+ Dir.chdir "#{params[:clients_folder]}" do
7
+ clients_folders = Dir.glob('*').sort.select { |f| File.directory? f }
8
8
 
9
- if(ENV["CLIENTS"])
10
- envClients = ENV["CLIENTS"].split(",")
11
- selectedClients = envClients.select{|x| clients_folders.include?(x) }
12
- puts("
9
+ if (ENV['CLIENTS'])
10
+ envClients = ENV['CLIENTS'].split(',')
11
+ selectedClients =
12
+ envClients.select { |x| clients_folders.include?(x) }
13
+ puts(
14
+ "
13
15
  ***********************************************
14
- Selected clients: #{selectedClients}
16
+ Selected clients: #{
17
+ selectedClients
18
+ }
15
19
  ***********************************************
16
- ")
17
- return selectedClients
18
- end
20
+ "
21
+ )
22
+ return selectedClients
23
+ end
19
24
 
20
- clients_folders.unshift("All")
21
- selected_client = UI.select("Select clients: ", clients_folders)
25
+ clients_folders.unshift('All')
26
+ selected_client = UI.select('Select clients: ', clients_folders)
22
27
 
23
- if (selected_client === "All")
24
- clients_folders.shift()
25
- puts("
28
+ if (selected_client === 'All')
29
+ clients_folders.shift
30
+ puts(
31
+ "
26
32
  ***********************************************
27
- Selected clients: #{clients_folders}
33
+ Selected clients: #{
34
+ clients_folders
35
+ }
28
36
  ***********************************************
29
- ")
30
- return clients_folders
31
- end
37
+ "
38
+ )
39
+ return clients_folders
40
+ end
32
41
 
33
-
34
- puts("
42
+ puts(
43
+ "
35
44
  ***********************************************
36
- Selected client: #{selected_client}
45
+ Selected client: #{
46
+ selected_client
47
+ }
37
48
  ***********************************************
38
- ")
39
- clients.push(selected_client)
40
-
41
- end
42
-
43
- return clients
49
+ "
50
+ )
51
+ clients.push(selected_client)
44
52
  end
45
53
 
46
- def self.description
47
- "Select list of clients"
48
- end
54
+ return clients
55
+ end
49
56
 
50
- def self.available_options
51
- [
52
- FastlaneCore::ConfigItem.new(
53
- key: :clients_folder,
54
- env_name: "FIV_CLIENTS_FOLDER", # The name of the environment variable
55
- description: "Clients folder path for SelectClientAction", # a short description of this parameter
56
- default_value: "clients",
57
- is_string: true,
58
- verify_block: proc do |value|
59
- UI.user_error!("No client folder path for FivSelectClientAction given, pass using `client_folder: '../path_to_clients_folder'`") unless (value and not value.empty?)
60
- UI.user_error!("Couldn't find clients folder at path '#{value}'") unless File.directory?(value)
61
- end)
62
- ]
63
- end
57
+ def self.description
58
+ 'Select list of clients'
59
+ end
64
60
 
65
- def self.author
66
- "Marc"
67
- end
61
+ def self.available_options
62
+ [
63
+ FastlaneCore::ConfigItem.new(
64
+ key: :clients_folder,
65
+ env_name: 'FIV_CLIENTS_FOLDER',
66
+ # The name of the environment variable
67
+ description: 'Clients folder path for SelectClientAction',
68
+ # a short description of this parameter
69
+ default_value: 'clients',
70
+ is_string: true,
71
+ verify_block:
72
+ proc do |value|
73
+ unless (value and not value.empty?)
74
+ UI.user_error!(
75
+ "No client folder path for FivSelectClientAction given, pass using `client_folder: '../path_to_clients_folder'`"
76
+ )
77
+ end
78
+ unless File.directory?(value)
79
+ UI.user_error!(
80
+ "Couldn't find clients folder at path '#{value}'"
81
+ )
82
+ end
83
+ end
84
+ )
85
+ ]
86
+ end
68
87
 
69
- def self.is_supported?(platform)
70
- [:ios, :mac, :android].include? platform
71
- end
88
+ def self.author
89
+ 'Marc'
90
+ end
91
+
92
+ def self.is_supported?(platform)
93
+ %i[ios mac android].include? platform
72
94
  end
73
95
  end
96
+ end
74
97
  end
@@ -1,73 +1,111 @@
1
1
  module Fastlane
2
- module Actions
3
- class FivSelectEnvAction < Action
4
- def self.run(params)
5
- Dir.chdir "#{params[:clients_folder]}/#{params[:client]}/#{params[:environments_folder]}" do
6
- environment = Dir.glob('*').sort.select {|f| File.directory? f}
7
- if (ENV["ENV"] && environment.include?(ENV["ENV"]))
8
- puts("
2
+ module Actions
3
+ class FivSelectEnvAction < Action
4
+ def self.run(params)
5
+ Dir.chdir "#{params[:clients_folder]}/#{params[:client]}/#{
6
+ params[:environments_folder]
7
+ }" do
8
+ environment = Dir.glob('*').sort.select { |f| File.directory? f }
9
+ if (ENV['ENV'] && environment.include?(ENV['ENV']))
10
+ puts(
11
+ "
9
12
  ***********************************************
10
- Selected environment: #{ENV["ENV"]}
13
+ Selected environment: #{
14
+ ENV['ENV']
15
+ }
11
16
  ***********************************************
12
- ")
13
- return ENV["ENV"]
14
- end
17
+ "
18
+ )
19
+ return ENV['ENV']
20
+ end
15
21
 
16
- selected_env = UI.select("Select one environment: ", environment)
22
+ selected_env = UI.select('Select one environment: ', environment)
17
23
 
18
- puts("
24
+ puts(
25
+ "
19
26
  ***********************************************
20
- Selected environment: #{selected_env}
27
+ Selected environment: #{
28
+ selected_env
29
+ }
21
30
  ***********************************************
22
- ")
23
- return selected_env
24
- end
31
+ "
32
+ )
33
+ return selected_env
25
34
  end
35
+ end
26
36
 
27
- def self.description
28
- "Select a client"
29
- end
37
+ def self.description
38
+ 'Select a client'
39
+ end
30
40
 
31
- def self.available_options
32
- [
33
- FastlaneCore::ConfigItem.new(
34
- key: :clients_folder,
35
- env_name: "FIV_CLIENTS_FOLDER", # The name of the environment variable
36
- description: "Clients folder path for SelectEnvAction", # a short description of this parameter
37
- default_value: "clients",
38
- is_string: true,
39
- verify_block: proc do |value|
40
- UI.user_error!("No client folder path for SelectClientAction given, pass using `client_folder: '../path_to_clients_folder'`") unless (value and not value.empty?)
41
- UI.user_error!("Couldn't find clients folder at path '#{value}'") unless File.directory?(value)
42
- end),
43
- FastlaneCore::ConfigItem.new(
44
- key: :environments_folder,
45
- env_name: "FIV_ENVIRONMENT_FOLDER", # The name of the environment variable
46
- description: "Environment folder path for SelectEnvAction", # a short description of this parameter
47
- default_value: "environments",
48
- is_string: true,
49
- verify_block: proc do |value|
50
- UI.user_error!("No environment folder path for SelectClientAction given, pass using `environment: '../path_to_environment_folder'`") unless (value and not value.empty?)
51
- end),
52
- FastlaneCore::ConfigItem.new(
53
- key: :client,
54
- env_name: "FIV_CLIENT", # The name of the environment variable
55
- description: "Client folder path for SelectEnvAction", # a short description of this parameter
56
- is_string: true,
57
- optional: false,
58
- verify_block: proc do |value|
59
- UI.user_error!("No client folder path for SelectEnvAction given, pass using `client: '../path_to_client_folder'`") unless (value and not value.empty?)
60
- end)
61
- ]
62
- end
41
+ def self.available_options
42
+ [
43
+ FastlaneCore::ConfigItem.new(
44
+ key: :clients_folder,
45
+ env_name: 'FIV_CLIENTS_FOLDER',
46
+ # The name of the environment variable
47
+ description: 'Clients folder path for SelectEnvAction',
48
+ # a short description of this parameter
49
+ default_value: 'clients',
50
+ is_string: true,
51
+ verify_block:
52
+ proc do |value|
53
+ unless (value and not value.empty?)
54
+ UI.user_error!(
55
+ "No client folder path for SelectClientAction given, pass using `client_folder: '../path_to_clients_folder'`"
56
+ )
57
+ end
58
+ unless File.directory?(value)
59
+ UI.user_error!(
60
+ "Couldn't find clients folder at path '#{value}'"
61
+ )
62
+ end
63
+ end
64
+ ),
65
+ FastlaneCore::ConfigItem.new(
66
+ key: :environments_folder,
67
+ env_name: 'FIV_ENVIRONMENT_FOLDER',
68
+ # The name of the environment variable
69
+ description: 'Environment folder path for SelectEnvAction',
70
+ # a short description of this parameter
71
+ default_value: 'environments',
72
+ is_string: true,
73
+ verify_block:
74
+ proc do |value|
75
+ unless (value and not value.empty?)
76
+ UI.user_error!(
77
+ "No environment folder path for SelectClientAction given, pass using `environment: '../path_to_environment_folder'`"
78
+ )
79
+ end
80
+ end
81
+ ),
82
+ FastlaneCore::ConfigItem.new(
83
+ key: :client,
84
+ env_name: 'FIV_CLIENT',
85
+ # The name of the environment variable
86
+ description: 'Client folder path for SelectEnvAction',
87
+ # a short description of this parameter
88
+ is_string: true,
89
+ optional: false,
90
+ verify_block:
91
+ proc do |value|
92
+ unless (value and not value.empty?)
93
+ UI.user_error!(
94
+ "No client folder path for SelectEnvAction given, pass using `client: '../path_to_client_folder'`"
95
+ )
96
+ end
97
+ end
98
+ )
99
+ ]
100
+ end
63
101
 
64
- def self.author
65
- "Marc"
66
- end
102
+ def self.author
103
+ 'Marc'
104
+ end
67
105
 
68
- def self.is_supported?(platform)
69
- [:ios, :mac, :android].include? platform
70
- end
106
+ def self.is_supported?(platform)
107
+ %i[ios mac android].include? platform
71
108
  end
72
109
  end
110
+ end
73
111
  end