importance 0.2.6 → 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.
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 86bb3b486666bb086e1a64a43b1d1906d62ac952477f2550e20268e377920749
         | 
| 4 | 
            +
              data.tar.gz: e5b539125e55a53b2736066f40ad55b970cde3fe964f119726023dd39cef37a5
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 1353ec23b44df30105fac3d2259090766c7cecca3e825cf5234c9090988b7dc943180c5b71ceb16e89e47febbd27e4266c0c085c96191b2b7695d9449dafdd99
         | 
| 7 | 
            +
              data.tar.gz: 466258803ba8d8cb741e738f6e10002c03dd95f6c4543c0a58043a7290152cf18ec115618b5d0ae65ffe7cdeb097d0490f64ad973ab9f3dd1f724481634853a4
         | 
| @@ -58,14 +58,13 @@ module Importance | |
| 58 58 | 
             
                def import
         | 
| 59 59 | 
             
                  @layout = "Importance::#{Importance.configuration.layout.to_s.camelize}Layout".constantize
         | 
| 60 60 | 
             
                  @importer = Importance.configuration.importers[session[:importer].to_sym]
         | 
| 61 | 
            +
                  @importer.add_spreadsheet(session[:path])
         | 
| 61 62 |  | 
| 62 63 | 
             
                  if @importer.nil?
         | 
| 63 64 | 
             
                    flash[:alert] = t("importance.errors.no_importer")
         | 
| 64 65 | 
             
                    render :map and return
         | 
| 65 66 | 
             
                  end
         | 
| 66 67 |  | 
| 67 | 
            -
                  @importer.add_spreadsheet(session[:path])
         | 
| 68 | 
            -
             | 
| 69 68 | 
             
                  if params[:mappings].nil?
         | 
| 70 69 | 
             
                    flash[:alert] = t("importance.errors.no_mappings")
         | 
| 71 70 | 
             
                    render :map and return
         | 
| @@ -74,6 +74,10 @@ module Importance | |
| 74 74 | 
             
                  @worksheet.count - 1
         | 
| 75 75 | 
             
                end
         | 
| 76 76 |  | 
| 77 | 
            +
                def importer_attributes
         | 
| 78 | 
            +
                  @attributes
         | 
| 79 | 
            +
                end
         | 
| 80 | 
            +
             | 
| 77 81 | 
             
                # Yields each processed row (a hash of attribute => value) to the given block.
         | 
| 78 82 | 
             
                # Skips empty rows (all values nil or empty).
         | 
| 79 83 | 
             
                def each_processed_row(path, mappings)
         | 
    
        data/lib/importance/version.rb
    CHANGED