sisimai 4.22.3-java → 4.22.4-java

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sisimai might be problematic. Click here for more details.

Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/Benchmarks.mk +54 -0
  4. data/ChangeLog.md +23 -2
  5. data/Developers.mk +42 -35
  6. data/Makefile +10 -0
  7. data/README-JA.md +13 -13
  8. data/README.md +14 -14
  9. data/lib/sisimai.rb +12 -18
  10. data/lib/sisimai/address.rb +64 -82
  11. data/lib/sisimai/arf.rb +27 -42
  12. data/lib/sisimai/bite/email.rb +2 -4
  13. data/lib/sisimai/bite/email/activehunter.rb +12 -17
  14. data/lib/sisimai/bite/email/amazonses.rb +30 -48
  15. data/lib/sisimai/bite/email/amazonworkmail.rb +20 -27
  16. data/lib/sisimai/bite/email/aol.rb +27 -35
  17. data/lib/sisimai/bite/email/apachejames.rb +17 -28
  18. data/lib/sisimai/bite/email/bigfoot.rb +20 -33
  19. data/lib/sisimai/bite/email/biglobe.rb +15 -24
  20. data/lib/sisimai/bite/email/courier.rb +37 -61
  21. data/lib/sisimai/bite/email/domino.rb +19 -28
  22. data/lib/sisimai/bite/email/einsundeins.rb +20 -34
  23. data/lib/sisimai/bite/email/exchange2003.rb +25 -43
  24. data/lib/sisimai/bite/email/exchange2007.rb +15 -23
  25. data/lib/sisimai/bite/email/exim.rb +101 -120
  26. data/lib/sisimai/bite/email/ezweb.rb +28 -44
  27. data/lib/sisimai/bite/email/facebook.rb +26 -37
  28. data/lib/sisimai/bite/email/fml.rb +11 -20
  29. data/lib/sisimai/bite/email/gmx.rb +17 -27
  30. data/lib/sisimai/bite/email/google.rb +19 -29
  31. data/lib/sisimai/bite/email/gsuite.rb +39 -48
  32. data/lib/sisimai/bite/email/imailserver.rb +25 -39
  33. data/lib/sisimai/bite/email/interscanmss.rb +19 -26
  34. data/lib/sisimai/bite/email/kddi.rb +20 -33
  35. data/lib/sisimai/bite/email/mailfoundry.rb +14 -24
  36. data/lib/sisimai/bite/email/mailmarshalsmtp.rb +15 -24
  37. data/lib/sisimai/bite/email/mailru.rb +40 -59
  38. data/lib/sisimai/bite/email/mcafee.rb +21 -35
  39. data/lib/sisimai/bite/email/messagelabs.rb +23 -38
  40. data/lib/sisimai/bite/email/messagingserver.rb +15 -27
  41. data/lib/sisimai/bite/email/mfilter.rb +19 -28
  42. data/lib/sisimai/bite/email/mxlogic.rb +31 -49
  43. data/lib/sisimai/bite/email/notes.rb +16 -24
  44. data/lib/sisimai/bite/email/office365.rb +29 -38
  45. data/lib/sisimai/bite/email/opensmtpd.rb +50 -67
  46. data/lib/sisimai/bite/email/outlook.rb +24 -36
  47. data/lib/sisimai/bite/email/postfix.rb +33 -42
  48. data/lib/sisimai/bite/email/qmail.rb +44 -59
  49. data/lib/sisimai/bite/email/receivingses.rb +28 -36
  50. data/lib/sisimai/bite/email/sendgrid.rb +28 -37
  51. data/lib/sisimai/bite/email/sendmail.rb +35 -51
  52. data/lib/sisimai/bite/email/surfcontrol.rb +17 -25
  53. data/lib/sisimai/bite/email/userdefined.rb +17 -28
  54. data/lib/sisimai/bite/email/v5sendmail.rb +32 -41
  55. data/lib/sisimai/bite/email/verizon.rb +31 -56
  56. data/lib/sisimai/bite/email/x1.rb +11 -18
  57. data/lib/sisimai/bite/email/x2.rb +11 -23
  58. data/lib/sisimai/bite/email/x3.rb +10 -19
  59. data/lib/sisimai/bite/email/x4.rb +46 -65
  60. data/lib/sisimai/bite/email/x5.rb +26 -37
  61. data/lib/sisimai/bite/email/yahoo.rb +11 -19
  62. data/lib/sisimai/bite/email/yandex.rb +19 -30
  63. data/lib/sisimai/bite/email/zoho.rb +21 -30
  64. data/lib/sisimai/bite/json.rb +1 -2
  65. data/lib/sisimai/bite/json/amazonses.rb +20 -25
  66. data/lib/sisimai/bite/json/sendgrid.rb +1 -1
  67. data/lib/sisimai/data.rb +36 -55
  68. data/lib/sisimai/data/json.rb +3 -3
  69. data/lib/sisimai/data/yaml.rb +1 -1
  70. data/lib/sisimai/datetime.rb +5 -21
  71. data/lib/sisimai/mail.rb +4 -6
  72. data/lib/sisimai/mail/maildir.rb +1 -1
  73. data/lib/sisimai/mda.rb +41 -44
  74. data/lib/sisimai/message.rb +2 -3
  75. data/lib/sisimai/message/email.rb +42 -52
  76. data/lib/sisimai/message/json.rb +7 -7
  77. data/lib/sisimai/mime.rb +25 -23
  78. data/lib/sisimai/order/email.rb +2 -2
  79. data/lib/sisimai/order/json.rb +2 -7
  80. data/lib/sisimai/reason.rb +41 -46
  81. data/lib/sisimai/reason/blocked.rb +60 -71
  82. data/lib/sisimai/reason/contenterror.rb +4 -8
  83. data/lib/sisimai/reason/delivered.rb +1 -3
  84. data/lib/sisimai/reason/exceedlimit.rb +10 -20
  85. data/lib/sisimai/reason/expired.rb +5 -9
  86. data/lib/sisimai/reason/feedback.rb +1 -3
  87. data/lib/sisimai/reason/filtered.rb +19 -38
  88. data/lib/sisimai/reason/hasmoved.rb +5 -8
  89. data/lib/sisimai/reason/hostunknown.rb +11 -18
  90. data/lib/sisimai/reason/mailboxfull.rb +14 -24
  91. data/lib/sisimai/reason/mailererror.rb +3 -5
  92. data/lib/sisimai/reason/mesgtoobig.rb +15 -25
  93. data/lib/sisimai/reason/networkerror.rb +8 -10
  94. data/lib/sisimai/reason/norelaying.rb +9 -14
  95. data/lib/sisimai/reason/notaccept.rb +9 -21
  96. data/lib/sisimai/reason/onhold.rb +3 -8
  97. data/lib/sisimai/reason/policyviolation.rb +8 -10
  98. data/lib/sisimai/reason/rejected.rb +36 -49
  99. data/lib/sisimai/reason/securityerror.rb +11 -13
  100. data/lib/sisimai/reason/spamdetected.rb +23 -37
  101. data/lib/sisimai/reason/suspend.rb +9 -10
  102. data/lib/sisimai/reason/syntaxerror.rb +3 -4
  103. data/lib/sisimai/reason/systemerror.rb +7 -9
  104. data/lib/sisimai/reason/systemfull.rb +2 -4
  105. data/lib/sisimai/reason/toomanyconn.rb +17 -30
  106. data/lib/sisimai/reason/undefined.rb +1 -3
  107. data/lib/sisimai/reason/userunknown.rb +28 -38
  108. data/lib/sisimai/reason/vacation.rb +4 -6
  109. data/lib/sisimai/reason/virusdetected.rb +4 -6
  110. data/lib/sisimai/rfc2606.rb +1 -2
  111. data/lib/sisimai/rfc3464.rb +87 -101
  112. data/lib/sisimai/rfc3834.rb +29 -39
  113. data/lib/sisimai/rfc5322.rb +17 -24
  114. data/lib/sisimai/rhost.rb +10 -7
  115. data/lib/sisimai/rhost/exchangeonline.rb +124 -255
  116. data/lib/sisimai/rhost/franceptt.rb +2 -2
  117. data/lib/sisimai/rhost/godaddy.rb +12 -25
  118. data/lib/sisimai/rhost/googleapps.rb +82 -183
  119. data/lib/sisimai/smtp.rb +4 -4
  120. data/lib/sisimai/smtp/error.rb +8 -8
  121. data/lib/sisimai/smtp/reply.rb +1 -1
  122. data/lib/sisimai/smtp/status.rb +1 -0
  123. data/lib/sisimai/string.rb +5 -7
  124. data/lib/sisimai/version.rb +1 -1
  125. data/set-of-emails/README.md +1 -1
  126. data/set-of-emails/maildir/bsd/README.md +50 -50
  127. data/sisimai-java.gemspec +1 -1
  128. data/sisimai.gemspec +1 -1
  129. metadata +4 -4
  130. data/lib/sisimai/skeleton.rb +0 -43
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa167d561a6db258e6a2c99edee1d8f9486911b4
4
- data.tar.gz: e98e6e71ff82cbd971dc5937ccecfd95dd651a0d
3
+ metadata.gz: 3cab18a983292f9e1afbecc7be1242a3f506db06
4
+ data.tar.gz: f24f870234b6808c419859c1f29a33fee6c71af0
5
5
  SHA512:
