gems-status 1.67.0 → 1.68.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.67.0
1
+ 1.68.0
@@ -99,6 +99,8 @@ module GemsStatus
99
99
  if listname.strip == "rubyonrails-security@googlegroups.com" && gem.name == "rails"
100
100
  @security_messages[key_for_emails(listname, gem, email)] = SecurityAlert.new(email.subject)
101
101
  Utils::log_debug "looking for security emails: listname matches gem #{gem.name}: #{listname}"
102
+ elsif email.subject.start_with? "Re:"
103
+ Utils::log_debug "ignoring message that starts with Re:"
102
104
  elsif match_name(email.subject, gem.name)
103
105
  @security_messages[key_for_emails(listname, gem, email)] = SecurityAlert.new(email.subject)
104
106
  Utils::log_debug "looking for security emails: subject matches gem #{gem.name}: #{email.subject}"
@@ -168,6 +168,26 @@ module GemsStatus
168
168
  assert_equal 1, ch.security_messages.length
169
169
  end
170
170
 
171
+ def test_look_in_emails_and_ignore_if_re_in_subject
172
+ mail = MockEmail.new
173
+ def mail.subject
174
+ "Re: ruby blablabla rails"
175
+ end
176
+ ch = NotASecurityAlertChecker.new([])
177
+ ch.emails = {
178
+ "other" => [mail]
179
+ }
180
+ gem = MockGem.new
181
+ def gem.name
182
+ "rails"
183
+ end
184
+ assert_equal Hash, ch.security_messages.class
185
+ assert_equal 0, ch.security_messages.length
186
+ ch.look_in_emails(gem)
187
+ assert_equal Hash, ch.security_messages.class
188
+ assert_equal 0, ch.security_messages.length
189
+ end
190
+
171
191
  def test_look_in_emails_for_gem_name_in_a_word
172
192
  mail = MockEmail.new
173
193
  def mail.subject
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gems-status
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.67.0
4
+ version: 1.68.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -256,7 +256,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
256
256
  version: '0'
257
257
  segments:
258
258
  - 0
259
- hash: -1975466862267572725
259
+ hash: 4221651524110072091
260
260
  required_rubygems_version: !ruby/object:Gem::Requirement
261
261
  none: false
262
262
  requirements:
@@ -265,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
265
265
  version: '0'
266
266
  segments:
267
267
  - 0
268
- hash: -1975466862267572725
268
+ hash: 4221651524110072091
269
269
  requirements: []
270
270
  rubyforge_project:
271
271
  rubygems_version: 1.8.25