enmail 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +1 -0
- data/.gitignore +357 -105
- data/.rubocop.yml +1 -1
- data/.travis.yml +6 -0
- data/Gemfile +6 -0
- data/README.adoc +1 -1
- data/Rakefile +10 -4
- data/ci/Mail-2.6.4.gemfile +3 -0
- data/ci/Mail-2.6.gemfile +3 -0
- data/ci/Mail-head.gemfile +3 -0
- data/docs/GPGMEAdapter.adoc +1 -1
- data/enmail.gemspec +5 -1
- data/lib/enmail/adapters/gpgme.rb +3 -3
- data/lib/enmail/helpers/message_manipulation.rb +11 -1
- data/lib/enmail/helpers/rfc1847.rb +1 -1
- data/lib/enmail/version.rb +1 -1
- metadata +22 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65e9a85a2a79570246e2312e8352f1747c4195d61f3ed2867cce79fa54e1fba4
|
4
|
+
data.tar.gz: f44e9728a978d4dfa0daaa9cd877799ddd7e30be43495e9f6ff1cfb559d5768d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6829ea3e29957d2c19c585daec9546fca11df13e529fa3b97dac09beb0a65a5efd72dff9763165851c180e57a2514b080c0ef10fc09e8d3e54f50016dc6a6dff
|
7
|
+
data.tar.gz: d205faff2f0d37f72aace686e658e4cdb559a715cc243e245675816df836dabc8dfb4c071492f1e98043043ac900f8b47ea824552b0f5b0e213f5cfb6b51c870
|
data/.gitattributes
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
.gitignore -text
|
data/.gitignore
CHANGED
@@ -1,65 +1,115 @@
|
|
1
|
-
/Gemfile.lock
|
2
|
-
/.ruby-gemset
|
3
|
-
/.ruby-version
|
4
1
|
/.rspec_status
|
5
|
-
*.gem
|
6
|
-
*.rbc
|
7
|
-
/.config
|
8
|
-
/coverage/
|
9
|
-
/InstalledFiles
|
10
|
-
/pkg/
|
11
|
-
/spec/reports/
|
12
|
-
/spec/examples.txt
|
13
|
-
/test/tmp/
|
14
|
-
/test/version_tmp/
|
15
|
-
/tmp/
|
16
2
|
|
17
|
-
# Used by dotenv library to load environment variables.
|
18
|
-
# .env
|
19
3
|
|
20
|
-
|
21
|
-
.
|
22
|
-
.repl_history
|
23
|
-
build/
|
24
|
-
*.bridgesupport
|
25
|
-
build-iPhoneOS/
|
26
|
-
build-iPhoneSimulator/
|
4
|
+
# Created by https://www.toptal.com/developers/gitignore/api/vim,ruby,linux,emacs,macos,rails,jekyll,textmate,sublimetext,visualstudiocode,windows,webstorm+all
|
5
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=vim,ruby,linux,emacs,macos,rails,jekyll,textmate,sublimetext,visualstudiocode,windows,webstorm+all
|
27
6
|
|
28
|
-
|
29
|
-
#
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
7
|
+
### Emacs ###
|
8
|
+
# -*- mode: gitignore; -*-
|
9
|
+
*~
|
10
|
+
\#*\#
|
11
|
+
/.emacs.desktop
|
12
|
+
/.emacs.desktop.lock
|
13
|
+
*.elc
|
14
|
+
auto-save-list
|
15
|
+
tramp
|
16
|
+
.\#*
|
35
17
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
/doc/
|
40
|
-
/rdoc/
|
18
|
+
# Org-mode
|
19
|
+
.org-id-locations
|
20
|
+
*_archive
|
41
21
|
|
42
|
-
|
43
|
-
|
44
|
-
/vendor/bundle
|
45
|
-
/lib/bundler/man/
|
22
|
+
# flymake-mode
|
23
|
+
*_flymake.*
|
46
24
|
|
47
|
-
#
|
48
|
-
|
49
|
-
|
50
|
-
# .ruby-version
|
51
|
-
# .ruby-gemset
|
25
|
+
# eshell files
|
26
|
+
/eshell/history
|
27
|
+
/eshell/lastdir
|
52
28
|
|
53
|
-
#
|
54
|
-
|
29
|
+
# elpa packages
|
30
|
+
/elpa/
|
31
|
+
|
32
|
+
# reftex files
|
33
|
+
*.rel
|
34
|
+
|
35
|
+
# AUCTeX auto folder
|
36
|
+
/auto/
|
37
|
+
|
38
|
+
# cask packages
|
39
|
+
.cask/
|
40
|
+
dist/
|
41
|
+
|
42
|
+
# Flycheck
|
43
|
+
flycheck_*.el
|
44
|
+
|
45
|
+
# server auth directory
|
46
|
+
/server/
|
47
|
+
|
48
|
+
# projectiles files
|
49
|
+
.projectile
|
50
|
+
|
51
|
+
# directory configuration
|
52
|
+
.dir-locals.el
|
53
|
+
|
54
|
+
# network security
|
55
|
+
/network-security.data
|
56
|
+
|
57
|
+
|
58
|
+
### Jekyll ###
|
59
|
+
_site/
|
60
|
+
.sass-cache/
|
61
|
+
.jekyll-cache/
|
62
|
+
.jekyll-metadata
|
63
|
+
|
64
|
+
### Linux ###
|
65
|
+
|
66
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
67
|
+
.fuse_hidden*
|
68
|
+
|
69
|
+
# KDE directory preferences
|
70
|
+
.directory
|
71
|
+
|
72
|
+
# Linux trash folder which might appear on any partition or disk
|
73
|
+
.Trash-*
|
74
|
+
|
75
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
76
|
+
.nfs*
|
77
|
+
|
78
|
+
### macOS ###
|
79
|
+
# General
|
80
|
+
.DS_Store
|
81
|
+
.AppleDouble
|
82
|
+
.LSOverride
|
83
|
+
|
84
|
+
# Icon must end with two \r
|
85
|
+
Icon
|
55
86
|
|
87
|
+
# Thumbnails
|
88
|
+
._*
|
89
|
+
|
90
|
+
# Files that might appear in the root of a volume
|
91
|
+
.DocumentRevisions-V100
|
92
|
+
.fseventsd
|
93
|
+
.Spotlight-V100
|
94
|
+
.TemporaryItems
|
95
|
+
.Trashes
|
96
|
+
.VolumeIcon.icns
|
97
|
+
.com.apple.timemachine.donotpresent
|
98
|
+
|
99
|
+
# Directories potentially created on remote AFP share
|
100
|
+
.AppleDB
|
101
|
+
.AppleDesktop
|
102
|
+
Network Trash Folder
|
103
|
+
Temporary Items
|
104
|
+
.apdisk
|
105
|
+
|
106
|
+
### Rails ###
|
56
107
|
*.rbc
|
57
108
|
capybara-*.html
|
58
109
|
.rspec
|
59
|
-
/log
|
60
|
-
/tmp
|
61
110
|
/db/*.sqlite3
|
62
111
|
/db/*.sqlite3-journal
|
112
|
+
/db/*.sqlite3-[0-9]*
|
63
113
|
/public/system
|
64
114
|
/coverage/
|
65
115
|
/spec/tmp
|
@@ -67,22 +117,32 @@ capybara-*.html
|
|
67
117
|
rerun.txt
|
68
118
|
pickle-email-*.html
|
69
119
|
|
120
|
+
# Ignore all logfiles and tempfiles.
|
121
|
+
/log/*
|
122
|
+
/tmp/*
|
123
|
+
!/log/.keep
|
124
|
+
!/tmp/.keep
|
125
|
+
|
70
126
|
# TODO Comment out this rule if you are OK with secrets being uploaded to the repo
|
71
127
|
config/initializers/secret_token.rb
|
128
|
+
config/master.key
|
72
129
|
|
73
130
|
# Only include if you have production secrets in this file, which is no longer a Rails default
|
74
131
|
# config/secrets.yml
|
75
132
|
|
76
|
-
# dotenv
|
77
|
-
# TODO Comment out
|
133
|
+
# dotenv, dotenv-rails
|
134
|
+
# TODO Comment out these rules if environment variables can be committed
|
78
135
|
.env
|
136
|
+
.env.*
|
79
137
|
|
80
138
|
## Environment normalization:
|
81
139
|
/.bundle
|
82
140
|
/vendor/bundle
|
83
141
|
|
84
142
|
# these should all be checked in to normalize the environment:
|
85
|
-
|
143
|
+
Gemfile.lock
|
144
|
+
.ruby-version
|
145
|
+
.ruby-gemset
|
86
146
|
|
87
147
|
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
88
148
|
.rvmrc
|
@@ -98,73 +158,265 @@ bower.json
|
|
98
158
|
# Ignore Byebug command history file.
|
99
159
|
.byebug_history
|
100
160
|
|
161
|
+
# Ignore node_modules
|
162
|
+
node_modules/
|
101
163
|
|
102
|
-
#
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
[._]*.s[a-v][a-z]
|
107
|
-
[._]*.sw[a-p]
|
108
|
-
[._]s[a-v][a-z]
|
109
|
-
[._]sw[a-p]
|
110
|
-
# session
|
111
|
-
Session.vim
|
112
|
-
# temporary
|
113
|
-
.netrwhist
|
114
|
-
*~
|
115
|
-
# auto-generated tag files
|
116
|
-
tags
|
117
|
-
|
118
|
-
# End of https://www.gitignore.io/api/vim
|
164
|
+
# Ignore precompiled javascript packs
|
165
|
+
/public/packs
|
166
|
+
/public/packs-test
|
167
|
+
/public/assets
|
119
168
|
|
169
|
+
# Ignore yarn files
|
170
|
+
/yarn-error.log
|
171
|
+
yarn-debug.log*
|
172
|
+
.yarn-integrity
|
120
173
|
|
121
|
-
#
|
174
|
+
# Ignore uploaded files in development
|
175
|
+
/storage/*
|
176
|
+
!/storage/.keep
|
177
|
+
/public/uploads
|
122
178
|
|
123
|
-
###
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
179
|
+
### Ruby ###
|
180
|
+
*.gem
|
181
|
+
/.config
|
182
|
+
/InstalledFiles
|
183
|
+
/pkg/
|
184
|
+
/spec/reports/
|
185
|
+
/spec/examples.txt
|
186
|
+
/test/tmp/
|
187
|
+
/test/version_tmp/
|
188
|
+
/tmp/
|
133
189
|
|
134
|
-
#
|
135
|
-
.
|
136
|
-
*_archive
|
190
|
+
# Used by dotenv library to load environment variables.
|
191
|
+
# .env
|
137
192
|
|
138
|
-
#
|
139
|
-
*_flymake.*
|
193
|
+
# Ignore Byebug command history file.
|
140
194
|
|
141
|
-
|
142
|
-
|
143
|
-
|
195
|
+
## Specific to RubyMotion:
|
196
|
+
.dat*
|
197
|
+
.repl_history
|
198
|
+
build/
|
199
|
+
*.bridgesupport
|
200
|
+
build-iPhoneOS/
|
201
|
+
build-iPhoneSimulator/
|
144
202
|
|
145
|
-
|
146
|
-
|
203
|
+
## Specific to RubyMotion (use of CocoaPods):
|
204
|
+
#
|
205
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
206
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
207
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
208
|
+
# vendor/Pods/
|
147
209
|
|
148
|
-
|
149
|
-
|
210
|
+
## Documentation cache and generated files:
|
211
|
+
/.yardoc/
|
212
|
+
/_yardoc/
|
213
|
+
/doc/
|
214
|
+
/rdoc/
|
150
215
|
|
151
|
-
|
152
|
-
/
|
216
|
+
/.bundle/
|
217
|
+
/lib/bundler/man/
|
153
218
|
|
154
|
-
#
|
155
|
-
|
156
|
-
|
219
|
+
# for a library or gem, you might want to ignore these files since the code is
|
220
|
+
# intended to run in multiple environments; otherwise, check them in:
|
221
|
+
# Gemfile.lock
|
222
|
+
# .ruby-version
|
223
|
+
# .ruby-gemset
|
157
224
|
|
158
|
-
#
|
159
|
-
flycheck_*.el
|
225
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
160
226
|
|
161
|
-
#
|
162
|
-
|
227
|
+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
228
|
+
.rubocop-https?--*
|
229
|
+
|
230
|
+
### SublimeText ###
|
231
|
+
# Cache files for Sublime Text
|
232
|
+
*.tmlanguage.cache
|
233
|
+
*.tmPreferences.cache
|
234
|
+
*.stTheme.cache
|
235
|
+
|
236
|
+
# Workspace files are user-specific
|
237
|
+
*.sublime-workspace
|
238
|
+
|
239
|
+
# Project files should be checked into the repository, unless a significant
|
240
|
+
# proportion of contributors will probably not be using Sublime Text
|
241
|
+
# *.sublime-project
|
242
|
+
|
243
|
+
# SFTP configuration file
|
244
|
+
sftp-config.json
|
245
|
+
sftp-config-alt*.json
|
246
|
+
|
247
|
+
# Package control specific files
|
248
|
+
Package Control.last-run
|
249
|
+
Package Control.ca-list
|
250
|
+
Package Control.ca-bundle
|
251
|
+
Package Control.system-ca-bundle
|
252
|
+
Package Control.cache/
|
253
|
+
Package Control.ca-certs/
|
254
|
+
Package Control.merged-ca-bundle
|
255
|
+
Package Control.user-ca-bundle
|
256
|
+
oscrypto-ca-bundle.crt
|
257
|
+
bh_unicode_properties.cache
|
258
|
+
|
259
|
+
# Sublime-github package stores a github token in this file
|
260
|
+
# https://packagecontrol.io/packages/sublime-github
|
261
|
+
GitHub.sublime-settings
|
262
|
+
|
263
|
+
### TextMate ###
|
264
|
+
*.tmproj
|
265
|
+
*.tmproject
|
266
|
+
tmtags
|
163
267
|
|
164
|
-
|
165
|
-
|
268
|
+
### Vim ###
|
269
|
+
# Swap
|
270
|
+
[._]*.s[a-v][a-z]
|
271
|
+
!*.svg # comment out if you don't need vector files
|
272
|
+
[._]*.sw[a-p]
|
273
|
+
[._]s[a-rt-v][a-z]
|
274
|
+
[._]ss[a-gi-z]
|
275
|
+
[._]sw[a-p]
|
166
276
|
|
167
|
-
#
|
168
|
-
.
|
277
|
+
# Session
|
278
|
+
Session.vim
|
279
|
+
Sessionx.vim
|
169
280
|
|
170
|
-
#
|
281
|
+
# Temporary
|
282
|
+
.netrwhist
|
283
|
+
# Auto-generated tag files
|
284
|
+
tags
|
285
|
+
# Persistent undo
|
286
|
+
[._]*.un~
|
287
|
+
|
288
|
+
### VisualStudioCode ###
|
289
|
+
.vscode/*
|
290
|
+
!.vscode/settings.json
|
291
|
+
!.vscode/tasks.json
|
292
|
+
!.vscode/launch.json
|
293
|
+
!.vscode/extensions.json
|
294
|
+
*.code-workspace
|
295
|
+
|
296
|
+
# Local History for Visual Studio Code
|
297
|
+
.history/
|
298
|
+
|
299
|
+
### VisualStudioCode Patch ###
|
300
|
+
# Ignore all local history of files
|
301
|
+
.history
|
302
|
+
.ionide
|
303
|
+
|
304
|
+
### WebStorm+all ###
|
305
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
306
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
307
|
+
|
308
|
+
# User-specific stuff
|
309
|
+
.idea/**/workspace.xml
|
310
|
+
.idea/**/tasks.xml
|
311
|
+
.idea/**/usage.statistics.xml
|
312
|
+
.idea/**/dictionaries
|
313
|
+
.idea/**/shelf
|
314
|
+
|
315
|
+
# AWS User-specific
|
316
|
+
.idea/**/aws.xml
|
317
|
+
|
318
|
+
# Generated files
|
319
|
+
.idea/**/contentModel.xml
|
320
|
+
|
321
|
+
# Sensitive or high-churn files
|
322
|
+
.idea/**/dataSources/
|
323
|
+
.idea/**/dataSources.ids
|
324
|
+
.idea/**/dataSources.local.xml
|
325
|
+
.idea/**/sqlDataSources.xml
|
326
|
+
.idea/**/dynamic.xml
|
327
|
+
.idea/**/uiDesigner.xml
|
328
|
+
.idea/**/dbnavigator.xml
|
329
|
+
|
330
|
+
# Gradle
|
331
|
+
.idea/**/gradle.xml
|
332
|
+
.idea/**/libraries
|
333
|
+
|
334
|
+
# Gradle and Maven with auto-import
|
335
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
336
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
337
|
+
# auto-import.
|
338
|
+
# .idea/artifacts
|
339
|
+
# .idea/compiler.xml
|
340
|
+
# .idea/jarRepositories.xml
|
341
|
+
# .idea/modules.xml
|
342
|
+
# .idea/*.iml
|
343
|
+
# .idea/modules
|
344
|
+
# *.iml
|
345
|
+
# *.ipr
|
346
|
+
|
347
|
+
# CMake
|
348
|
+
cmake-build-*/
|
349
|
+
|
350
|
+
# Mongo Explorer plugin
|
351
|
+
.idea/**/mongoSettings.xml
|
352
|
+
|
353
|
+
# File-based project format
|
354
|
+
*.iws
|
355
|
+
|
356
|
+
# IntelliJ
|
357
|
+
out/
|
358
|
+
|
359
|
+
# mpeltonen/sbt-idea plugin
|
360
|
+
.idea_modules/
|
361
|
+
|
362
|
+
# JIRA plugin
|
363
|
+
atlassian-ide-plugin.xml
|
364
|
+
|
365
|
+
# Cursive Clojure plugin
|
366
|
+
.idea/replstate.xml
|
367
|
+
|
368
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
369
|
+
com_crashlytics_export_strings.xml
|
370
|
+
crashlytics.properties
|
371
|
+
crashlytics-build.properties
|
372
|
+
fabric.properties
|
373
|
+
|
374
|
+
# Editor-based Rest Client
|
375
|
+
.idea/httpRequests
|
376
|
+
|
377
|
+
# Android studio 3.1+ serialized cache file
|
378
|
+
.idea/caches/build_file_checksums.ser
|
379
|
+
|
380
|
+
### WebStorm+all Patch ###
|
381
|
+
# Ignores the whole .idea folder and all .iml files
|
382
|
+
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
|
383
|
+
|
384
|
+
.idea/
|
385
|
+
|
386
|
+
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
|
387
|
+
|
388
|
+
*.iml
|
389
|
+
modules.xml
|
390
|
+
.idea/misc.xml
|
391
|
+
*.ipr
|
392
|
+
|
393
|
+
# Sonarlint plugin
|
394
|
+
.idea/sonarlint
|
395
|
+
|
396
|
+
### Windows ###
|
397
|
+
# Windows thumbnail cache files
|
398
|
+
Thumbs.db
|
399
|
+
Thumbs.db:encryptable
|
400
|
+
ehthumbs.db
|
401
|
+
ehthumbs_vista.db
|
402
|
+
|
403
|
+
# Dump file
|
404
|
+
*.stackdump
|
405
|
+
|
406
|
+
# Folder config file
|
407
|
+
[Dd]esktop.ini
|
408
|
+
|
409
|
+
# Recycle Bin used on file shares
|
410
|
+
$RECYCLE.BIN/
|
411
|
+
|
412
|
+
# Windows Installer files
|
413
|
+
*.cab
|
414
|
+
*.msi
|
415
|
+
*.msix
|
416
|
+
*.msm
|
417
|
+
*.msp
|
418
|
+
|
419
|
+
# Windows shortcuts
|
420
|
+
*.lnk
|
421
|
+
|
422
|
+
# End of https://www.toptal.com/developers/gitignore/api/vim,ruby,linux,emacs,macos,rails,jekyll,textmate,sublimetext,visualstudiocode,windows,webstorm+all
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -83,6 +83,12 @@ matrix:
|
|
83
83
|
include:
|
84
84
|
- env: TEST_WITHOUT_RNP="1"
|
85
85
|
- env: TEST_WITHOUT_GPGME="1"
|
86
|
+
# Test against older GPG versions
|
87
|
+
- env: GPG_VERSION="2.1" EXPECT_GPG_VERSION="2.1"
|
88
|
+
- gemfile: "ci/Mail-2.6.4.gemfile"
|
89
|
+
- gemfile: "ci/Mail-2.6.gemfile"
|
90
|
+
- gemfile: "ci/Mail-head.gemfile"
|
86
91
|
|
87
92
|
allow_failures:
|
88
93
|
- rvm: ruby-head
|
94
|
+
- gemfile: "ci/Mail-head.gemfile"
|
data/Gemfile
CHANGED
@@ -11,3 +11,9 @@ gem "simplecov", require: false, group: :test
|
|
11
11
|
|
12
12
|
gem "gpgme", install_if: -> { !ENV["TEST_WITHOUT_GPGME"] }
|
13
13
|
gem "rnp", install_if: -> { !ENV["TEST_WITHOUT_RNP"] }
|
14
|
+
|
15
|
+
group :development do
|
16
|
+
gem "rubocop", require: false
|
17
|
+
gem "rubocop-performance", require: false
|
18
|
+
gem "rubocop-rails", require: false
|
19
|
+
end
|
data/README.adoc
CHANGED
@@ -4,7 +4,7 @@ ifdef::env-github[]
|
|
4
4
|
image:https://img.shields.io/gem/v/enmail.svg[
|
5
5
|
Gem Version, link="https://rubygems.org/gems/enmail"]
|
6
6
|
image:https://img.shields.io/travis/riboseinc/enmail/master.svg[
|
7
|
-
Build Status, link="https://travis-ci.
|
7
|
+
Build Status, link="https://travis-ci.com/riboseinc/enmail/branches"]
|
8
8
|
image:https://img.shields.io/codecov/c/github/riboseinc/enmail.svg[
|
9
9
|
Test Coverage, link="https://codecov.io/gh/riboseinc/enmail"]
|
10
10
|
image:https://img.shields.io/codeclimate/maintainability/riboseinc/enmail.svg[
|
data/Rakefile
CHANGED
@@ -60,11 +60,17 @@ namespace :pgp_keys do
|
|
60
60
|
|
61
61
|
desc "Generates keys in tmp/pgp_home"
|
62
62
|
task :generate => :prepare do
|
63
|
+
# NOTE:
|
64
|
+
# - "cert" flag is implicit in "Key-Usage". It is harmless to specify
|
65
|
+
# it in GnuPG 2.2, but it is not recognized in 2.1.
|
66
|
+
# - For keys which are not password-protected, "%no-protection" is required
|
67
|
+
# in GnuPG 2.2, whereas it is ignored (with a warning) in 2.1.
|
68
|
+
|
63
69
|
# Key pairs without password
|
64
70
|
generate_pgp_keys(<<~KEY_PARAMS)
|
65
71
|
%no-protection
|
66
72
|
Key-Type: RSA
|
67
|
-
Key-Usage: sign
|
73
|
+
Key-Usage: sign
|
68
74
|
Key-Length: 2048
|
69
75
|
Subkey-Type: RSA
|
70
76
|
Subkey-Length: 2048
|
@@ -78,7 +84,7 @@ namespace :pgp_keys do
|
|
78
84
|
generate_pgp_keys(<<~KEY_PARAMS)
|
79
85
|
%no-protection
|
80
86
|
Key-Type: RSA
|
81
|
-
Key-Usage: sign
|
87
|
+
Key-Usage: sign
|
82
88
|
Key-Length: 2048
|
83
89
|
Subkey-Type: RSA
|
84
90
|
Subkey-Length: 2048
|
@@ -92,7 +98,7 @@ namespace :pgp_keys do
|
|
92
98
|
generate_pgp_keys(<<~KEY_PARAMS)
|
93
99
|
%no-protection
|
94
100
|
Key-Type: RSA
|
95
|
-
Key-Usage: sign
|
101
|
+
Key-Usage: sign
|
96
102
|
Key-Length: 2048
|
97
103
|
Subkey-Type: RSA
|
98
104
|
Subkey-Length: 2048
|
@@ -106,7 +112,7 @@ namespace :pgp_keys do
|
|
106
112
|
# Password-protected key pairs
|
107
113
|
generate_pgp_keys(<<~KEY_PARAMS)
|
108
114
|
Key-Type: RSA
|
109
|
-
Key-Usage: sign
|
115
|
+
Key-Usage: sign
|
110
116
|
Key-Length: 2048
|
111
117
|
Subkey-Type: RSA
|
112
118
|
Subkey-Length: 2048
|
data/ci/Mail-2.6.gemfile
ADDED
data/docs/GPGMEAdapter.adoc
CHANGED
@@ -7,7 +7,7 @@ https://gnupg.org/software/gpgme/index.html[GnuPG Made Easy] library.
|
|
7
7
|
|
8
8
|
This adapter requries two additional pieces of software to be installed:
|
9
9
|
|
10
|
-
1. GnuPG, version 2.
|
10
|
+
1. GnuPG, version 2.1 or newer
|
11
11
|
2. `https://rubygems.org/gems/gpgme[gpgme]` gem
|
12
12
|
|
13
13
|
== Options
|
data/enmail.gemspec
CHANGED
@@ -32,7 +32,11 @@ Gem::Specification.new do |spec|
|
|
32
32
|
# Mail 2.6.4 has been released on March 23, 2016, hence should be considered
|
33
33
|
# old enough. Nevertheless, pull requests which extend compatibility will be
|
34
34
|
# accepted.
|
35
|
-
|
35
|
+
#
|
36
|
+
# Version 2.7.0 has been blacklisted due to some bug (not sure which one
|
37
|
+
# exactly) in that version, which is fatal for EnMail. That bug has been
|
38
|
+
# fixed in 2.7.1.
|
39
|
+
spec.add_dependency "mail", "~> 2.6", ">= 2.6.4", "!= 2.7.0"
|
36
40
|
|
37
41
|
spec.add_development_dependency "bundler", ">= 1.14", "< 3.0"
|
38
42
|
spec.add_development_dependency "gpgme", *EnMail::DependencyConstraints::GPGME
|
@@ -35,10 +35,10 @@ module EnMail
|
|
35
35
|
ctx.sign(plain, output, mode)
|
36
36
|
hash_algorithm_num = ctx.sign_result.signatures[0].hash_algo
|
37
37
|
hash_algorithm = ::GPGME.hash_algo_name(hash_algorithm_num)
|
38
|
-
rescue ::GPGME::Error::UnusableSecretKey =>
|
38
|
+
rescue ::GPGME::Error::UnusableSecretKey => e
|
39
39
|
# TODO Copy-pasted from GPGME gem. Needs any test coverage.
|
40
|
-
|
41
|
-
raise
|
40
|
+
e.keys = ctx.sign_result.invalid_signers
|
41
|
+
raise e
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
@@ -25,13 +25,23 @@ module EnMail
|
|
25
25
|
part = ::Mail::Part.new
|
26
26
|
part.content_type = message.content_type
|
27
27
|
if message.multipart?
|
28
|
-
message.body.parts.each { |p| part.add_part p
|
28
|
+
message.body.parts.each { |p| part.add_part duplicate_part(p) }
|
29
29
|
else
|
30
30
|
part.body = message.body.decoded
|
31
31
|
end
|
32
32
|
part
|
33
33
|
end
|
34
34
|
|
35
|
+
# Duplicates a message part, preserving its Content-ID if present.
|
36
|
+
#
|
37
|
+
# @param [Mail::Part] part message part
|
38
|
+
# @return [Mail::Part] duplicate of +part+
|
39
|
+
def duplicate_part(part)
|
40
|
+
duplicate = part.dup
|
41
|
+
duplicate.add_content_id(part.content_id) unless part.content_id.nil?
|
42
|
+
duplicate
|
43
|
+
end
|
44
|
+
|
35
45
|
# Detects a list of e-mails which should be used to define a list of
|
36
46
|
# recipients of encrypted message. All is simply taken from the message
|
37
47
|
# +To:+ field.
|
data/lib/enmail/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enmail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mail
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.6'
|
20
|
+
- - ">="
|
18
21
|
- !ruby/object:Gem::Version
|
19
22
|
version: 2.6.4
|
23
|
+
- - "!="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: 2.7.0
|
20
26
|
type: :runtime
|
21
27
|
prerelease: false
|
22
28
|
version_requirements: !ruby/object:Gem::Requirement
|
23
29
|
requirements:
|
24
30
|
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.6'
|
33
|
+
- - ">="
|
25
34
|
- !ruby/object:Gem::Version
|
26
35
|
version: 2.6.4
|
36
|
+
- - "!="
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: 2.7.0
|
27
39
|
- !ruby/object:Gem::Dependency
|
28
40
|
name: bundler
|
29
41
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,6 +166,7 @@ extensions: []
|
|
154
166
|
extra_rdoc_files: []
|
155
167
|
files:
|
156
168
|
- ".editorconfig"
|
169
|
+
- ".gitattributes"
|
157
170
|
- ".gitignore"
|
158
171
|
- ".gitmodules"
|
159
172
|
- ".hound.yml"
|
@@ -169,6 +182,9 @@ files:
|
|
169
182
|
- bin/console
|
170
183
|
- bin/rspec
|
171
184
|
- bin/setup
|
185
|
+
- ci/Mail-2.6.4.gemfile
|
186
|
+
- ci/Mail-2.6.gemfile
|
187
|
+
- ci/Mail-head.gemfile
|
172
188
|
- ci/install_botan.sh
|
173
189
|
- ci/install_json_c.sh
|
174
190
|
- ci/install_rnp.sh
|
@@ -191,7 +207,7 @@ homepage: https://github.com/riboseinc/enmail
|
|
191
207
|
licenses:
|
192
208
|
- MIT
|
193
209
|
metadata: {}
|
194
|
-
post_install_message:
|
210
|
+
post_install_message:
|
195
211
|
rdoc_options: []
|
196
212
|
require_paths:
|
197
213
|
- lib
|
@@ -206,8 +222,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
222
|
- !ruby/object:Gem::Version
|
207
223
|
version: '0'
|
208
224
|
requirements: []
|
209
|
-
rubygems_version: 3.
|
210
|
-
signing_key:
|
225
|
+
rubygems_version: 3.1.4
|
226
|
+
signing_key:
|
211
227
|
specification_version: 4
|
212
228
|
summary: Encrypted Email in Ruby
|
213
229
|
test_files: []
|