Permalink
Browse files

Whitespace

  • Loading branch information...
1 parent 2da44c2 commit 546e7222a7f0fe0edde07308628bb161b579196c @joeyates committed Oct 17, 2012
View
@@ -34,7 +34,6 @@ opts = OptionParser.new do |opts|
puts opts
exit
end
-
end
opts.parse!
@@ -4,7 +4,6 @@ module Imap
module Backup
module Account
class Connection
-
attr_reader :username
attr_reader :imap
@@ -39,7 +38,6 @@ def run_backup
d.run
end
end
-
end
end
end
@@ -4,7 +4,6 @@ module Imap
module Backup
module Account
class Folder
-
REQUESTED_ATTRIBUTES = ['RFC822', 'FLAGS', 'INTERNALDATE']
def initialize(connection, folder)
@@ -22,7 +21,6 @@ def fetch(uid)
message['RFC822'].force_encoding('utf-8') if RUBY_VERSION > '1.9'
message
end
-
end
end
end
@@ -4,7 +4,6 @@ module Imap
module Backup
module Configuration
class Account
-
def initialize(store, account)
@store, @account = store, account
end
@@ -77,7 +76,6 @@ def run
end
end
end
-
end
end
end
@@ -4,7 +4,6 @@ module Imap
module Backup
module Configuration
module Asker
-
EMAIL_MATCHER = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
def self.email(default = '')
@@ -34,7 +33,6 @@ def self.backup_path(default, validator)
q.responses[:not_valid] = 'Choose a different directory '
end
end
-
end
end
end
@@ -4,7 +4,6 @@ module Imap
module Backup
module Configuration
class FolderChooser
-
def initialize(account)
@account = account
end
@@ -48,7 +47,6 @@ def run
end
end
end
-
end
end
end
@@ -4,28 +4,26 @@ module Imap
module Backup
module Configuration
class List
+ attr_reader :accounts
- attr_reader :accounts
+ def initialize(accounts = nil)
+ @config = Imap::Backup::Configuration::Store.new
- def initialize(accounts = nil)
- @config = Imap::Backup::Configuration::Store.new
-
- if accounts.nil?
- @accounts = @config.data[:accounts]
- else
- @accounts = @config.data[:accounts].select{ |account| accounts.include?(account[:username]) }
+ if accounts.nil?
+ @accounts = @config.data[:accounts]
+ else
+ @accounts = @config.data[:accounts].select{ |account| accounts.include?(account[:username]) }
+ end
end
- end
- def each_connection
- @accounts.each do |account|
- connection = Imap::Backup::Account::Connection.new(account)
- yield connection
- connection.disconnect
+ def each_connection
+ @accounts.each do |account|
+ connection = Imap::Backup::Account::Connection.new(account)
+ yield connection
+ connection.disconnect
+ end
end
end
-
- end
end
end
end
@@ -6,7 +6,6 @@ module Imap
module Backup
module Configuration
class Setup
-
class << self
attr_accessor :highline
end
@@ -60,7 +59,6 @@ def edit_account(username)
end
Account.new(@config, account).run
end
-
end
end
end
@@ -6,7 +6,6 @@ module Imap
module Backup
module Configuration
class Store
-
CONFIGURATION_DIRECTORY = File.expand_path('~/.imap-backup')
attr_reader :data
@@ -56,7 +55,6 @@ def mkdir_private(path)
FileUtils.chmod 0700, path
end
end
-
end
end
end
@@ -5,7 +5,6 @@
module Imap
module Backup
class Downloader
-
def initialize(folder, serializer)
@folder, @serializer = folder, serializer
end
@@ -17,7 +16,6 @@ def run
@serializer.save(uid, message)
end
end
-
end
end
end
@@ -5,7 +5,6 @@ module Imap
module Backup
module Serializer
class Directory
-
def initialize(path, folder)
@path, @folder = path, folder
permissions = 0700
@@ -43,7 +42,6 @@ def directory
def filename(uid)
"#{directory}/%012u.json" % uid.to_i
end
-
end
end
end

0 comments on commit 546e722

Please sign in to comment.