mail_daemon 0.0.5 → 0.0.6

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: 48feab4732334f1c8c9286c661a700b603ef6189
4
- data.tar.gz: 410115f6ee8a2e51c3a46907b5639ceb160c8810
3
+ metadata.gz: 07eea8b37008357ec09b03fcab08ba8db2bc5dad
4
+ data.tar.gz: a7abb364c92986f136ed4c569aa5ea90141bfcc9
5
5
  SHA512:
6
- metadata.gz: 6b41e1e61aaca95d8f32e5967b4d2a488dd292f8f211ebb3d33530045121307be75c667026a2a6dab1b1219eb172dfc02efda21a5d482333b7bf06801a9a02ca
7
- data.tar.gz: f3458d0f73b2df26d6a119a89680aabc4cb7f8248769c8b46cf04d4eaa8941b6ef9c2d1ad761b4f56dc5031460ef54dbb6e8aa3af87660c4bf5ad5f7c99a3f5c
6
+ metadata.gz: 1fdfc46450253881a3fde6909152010e8b20addf9a5c2deb990145b56c0ce17f1ba7d366e6d75bd201c7f0db97d8c8addf74c684f3ca41b72c3f396627313be6
7
+ data.tar.gz: aaa872a1304075ab305e649ae35baa29506f889a87676e9eafd270be2c185413356784320ad2e3305f38c053894ff320fcc4e8f5123d3d45d57652530845829d
data/Gemfile CHANGED
@@ -2,5 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in mail_daemon.gemspec
4
4
  gemspec
5
-
6
- gem "mail_room", :path => "/Users/stewartmckee/code/mail_room"
data/lib/mail_daemon.rb CHANGED
@@ -30,8 +30,9 @@ module MailDaemon
30
30
 
31
31
  def restart
32
32
  self.stop if self.running?
33
- self.reload unless @mailbox_config
34
- self.start
33
+ Thread.new do
34
+ self.start(&@client_handler_block)
35
+ end
35
36
  end
36
37
 
37
38
  def running?
@@ -44,9 +45,16 @@ module MailDaemon
44
45
  @threads.map{|t| t.kill }
45
46
  end
46
47
 
48
+ def reload(options)
49
+ reload_options(options)
50
+ self.restart
51
+ end
52
+
47
53
  def start(&block)
48
54
  @watchers = []
49
55
 
56
+ @client_handler_block = block
57
+
50
58
  @options[:connections].each do |mailbox|
51
59
  mailbox[:ssl_options] = {:verify_mode => OpenSSL::SSL::VERIFY_NONE} if mailbox[:ssl]
52
60
 
@@ -3,6 +3,9 @@ module MailDaemon
3
3
  def setup_options(options)
4
4
  @options = options.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
5
5
  end
6
+ def reload_options(options)
7
+ @options.merge!(options)
8
+ end
6
9
  def default_option(name, value)
7
10
  @options[name.to_s.to_sym] = value unless @options.has_key?(name.to_s.to_sym)
8
11
  end
@@ -1,3 +1,3 @@
1
1
  module MailDaemon
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/mail_daemon.gemspec CHANGED
@@ -22,14 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "rake"
23
23
  spec.add_development_dependency "awesome_print"
24
24
 
25
- spec.add_dependency 'mysql2'
26
- spec.add_dependency 'sidekiq'
27
- spec.add_dependency 'mail'
28
- # spec.add_dependency 'mail_room'
29
- spec.add_dependency 'charlock_holmes' # required for sidekiq delivery
30
- spec.add_dependency 'nokogiri'
31
- spec.add_dependency 'sinatra'
32
- spec.add_dependency 'sanitize'
25
+ # spec.add_dependency 'mail'
33
26
 
34
27
 
35
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail_daemon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - EmergeAdapt
@@ -52,104 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: mysql2
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: sidekiq
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: mail
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: charlock_holmes
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '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'
111
- - !ruby/object:Gem::Dependency
112
- name: nokogiri
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :runtime
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: sinatra
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :runtime
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: sanitize
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :runtime
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
55
  description: "."
154
56
  email:
155
57
  - development@emergeadapt.com