refactor: migrate is_set method in helper (#1)
This commit is contained in:
		
							parent
							
								
									28fe4921f5
								
							
						
					
					
						commit
						d4896b44f7
					
				| @ -1,11 +1,7 @@ | |||||||
| require 'fastlane/action' | require 'fastlane/action' | ||||||
| require_relative '../helper/android_cd_helper' | require_relative '../helper/android_cd_helper' | ||||||
| 
 | 
 | ||||||
| def is_set variable | 
 | ||||||
|   str_variable = variable |  | ||||||
|   str_variable = variable.strip if variable.class.to_s == "String" |  | ||||||
|   variable && !(str_variable.nil? || str_variable.empty?) |  | ||||||
| end |  | ||||||
| 
 | 
 | ||||||
| module Fastlane | module Fastlane | ||||||
|   module Actions |   module Actions | ||||||
| @ -13,7 +9,7 @@ module Fastlane | |||||||
|       def self.run(params) |       def self.run(params) | ||||||
|          |          | ||||||
|         # Check parameters |         # Check parameters | ||||||
|         unless is_set(params[:beta_type]) |         unless Helper::AndroidCdHelper.is_set(params[:beta_type]) | ||||||
|           UI.error("Parameters beta_type cannot be null") |           UI.error("Parameters beta_type cannot be null") | ||||||
|           puts "Error on beta type parameter" |           puts "Error on beta type parameter" | ||||||
|         end |         end | ||||||
|  | |||||||
| @ -21,6 +21,12 @@ module Fastlane | |||||||
|           puts "Erreur lors de la décompression du fichier GPG" |           puts "Erreur lors de la décompression du fichier GPG" | ||||||
|         end |         end | ||||||
|       end |       end | ||||||
|  | 
 | ||||||
|  |       def self.is_set variable | ||||||
|  |         str_variable = variable | ||||||
|  |         str_variable = variable.strip if variable.class.to_s == "String" | ||||||
|  |         variable && !(str_variable.nil? || str_variable.empty?) | ||||||
|  |       end | ||||||
|     end |     end | ||||||
|   end |   end | ||||||
| end | end | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user