mayaml-mutt 4.0.3 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a34b4b296bd3553348ed2bee83e21df8c8142d7627e1e6fd511ebe2929fefb7
4
- data.tar.gz: 8cc5d663323768c4a2dc92efc5aa92da2f8d9d3ee4e39f835be9d97af375bfc6
3
+ metadata.gz: 00e874f16961920f4a5072328836a113764a03d991128d3321aff86e2e604cee
4
+ data.tar.gz: 28be3e18d3fdbba48d3fa2b313b2c37812a3170dc00975f364fdb134f2c86c03
5
5
  SHA512:
6
- metadata.gz: 75b18c2a0aa8d460d83004f21e1295f2d55735dc4faadbab16561aeb72da1c9720c26720c80c863b6d9e5821ea08642fef081d4b4ab785998d92ffe90f1f1be3
7
- data.tar.gz: 1102f8c5f9225c6d14fd454bd57322f7bd8bcfceb416f5dd7785d3ec6d8a74f686ecb0ade07ee637f772242cf4868caf033789f26223e89c86efddb4063f683c
6
+ metadata.gz: 7d4af73aec5cf0696d83b6781fa93f317471ae3654602f9987ca04f051e72777436b06b06cf9269aa6174d44a42d59b9a0ecb50b49d6e61df73552fce3952b3c
7
+ data.tar.gz: 471c2dae33dff5fc449fb9599844c6494ad1342c1c2d42b559aa345f96b4cc71bf51c3829ee49d5ce93046d4b5eea9d825743c60d8ab3948b6f09cae5b3687c6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 4.1.0 (2022.06.17)
2
+
3
+ * update aliases format
4
+
1
5
  ### 4.0.3 (2018.12.08)
2
6
 
3
7
  * move templates to the lib
@@ -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
@@ -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.3"
21
+ VERSION = "4.1.0"
22
22
  end
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.3
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: 2018-12-08 00:00:00.000000000 Z
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
- rubyforge_project:
169
- rubygems_version: 2.7.8
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: []