liquid_backup 0.2.0 → 0.2.1
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.
- data/.gitignore +2 -0
- data/VERSION +1 -1
- data/lib/liquid_backup/handler/s3.rb +2 -1
- data/lib/liquid_backup/job.rb +2 -1
- data/spec/backup_spec.rb +1 -1
- metadata +3 -2
    
        data/.gitignore
    CHANGED
    
    
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.2. | 
| 1 | 
            +
            0.2.1
         | 
| @@ -15,10 +15,11 @@ module LiquidBackup | |
| 15 15 | 
             
                    files.each do |file|
         | 
| 16 16 | 
             
                      AWS::S3::S3Object.store("#{File.mtime(file).strftime("%Y%m%d%H%M%S")}_#{File.split(file)[-1]}", File.open(file), location)
         | 
| 17 17 | 
             
                    end
         | 
| 18 | 
            +
                    self
         | 
| 18 19 | 
             
                  end
         | 
| 19 20 |  | 
| 20 21 | 
             
                  def cleanup
         | 
| 21 | 
            -
             | 
| 22 | 
            +
                    # Nothing here yet
         | 
| 22 23 | 
             
                  end
         | 
| 23 24 | 
             
                end
         | 
| 24 25 | 
             
              end
         | 
    
        data/lib/liquid_backup/job.rb
    CHANGED
    
    | @@ -1,3 +1,4 @@ | |
| 1 | 
            +
            require 'fileutils'
         | 
| 1 2 | 
             
            require 'active_support/concern'
         | 
| 2 3 | 
             
            require 'active_support/callbacks'
         | 
| 3 4 |  | 
| @@ -68,7 +69,7 @@ class LiquidBackup::Job | |
| 68 69 |  | 
| 69 70 | 
             
                def upload
         | 
| 70 71 | 
             
                  files_to_backup = Dir.glob(File.join(current_backup_path,'*.tar.gz'))
         | 
| 71 | 
            -
                  LiquidBackup::Manager.handler(destination_handler).store(destination_location, files_to_backup)
         | 
| 72 | 
            +
                  LiquidBackup::Manager.handler(destination_handler).store(destination_location, files_to_backup).cleanup
         | 
| 72 73 | 
             
                end
         | 
| 73 74 |  | 
| 74 75 | 
             
                def compress(source,destination)
         | 
    
        data/spec/backup_spec.rb
    CHANGED
    
    | @@ -42,7 +42,7 @@ describe LiquidBackup do | |
| 42 42 | 
             
                    LiquidBackup::Manager.use(:s3, s3)
         | 
| 43 43 |  | 
| 44 44 | 
             
                    @job = LiquidBackup::Job.new(File.join(File.dirname(__FILE__), "/fs_root/home/user1/app1/production/current/config/backup.rb"))
         | 
| 45 | 
            -
                    LiquidBackup::Manager.handler(:s3).should_receive(:store).with('liquidmedia_fairness',Dir.glob(File.join(@job.current_backup_path,'*.tar.gz'))).and_return( | 
| 45 | 
            +
                    LiquidBackup::Manager.handler(:s3).should_receive(:store).with('liquidmedia_fairness',Dir.glob(File.join(@job.current_backup_path,'*.tar.gz'))).and_return(LiquidBackup::Manager.handler(:s3))
         | 
| 46 46 | 
             
                    @job.perform
         | 
| 47 47 | 
             
                  end
         | 
| 48 48 | 
             
                end
         | 
    
        metadata
    CHANGED
    
    | @@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version | |
| 5 5 | 
             
              segments: 
         | 
| 6 6 | 
             
              - 0
         | 
| 7 7 | 
             
              - 2
         | 
| 8 | 
            -
              -  | 
| 9 | 
            -
              version: 0.2. | 
| 8 | 
            +
              - 1
         | 
| 9 | 
            +
              version: 0.2.1
         | 
| 10 10 | 
             
            platform: ruby
         | 
| 11 11 | 
             
            authors: 
         | 
| 12 12 | 
             
            - Dan Williams
         | 
| @@ -66,6 +66,7 @@ files: | |
| 66 66 | 
             
            - lib/liquid_backup/job/modules/folder_module.rb
         | 
| 67 67 | 
             
            - lib/liquid_backup/manager.rb
         | 
| 68 68 | 
             
            - spec/backup_spec.rb
         | 
| 69 | 
            +
            - spec/fs_root/home/user1/app1/production/current/config/backup.rb
         | 
| 69 70 | 
             
            - spec/fs_root/home/user1/app1/production/current/public/system/important_files/file1.txt
         | 
| 70 71 | 
             
            - spec/fs_root/home/user1/app1/production/current/public/system/important_files/file2.txt
         | 
| 71 72 | 
             
            - spec/spec.opts
         |