6
- metadata.gz: 1734abd35586c113cd6fc3737c98a37767e7eab9827a3b07517bce298c723ab88b5085159a303054f55f815b79c7da7e8d5bfd592311617addf7179b1bfcb14b
7
- data.tar.gz: e6ecc8759f527fa0d3370d6146b1302a3434f09bdfeb2d7fdd98666c9b95770d7120301d518e2508f60a2f519645472fe798c3574fa94a6f49c1af6a6c5dc227
6
+ metadata.gz: 6ba51cdd1949c2314ab3bb79b538e8dcd4f4c932c9bdf181a7474d4d15415b7e0b7ec9fa24909e4bfd9639b73ea85297b97c0513b761c7d550ef906a905afb40
7
+ data.tar.gz: 2698c61eb920736397665fe8228edfb37ed79e34cabb3a00307a8501598aab466956dfd9fa6c9a69ee24ce678e36dad88a65b93dcc56e56a404615f913a9eae9
data/.travis.yml CHANGED
@@ -1,10 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.1.1
4
- - 2.2.2
5
4
  - 2.2.4
6
5
  - 2.3.0
7
6
  - 2.4.0
7
+ - 2.5.0
8
8
  - jruby-9.0.5.0
9
9
  - jruby-9.1.9.0
10
10
  before_install:
