smailr 0.8.4 → 0.8.5
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.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/smailr/cli.rb +12 -10
- data/lib/smailr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3da734e8d32a11dd96f3c2a3e820aa04cab4841e22bccab9488a4258f782f923
|
|
4
|
+
data.tar.gz: bbcc0c1719497142b3aea0a4ce3c70b257fb7c5787086b3458bb2088edb772af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 072341ff8b4a7ca1691c61686e762d1c1b44e222d239b728fc3189dd5a5325a1714d923ef71e3ab46e08248b0b1b49e9f0615950708c66c8176f07e5e25b68ca
|
|
7
|
+
data.tar.gz: b56b46286fa30700bf5d4e434b7b3bfeca03330dfbef714c61e965a46df4d2d2ae7cec8779b06fd00aea10d592e370c27f43b47e4fe3253c2f07f00a286f600d
|
data/README.md
CHANGED
|
@@ -10,9 +10,10 @@ able to get everything up and running within a couple of minutes.
|
|
|
10
10
|
|
|
11
11
|
Install Packages
|
|
12
12
|
|
|
13
|
-
#
|
|
13
|
+
# apt install exim4-daemon-heavy dovecot-imapd dovecot-pop3d
|
|
14
14
|
|
|
15
|
-
#
|
|
15
|
+
# apt install ruby-rubygems ruby-bcrypt ruby-sqlite3
|
|
16
|
+
# apt install ruby-rubygems ruby-bcrypt ruby-mysql2
|
|
16
17
|
|
|
17
18
|
Install Smailr Gem package
|
|
18
19
|
|
|
@@ -54,7 +55,7 @@ But you can configure any other database as well. Eg. for MySQL use:
|
|
|
54
55
|
database: smailr
|
|
55
56
|
password: S3cr3t
|
|
56
57
|
|
|
57
|
-
Just make sure the database driver is installed (for MySQL:
|
|
58
|
+
Just make sure the database driver is installed (for MySQL: apt install
|
|
58
59
|
ruby-mysql2). Smailr uses the Sequel ORM, check out the following page for
|
|
59
60
|
connection parameters: [sequel.jeremyevans.net/opening_databases_rdoc](http://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html)
|
|
60
61
|
|
|
@@ -186,4 +187,3 @@ https://github.com/sts/smailr/issues
|
|
|
186
187
|
## WHO
|
|
187
188
|
|
|
188
189
|
Stefan Schlesinger / sts@ono.at / @stsonoat / http://sts.ono.at
|
|
189
|
-
|
data/lib/smailr/cli.rb
CHANGED
|
@@ -27,22 +27,24 @@ module Smailr
|
|
|
27
27
|
# Returns a string containing the entered password if password and
|
|
28
28
|
# confirmation match.
|
|
29
29
|
def ask_password
|
|
30
|
-
min_password_length = Smailr.config["password_policy"]["length"]
|
|
30
|
+
min_password_length = Smailr.config["password_policy"]["length"].to_i
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
loop do
|
|
33
|
+
password = ask("Password: ") { |q| q.echo = "*" }
|
|
34
|
+
confirm = ask("Confirm: ") { |q| q.echo = "*" }
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
if password != confirm
|
|
36
37
|
say("Mismatch; try again.")
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
next
|
|
39
|
+
end
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
if password.length < min_password_length
|
|
41
42
|
say("Too short; try again.")
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
next
|
|
44
|
+
end
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
return password
|
|
47
|
+
end
|
|
46
48
|
end
|
|
47
49
|
|
|
48
50
|
# Initialize the Cli
|
data/lib/smailr/version.rb
CHANGED