gitlab-mail-receiver 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -0
- data/lib/mail-receiver/body_parser.rb +2 -3
- data/lib/mail-receiver/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1598efc387f3f2baee9a458f08d61a3be4fad7f5
|
4
|
+
data.tar.gz: 96511d8191638b07aa0bc2b1b1c57056aa69ac19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a376a049021dfb61f56bfcc111970efd08452348375e16d56b2833be5bd96f9f6dc510e30e8c40694c0f209aa4f7ea8431dac6a68fa3f4adf2ad5fca39995ea
|
7
|
+
data.tar.gz: 1f989e4a1cbe8dd1022dae7adb43042382afed1d3f48eeb7f01ad22d75bae831000177c0748b9a03ea86f658130b2b45cca3ee389a60767e154433e5d9f735ab
|
data/README.md
CHANGED
@@ -94,4 +94,21 @@ Stop daemon
|
|
94
94
|
$ bundle exec gitlab-mail-receiver stop
|
95
95
|
Stoping gitlab-mail-receiver... [OK]
|
96
96
|
```
|
97
|
+
|
98
|
+
|
99
|
+
### Daemon Signals
|
100
|
+
|
101
|
+
gitlab-mail-receiver has support the [Unix process signal](https://en.wikipedia.org/wiki/Unix_signal) to manage the daemon.
|
102
|
+
|
103
|
+
You can use the `kill` command to send the signal to the master process.
|
104
|
+
|
105
|
+
- USR2 - Hot reload processes.
|
106
|
+
- QUIT - Stop processes.
|
107
|
+
|
97
108
|
```
|
109
|
+
$ ps aux | grep gitlab-mail-receiver
|
110
|
+
git 15488 0.2 0.2 612612 242920 pts/3 Sl 14:24 0:16 gitlab-mail-receiver [worker]
|
111
|
+
git 16320 0.0 0.0 309100 43004 pts/3 Sl 11:54 0:00 gitlab-mail-receiver [master]
|
112
|
+
$ kill -USR2 15488
|
113
|
+
```
|
114
|
+
|
@@ -1,15 +1,14 @@
|
|
1
1
|
# Mail body context parser
|
2
2
|
module MailReceiver
|
3
3
|
module BodyParser
|
4
|
-
# might need: mail.body.split(‘—-Original Message-—‘)[0].reverse.split(‘nO’)[-1].reverse for Outlook
|
5
4
|
def extract
|
6
5
|
self.decoded_part.
|
7
6
|
# Most providers start it off with that "On" date line.
|
8
7
|
reverse.split(' nO')[-1].reverse.
|
9
8
|
# Fancy sigs and sigs need to be discarded
|
10
|
-
|
9
|
+
chomp.
|
11
10
|
# Strip leading and trailing whitespace
|
12
|
-
strip
|
11
|
+
strip.force_encoding('utf-8')
|
13
12
|
end
|
14
13
|
|
15
14
|
def decoded_part
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-mail-receiver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mailman
|