data/Benchmarks.mk ADDED
@@ -0,0 +1,54 @@
1
+ # rb-Sisimai/Benchmarks.mk
2
+ # ____ _ _ _
3
+ # | __ ) ___ _ __ ___| |__ _ __ ___ __ _ _ __| | _____ _ __ ___ | | __
4
+ # | _ \ / _ \ '_ \ / __| '_ \| '_ ` _ \ / _` | '__| |/ / __| | '_ ` _ \| |/ /
5
+ # | |_) | __/ | | | (__| | | | | | | | | (_| | | | <\__ \_| | | | | | <
6
+ # |____/ \___|_| |_|\___|_| |_|_| |_| |_|\__,_|_| |_|\_\___(_)_| |_| |_|_|\_\
7
+ # -----------------------------------------------------------------------------
8
+ SHELL := /bin/sh
9
+ HERE := $(shell pwd)
10
+ NAME := Sisimai
11
+ RUBY ?= ruby
12
+ MKDIR := mkdir -p
13
+ LS := ls -1
14
+ CP := cp
15
+
16
+ EMAILROOTDIR := set-of-emails
17
+ PUBLICEMAILS := $(EMAILROOTDIR)/maildir/bsd
18
+ DOSFORMATSET := $(EMAILROOTDIR)/maildir/dos
19
+ MACFORMATSET := $(EMAILROOTDIR)/maildir/mac
20
+ SPEEDTESTDIR := $(PUBLICEMAILS)
21
+
22
+ COMMANDARGVS := -I./lib -rsisimai
23
+ TOBEEXECUTED := 'Sisimai.make($$*.shift, delivered: true)' $(PUBLICMAILS)
24
+ HOWMANYMAILS := $(PERL) $(COMMANDARGVS) -le 'puts Sisimai.make($$*.shift, delivered: true).size'
25
+
26
+ # -----------------------------------------------------------------------------
27
+ .PHONY: clean
28
+
29
+ speed-test:
30
+ @ echo `$(HOWMANYMAILS) $(SPEEDTESTDIR)` emails in $(SPEEDTESTDIR)
31
+ @ echo -------------------------------------------------------------------
32
+ @ uptime
33
+ @ echo -------------------------------------------------------------------
34
+ @ n=1; while [ "$$n" -le "10" ]; do \
35
+ /usr/bin/time $(PERL) $(COMMANDARGVS) -e $(TOBEEXECUTED) $(SPEEDTESTDIR) > /dev/null; \
36
+ sleep 2; \
37
+ n=`expr $$n + 1`; \
38
+ done
39
+
40
+ profile:
41
+ @ uptime
42
+ $(RUBY) -rprofile $(COMMANDARGVS) -e $(TOBEEXECUTED) $(SPEEDTESTDIR) 2> pf > /dev/null
43
+ cat ./pf | sed -e 's/^ *//g' | tr -s ' ' | sed -e 's/self self/self self/' | tr ' ' '\t' > profiling-`date '+%Y-%m-%d-%T'`.txt
44
+ $(RM) ./pf
45
+
46
+ loc:
47
+ @ for v in `find lib -type f -name '*.rb'`; do \
48
+ x=`wc -l $$v | awk '{ print $$1 }'`; \
49
+ z=`grep -E '^\s*#|^$$' $$v | wc -l | awk '{ print $$1 }'`; \
50
+ echo "$$x - $$z" | bc ;\
51
+ done | awk '{ s += $$1 } END { print s }'
52
+
53
+ clean:
54
+ find . -type f -name 'profiling-*' -ctime +1 -delete
data/ChangeLog.md CHANGED
@@ -3,6 +3,27 @@ RELEASE NOTES for Ruby version of Sisimai
3
3
  - releases: "https://github.com/sisimai/rb-Sisimai/releases"
4
4
  - download: "https://rubygems.org/gems/sisimai"
5
5
 
6
+ v4.22.4
7
+ --------------------------------------------------------------------------------
8
+ - release: "Wed, 14 Feb 2018 10:44:00 +0900 (JST)"
9
+ - version: "4.22.4"
10
+ - changes:
11
+ - Import commit sisimai/p5-Sisimai@8c6eb33, Add status code 4.7.25 (RFC-7372)
12
+ as "blocked".
13
+ - The following performance improvements makes 1.49 times faster.
14
+ - It makes rb-Sisimai on JRuby 1.16 times faster.
15
+ - #96 String#+ and sprintf replaced with String#<< at Pull-Request #103.
16
+ - #98 loop do replaced with while(true) at Pull-Request #104.
17
+ - #99 String#=~ and regular expressions /\A...\z/, /\A.../ or /...\z/ have
18
+ been replaced with String#start_with?, String#end_with?, String#include?,
19
+ Array#include?, or String#== at Pull-Request #105, #107, #108.
20
+ - #102 String#sub(/...\z/, '...') has been replaced with String#chomp, or
21
+ String#strip, String#lstrip, String#rstrip at Pull-Request #106.
22
+ - Import Pull-Request sisimai/p5-Sisimai#258, remove /i modifier from each
23
+ regular expressions as possible and call String#downcase before matching.
24
+ - Pull-Request #111, Some Array#each have been replaced with Array#shift in
25
+ while loop.
26
+
6
27
  v4.22.3
7
28
  --------------------------------------------------------------------------------
8
29
  - release: "Tue, 26 Dec 2017 09:22:22 +0900 (JST)"
