mayaml-getmail 3.0.0 → 4.0.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
  SHA1:
3
- metadata.gz: 0649ee3134718c8b5dd959198e1d612d9d0d9585
4
- data.tar.gz: 55cec5bab3c147efe437da3a6e00fdfc6e9e0f27
3
+ metadata.gz: 8b1dbde341284d3a973b80d337d4a50b1be2cbe9
4
+ data.tar.gz: 056138235e99bf8ad03286dc2fe33264977b7517
5
5
  SHA512:
6
- metadata.gz: 6c3449cdf3b563a41cd1df67f8f4621e2c7436b73471e3ea33636946178ba4b0fecbdc6230632937a644af8f54e2fc2f3207b4297b68f29ee50293d9bdcbb0d7
7
- data.tar.gz: 362ca2269e1b5679240d37db151f6f3034385f44c84810e987771d1727f33d12f409cfba95d221c26cf5819d04389ccb713dd325ad2f66358e96cf1a04844778
6
+ metadata.gz: ccf1b53520c2d4813a228aae2deca601e1e77d84d6a459643f914dee18ba0e905997f3ba9f6475297d5bb62c5c6d0771979b53f7fb82d251e750fa3a55d33f81
7
+ data.tar.gz: a500e10cd9940a3e5c9fae3e20dc451a1d4e45487ba11e33738499ed7db2dd8be8214f982dec131c26b3f43d9132cc1763c2f1b3f36da2999135d48c1c29a405
data/CHANGELOG.md CHANGED
@@ -1,20 +1,27 @@
1
- === 3.0.0 (2016.09.07)
1
+ ### 4.0.0 (2017.04.06)
2
+
3
+ * update to use mayaml v4
4
+ * license update
5
+ * fix travis integration
6
+ * cleanup
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
- === 1.0.3 (2016.08.31)
13
+ ### 1.0.3 (2016.08.31)
7
14
 
8
15
  * update docs
9
16
 
10
- === 1.0.2 (2016.08.31)
17
+ ### 1.0.2 (2016.08.31)
11
18
 
12
19
  * update to use mayaml v2
13
20
 
14
- === 1.0.1 (2016.07.17)
21
+ ### 1.0.1 (2016.07.17)
15
22
 
16
23
  * update getmail tempate config
17
24
 
18
- === 1.0.0 (2016.07.05)
25
+ ### 1.0.0 (2016.07.05)
19
26
 
20
27
  * publication of the code
data/Gemfile CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  source "https://rubygems.org"
2
3
 
3
4
  # Specify your gem's dependencies in mayaml.gemspec
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/mayaml-getmail.svg)](http://badge.fury.io/rb/mayaml-getmail)
4
4
  [![Code Climate](https://codeclimate.com/github/skopciewski/mayaml-getmail/badges/gpa.svg)](https://codeclimate.com/github/skopciewski/mayaml-getmail)
5
+ [![Dependency Status](https://gemnasium.com/badges/github.com/skopciewski/mayaml-getmail.svg)](https://gemnasium.com/github.com/skopciewski/mayaml-getmail)
5
6
 
6
7
  This is the getmail configs generator which gets the accounts settigns from yaml file. See [Mayaml][mayaml_url]
7
8
 
data/bin/mayaml-getmail 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 MayamlGetmail.
6
7
  #
@@ -47,10 +48,9 @@ def check_yaml_path(yaml_path)
47
48
  puts_ussage_message
48
49
  exit 1
49
50
  end
50
- unless File.exist? yaml_path
51
- puts "Could not find file: #{yaml_path}"
52
- exit 1
53
- end
51
+ return if File.exist? yaml_path
52
+ puts "Could not find file: #{yaml_path}"
53
+ exit 1
54
54
  end
55
55
 
56
56
  def main(args)
@@ -1,6 +1,6 @@
1
- # encoding: utf-8
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 MayamlGetmail.
6
6
  #
@@ -1,6 +1,6 @@
1
- # encoding: utf-8
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 MayamlGetmail.
6
6
  #
@@ -21,13 +21,9 @@ require "mustache"
21
21
 
22
22
  module MayamlGetmail
23
23
  class AccountConfig
24
- def initialize
25
- @template = IO.read(File.join(File.dirname(__FILE__), "account_config.mustache"))
26
- end
27
-
28
24
  def render(mail_account, config = {})
29
25
  ::Mustache.render(
30
- @template,
26
+ IO.read(template_file_path),
31
27
  type: type(mail_account),
32
28
  server: mail_account.server,
33
29
  port: mail_account.port,
@@ -42,6 +38,10 @@ module MayamlGetmail
42
38
 
43
39
  private
44
40
 
41
+ def template_file_path
42
+ File.join(Gem.datadir("mayaml-getmail"), "account_config.mustache")
43
+ end
44
+
45
45
  def type(mail_account)
46
46
  types_map = {
47
47
  imap: "SimpleIMAPRetriever",
@@ -1,6 +1,6 @@
1
- # encoding: utf-8
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 MayamlGetmail.
6
6
  #
@@ -1,6 +1,6 @@
1
- # encoding: utf-8
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 MayamlGetmail.
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 MayamlGetmail
21
- VERSION = "3.0.0".freeze
21
+ VERSION = "4.0.0"
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mayaml-getmail
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
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: 2016-09-07 00:00:00.000000000 Z
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: '3'
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: '3'
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
@@ -122,7 +136,6 @@ files:
122
136
  - README.md
123
137
  - bin/mayaml-getmail
124
138
  - lib/mayaml-getmail.rb
125
- - lib/mayaml-getmail/account_config.mustache
126
139
  - lib/mayaml-getmail/account_config.rb
127
140
  - lib/mayaml-getmail/configs_generator.rb
128
141
  - lib/mayaml-getmail/version.rb
@@ -1,21 +0,0 @@
1
- [retriever]
2
- type = {{ type }}
3
- server = {{ server }}
4
- port = {{ port }}
5
- username = {{ user }}
6
- password = {{ pass }}
7
- {{#mailboxes}}
8
- mailboxes = ({{{ . }}})
9
- {{/mailboxes}}
10
-
11
- [destination]
12
- type = MDA_external
13
- path = {{ mda_path }}
14
- unixfrom = True
15
-
16
- [options]
17
- verbose = 1
18
- delivered_to = false
19
- received = false
20
- read_all = {{ read_all }}
21
- delete = {{ delete }}