mayaml-mutt 3.0.0 → 4.0.0
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/CHANGELOG.md +12 -5
- data/Gemfile +1 -0
- data/README.md +1 -0
- data/bin/mayaml-mutt-creds +5 -5
- data/bin/mayaml-mutt-init +5 -5
- data/lib/mayaml-mutt/account_creds.rb +11 -8
- data/lib/mayaml-mutt/account_init.rb +7 -7
- data/lib/mayaml-mutt/accounts_alternates.rb +9 -7
- data/lib/mayaml-mutt/configs_generator.rb +2 -2
- data/lib/mayaml-mutt/version.rb +3 -3
- data/lib/mayaml-mutt.rb +2 -2
- metadata +18 -7
- data/lib/mayaml-mutt/account_creds.mustache +0 -8
- data/lib/mayaml-mutt/account_init.mustache +0 -3
- data/lib/mayaml-mutt/accounts_alternates.mustache +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 332a8954d08d49e253f062c350f3a1d149337df3
|
4
|
+
data.tar.gz: d890d9ebb4f350bf7d3a105c58f716967e71ba41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 252016b2d8b977a8acfa35ba1c1b50a18134f4b5e18a2540ee3fe72a95dda4ae8b276bdfb4f5712044369bca9c39996d5d4fe9cd372b5bc5fb0acd6b6d1a048b
|
7
|
+
data.tar.gz: fcb21896a4001522f9ab09142c7c5f15f494641bb70fbaa39d78a23ccc41e1fd83167041d34cc970753a068a5e8a72029a023e433429a413df958cf96fab9b8f
|
data/CHANGELOG.md
CHANGED
@@ -1,20 +1,27 @@
|
|
1
|
-
|
1
|
+
### 4.0.0 (2017.04.06)
|
2
|
+
|
3
|
+
* update to use mayaml v4
|
4
|
+
* update license
|
5
|
+
* fix travis integration
|
6
|
+
* cleanup and refactor
|
7
|
+
|
8
|
+
### 3.0.0 (2016.09.07)
|
2
9
|
|
3
10
|
* skip v2 release to be compatible with mayaml version
|
4
11
|
* update to use mayaml v3
|
5
12
|
|
6
|
-
|
13
|
+
### 1.1.2 (2016.09.06)
|
7
14
|
|
8
15
|
* fix typo in the account_init config file
|
9
16
|
|
10
|
-
|
17
|
+
### 1.1.1 (2016.09.06)
|
11
18
|
|
12
19
|
* fix accounts default path in the account_init config file
|
13
20
|
|
14
|
-
|
21
|
+
### 1.1.0 (2016.09.06)
|
15
22
|
|
16
23
|
* uses parameters: `realname` and `default` from mayaml v2
|
17
24
|
|
18
|
-
|
25
|
+
### 1.0.0 (2016.08.22)
|
19
26
|
|
20
27
|
* publication of the code
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
[](http://badge.fury.io/rb/mayaml-mutt)
|
4
4
|
[](https://codeclimate.com/github/skopciewski/mayaml-mutt)
|
5
|
+
[](https://gemnasium.com/github.com/skopciewski/mayaml-mutt)
|
5
6
|
|
6
7
|
This is the mutt configs generator which gets the accounts settigns from yaml file. See [Mayaml][mayaml_url]
|
7
8
|
The mutt configuration is designed to handle many accounts and one inbox. (example implementation: [DockerMutt][docker_mutt_url])
|
data/bin/mayaml-mutt-creds
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
# Copyright (C) 2016 Szymon Kopciewski
|
4
|
+
# Copyright (C) 2016, 2017 Szymon Kopciewski
|
4
5
|
#
|
5
6
|
# This file is part of MayamlMutt.
|
6
7
|
#
|
@@ -53,10 +54,9 @@ def check_yaml_path(yaml_path)
|
|
53
54
|
puts_ussage_message
|
54
55
|
exit 1
|
55
56
|
end
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
end
|
57
|
+
return if File.exist? yaml_path
|
58
|
+
puts "Could not find file: #{yaml_path}"
|
59
|
+
exit 1
|
60
60
|
end
|
61
61
|
|
62
62
|
def main(args)
|
data/bin/mayaml-mutt-init
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
# Copyright (C) 2016 Szymon Kopciewski
|
4
|
+
# Copyright (C) 2016, 2017 Szymon Kopciewski
|
4
5
|
#
|
5
6
|
# This file is part of MayamlMutt.
|
6
7
|
#
|
@@ -52,10 +53,9 @@ def check_yaml_path(yaml_path)
|
|
52
53
|
puts_ussage_message
|
53
54
|
exit 1
|
54
55
|
end
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
end
|
56
|
+
return if File.exist? yaml_path
|
57
|
+
puts "Could not find file: #{yaml_path}"
|
58
|
+
exit 1
|
59
59
|
end
|
60
60
|
|
61
61
|
def main(args)
|
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (C) 2016 Szymon Kopciewski
|
3
|
+
# Copyright (C) 2016, 2017 Szymon Kopciewski
|
4
4
|
#
|
5
5
|
# This file is part of MayamlMutt.
|
6
6
|
#
|
@@ -21,13 +21,9 @@ require "mustache"
|
|
21
21
|
|
22
22
|
module MayamlMutt
|
23
23
|
class AccountCreds
|
24
|
-
def initialize
|
25
|
-
@template = IO.read(File.join(File.dirname(__FILE__), "account_creds.mustache"))
|
26
|
-
end
|
27
|
-
|
28
24
|
def render(mail_account)
|
29
25
|
::Mustache.render(
|
30
|
-
|
26
|
+
IO.read(template_file_path),
|
31
27
|
name: mail_account.name,
|
32
28
|
realname: mail_account.realname,
|
33
29
|
user: mail_account.user,
|
@@ -35,8 +31,15 @@ module MayamlMutt
|
|
35
31
|
server: mail_account.server,
|
36
32
|
smtp_protocol: mail_account.smtp_protocol,
|
37
33
|
smtp_port: mail_account.smtp_port,
|
38
|
-
smtp_authenticator: mail_account.smtp_authenticator
|
34
|
+
smtp_authenticator: mail_account.smtp_authenticator,
|
35
|
+
smtp_server: mail_account.smtp_server
|
39
36
|
)
|
40
37
|
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def template_file_path
|
42
|
+
File.join(Gem.datadir("mayaml-mutt"), "account_creds.mustache")
|
43
|
+
end
|
41
44
|
end
|
42
45
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (C) 2016 Szymon Kopciewski
|
3
|
+
# Copyright (C) 2016, 2017 Szymon Kopciewski
|
4
4
|
#
|
5
5
|
# This file is part of MayamlMutt.
|
6
6
|
#
|
@@ -21,13 +21,9 @@ require "mustache"
|
|
21
21
|
|
22
22
|
module MayamlMutt
|
23
23
|
class AccountInit
|
24
|
-
def initialize
|
25
|
-
@template = IO.read(File.join(File.dirname(__FILE__), "account_init.mustache"))
|
26
|
-
end
|
27
|
-
|
28
24
|
def render(mail_account, config = {})
|
29
25
|
::Mustache.render(
|
30
|
-
|
26
|
+
IO.read(template_file_path),
|
31
27
|
name: mail_account.name,
|
32
28
|
clean_name: clean_name(mail_account.name),
|
33
29
|
accounts_dir: config.fetch(:accounts_dir, "~/.mutt/accounts")
|
@@ -36,6 +32,10 @@ module MayamlMutt
|
|
36
32
|
|
37
33
|
private
|
38
34
|
|
35
|
+
def template_file_path
|
36
|
+
File.join(Gem.datadir("mayaml-mutt"), "account_init.mustache")
|
37
|
+
end
|
38
|
+
|
39
39
|
def clean_name(string)
|
40
40
|
string.gsub(/\W/, "_")
|
41
41
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (C) 2016 Szymon Kopciewski
|
3
|
+
# Copyright (C) 2016, 2017 Szymon Kopciewski
|
4
4
|
#
|
5
5
|
# This file is part of MayamlMutt.
|
6
6
|
#
|
@@ -21,16 +21,18 @@ require "mustache"
|
|
21
21
|
|
22
22
|
module MayamlMutt
|
23
23
|
class AccountsAlternates
|
24
|
-
def initialize
|
25
|
-
@template = IO.read(File.join(File.dirname(__FILE__), "accounts_alternates.mustache"))
|
26
|
-
end
|
27
|
-
|
28
24
|
def render(account_names)
|
29
25
|
return "" if account_names.nil? || account_names.empty?
|
30
26
|
::Mustache.render(
|
31
|
-
|
27
|
+
IO.read(template_file_path),
|
32
28
|
accounts: account_names.join(" ")
|
33
29
|
)
|
34
30
|
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def template_file_path
|
35
|
+
File.join(Gem.datadir("mayaml-mutt"), "accounts_alternates.mustache")
|
36
|
+
end
|
35
37
|
end
|
36
38
|
end
|
data/lib/mayaml-mutt/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (C) 2016 Szymon Kopciewski
|
3
|
+
# Copyright (C) 2016, 2017 Szymon Kopciewski
|
4
4
|
#
|
5
5
|
# This file is part of MayamlMutt.
|
6
6
|
#
|
@@ -18,5 +18,5 @@
|
|
18
18
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19
19
|
|
20
20
|
module MayamlMutt
|
21
|
-
VERSION = "
|
21
|
+
VERSION = "4.0.0"
|
22
22
|
end
|
data/lib/mayaml-mutt.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mayaml-mutt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Szymon Kopciewski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mayaml
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mustache
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: codeclimate-test-reporter
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -124,11 +138,8 @@ files:
|
|
124
138
|
- bin/mayaml-mutt-creds
|
125
139
|
- bin/mayaml-mutt-init
|
126
140
|
- lib/mayaml-mutt.rb
|
127
|
-
- lib/mayaml-mutt/account_creds.mustache
|
128
141
|
- lib/mayaml-mutt/account_creds.rb
|
129
|
-
- lib/mayaml-mutt/account_init.mustache
|
130
142
|
- lib/mayaml-mutt/account_init.rb
|
131
|
-
- lib/mayaml-mutt/accounts_alternates.mustache
|
132
143
|
- lib/mayaml-mutt/accounts_alternates.rb
|
133
144
|
- lib/mayaml-mutt/configs_generator.rb
|
134
145
|
- lib/mayaml-mutt/version.rb
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# vim: filetype=muttrc
|
2
|
-
|
3
|
-
set realname="{{ realname }}"
|
4
|
-
set from="{{ name }}"
|
5
|
-
set smtp_url="{{ smtp_protocol }}://{{ user }}@{{ server }}:{{ smtp_port }}/" smtp_pass="{{ pass }}"
|
6
|
-
set smtp_authenticators="{{ smtp_authenticator }}"
|
7
|
-
set ssl_force_tls = yes
|
8
|
-
set ssl_starttls = yes
|
@@ -1 +0,0 @@
|
|
1
|
-
alternates {{ accounts }}
|