@@ -182,8 +203,8 @@ v4.19.0 - Callback Feature
182
203
  - changes:
183
204
  - Implement a callback feature at `Sisimai.make()` and `Sisimai.dump()` methods.
184
205
  More imformation about the feature are available at the following pages:
185
- - http://libsisimai.org/en/usage#callback
186
- - http://libsisimai.org/ja/usage#callback
206
+ - https://libsisimai.org/en/usage#callback
207
+ - https://libsisimai.org/ja/usage#callback
187
208
  - Implement `Sisimai.match()` method: issue #52.
188
209
  - Minor bug fix in `Sisimai::MSP::US::AmazonSES.scan()` method.
189
210
 
data/Developers.mk CHANGED
@@ -16,18 +16,25 @@ CP := cp
16
16
  RM := rm -f
17
17
 
18
18
  BH_LATESTVER := 2.7.13p3
19
- MBOXPARSERV0 := /usr/local/bouncehammer/bin/mailboxparser -T
20
- PERL_SISIMAI := p5-Sisimai
19
+ BOUNCEHAMMER := /usr/local/bouncehammer
20
+ MBOXPARSERV0 := $(BOUNCEHAMMER)/bin/mailboxparser -T
21
+ PERL5SISIMAI := p5-Sisimai
21
22
  PRECISIONTAB := ANALYTICAL-PRECISION
22
- BENCHMARKDIR := tmp/benchmark
23
23
  PARSERLOGDIR := var/log
24
24
  MAILCLASSDIR := lib/$(NAME)/Bite/Email
25
25
  JSONCLASSDIR := lib/$(NAME)/Bite/JSON
26
26
  MTARELATIVES := ARF rfc3464 rfc3834
27
- EMAIL_PARSER := sbin/emparser
28
- BENCHMARKEMP := sbin/mp
29
- VELOCITYTEST := tmp/emails-for-velocity-measurement
27
+
28
+ BENCHMARKDIR := tmp/benchmark
30
29
  BENCHMARKSET := tmp/sample
30
+ SPEEDTESTDIR := tmp/emails-for-speed-test
31
+
32
+ PARSERSCRIPT := $(RUBY) sbin/emparser --delivered
33
+ RELEASEVERMP := $(RUBY) -rsisimai
34
+ DEVELOPVERMP := $(RUBY) -I./lib -rsisimai
35
+ HOWMANYMAILS := $(DEVELOPVERMP) -e 'print Sisimai.make($$*.shift, delivered: true).size' $(SPEEDTESTDIR)
36
+
37
+ BENCHMARKEMP := sbin/mp
31
38
 
32
39
  SET_OF_EMAIL := set-of-emails
33
40
  PRIVATEMAILS := $(SET_OF_EMAIL)/private
@@ -37,20 +44,17 @@ MACFORMATSET := $(SET_OF_EMAIL)/maildir/mac
37
44
 
38
45
  INDEX_LENGTH := 24
39
46
  DESCR_LENGTH := 50
40
- BH_CAN_PARSE := courier exim messagingserver postfix sendmail surfcontrol x5 \
41
- ezweb kddi yandex messagelabs amazonses aol bigfoot facebook \
42
- outlook verizon
43
-
47
+ BH_CAN_PARSE := Courier Exim OpenSMTPD Postfix qmail Sendmail EZweb KDDI Facebook Google Verizon
44
48
 
45
49
  # -----------------------------------------------------------------------------
46
50
  .PHONY: clean
47
51
 
48
52
  private-sample:
49
53
  $(RM) -r ./$(PRIVATEMAILS)
50
- $(CP) -vRp ../$(PERL_SISIMAI)/$(PRIVATEMAILS) $(SET_OF_EMAIL)
54
+ $(CP) -vRp ../$(PERL5SISIMAI)/$(PRIVATEMAILS) $(SET_OF_EMAIL)
51
55
 
52
56
  precision-table:
53
- cat ../$(PERL_SISIMAI)/$(PRECISIONTAB) | sed \
57
+ cat ../$(PERL5SISIMAI)/$(PRECISIONTAB) | sed \
54
58
  -e 's/Email::qmail/Email::Qmail/g' \
55
59
  -e 's/Email::mFILTER/Email::MFILTER/g' > $(PRECISIONTAB)
56
60
 
