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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec2eb186ac1f81e1be4bb80e199288cb2d63661bfbfa4a07190b4cefd59c5f44
4
- data.tar.gz: 2740f99b5401c4163a09793ac62cfc5cff8e8aa7c0a3aaa2686c57d79fe58be3
3
+ metadata.gz: 3da734e8d32a11dd96f3c2a3e820aa04cab4841e22bccab9488a4258f782f923
4
+ data.tar.gz: bbcc0c1719497142b3aea0a4ce3c70b257fb7c5787086b3458bb2088edb772af
5
5
  SHA512:
6
- metadata.gz: 6974dbf722f0f0c508c9b012a622b63a74b400c4bced9b778e40fae5805efa6b93b87b9230fb1057037f6b83b535f6047a80b99ddf47e1ce57624369335aa547
7
- data.tar.gz: 052e8c354fdc58689d24430f69fa67b59c5e331f862e834b8e65a0ebc4c49cc7a684e5bfd258aa9be4e3a120c83c93ae9e964f0ca79993500928782bd4e50f95
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
- # aptitude install exim4-daemon-heavy dovecot-imapd dovecot-pop3d
13
+ # apt install exim4-daemon-heavy dovecot-imapd dovecot-pop3d
14
14
 
15
- # aptitude install rubygems libsqlite3-dev ruby-sqlite3
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: aptitude install
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
- password = ask("Password: ") { |q| q.echo = "*" }
33
- confirm = ask("Confirm: ") { |q| q.echo = "*" }
32
+ loop do
33
+ password = ask("Password: ") { |q| q.echo = "*" }
34
+ confirm = ask("Confirm: ") { |q| q.echo = "*" }
34
35
 
35
- if password != confirm
36
+ if password != confirm
36
37
  say("Mismatch; try again.")
37
- ask_password
38
- end
38
+ next
39
+ end
39
40
 
40
- if password.length < min_password_length.to_i
41
+ if password.length < min_password_length
41
42
  say("Too short; try again.")
42
- ask_password
43
- end
43
+ next
44
+ end
44
45
 
45
- password
46
+ return password
47
+ end
46
48
  end
47
49
 
48
50
  # Initialize the Cli
@@ -1,3 +1,3 @@
1
1
  module Smailr
2
- VERSION = '0.8.4'
2
+ VERSION = '0.8.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smailr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Schlesinger