Skip to content

Commit

Permalink
Do not try to login more than once (#36)
Browse files Browse the repository at this point in the history
* Do not try to login more than once

Release v0.2.1 with this fix

* Fix missing config
  • Loading branch information
ShockwaveNN authored Sep 17, 2020
1 parent 353e022 commit 66214a6
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"MD024": { "siblings_only": true }
}
2 changes: 1 addition & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Metrics/BlockLength:
# Offense count: 1
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 162
Max: 164

# Offense count: 4
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## master (unreleased)

## 0.2.1 (2020-09-17)

### Fixes

* Do not try to login more than once
* Fix missing `markdownlint` config

## 0.2.0 (2020-09-17)

### New Features
Expand Down
3 changes: 3 additions & 0 deletions lib/onlyoffice_iredmail_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def inspect
# Login to email via IMAP
# @return [nil]
def login
return if @imap

@imap = Net::IMAP.new(@domainname)
@imap.authenticate('LOGIN', @username, @password)
end
Expand Down Expand Up @@ -179,6 +181,7 @@ def close
@imap.close
@imap.logout
@imap.disconnect
@imap = nil
end

# Move out message to `checked` directory
Expand Down
2 changes: 1 addition & 1 deletion lib/onlyoffice_iredmail_helper/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

module OnlyofficeIredmailHelper
# [String] version of gem
VERSION = '0.2.0'
VERSION = '0.2.1'
end

0 comments on commit 66214a6

Please sign in to comment.