@@ -74,47 +78,50 @@ sample:
74
78
  $(CP) $(PRIVATEMAILS)/$$v/* $(BENCHMARKSET)/$$v/ ;\
75
79
  done
76
80
 
77
- profile: benchmark-mbox
78
- $(RUBY) -rprofile $(EMAIL_PARSER) $(BENCHMARKDIR) > /dev/null
79
-
80
- velocity-measurement:
81
- @ $(MKDIR) $(VELOCITYTEST)
81
+ samples-for-speedtest:
82
+ @ rm -fr ./$(SPEEDTESTDIR)
83
+ @ $(MKDIR) $(SPEEDTESTDIR)
82
84
  @ for v in $(BH_CAN_PARSE); do \
83
- $(CP) $(PUBLICEMAILS)/email-$$v-*.eml $(VELOCITYTEST)/; \
84
- $(CP) $(PRIVATEMAILS)/email-$$v/*.eml $(VELOCITYTEST)/; \
85
+ $(CP) $(PUBLICEMAILS)/email-`echo $$v | tr '[A-Z]' '[a-z]'`-*.eml $(SPEEDTESTDIR)/; \
86
+ test -d $(PRIVATEEMAILS) && $(CP) $(PRIVATEMAILS)/email-`echo $$v | tr '[A-Z]' '[a-z]'`/*.eml $(SPEEDTESTDIR)/; \
85
87
  done
88
+
89
+ velocity-measurement: samples-for-speedtest
86
90
  @ echo -------------------------------------------------------------------
87
- @ echo `$(LS) $(VELOCITYTEST) | wc -l` emails in $(VELOCITYTEST)
88
- @ echo -n 'Calculating the velocity of 1000 mails: multiply by '
89
- @ echo "scale=4; 1000 / `$(LS) $(VELOCITYTEST) | wc -l`" | bc
90
- @ echo -n 'Calculating the velocity of 2000 mails: multiply by '
91
- @ echo "scale=4; 2000 / `$(LS) $(VELOCITYTEST) | wc -l`" | bc
91
+ @ echo `$(HOWMANYMAILS)` emails in $(SPEEDTESTDIR)
92
+ @ echo -n 'Calculating the velocity of parsing 1000 mails: multiply by '
93
+ @ echo "scale=6; 1000 / `$(HOWMANYMAILS)`" | bc
92
94
  @ echo -------------------------------------------------------------------
93
- @ echo 'Sisimai(1)' $(BENCHMARKEMP)
95
+ @ uptime
96
+ @ echo -------------------------------------------------------------------
97
+ @ if [ -x "$(BOUNCEHAMMER)/bin/mailboxparser" ]; then \
98
+ echo bounceHammer $(BH_LATESTVER); \
99
+ n=1; while [ $$n -le 5 ]; do \
100
+ /usr/bin/time $(MBOXPARSERV0) -Fjson $(SPEEDTESTDIR) > /dev/null ;\
101
+ sleep 1; \
102
+ n=`expr $$n + 1`; \
103
+ done; \
104
+ echo -------------------------------------------------------------------; \
105
+ fi
106
+ @ echo 'Sisimai' `$(RELEASEVERMP) -e 'puts Sisimai.version'` $(RELEASEVERMP)
94
107
  @ n=1; while [ $$n -le 5 ]; do \
95
- /usr/bin/time $(BENCHMARKEMP) $(VELOCITYTEST) > /dev/null ;\
108
+ /usr/bin/time $(RELEASEVERMP) -e 'Sisimai.make($$*.shift, deliverd: true)' $(SPEEDTESTDIR) > /dev/null ;\
96
109
  sleep 1; \
97
110
  n=`expr $$n + 1`; \
98
111
  done
99
112
  @ echo -------------------------------------------------------------------
100
- @ echo bounceHammer $(BH_LATESTVER)
113
+ @ echo 'Sisimai' `$(DEVELOPVERMP) -e 'puts Sisimai.version'` $(DEVELOPVERMP)
101
114
  @ n=1; while [ $$n -le 5 ]; do \
102
- /usr/bin/time $(MBOXPARSERV0) -Fjson $(VELOCITYTEST) > /dev/null ;\
115
+ /usr/bin/time $(DEVELOPVERMP) -e 'Sisimai.make($$*.shift, deliverd: true)' $(SPEEDTESTDIR) > /dev/null ;\
103
116
  sleep 1; \
104
117
  n=`expr $$n + 1`; \
105
118
  done
119
+ @ echo -------------------------------------------------------------------
106
120
 
107
121
  benchmark-mbox: sample
108
122
  $(MKDIR) -p $(BENCHMARKDIR)
109
123
  $(CP) `find $(BENCHMARKSET) -type f` $(BENCHMARKDIR)/
110
124
 
111
- loc:
112
- @ for v in `find lib -type f -name '*.rb'`; do \
113
- x=`wc -l $$v | awk '{ print $$1 }'`; \
114
- z=`grep -E '^\s*#|^$$' $$v | wc -l | awk '{ print $$1 }'`; \
115
- echo "$$x - $$z" | bc ;\
116
- done | awk '{ s += $$1 } END { print s }'
117
-
118
125
  clean:
119
126
  $(RM) -r ./$(BENCHMARKSET)
120
127
  $(RM) -r ./$(BENCHMARKDIR)
data/Makefile CHANGED
@@ -20,6 +20,9 @@ DEPENDENCIES = bundle rake rspec
20
20
  .DEFAULT_GOAL = git-status
21
21
  REPOS_TARGETS = git-status git-push git-commit-amend git-tag-list git-diff \
22
22
  git-reset-soft git-rm-cached git-branch
23
+ DEVEL_TARGETS = private-sample
24
+ BENCH_TARGETS = profile speed-test loc
25
+
23
26
 
24
27
  # -----------------------------------------------------------------------------
25
28
  .PHONY: clean
@@ -70,6 +73,12 @@ patrol:
70
73
  $(REPOS_TARGETS):
71
74
  $(MAKE) -f Repository.mk $@
72
75
 
76
+ $(DEVEL_TARGETS):
77
+ $(MAKE) -f Developers.mk $@
78
+
79
+ $(BENCH_TARGETS):
80
+ $(MAKE) -f Benchmarks.mk $@
81
+
73
82
  diff push branch:
74
83
  @$(MAKE) git-$@
75
84
  fix-commit-message: git-commit-amend
@@ -78,4 +87,5 @@ remove-added-file: git-rm-cached
78
87
 
79
88
  clean:
80
89
  $(MAKE) -f Repository.mk clean
90
+ $(MAKE) -f Benchmarks.mk clean
81
91
 
data/README-JA.md CHANGED
@@ -1,4 +1,4 @@
1
- ![](http://libsisimai.org/static/images/logo/sisimai-x01.png)
1
+ ![](https://libsisimai.org/static/images/logo/sisimai-x01.png)
2
2
 
3
3
  [![License](https://img.shields.io/badge/license-BSD%202--Clause-orange.svg)](https://github.com/sisimai/rb-Sisimai/blob/master/LICENSE)
4
4
  [![Coverage Status](https://img.shields.io/coveralls/sisimai/rb-Sisimai.svg)](https://coveralls.io/r/sisimai/rb-Sisimai)
@@ -43,7 +43,7 @@ Sisimai(シシマイ)はRFC5322準拠のエラーメールを解析し、解析
43
43
  [github.com/sisimai/p5-Sisimai](https://github.com/sisimai/p5-Sisimai/)
44
44
  で公開しているPerl版シシマイから移植しました。
45
45
 
46
- ![](http://libsisimai.org/static/images/figure/sisimai-overview-1.png)
46
+ ![](https://libsisimai.org/static/images/figure/sisimai-overview-1.png)
47
47
 
48
48
  Key features
49
49
  -------------------------------------------------------------------------------
@@ -66,7 +66,7 @@ Setting Up Sisimai
66
66
  System requirements
67
67
  -------------------------------------------------------------------------------
68
68
  Sisimaiの動作環境についての詳細は
69
- [Sisimai | シシマイを使ってみる](http://libsisimai.org/ja/start)をご覧ください。
69
+ [Sisimai | シシマイを使ってみる](https://libsisimai.org/ja/start/)をご覧ください。
70
70
 
71
71
 
72
72
  * [Ruby 2.1.0 or later](http://www.ruby-lang.org/)
@@ -203,7 +203,7 @@ puts data[0].catch['x-mailer'] # Apple Mail (2.1283)
203
203
  ```
204
204
 
205
205
  コールバック機能のより詳細な使い方は
206
- [Sisimai | 解析方法 - コールバック機能](http://libsisimai.org/ja/usage/#callback)
206
+ [Sisimai | 解析方法 - コールバック機能](https://libsisimai.org/ja/usage/#callback)
207
207
  をご覧ください。
208
208
 
209
209
 
@@ -216,7 +216,7 @@ $ ruby -rsisimai -e 'puts Sisimai.dump($*.shift)' /path/to/mbox
216
216
 
217
217
  Output example
218
218
  -------------------------------------------------------------------------------
219
- ![](http://libsisimai.org/static/images/demo/sisimai-dump-02.gif)
219
+ ![](https://libsisimai.org/static/images/demo/sisimai-dump-02.gif)
220
220
 
221
221
  ```json
222
222
  [{"recipient": "kijitora@example.jp", "addresser": "shironeko@1jo.example.org", "feedbacktype": "", "action": "failed", "subject": "Nyaaaaan", "smtpcommand": "DATA", "diagnosticcode": "550 Unknown user kijitora@example.jp", "listid": "", "destination": "example.jp", "smtpagent": "Email::Courier", "lhost": "1jo.example.org", "deliverystatus": "5.0.0", "timestamp": 1291954879, "messageid": "201012100421.oBA4LJFU042012@1jo.example.org", "diagnostictype": "SMTP", "timezoneoffset": "+0900", "reason": "filtered", "token": "ce999a4c869e3f5e4d8a77b2e310b23960fb32ab", "alias": "", "senderdomain": "1jo.example.org", "rhost": "mfsmax.example.jp"}, {"diagnostictype": "SMTP", "timezoneoffset": "+0900", "reason": "userunknown", "timestamp": 1381900535, "messageid": "E1C50F1B-1C83-4820-BC36-AC6FBFBE8568@example.org", "token": "9fe754876e9133aae5d20f0fd8dd7f05b4e9d9f0", "alias": "", "senderdomain": "example.org", "rhost": "mx.bouncehammer.jp", "action": "failed", "addresser": "kijitora@example.org", "recipient": "userunknown@bouncehammer.jp", "feedbacktype": "", "smtpcommand": "DATA", "subject": "バウンスメールのテスト(日本語)", "destination": "bouncehammer.jp", "listid": "", "diagnosticcode": "550 5.1.1 <userunknown@bouncehammer.jp>... User Unknown", "deliverystatus": "5.1.1", "lhost": "p0000-ipbfpfx00kyoto.kyoto.example.co.jp", "smtpagent": "Email::Sendmail"}]
@@ -229,17 +229,17 @@ Differences between Ruby version and Perl version
229
229
  -------------------------------------------------------------------------------
230
230
  公開中のPerl版Sisimai(p5-Sisimai)とRuby版Sisimai(rb-Sisimai)は下記のような違いが
231
231
  あります。bounceHammer 2.7.13p3とSisimai(シシマイ)の違いについては
232
- [Sisimai | 違いの一覧](http://libsisimai.org/ja/diff)をご覧ください。
232
+ [Sisimai | 違いの一覧](https://libsisimai.org/ja/diff/)をご覧ください。
233
233
 
234
234
  | 機能 | Ruby version | Perl version |
235
235
  |---------------------------------------------|----------------|---------------|
236
- | 動作環境 | Ruby 2.1 - 2.4 | Perl 5.10 - |
236
+ | 動作環境 | Ruby 2.1 - 2.5 | Perl 5.10 - |
237
237
  | | JRuby 9.0.4.0- | |
238
238
  | 解析精度の割合(2000通のメール)[1] | 1.00 | 1.00 |
239
- | メール解析速度(1000通のメール) | 6.70秒 | 2.10秒 |
239
+ | メール解析速度(1000通のメール) | 5.05秒 | 1.95秒 |
240
240
  | インストール方法 | gem install | cpanm, cpm |
241
241
  | 依存モジュール数(コアモジュールを除く) | 1モジュール | 2モジュール |
242
- | LOC:ソースコードの行数 | 13000行 | 9800行 |
242
+ | LOC:ソースコードの行数 | 12000行 | 8700行 |
243
243
  | テスト件数(spec/,t/,xt/ディレクトリ) | 213000件 | 230000件 |
244
244
  | ライセンス | 二条項BSD | 二条項BSD |
245
245
  | 開発会社によるサポート契約 | 準備中 | 提供中 |
@@ -248,9 +248,9 @@ Differences between Ruby version and Perl version
248
248
 
249
249
  Other spec of Sisimai
250
250
  -------------------------------------------------------------------------------
251
- - [**解析モジュールの一覧**](http://libsisimai.org/ja/engine)
252
- - [**バウンス理由の一覧**](http://libsisimai.org/ja/reason)
253
- - [**Sisimai::Dataのデータ構造**](http://libsisimai.org/ja/data)
251
+ - [**解析モジュールの一覧**](https://libsisimai.org/ja/engine/)
252
+ - [**バウンス理由の一覧**](https://libsisimai.org/ja/reason/)
253
+ - [**Sisimai::Dataのデータ構造**](https://libsisimai.org/ja/data/)
254
254
 
255
255
  Contributing
256
256
  ===============================================================================
@@ -271,7 +271,7 @@ Other Information
271
271
  Related sites
272
272
  -------------------------------------------------------------------------------
273
273
  * __@libsisimai__ | [Sisimai on Twitter (@libsisimai)](https://twitter.com/libsisimai)
274
- * __libSISIMAI.ORG__ | [Sisimai | The successor to bounceHammer, Library to parse bounce mails](http://libsisimai.org/)
274
+ * __libSISIMAI.ORG__ | [Sisimai | The successor to bounceHammer, Library to parse bounce mails](https://libsisimai.org/)
275
275
  * __Sisimai Blog__ | [blog.libsisimai.org](http://blog.libsisimai.org/)
276
276
  * __Facebook Page__ | [facebook.com/libsisimai](https://www.facebook.com/libsisimai/)
277
277
  * __GitHub__ | [github.com/sisimai/rb-Sisimai](https://github.com/sisimai/rb-Sisimai)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![](http://libsisimai.org/static/images/logo/sisimai-x01.png)
1
+ ![](https://libsisimai.org/static/images/logo/sisimai-x01.png)
2
2
 
3
3
  [![License](https://img.shields.io/badge/license-BSD%202--Clause-orange.svg)](https://github.com/sisimai/rb-Sisimai/blob/master/LICENSE)
4
4
  [![Coverage Status](https://img.shields.io/coveralls/sisimai/rb-Sisimai.svg)](https://coveralls.io/r/sisimai/rb-Sisimai)
@@ -42,7 +42,7 @@ Sisimai is a Ruby library for analyzing RFC5322 bounce emails and generating
42
42
  structured data from parsed results. The Ruby version of Sisimai is ported from
43
43
  the Perl version of Sisimai at [github.com/sisimai/p5-Sisimai](https://github.com/sisimai/p5-Sisimai/).
44
44
 
45
- ![](http://libsisimai.org/static/images/figure/sisimai-overview-1.png)
45
+ ![](https://libsisimai.org/static/images/figure/sisimai-overview-1.png)
46
46
 
47
47
  Key Features
48
48
  -------------------------------------------------------------------------------
@@ -63,7 +63,7 @@ Command line demo
63
63
  -------------------------------------------------------------------------------
64
64
  The following screen shows a demonstration of Sisimai at the command line using
65
65
  Ruby(rb-Sisimai) and Perl(p5-Sisimai) version of Sisimai.
66
- ![](http://libsisimai.org/static/images/demo/sisimai-dump-01.gif)
66
+ ![](https://libsisimai.org/static/images/demo/sisimai-dump-01.gif)
67
67
 
68
68
  Setting Up Sisimai
69
69
  ===============================================================================
@@ -71,7 +71,7 @@ Setting Up Sisimai
71
71
  System requirements
72
72
  -------------------------------------------------------------------------------
73
73
  More details about system requirements are available at
74
- [Sisimai | Getting Started](http://libsisimai.org/en/start) page.
74
+ [Sisimai | Getting Started](https://libsisimai.org/en/start/) page.
75
75
 
76
76
 
77
77
  * [Ruby 2.1.0 or later](http://www.ruby-lang.org/)
@@ -207,7 +207,7 @@ puts data[0].catch['x-mailer'] # Apple Mail (2.1283)
207
207
  ```
208
208
 
209
209
  More information about the callback feature is available at
210
- [Sisimai | How To Parse - Callback](http://libsisimai.org/en/usage/#callback)
210
+ [Sisimai | How To Parse - Callback](https://libsisimai.org/en/usage/#callback)
211
211
  Page.
212
212
 
213
213
  One-Liner
@@ -219,7 +219,7 @@ One-Liner
219
219
 
220
220
  Output example
221
221
  -------------------------------------------------------------------------------
222
- ![](http://libsisimai.org/static/images/demo/sisimai-dump-02.gif)
222
+ ![](https://libsisimai.org/static/images/demo/sisimai-dump-02.gif)
223
223
 
224
224
  ```json
225
225
  [{"recipient": "kijitora@example.jp", "addresser": "shironeko@1jo.example.org", "feedbacktype": "", "action": "failed", "subject": "Nyaaaaan", "smtpcommand": "DATA", "diagnosticcode": "550 Unknown user kijitora@example.jp", "listid": "", "destination": "example.jp", "smtpagent": "Email::Courier", "lhost": "1jo.example.org", "deliverystatus": "5.0.0", "timestamp": 1291954879, "messageid": "201012100421.oBA4LJFU042012@1jo.example.org", "diagnostictype": "SMTP", "timezoneoffset": "+0900", "reason": "filtered", "token": "ce999a4c869e3f5e4d8a77b2e310b23960fb32ab", "alias": "", "senderdomain": "1jo.example.org", "rhost": "mfsmax.example.jp"}, {"diagnostictype": "SMTP", "timezoneoffset": "+0900", "reason": "userunknown", "timestamp": 1381900535, "messageid": "E1C50F1B-1C83-4820-BC36-AC6FBFBE8568@example.org", "token": "9fe754876e9133aae5d20f0fd8dd7f05b4e9d9f0", "alias": "", "senderdomain": "example.org", "rhost": "mx.bouncehammer.jp", "action": "failed", "addresser": "kijitora@example.org", "recipient": "userunknown@bouncehammer.jp", "feedbacktype": "", "smtpcommand": "DATA", "subject": "バウンスメールのテスト(日本語)", "destination": "bouncehammer.jp", "listid": "", "diagnosticcode": "550 5.1.1 <userunknown@bouncehammer.jp>... User Unknown", "deliverystatus": "5.1.1", "lhost": "p0000-ipbfpfx00kyoto.kyoto.example.co.jp", "smtpagent": "Email::Sendmail"}]
@@ -233,17 +233,17 @@ Differences between Ruby version and Perl version
233
233
  The following table show the differences between Ruby version of Sisimai
234
234
  and Perl version of Sisimai. Information about differences between Sisimai
235
235
  and bounceHammer are available at
236
- [Sisimai | Differences](http://libsisimai.org/en/diff) page.
236
+ [Sisimai | Differences](https://libsisimai.org/en/diff/) page.
237
237
 
238
238
  | Features | Ruby version | Perl version |
239
239
  |---------------------------------------------|----------------|---------------|
240
- | System requirements | Ruby 2.1 - 2.4 | Perl 5.10 - |
240
+ | System requirements | Ruby 2.1 - 2.5 | Perl 5.10 - |
241
241
  | | JRuby 9.0.4.0- | |
242
242
  | Analytical precision ratio(2000 emails)[1] | 1.00 | 1.00 |
243
- | The speed of parsing email(1000 emails) | 6.70s | 2.10s |
243
+ | The speed of parsing email(1000 emails) | 5.05s | 1.95s |
244
244
  | How to install | gem install | cpanm, cpm |
245
245
  | Dependencies (Except core modules) | 1 module | 2 modules |
246
- | LOC:Source lines of code | 13000 lines | 9800 lines |
246
+ | LOC:Source lines of code | 12000 lines | 8700 lines |
247
247
  | The number of tests(spec/,t/,xt/) directory | 213000 tests | 230000 tests |
248
248
  | License | BSD 2-Clause | BSD 2-Clause |
249
249
  | Support Contract provided by Developer | Coming soon | Available |
@@ -252,9 +252,9 @@ and bounceHammer are available at
252
252
 
253
253
  Other specification of Sisimai
254
254
  -------------------------------------------------------------------------------
255
- - [**Parser Engines**](http://libsisimai.org/en/engine)
256
- - [**Bounce Reason List**](http://libsisimai.org/en/reason)
257
- - [**Data Structure of Sisimai::Data**](http://libsisimai.org/en/data)
255
+ - [**Parser Engines**](https://libsisimai.org/en/engine/)
256
+ - [**Bounce Reason List**](https://libsisimai.org/en/reason/)
257
+ - [**Data Structure of Sisimai::Data**](https://libsisimai.org/en/data/)
258
258
 
259
259
  Contributing
260
260
  ===============================================================================
@@ -277,7 +277,7 @@ Other Information
277
277
  Related Sites
278
278
  -------------------------------------------------------------------------------
279
279
  * __@libsisimai__ | [Sisimai on Twitter (@libsisimai)](https://twitter.com/libsisimai)
280
- * __libSISIMAI.ORG__ | [Sisimai | The successor to bounceHammer, Library to parse bounce mails](http://libsisimai.org/)
280
+ * __libSISIMAI.ORG__ | [Sisimai | The successor to bounceHammer, Library to parse bounce mails](https://libsisimai.org/)
281
281
  * __Sisimai Blog__ | [blog.libsisimai.org](http://blog.libsisimai.org/)
282
282
  * __Facebook Page__ | [facebook.com/libsisimai](https://www.facebook.com/libsisimai/)
283
283
  * __GitHub__ | [github.com/sisimai/rb-Sisimai](https://github.com/sisimai/rb-Sisimai)