jmcarbo-imapstore 0.4.5 → 0.4.6
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/bin/imapstore +3 -3
- data/lib/imapstore/imapstore.rb +5 -3
- data/lib/imapstore.rb +1 -1
- metadata +2 -2
    
        data/bin/imapstore
    CHANGED
    
    | @@ -8,7 +8,7 @@ require 'getoptions' | |
| 8 8 | 
             
            require 'rdoc/ri/ri_paths'
         | 
| 9 9 |  | 
| 10 10 | 
             
            COMMAND_LIST = ['ls', 'rm', 'put', 'get', 'rmdir', 'mkdir', 'quota', 'setup', 'snipplet' ]
         | 
| 11 | 
            -
            opt = GetOptions.new(%w( help subject=s command=s dir=s files=@s recursive! versioned! all! imapstore:s x! text=s))
         | 
| 11 | 
            +
            opt = GetOptions.new(%w( help password=s subject=s command=s dir=s files=@s recursive! versioned! all! imapstore:s x! text=s ))
         | 
| 12 12 |  | 
| 13 13 | 
             
            if opt['help']
         | 
| 14 14 | 
             
            	puts "Usage: imapstore -c <#{COMMAND_LIST.join(', ')}> -s <subject> -d <folder> -f <file list or glob> "
         | 
| @@ -27,7 +27,7 @@ all = opt['all'] || false | |
| 27 27 | 
             
            versioned = opt['versioned']
         | 
| 28 28 | 
             
            verbose = opt['x'] || false
         | 
| 29 29 | 
             
            text = opt['text'] || "no text"
         | 
| 30 | 
            -
             | 
| 30 | 
            +
            password = opt['password']
         | 
| 31 31 |  | 
| 32 32 |  | 
| 33 33 |  | 
| @@ -40,7 +40,7 @@ if COMMAND_LIST.include? command | |
| 40 40 | 
             
              end
         | 
| 41 41 |  | 
| 42 42 | 
             
            	puts "Opening mailstore #{imapstore} configured in #{File.expand_path('~/.imapstore/config.yml')}" if verbose
         | 
| 43 | 
            -
            	i = IMAPSTORE::Imapstore.new(File.expand_path('~/.imapstore/config.yml'), imapstore)
         | 
| 43 | 
            +
            	i = IMAPSTORE::Imapstore.new(File.expand_path('~/.imapstore/config.yml'), imapstore, password)
         | 
| 44 44 | 
             
            	puts "Mailstore #{imapstore} opened" if verbose
         | 
| 45 45 |  | 
| 46 46 | 
             
            	i.versioned=versioned if versioned!=nil
         | 
    
        data/lib/imapstore/imapstore.rb
    CHANGED
    
    | @@ -37,11 +37,13 @@ END | |
| 37 37 | 
             
            			end      
         | 
| 38 38 | 
             
                end
         | 
| 39 39 |  | 
| 40 | 
            -
            	  def initialize(file = File.expand_path('~/.imapstore/config.yml'), imapstore="default")
         | 
| 40 | 
            +
            	  def initialize(file = File.expand_path('~/.imapstore/config.yml'), imapstore="default", password=nil)
         | 
| 41 41 | 
             
            			puts "Initializing IMAP" if @verbose
         | 
| 42 42 | 
             
            			@versioned = true
         | 
| 43 43 | 
             
            			@verbose = false
         | 
| 44 | 
            -
             | 
| 44 | 
            +
            			
         | 
| 45 | 
            +
            			@password = password
         | 
| 46 | 
            +
            			
         | 
| 45 47 | 
             
            			puts "Getting configuration file #{file} for account #{imapstore}" if @verbose
         | 
| 46 48 | 
             
            			get_config(file, imapstore)
         | 
| 47 49 | 
             
            			connect
         | 
| @@ -113,7 +115,7 @@ END | |
| 113 115 |  | 
| 114 116 | 
             
            	    #COFIGURATION SECTION
         | 
| 115 117 | 
             
            	    @email = aConfig[imapstore]['email']
         | 
| 116 | 
            -
            	    @password = aConfig[imapstore]['password']
         | 
| 118 | 
            +
            	    @password = aConfig[imapstore]['password'] if aConfig[imapstore]['password']
         | 
| 117 119 | 
             
            	    @store_tag = aConfig[imapstore]['store_tag'] || "IMAPSTORE"
         | 
| 118 120 | 
             
            			@imap_server = aConfig[imapstore]['imap_server']
         | 
| 119 121 | 
             
            			@imap_port = aConfig[imapstore]['imap_port']
         | 
    
        data/lib/imapstore.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: jmcarbo-imapstore
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              version: 0.4. | 
| 4 | 
            +
              version: 0.4.6
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors: 
         | 
| 7 7 | 
             
            - Joan Marc Carbo Arnau
         | 
| @@ -9,7 +9,7 @@ autorequire: | |
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 11 |  | 
| 12 | 
            -
            date: 2009-01- | 
| 12 | 
            +
            date: 2009-01-17 00:00:00 -08:00
         | 
| 13 13 | 
             
            default_executable: imapstore
         | 
| 14 14 | 
             
            dependencies: 
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency 
         |