backup2everbox 0.1.3 → 0.2.0
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/Gemfile.lock +1 -1
- data/History.rdoc +3 -0
- data/README.md +2 -0
- data/lib/backup/connection/everbox.rb +1 -2
- data/lib/backup/storage/everbox.rb +11 -2
- data/lib/backup2everbox/cli.rb +1 -0
- data/lib/backup2everbox/version.rb +1 -1
- metadata +4 -4
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/History.rdoc
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -25,6 +25,7 @@ | |
| 25 25 | 
             
              add following code to your ~/Backup/models/foo.rb
         | 
| 26 26 | 
             
              ##################################################
         | 
| 27 27 | 
             
                store_with Everbox do |eb|
         | 
| 28 | 
            +
                  eb.keep      = 7
         | 
| 28 29 | 
             
                  eb.token     = '1234567890abcdefgh'
         | 
| 29 30 | 
             
                  eb.secret    = 'hgfedcba0987654321'
         | 
| 30 31 | 
             
                end
         | 
| @@ -51,6 +52,7 @@ | |
| 51 52 | 
             
                end
         | 
| 52 53 |  | 
| 53 54 | 
             
                store_with Everbox do |eb|
         | 
| 55 | 
            +
                  eb.keep      = 7
         | 
| 54 56 | 
             
                  eb.token     = '1234567890abcdefgh'
         | 
| 55 57 | 
             
                  eb.secret    = 'hgfedcba0987654321'
         | 
| 56 58 | 
             
                end
         | 
| @@ -15,11 +15,16 @@ module Backup | |
| 15 15 | 
             
                    instance_eval(&block) if block_given?
         | 
| 16 16 | 
             
                  end
         | 
| 17 17 |  | 
| 18 | 
            +
                  def remove!(pkg)
         | 
| 19 | 
            +
                    remote_path = remote_path_for(pkg)
         | 
| 20 | 
            +
                    Logger.message "#{storage_name} started removing " +
         | 
| 21 | 
            +
                          "'#{ remote_path }'."
         | 
| 22 | 
            +
                    connection.session.delete(remote_path)
         | 
| 23 | 
            +
                  end
         | 
| 24 | 
            +
             | 
| 18 25 | 
             
                  def transfer!
         | 
| 19 26 | 
             
                    remote_path = remote_path_for(@package)
         | 
| 20 27 |  | 
| 21 | 
            -
                    connection = Backup::Connection::Everbox.new(token, secret)
         | 
| 22 | 
            -
             | 
| 23 28 | 
             
                    files_to_transfer_for(@package) do |local_file, remote_file|
         | 
| 24 29 | 
             
                      Logger.message "#{storage_name} started transferring " +
         | 
| 25 30 | 
             
                          "'#{ local_file }'."
         | 
| @@ -38,6 +43,10 @@ module Backup | |
| 38 43 | 
             
                    end
         | 
| 39 44 | 
             
                  end
         | 
| 40 45 |  | 
| 46 | 
            +
                  private
         | 
| 47 | 
            +
                  def connection
         | 
| 48 | 
            +
                    @connection ||= Backup::Connection::Everbox.new(token, secret)
         | 
| 49 | 
            +
                  end
         | 
| 41 50 | 
             
                end
         | 
| 42 51 | 
             
              end
         | 
| 43 52 | 
             
            end
         | 
    
        data/lib/backup2everbox/cli.rb
    CHANGED
    
    | @@ -33,6 +33,7 @@ module Backup2everbox | |
| 33 33 | 
             
                  puts "add following code to your ~/Backup/models/foo.rb"
         | 
| 34 34 | 
             
                  puts "#" * 50
         | 
| 35 35 | 
             
                  puts "  store_with Everbox do |eb|"
         | 
| 36 | 
            +
                  puts "    eb.keep      = 7"
         | 
| 36 37 | 
             
                  puts "    eb.token     = '#{access_token.token}'"
         | 
| 37 38 | 
             
                  puts "    eb.secret    = '#{access_token.secret}'"
         | 
| 38 39 | 
             
                  puts "  end"
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: backup2everbox
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.2.0
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2012-08- | 
| 12 | 
            +
            date: 2012-08-26 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: backup
         | 
| @@ -196,7 +196,7 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 196 196 | 
             
                  version: '0'
         | 
| 197 197 | 
             
                  segments:
         | 
| 198 198 | 
             
                  - 0
         | 
| 199 | 
            -
                  hash:  | 
| 199 | 
            +
                  hash: -3041682065296939570
         | 
| 200 200 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 201 201 | 
             
              none: false
         | 
| 202 202 | 
             
              requirements:
         | 
| @@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 205 205 | 
             
                  version: '0'
         | 
| 206 206 | 
             
                  segments:
         | 
| 207 207 | 
             
                  - 0
         | 
| 208 | 
            -
                  hash:  | 
| 208 | 
            +
                  hash: -3041682065296939570
         | 
| 209 209 | 
             
            requirements: []
         | 
| 210 210 | 
             
            rubyforge_project: backup2everbox
         | 
| 211 211 | 
             
            rubygems_version: 1.8.23
         |