mayaml-mutt 4.0.3 → 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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/mayaml-mutt/account_init.rb +4 -4
- data/lib/mayaml-mutt/configs_generator.rb +2 -2
- data/lib/mayaml-mutt/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
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
|
@@ -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
|
|
@@ -37,8 +37,8 @@ module MayamlMutt
|
|
|
37
37
|
File.join(templates_dir, "account_init.mustache")
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
-
def clean_name(string)
|
|
41
|
-
string.gsub(/\W/, "_")
|
|
40
|
+
def clean_name(string, index)
|
|
41
|
+
"#{index}_#{string.gsub(/\W/, "_")}"
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
end
|
|
@@ -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
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
|
|
@@ -150,7 +150,7 @@ 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: []
|