deliver 0.7.1 → 0.7.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: 2e53e55611e6ae56d0fa0371a3b4bd08716d43c8
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: c1d9817f3fd4e7f58c372d41ec69b85b2457e2ad
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: a599b7c21a251ada077bdd22e5540fa31e372d4d5d5d6ccc285532e47cd74b8ad04b6a52d261258d7eb21472aa60984940beb11223505e07235130a3fe3670b3
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 52abde10badcc9ee4e87e6b19d4b8d763752b50813b623c73ba02374592bfb79b3e8621979f9ed6783be3ef264d25c77aa63fb0b45496b5a7fe7b2a54bfe3800
         
     | 
| 
         @@ -261,13 +261,15 @@ module Deliver 
     | 
|
| 
       261 
261 
     | 
    
         
             
                end
         
     | 
| 
       262 
262 
     | 
    
         | 
| 
       263 
263 
     | 
    
         
             
                def call_success_block
         
     | 
| 
       264 
     | 
    
         
            -
                   
     | 
| 
      
 264 
     | 
    
         
            +
                  if @deploy_information[:blocks][:success]
         
     | 
| 
      
 265 
     | 
    
         
            +
                    @deploy_information[:blocks][:success].call(hash_for_callback)
         
     | 
| 
      
 266 
     | 
    
         
            +
                  end
         
     | 
| 
       265 
267 
     | 
    
         
             
                end
         
     | 
| 
       266 
268 
     | 
    
         | 
| 
       267 
269 
     | 
    
         
             
                def call_error_block(ex)
         
     | 
| 
       268 
270 
     | 
    
         
             
                  if @deploy_information[:blocks][:error]
         
     | 
| 
       269 
271 
     | 
    
         
             
                    # Custom error handling, we just call this one
         
     | 
| 
       270 
     | 
    
         
            -
                    @deploy_information[:blocks][:error].call(ex)
         
     | 
| 
      
 272 
     | 
    
         
            +
                    @deploy_information[:blocks][:error].call(hash_for_callback(ex))
         
     | 
| 
       271 
273 
     | 
    
         
             
                  end
         
     | 
| 
       272 
274 
     | 
    
         | 
| 
       273 
275 
     | 
    
         
             
                  # Re-Raise the exception
         
     | 
| 
         @@ -278,6 +280,19 @@ module Deliver 
     | 
|
| 
       278 
280 
     | 
    
         
             
                  #####################################################
         
     | 
| 
       279 
281 
     | 
    
         
             
                  # @!group All the helper methods
         
     | 
| 
       280 
282 
     | 
    
         
             
                  #####################################################
         
     | 
| 
      
 283 
     | 
    
         
            +
             
     | 
| 
      
 284 
     | 
    
         
            +
                  def hash_for_callback(error = nil)
         
     | 
| 
      
 285 
     | 
    
         
            +
                    {
         
     | 
| 
      
 286 
     | 
    
         
            +
                      error: error,
         
     | 
| 
      
 287 
     | 
    
         
            +
                      app_version: @app_version,
         
     | 
| 
      
 288 
     | 
    
         
            +
                      app_identifier: @app_identifier,
         
     | 
| 
      
 289 
     | 
    
         
            +
                      skipped_deploy: skip_deployment?,
         
     | 
| 
      
 290 
     | 
    
         
            +
                      is_release_build: is_release_build?,
         
     | 
| 
      
 291 
     | 
    
         
            +
                      is_beta_build: is_beta_build?,
         
     | 
| 
      
 292 
     | 
    
         
            +
                      ipa_path: ENV["DELIVER_IPA_PATH"]
         
     | 
| 
      
 293 
     | 
    
         
            +
                    }
         
     | 
| 
      
 294 
     | 
    
         
            +
                  end
         
     | 
| 
      
 295 
     | 
    
         
            +
             
     | 
| 
       281 
296 
     | 
    
         
             
                  def verify_app_identifier(app_identifier)
         
     | 
| 
       282 
297 
     | 
    
         
             
                    if app_identifier
         
     | 
| 
       283 
298 
     | 
    
         
             
                      if @ipa.fetch_app_identifier and app_identifier != @ipa.fetch_app_identifier
         
     | 
| 
         @@ -309,7 +324,7 @@ module Deliver 
     | 
|
| 
       309 
324 
     | 
    
         
             
                  end
         
     | 
| 
       310 
325 
     | 
    
         | 
| 
       311 
326 
     | 
    
         
             
                  def is_beta_build?
         
     | 
