tegawa 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 757fdf244446e8d1465b45f2c9d3430e7df82999555de0d923a51680f8b932bf
4
- data.tar.gz: 13b854055017153caa03e691fea340e532bef69df131c0efb2b58360a6617bf7
3
+ metadata.gz: 2acd27c3faffceda5a160bb971fe44f4160e882d029f67cbfaa0ca158b4bc4e5
4
+ data.tar.gz: 29a758687e09313d4fb8fa89e5dbd15c89aa0f2f6007843840e42abf3e7723c9
5
5
  SHA512:
6
- metadata.gz: 69b1c4217a34a35cce8d6083e218d1de9d19578132d0f84d59cd8c3f2ea1309ff1f05074fb47ff2f3a9c7da0020a76ef26483ba57ce1a198658bfd9d16c23b53
7
- data.tar.gz: 9391cdc145099e9fa731e86135d6ac570641fe6b17a2c0887df69d0eca83326268d4d333652a045634c7c23473b15a255b25ecd64c8ac9574032b6a5f61bb6df
6
+ metadata.gz: c51e8ecfcfe057597dd9618de064efb09c3bef23f9d9663af373985cfa2fff00d6d2c983c3b3ddd2b6f321d16217a15548390f3ee6edb90500976ca249034f81
7
+ data.tar.gz: d63a7af3cc5f9e5cbdaf18ee9c692157eee25f330250edd6edb75776996831a3eca124cc446438f1f11c6ab404b3856682c01f0c41edb1c25e1dd86daf27d1c0
@@ -19,7 +19,7 @@ module Tegawa
19
19
 
20
20
  # setup exit code
21
21
  at_exit do
22
- Tegawa.mail_server&.stop
22
+ Tegawa.mail_server.stop if Tegawa.mail_server
23
23
  # puts "#{Time.now}: TeGaWa down!\n"
24
24
  end
25
25
  end
@@ -25,17 +25,17 @@ module Tegawa
25
25
 
26
26
  # opt_parser = OptionParser.new do |opts|
27
27
  opt_parser = OptionParser.new { |opts|
28
- opts.banner = <<~EOF
29
- Usage: tegawa [options]
28
+ opts.banner = <<-EOF
29
+ Usage: tegawa [options]
30
30
 
31
- TeGaWa stands for Telegram GateWay. This tool is supposed to be run
32
- as a daemon and accept local mail as well as watch a directory for
33
- text files. It then forwards these mails and files to a Telegram
34
- channel so you can easily stay informed about what is happening on
35
- your systems.
31
+ TeGaWa stands for Telegram GateWay. This tool is supposed to be run
32
+ as a daemon and accept local mail as well as watch a directory for
33
+ text files. It then forwards these mails and files to a Telegram
34
+ channel so you can easily stay informed about what is happening on
35
+ your systems.
36
36
 
37
- It expects $TEGAWA_TOKEN to contain your telegram bot token and it
38
- needs the channel_id to which it forwards the information.
37
+ It expects $TEGAWA_TOKEN to contain your telegram bot token and it
38
+ needs the channel_id to which it forwards the information.
39
39
 
40
40
  EOF
41
41
 
@@ -11,6 +11,10 @@ module Tegawa
11
11
  @logger = Tegawa.logger
12
12
  end
13
13
 
14
+ def start
15
+ super
16
+ end
17
+
14
18
  def on_message_data_event(ctx)
15
19
  # Output for debug
16
20
  @logger.debug("mail reveived at: [#{ctx[:server][:local_ip]}:#{ctx[:server][:local_port]}] from: [#{ctx[:envelope][:from]}] for recipient(s): [#{ctx[:envelope][:to]}]...")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tegawa
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
@@ -10,6 +10,7 @@ Gem::Specification.new do |spec|
10
10
  # spec.description = %q{TODO: Write a longer description or delete this line.}
11
11
  spec.homepage = "https://github.com/to-str/tegawa"
12
12
  spec.license = "MIT"
13
+ # minimum version required by 'listen' gem
13
14
  spec.required_ruby_version = Gem::Requirement.new(">= 1.9.3")
14
15
 
15
16
  # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
@@ -18,6 +19,14 @@ Gem::Specification.new do |spec|
18
19
  spec.metadata["source_code_uri"] = "https://github.com/to-str/tegawa"
19
20
  spec.metadata["changelog_uri"] = "https://github.com/to-str/tegawa"
20
21
 
22
+ spec.add_runtime_dependency "telegram-bot-ruby", ["~> 0.12.0"]
23
+ spec.add_runtime_dependency "midi-smtp-server", ["~> 2.1.0"]
24
+ spec.add_runtime_dependency "mail", ["~> 2.7"]
25
+ spec.add_runtime_dependency "faraday", ["~> 0.17.3"]
26
+ spec.add_runtime_dependency "ffi", ["~> 1.10.0"]
27
+ spec.add_runtime_dependency "listen", ["~> 3.0.0"]
28
+ spec.add_runtime_dependency "rb-inotify", ["~> 0.9.0"]
29
+
21
30
  # Specify which files should be added to the gem when it is released.
22
31
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
32
  spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tegawa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Otto Strassen
@@ -9,7 +9,105 @@ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
11
  date: 2020-07-13 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: telegram-bot-ruby
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.12.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.12.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: midi-smtp-server
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 2.1.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 2.1.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: mail
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.7'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.7'
55
+ - !ruby/object:Gem::Dependency
56
+ name: faraday
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.17.3
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.17.3
69
+ - !ruby/object:Gem::Dependency
70
+ name: ffi
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 1.10.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 1.10.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: listen
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 3.0.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 3.0.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: rb-inotify
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.9.0
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 0.9.0
13
111
  description:
14
112
  email:
15
113
  - otto@tostr.io