mail-gpg 0.2.2 → 0.2.3

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: 4dcf09f797ab779eb55e25010d36f0755f1e9faa
4
- data.tar.gz: 9fc53e722aceea7fa514a08cd2978679106d44e3
3
+ metadata.gz: 0f2bdd9267f91e61670a13871264ff5147b4a94d
4
+ data.tar.gz: 21e4caa89623e7ae09a0e56dfe529d86d6733104
5
5
  SHA512:
6
- metadata.gz: 836562359cfe50d35a2e7950cdb32fbdbdca566bab08539dbd579b1acaa917d38ce60e5ed2c83820519b92e160a1327aa631143a571231573d417630046bfac9
7
- data.tar.gz: a80337dde9e52d9a0e00e352f7e664ab3450aa48d5da3a0d2a25945bc9b7770b2a5d282eef1bd491d83b330138f0431c378cf315e43dd90bcc2e9b8011cfd5bd
6
+ metadata.gz: c36bc5f37255e7eb1af591b72c056b6a47fc69df10a554344d2cc22c47cf794888fa7f2d7d00e9e86795953f279bbf0e2c220ff80b650f46a99807f4dd021d7e
7
+ data.tar.gz: 0d69b3db9aebe8ef48f542d061d044a1bc9300ad72319ddfd5b0f6610ee246cb3e3d26ea7a624faccb4ac41e1768878f5b3fd0f3bb2817854695fd9089254fa4
@@ -1,3 +1,7 @@
1
+ == 0.2.3 2015-02-18
2
+
3
+ * inline pgp detection now ignores signature.asc attachments
4
+
1
5
  == 0.2.2 2014-09-03
2
6
 
3
7
  * add option to import missing keys for signature verification
data/README.md CHANGED
@@ -191,6 +191,7 @@ Mail::Message#gpg method.
191
191
  Test cases use a mock gpghome located in `test/gpghome` in order to not mess
192
192
  around with your personal gpg keychain.
193
193
 
194
+ Password for the test PGP private keys is `abc`
194
195
 
195
196
  ## Todo
196
197
 
data/Rakefile CHANGED
@@ -39,9 +39,17 @@ END
39
39
  end
40
40
  end
41
41
 
42
- task :default => [:test]
42
+ task :default => ["mail_gpg:tests:setup", :test]
43
+
44
+ namespace :mail_gpg do
45
+ namespace :tests do
46
+ task :setup do
47
+ setup_gpghome
48
+ end
49
+ end
50
+ end
51
+
43
52
  Rake::TestTask.new(:test) do |test|
44
- setup_gpghome
45
53
  test.libs << 'test'
46
54
  test.test_files = FileList['test/**/*_test.rb']
47
55
  test.verbose = true
@@ -213,7 +213,10 @@ module Mail
213
213
  return true if part.body.include?('-----BEGIN PGP MESSAGE-----')
214
214
  return true if part.has_content_type? &&
215
215
  /application\/(?:octet-stream|pgp-encrypted)/ =~ part.mime_type &&
216
- /.*\.(?:pgp|gpg|asc)$/ =~ part.content_type_parameters[:name]
216
+ /.*\.(?:pgp|gpg|asc)$/ =~ part.content_type_parameters[:name] &&
217
+ 'signature.asc' != part.content_type_parameters[:name]
218
+ # that last condition above prevents false positives in case e.g.
219
+ # someone forwards a mime signed mail including signature.
217
220
  end
218
221
  end
219
222
  false
@@ -28,8 +28,9 @@ module Mail
28
28
  # mail.gpg encrypt: true, sign: true
29
29
  # mail.gpg encrypt: true, sign_as: "other_address@host.com"
30
30
  #
31
- # future versions will also support sign-only mode:
32
- # mail.gpg sign_as: 'jane@doe.com', encrypt: false
31
+ # sign-only mode is also supported:
32
+ # mail.gpg sign: true
33
+ # mail.gpg sign_as: 'jane@doe.com'
33
34
  #
34
35
  # To turn off gpg encryption use:
