mayaml-mutt 4.0.1 → 4.1.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 +5 -5
- data/CHANGELOG.md +14 -0
- data/Gemfile +1 -0
- data/README.md +2 -3
- data/bin/mayaml-mutt-creds +1 -1
- data/bin/mayaml-mutt-init +1 -1
- data/lib/mayaml-mutt/account_creds.rb +3 -2
- data/lib/mayaml-mutt/account_init.rb +7 -6
- data/lib/mayaml-mutt/accounts_alternates.rb +3 -2
- data/lib/mayaml-mutt/configs_generator.rb +3 -3
- data/lib/mayaml-mutt/version.rb +2 -2
- data/lib/mayaml-mutt.rb +1 -1
- data/{data/mayaml-mutt → lib/templates}/account_creds.mustache +0 -0
- data/{data/mayaml-mutt → lib/templates}/account_init.mustache +0 -0
- data/{data/mayaml-mutt → lib/templates}/accounts_alternates.mustache +0 -0
- metadata +15 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 00e874f16961920f4a5072328836a113764a03d991128d3321aff86e2e604cee
|
|
4
|
+
data.tar.gz: 28be3e18d3fdbba48d3fa2b313b2c37812a3170dc00975f364fdb134f2c86c03
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d4af73aec5cf0696d83b6781fa93f317471ae3654602f9987ca04f051e72777436b06b06cf9269aa6174d44a42d59b9a0ecb50b49d6e61df73552fce3952b3c
|
|
7
|
+
data.tar.gz: 471c2dae33dff5fc449fb9599844c6494ad1342c1c2d42b559aa345f96b4cc71bf51c3829ee49d5ce93046d4b5eea9d825743c60d8ab3948b6f09cae5b3687c6
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
### 4.1.0 (2022.06.17)
|
|
2
|
+
|
|
3
|
+
* update aliases format
|
|
4
|
+
|
|
5
|
+
### 4.0.3 (2018.12.08)
|
|
6
|
+
|
|
7
|
+
* move templates to the lib
|
|
8
|
+
|
|
9
|
+
### 4.0.2 (2018.07.07)
|
|
10
|
+
|
|
11
|
+
* update code to ruby 2.5
|
|
12
|
+
* fix warnings, travis, docs
|
|
13
|
+
* update license
|
|
14
|
+
|
|
1
15
|
### 4.0.1 (2017.04.06)
|
|
2
16
|
|
|
3
17
|
* add missing data dir to gemspec
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
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)
|
|
6
5
|
|
|
7
6
|
This is the mutt configs generator which gets the accounts settigns from yaml file. See [Mayaml][mayaml_url]
|
|
8
7
|
The mutt configuration is designed to handle many accounts and one inbox. (example implementation: [DockerMutt][docker_mutt_url])
|
|
@@ -23,9 +22,9 @@ Or install it yourself as:
|
|
|
23
22
|
|
|
24
23
|
## Usage
|
|
25
24
|
|
|
26
|
-
If ruby bin dir is in your PATH, just call `mayaml-mutt-init <path_to_the_yaml_file> [<destination_config_file>]`
|
|
25
|
+
If ruby bin dir is in your PATH, just call `mayaml-mutt-init <path_to_the_yaml_file> [<destination_config_file>]`
|
|
27
26
|
to list generated configs or store them in `destination_config_file`.
|
|
28
|
-
Or `mayaml-mutt-creds <path_to_the_yaml_file> [<dir_for_storing_configs>]`
|
|
27
|
+
Or `mayaml-mutt-creds <path_to_the_yaml_file> [<dir_for_storing_configs>]`
|
|
29
28
|
to list generated configs or store them in `dir_for_storing_configs`.
|
|
30
29
|
|
|
31
30
|
## Versioning
|
data/bin/mayaml-mutt-creds
CHANGED
data/bin/mayaml-mutt-init
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (C) 2016, 2017 Szymon Kopciewski
|
|
3
|
+
# Copyright (C) 2016, 2017, 2018 Szymon Kopciewski
|
|
4
4
|
#
|
|
5
5
|
# This file is part of MayamlMutt.
|
|
6
6
|
#
|
|
@@ -39,7 +39,8 @@ module MayamlMutt
|
|
|
39
39
|
private
|
|
40
40
|
|
|
41
41
|
def template_file_path
|
|
42
|
-
File.
|
|
42
|
+
templates_dir = File.expand_path("../templates", __dir__)
|
|
43
|
+
File.join(templates_dir, "account_creds.mustache")
|
|
43
44
|
end
|
|
44
45
|
end
|
|
45
46
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (C) 2016, 2017 Szymon Kopciewski
|
|
3
|
+
# Copyright (C) 2016, 2017, 2018 Szymon Kopciewski
|
|
4
4
|
#
|
|
5
5
|
# This file is part of MayamlMutt.
|
|
6
6
|
#
|
|
@@ -21,11 +21,11 @@ require "mustache"
|
|
|
21
21
|
|
|
22
22
|
module MayamlMutt
|
|
23
23
|
class AccountInit
|
|
24
|
-
def render(mail_account, config = {})
|
|
24
|
+
def render(mail_account, index, config = {})
|
|
25
25
|
::Mustache.render(
|
|
26
26
|
IO.read(template_file_path),
|
|
27
27
|
name: mail_account.name,
|
|
28
|
-
clean_name: clean_name(mail_account.name),
|
|
28
|
+
clean_name: clean_name(mail_account.name, index),
|
|
29
29
|
accounts_dir: config.fetch(:accounts_dir, "~/.mutt/accounts")
|
|
30
30
|
)
|
|
31
31
|
end
|
|
@@ -33,11 +33,12 @@ module MayamlMutt
|
|
|
33
33
|
private
|
|
34
34
|
|
|
35
35
|
def template_file_path
|
|
36
|
-
File.
|
|
36
|
+
templates_dir = File.expand_path("../templates", __dir__)
|
|
37
|
+
File.join(templates_dir, "account_init.mustache")
|
|
37
38
|
end
|
|
38
39
|
|
|
39
|
-
def clean_name(string)
|
|
40
|
-
string.gsub(/\W/, "_")
|
|
40
|
+
def clean_name(string, index)
|
|
41
|
+
"#{index}_#{string.gsub(/\W/, "_")}"
|
|
41
42
|
end
|
|
42
43
|
end
|
|
43
44
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (C) 2016, 2017 Szymon Kopciewski
|
|
3
|
+
# Copyright (C) 2016, 2017, 2018 Szymon Kopciewski
|
|
4
4
|
#
|
|
5
5
|
# This file is part of MayamlMutt.
|
|
6
6
|
#
|
|
@@ -32,7 +32,8 @@ module MayamlMutt
|
|
|
32
32
|
private
|
|
33
33
|
|
|
34
34
|
def template_file_path
|
|
35
|
-
File.
|
|
35
|
+
templates_dir = File.expand_path("../templates", __dir__)
|
|
36
|
+
File.join(templates_dir, "accounts_alternates.mustache")
|
|
36
37
|
end
|
|
37
38
|
end
|
|
38
39
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (C) 2016, 2017 Szymon Kopciewski
|
|
3
|
+
# Copyright (C) 2016, 2017, 2018 Szymon Kopciewski
|
|
4
4
|
#
|
|
5
5
|
# This file is part of MayamlMutt.
|
|
6
6
|
#
|
|
@@ -27,10 +27,10 @@ module MayamlMutt
|
|
|
27
27
|
|
|
28
28
|
def generates_init(accounts)
|
|
29
29
|
alternates = []
|
|
30
|
-
accounts.each_with_object({}) do |mail_account, result|
|
|
30
|
+
accounts.each_with_object({}).with_index do |(mail_account, result), index|
|
|
31
31
|
key = mail_account.name.to_sym
|
|
32
32
|
alternates << mail_account.name
|
|
33
|
-
result[key] = @init_templater.render(mail_account)
|
|
33
|
+
result[key] = @init_templater.render(mail_account, index)
|
|
34
34
|
result[:alternates] = @alternates_templater.render(alternates)
|
|
35
35
|
result
|
|
36
36
|
end
|
data/lib/mayaml-mutt/version.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (C) 2016, 2017 Szymon Kopciewski
|
|
3
|
+
# Copyright (C) 2016, 2017, 2018 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 = "4.0
|
|
21
|
+
VERSION = "4.1.0"
|
|
22
22
|
end
|
data/lib/mayaml-mutt.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
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.0
|
|
4
|
+
version: 4.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Szymon Kopciewski
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-06-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: mayaml
|
|
@@ -39,7 +39,7 @@ dependencies:
|
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '1.0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
42
|
+
name: codeclimate-test-reporter
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - ">="
|
|
@@ -53,7 +53,7 @@ dependencies:
|
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
56
|
+
name: minitest
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - ">="
|
|
@@ -67,7 +67,7 @@ dependencies:
|
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: minitest
|
|
70
|
+
name: minitest-reporters
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - ">="
|
|
@@ -81,7 +81,7 @@ dependencies:
|
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
84
|
+
name: pry
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - ">="
|
|
@@ -95,7 +95,7 @@ dependencies:
|
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
98
|
+
name: rake
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - ">="
|
|
@@ -109,7 +109,7 @@ dependencies:
|
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '0'
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
112
|
+
name: simplecov
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
115
|
- - ">="
|
|
@@ -137,20 +137,20 @@ files:
|
|
|
137
137
|
- README.md
|
|
138
138
|
- bin/mayaml-mutt-creds
|
|
139
139
|
- bin/mayaml-mutt-init
|
|
140
|
-
- data/mayaml-mutt/account_creds.mustache
|
|
141
|
-
- data/mayaml-mutt/account_init.mustache
|
|
142
|
-
- data/mayaml-mutt/accounts_alternates.mustache
|
|
143
140
|
- lib/mayaml-mutt.rb
|
|
144
141
|
- lib/mayaml-mutt/account_creds.rb
|
|
145
142
|
- lib/mayaml-mutt/account_init.rb
|
|
146
143
|
- lib/mayaml-mutt/accounts_alternates.rb
|
|
147
144
|
- lib/mayaml-mutt/configs_generator.rb
|
|
148
145
|
- lib/mayaml-mutt/version.rb
|
|
146
|
+
- lib/templates/account_creds.mustache
|
|
147
|
+
- lib/templates/account_init.mustache
|
|
148
|
+
- lib/templates/accounts_alternates.mustache
|
|
149
149
|
homepage: https://github.com/skopciewski/mayaml-mutt
|
|
150
150
|
licenses:
|
|
151
151
|
- GPL-3.0
|
|
152
152
|
metadata: {}
|
|
153
|
-
post_install_message:
|
|
153
|
+
post_install_message:
|
|
154
154
|
rdoc_options: []
|
|
155
155
|
require_paths:
|
|
156
156
|
- lib
|
|
@@ -165,9 +165,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
165
165
|
- !ruby/object:Gem::Version
|
|
166
166
|
version: '0'
|
|
167
167
|
requirements: []
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
signing_key:
|
|
168
|
+
rubygems_version: 3.3.7
|
|
169
|
+
signing_key:
|
|
171
170
|
specification_version: 4
|
|
172
171
|
summary: Generates mutt configuration from mayaml parser
|
|
173
172
|
test_files: []
|