fastlane-plugin-waldo 1.2.1 → 1.2.2
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.
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 056a17e44467bd00b33113d8cf52829a6b849c29
         | 
| 4 | 
            +
              data.tar.gz: 38c5bdbe260672b4ad39c59fdcbc3498118350e5
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 58a2fc1db402ef97db5a7215fb23d5ee61ad017cbfb4d963e8c661ded128e4894da651ba783911f3fd5d0459a68a72f7ec5756d3a009111d460439d450aa3f08
         | 
| 7 | 
            +
              data.tar.gz: bdb76754572891b23d5ad91a5627e1245ad9a0acae7eb157903c61e5873a1f9fbc70d01fae55c51dc538b5d55d9c2a3097df9e688c2bbedba2d3f20da1289fe8
         | 
| @@ -2,9 +2,11 @@ module Fastlane | |
| 2 2 | 
             
              module Actions
         | 
| 3 3 | 
             
                class WaldoAction < Action
         | 
| 4 4 | 
             
                  def self.run(params)
         | 
| 5 | 
            -
                     | 
| 5 | 
            +
                    mparams = Helper::WaldoHelper.filter_parameters(params)
         | 
| 6 6 |  | 
| 7 | 
            -
                     | 
| 7 | 
            +
                    return unless Helper::WaldoHelper.validate_parameters(mparams)
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                    FastlaneCore::PrintTable.print_values(config: mparams,
         | 
| 8 10 | 
             
                                                          title: "Summary for waldo #{Fastlane::Waldo::VERSION.to_s}")
         | 
| 9 11 |  | 
| 10 12 | 
             
                    Helper::WaldoHelper.upload_build
         | 
| @@ -25,6 +25,42 @@ module Fastlane | |
| 25 25 | 
             
                    puts "#{response.body}"
         | 
| 26 26 | 
             
                  end
         | 
| 27 27 |  | 
| 28 | 
            +
                  def self.filter_parameters(in_params)
         | 
| 29 | 
            +
                    out_params = {}
         | 
| 30 | 
            +
             | 
| 31 | 
            +
                    apk_path = in_params[:apk_path]
         | 
| 32 | 
            +
                    app_path = in_params[:app_path]
         | 
| 33 | 
            +
                    ipa_path = in_params[:ipa_path]
         | 
| 34 | 
            +
                    upload_token = in_params[:upload_token]
         | 
| 35 | 
            +
                    variant_name = in_params[:variant_name]
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                    apk_path.gsub!("\\ ", ' ') if apk_path
         | 
| 38 | 
            +
                    app_path.gsub!("\\ ", ' ') if app_path
         | 
| 39 | 
            +
                    ipa_path.gsub!("\\ ", ' ') if ipa_path
         | 
| 40 | 
            +
             | 
| 41 | 
            +
                    out_params[:apk_path] = apk_path if apk_path
         | 
| 42 | 
            +
             | 
| 43 | 
            +
                    if app_path && ipa_path
         | 
| 44 | 
            +
                      if !File.exist?(app_path)
         | 
| 45 | 
            +
                        out_params[:ipa_path] = ipa_path
         | 
| 46 | 
            +
                      elsif !File.exist?(ipa_path)
         | 
| 47 | 
            +
                        out_params[:app_path] = app_path
         | 
| 48 | 
            +
                      elsif File.mtime(app_path) < File.mtime(ipa_path)
         | 
| 49 | 
            +
                        out_params[:ipa_path] = ipa_path
         | 
| 50 | 
            +
                      else
         | 
| 51 | 
            +
                        out_params[:app_path] = app_path
         | 
| 52 | 
            +
                      end
         | 
| 53 | 
            +
                    else
         | 
| 54 | 
            +
                      out_params[:app_path] = app_path if app_path
         | 
| 55 | 
            +
                      out_params[:ipa_path] = ipa_path if ipa_path
         | 
| 56 | 
            +
                    end
         | 
| 57 | 
            +
             | 
| 58 | 
            +
                    out_params[:upload_token] = upload_token if upload_token && !upload_token.empty?
         | 
| 59 | 
            +
                    out_params[:variant_name] = variant_name if variant_name
         | 
| 60 | 
            +
             | 
| 61 | 
            +
                    out_params
         | 
| 62 | 
            +
                  end
         | 
| 63 | 
            +
             | 
| 28 64 | 
             
                  def self.get_authorization
         | 
| 29 65 | 
             
                    "Upload-Token #{@upload_token}"
         | 
| 30 66 | 
             
                  end
         | 
| @@ -200,10 +236,6 @@ module Fastlane | |
| 200 236 | 
             
                    @upload_token = params[:upload_token]
         | 
| 201 237 | 
             
                    @variant_name = params[:variant_name]
         | 
| 202 238 |  | 
| 203 | 
            -
                    if @upload_token && @upload_token.empty?
         | 
| 204 | 
            -
                      @upload_token = nil                       # easier to test
         | 
| 205 | 
            -
                    end
         | 
| 206 | 
            -
             | 
| 207 239 | 
             
                    unless @upload_token
         | 
| 208 240 | 
             
                      handle_error('You must pass a nonempty upload token to the Waldo action')
         | 
| 209 241 |  | 
| @@ -218,8 +250,6 @@ module Fastlane | |
| 218 250 | 
             
                        return false
         | 
| 219 251 | 
             
                      end
         | 
| 220 252 |  | 
| 221 | 
            -
                      @apk_path.gsub!("\\ ", ' ')
         | 
| 222 | 
            -
             | 
| 223 253 | 
             
                      unless File.exist?(@apk_path)
         | 
| 224 254 | 
             
                        handle_error("Unable to find APK at path '#{@apk_path.to_s}'")
         | 
| 225 255 |  | 
| @@ -239,8 +269,6 @@ module Fastlane | |
| 239 269 | 
             
                      end
         | 
| 240 270 |  | 
| 241 271 | 
             
                      if @app_path
         | 
| 242 | 
            -
                        @app_path.gsub!("\\ ", ' ')
         | 
| 243 | 
            -
             | 
| 244 272 | 
             
                        unless File.exist?(@app_path)
         | 
| 245 273 | 
             
                          handle_error("Unable to find app at path '#{@app_path.to_s}'")
         | 
| 246 274 |  | 
| @@ -253,8 +281,6 @@ module Fastlane | |
| 253 281 | 
             
                          return false
         | 
| 254 282 | 
             
                        end
         | 
| 255 283 | 
             
                      elsif @ipa_path
         | 
| 256 | 
            -
                        @ipa_path.gsub!("\\ ", ' ')
         | 
| 257 | 
            -
             | 
| 258 284 | 
             
                        unless File.exist?(@ipa_path)
         | 
| 259 285 | 
             
                          handle_error("Unable to find IPA at path '#{@ipa_path.to_s}'")
         | 
| 260 286 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: fastlane-plugin-waldo
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.2. | 
| 4 | 
            +
              version: 1.2.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - J. G. Pusey
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2019- | 
| 11 | 
            +
            date: 2019-07-26 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         |