35
36
  # mail.gpg false
@@ -44,13 +45,11 @@ module Mail
44
45
  self.delivery_handler = nil
45
46
  end
46
47
  nil
47
- end
48
- if options
48
+ else
49
49
  self.raise_encryption_errors = true if raise_encryption_errors.nil?
50
50
  @gpg = options
51
51
  self.delivery_handler ||= Mail::Gpg::DeliveryHandler
52
- else
53
- @gpg
52
+ nil
54
53
  end
55
54
  end
56
55
 
@@ -1,5 +1,5 @@
1
1
  module Mail
2
2
  module Gpg
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,137 +1,137 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail-gpg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Kraemer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-03 00:00:00.000000000 Z
11
+ date: 2015-02-18 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
18
  - !ruby/object:Gem::Version
19
19
  version: '2.5'
20
- - - '>='
20
+ - - ">="
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.5.3
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ~>
27
+ - - "~>"
28
28
  - !ruby/object:Gem::Version
29
29
  version: '2.5'
30
- - - '>='
30
+ - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.5.3
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: gpgme
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ~>
37
+ - - "~>"
38
38
  - !ruby/object:Gem::Version
39
39
  version: '2.0'
40
- - - '>='
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: 2.0.2
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - ~>
47
+ - - "~>"
48
48
  - !ruby/object:Gem::Version
49
49
  version: '2.0'
50
- - - '>='
50
+ - - ">="
51
51
  - !ruby/object:Gem::Version
52
52
  version: 2.0.2
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: bundler
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - ~>
57
+ - - "~>"
58
58
  - !ruby/object:Gem::Version
59
59
  version: '1.3'
60
60
  type: :development
61
61
  prerelease: false
62
62
  version_requirements: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - ~>
64
+ - - "~>"
65
65
  - !ruby/object:Gem::Version
66
66
  version: '1.3'
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: minitest
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - ~>
71
+ - - "~>"
72
72
  - !ruby/object:Gem::Version
73
73
  version: '4.0'
74
74
  type: :development
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - ~>
78
+ - - "~>"
79
79
  - !ruby/object:Gem::Version
80
80
  version: '4.0'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: rake
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - '>='
85
+ - - ">="
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
- - - '>='
92
+ - - ">="
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: actionmailer
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - '>='
99
+ - - ">="
100
100
  - !ruby/object:Gem::Version
101
101
  version: 3.2.0
102
102
  type: :development
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
- - - '>='
106
+ - - ">="
107
107
  - !ruby/object:Gem::Version
108
108
  version: 3.2.0
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: pry-nav
111
111
  requirement: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - '>='
113
+ - - ">="
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  type: :development
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
- - - '>='
120
+ - - ">="
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  - !ruby/object:Gem::Dependency
124
124
  name: shoulda-context
125
125
  requirement: !ruby/object:Gem::Requirement
126
126
  requirements:
127
- - - ~>
127
+ - - "~>"
128
128
  - !ruby/object:Gem::Version
129
129
  version: '1.1'
130
130
  type: :development
131
131
  prerelease: false
132
132
  version_requirements: !ruby/object:Gem::Requirement
133
133
  requirements:
134
- - - ~>
134
+ - - "~>"
135
135
  - !ruby/object:Gem::Version
136
136
  version: '1.1'
137
137
  description: |-
@@ -143,8 +143,8 @@ executables: []
143
143
  extensions: []
144
144
  extra_rdoc_files: []
145
145
  files:
146
- - .gitignore
147
- - .travis.yml
146
+ - ".gitignore"
147
+ - ".travis.yml"
148
148
  - Gemfile
149
149
  - History.txt
150
150
  - LICENSE.txt
@@ -198,12 +198,12 @@ require_paths:
198
198
  - lib
199
199
  required_ruby_version: !ruby/object:Gem::Requirement
200
200
  requirements:
201
- - - '>='
201
+ - - ">="
202
202
  - !ruby/object:Gem::Version
203
203
  version: '0'
204
204
  required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - '>='
206
+ - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  requirements: []