| 
       312 
     | 
    
         
            -
             
     | 
| 
      
 327 
     | 
    
         
            +
                    @deploy_information[Deliverer::ValKey::IS_BETA_IPA]
         
     | 
| 
       313 
328 
     | 
    
         
             
                  end
         
     | 
| 
       314 
329 
     | 
    
         
             
              end
         
     | 
| 
       315 
330 
     | 
    
         
             
            end
         
     | 
| 
         @@ -33,15 +33,15 @@ module Deliver 
     | 
|
| 
       33 
33 
     | 
    
         
             
                      end
         
     | 
| 
       34 
34 
     | 
    
         
             
                    else
         
     | 
| 
       35 
35 
     | 
    
         
             
                      Helper.log.warn "Can not create version #{version_number} on iTunesConnect. Maybe it was already created."
         
     | 
| 
       36 
     | 
    
         
            -
                      Helper.log.info "Check out '#{current_url}' what's the latest version."
         
     | 
| 
       37 
36 
     | 
    
         | 
| 
       38 
37 
     | 
    
         
             
                      begin
         
     | 
| 
       39 
     | 
    
         
            -
                        created_version =  
     | 
| 
      
 38 
     | 
    
         
            +
                        created_version = wait_for_elements("input[ng-model='versionInfo.version.value']").first.value
         
     | 
| 
       40 
39 
     | 
    
         
             
                        if created_version != version_number
         
     | 
| 
       41 
     | 
    
         
            -
                           
     | 
| 
      
 40 
     | 
    
         
            +
                          update_existing_version_number!(app, version_number)
         
     | 
| 
       42 
41 
     | 
    
         
             
                        end
         
     | 
| 
       43 
42 
     | 
    
         
             
                      rescue => ex
         
     | 
| 
       44 
43 
     | 
    
         
             
                        # Can not fetch the version number of the new version (this happens, when it's e.g. 'Developer Rejected')
         
     | 
| 
      
 44 
     | 
    
         
            +
                        Helper.log.error ex
         
     | 
| 
       45 
45 
     | 
    
         
             
                        unless page.has_content?version_number
         
     | 
| 
       46 
46 
     | 
    
         
             
                          raise "Some other version was created instead of the one you defined ('#{version_number}')."
         
     | 
| 
       47 
47 
     | 
    
         
             
                        end
         
     | 
| 
         @@ -53,5 +53,15 @@ module Deliver 
     | 
|
| 
       53 
53 
     | 
    
         
             
                    error_occured(ex)
         
     | 
| 
       54 
54 
     | 
    
         
             
                  end
         
     | 
| 
       55 
55 
     | 
    
         
             
                end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                def update_existing_version_number!(app, version_number)
         
     | 
| 
      
 58 
     | 
    
         
            +
                  Helper.log.warn "There is already a new version created, which does not match the current version: '#{version_number}'"
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
                  version_input = wait_for_elements("input[ng-model='versionInfo.version.value']").first
         
     | 
| 
      
 61 
     | 
    
         
            +
                  version_input.set version_number
         
     | 
| 
      
 62 
     | 
    
         
            +
                  click_on "Save"
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                  Helper.log.warn "Changed the version number of the latest version to '#{version_number}'".green
         
     | 
| 
      
 65 
     | 
    
         
            +
                end
         
     | 
| 
       56 
66 
     | 
    
         
             
              end
         
     | 
| 
       57 
67 
     | 
    
         
             
            end
         
     | 
| 
         @@ -47,7 +47,9 @@ module Deliver 
     | 
|
| 
       47 
47 
     | 
    
         
             
                    open_app_page(app)
         
     | 
| 
       48 
48 
     | 
    
         | 
| 
       49 
49 
     | 
    
         
             
                    begin
         
     | 
| 
       50 
     | 
    
         
            -
                       
     | 
| 
      
 50 
     | 
    
         
            +
                      version_number = wait_for_elements("input[ng-model='versionInfo.version.value']").first.value
         
     | 
| 
      
 51 
     | 
    
         
            +
                      version_number ||= first(".status.ready").text.split(" ").first
         
     | 
| 
      
 52 
     | 
    
         
            +
                      return version_number
         
     | 
| 
       51 
53 
     | 
    
         
             
                    rescue
         
     | 
| 
       52 
54 
     | 
    
         
             
                      Helper.log.debug "Could not fetch version number of the live version for app #{app}."
         
     | 
| 
       53 
55 
     | 
    
         
             
                      return nil
         
     | 
    
        data/lib/deliver/version.rb
    CHANGED