autoreply 0.1.3 → 0.1.4

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: 2528e7e0656038283f9a18ab7a92750948049ef6
4
- data.tar.gz: c1e439369d2ba5a6190024f20fa6e9d24c9c6dbf
3
+ metadata.gz: 47956b1d37432fb647cdbbacbb6dd281fbe1f48b
4
+ data.tar.gz: d2a3923cea5db75c953dc6524fa6214782f64dbb
5
5
  SHA512:
6
- metadata.gz: 02f098274ed4d93adc0c1bd1eed06ac80172eac774d34cf192c9f6a8722ea46028fd43852a4dee33697555b4ff26b4ff21975df336dea4da6a12585e72dc4781
7
- data.tar.gz: 95d558f5cccdc07fadf6fe977c9200f746e5c934f6c7b2b278cd59ad285b250563d828a6d27981e9f0f44ecb27fc253c74fecbab1a69bf5f55bff9bb3107f608
6
+ metadata.gz: 1e022aad2ff2980ae5934b1d0b7f02337f6d1ab3f9182b4aad2db1b01f14c6b8c7c740f679355d1742050dc48b62c2618b642e2bfb7b3500cba3f006cec007c4
7
+ data.tar.gz: 57e658ae6679a8e3b35da154d61a730bdaec15169cf4c743c8a8346cf333dea781175fb90a563d9a74f539968fc5713283038351d26014558e65236e0f49d4cd
data/.travis.yml CHANGED
@@ -2,6 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - 2.1.3
4
4
  - 2.2.2
5
+ - 2.3.3
5
6
  before_install: gem install bundler -v 1.10.5
6
7
  addons:
7
8
  code_climate:
@@ -20,7 +20,7 @@ module Autoreply
20
20
  )
21
21
 
22
22
  def autoreply?
23
- !(KNOWN_HEADERS & detected_headers).blank?
23
+ !(KNOWN_HEADERS & detected_headers).empty?
24
24
  end
25
25
 
26
26
  private
@@ -15,7 +15,7 @@ module Autoreply
15
15
  }
16
16
 
17
17
  def autoreply?
18
- !detected_headers.blank?
18
+ !detected_headers.empty?
19
19
  end
20
20
 
21
21
  private
@@ -27,7 +27,7 @@ module Autoreply
27
27
  ]
28
28
 
29
29
  def autoreply?
30
- !detected_senders.blank?
30
+ !detected_senders.empty?
31
31
  end
32
32
 
33
33
  private
@@ -19,22 +19,18 @@ module Autoreply
19
19
  ]
20
20
 
21
21
  def autoreply?
22
- !detected_subjects.blank?
22
+ !detected_subjects.empty?
23
23
  end
24
24
 
25
25
  private
26
26
 
27
27
  def detected_subjects
28
- return unless mail.subject
28
+ return [] unless mail.subject
29
29
 
30
30
  KNOWN_SUBJECTS.inject([]) do |result, subject|
31
- result << subject if starts_with?(mail.subject, subject)
31
+ result << subject unless mail.subject.match(subject).nil?
32
32
  result
33
33
  end
34
34
  end
35
-
36
- def starts_with?(string, prefix)
37
- string[0, prefix.length] == prefix
38
- end
39
35
  end
40
36
  end
@@ -1,3 +1,3 @@
1
1
  module Autoreply
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoreply
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Kishenin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2015-12-08 00:00:00.000000000 Z
12
+ date: 2017-02-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  requirements: []
118
118
  rubyforge_project:
119
- rubygems_version: 2.2.2
119
+ rubygems_version: 2.6.8
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: Detect if email is autoresponder or "out-of-office" email