imap_guard 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d95cc42f451c9e8d2230c9ed670c5b5cb5f42d20
4
+ data.tar.gz: 22a08ac744d604430aa795cf156f8b0ea899a9fc
5
+ SHA512:
6
+ metadata.gz: 9a7fe8edceec8be75626f91f69b8228bd1e2f4205d4fe52f742cf5bea0b828f79851e3ce9b843c1941eaefe63092541204c61f8c225bcbdcf54dfc3e7d29c1b7
7
+ data.tar.gz: 47a6ba91f840a30ad8164a84593f3fdbd91fdf5c46bd798a74f1af8926152b66e0c2af02ddfcebfc3f2166fe04dd6f843fe04cf6213266daba6822f4e79e7fc2
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 1.9.3
1
+ 2.1.0
data/.travis.yml CHANGED
@@ -5,12 +5,13 @@ after_script:
5
5
  rvm:
6
6
  - 1.9.3
7
7
  - 2.0.0
8
+ - 2.1.0
8
9
  - ruby-head
9
- - rbx-19mode
10
+ - rbx
10
11
  matrix:
11
12
  allow_failures:
12
13
  - rvm: ruby-head
13
- - rvm: rbx-19mode
14
+ - rvm: rbx
14
15
  notifications:
15
16
  email:
16
17
  on_success: always
data/README.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # ImapGuard [![Build Status](https://secure.travis-ci.org/infertux/imap_guard.png?branch=master)](https://travis-ci.org/infertux/imap_guard) [![Dependency Status](https://gemnasium.com/infertux/imap_guard.png)](https://gemnasium.com/infertux/imap_guard) [![Code Climate](https://codeclimate.com/github/infertux/imap_guard.png)](https://codeclimate.com/github/infertux/imap_guard)
2
2
 
3
- A guard for your IMAP mailboxes.
3
+ **A guard for your IMAP mailboxes.**
4
+
5
+ * [Source Code](https://github.com/infertux/imap_guard "Source Code on Github")
6
+ * [Bug Tracker](https://github.com/infertux/imap_guard/issues "Bug Tracker on Github")
7
+ * [API documentation](http://rubydoc.info/gems/imap_guard/frames "API Documentation on Rubydoc")
8
+ * [Rubygem](https://rubygems.org/gems/imap_guard "ImapGuard on Rubygems")
9
+ * [Continuous Integration](https://travis-ci.org/infertux/imap_guard "ImapGuard on Travis-CI")
10
+ * [Dependencies](https://gemnasium.com/infertux/imap_guard "ImapGuard dependencies on Gemnasium")
4
11
 
5
12
  ImapGuard connects to your IMAP server and processes your emails.
6
13
  You can finely pick them thanks to advanced search queries and Ruby blocks.
@@ -16,6 +23,9 @@ It can be used by a disposable script to clean things up or with a cron job to k
16
23
 
17
24
  ## Usage
18
25
 
26
+ Read below for detailed explanations.
27
+ If you prefer a quick overview, you can take a look at [this example](https://github.com/infertux/imap_guard/blob/master/examples/example.rb).
28
+
19
29
  Example initialization:
20
30
 
21
31
  ```ruby
@@ -29,16 +39,16 @@ SETTINGS = {
29
39
  read_only: true # don't perform any modification aka dry-run mode
30
40
  }
31
41
 
32
- guard = IMAPGuard::Guard.new SETTINGS
42
+ guard = ImapGuard::Guard.new SETTINGS
33
43
  guard.login # authenticate the user
34
44
  guard.select 'INBOX.ops' # select the mailbox
35
45
  ```
36
46
 
37
47
  IMAP search query syntax can be a bit tricky.
38
- `IMAPGuard::Query` can help you to build queries with a simple Ruby DSL:
48
+ `ImapGuard::Query` can help you to build queries with a simple Ruby DSL:
39
49
 
40
50
  ```ruby
41
- base_query = IMAPGuard::Query.new.unflagged.unanswered.seen.freeze
51
+ base_query = ImapGuard::Query.new.unflagged.unanswered.seen.freeze
42
52
  query = base_query.dup.before(7).subject("abc").from("root")
43
53
  p query #=> ["UNFLAGGED", "UNANSWERED", "SEEN", "BEFORE", "13-Mar-2013", "SUBJECT", "abc", "FROM", "root"]
44
54
  guard.delete query # will delete every emails which match this query
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'imap_guard'
4
+
5
+ SETTINGS = {
6
+ host: 'imap.googlemail.com',
7
+ port: 993,
8
+ username: 'you@gmail.com',
9
+ password: 'your_pass',
10
+ }
11
+
12
+ settings = SETTINGS.merge({ read_only: false })
13
+ base_query = ImapGuard::Query.new.unflagged.unanswered.freeze
14
+ guard = ImapGuard::Guard.new settings
15
+ # guard.debug = ->(mail) { print "#{mail.subject}: " }
16
+ guard.login
17
+
18
+ guard.select 'INBOX'
19
+
20
+ # Github
21
+ %w(github.com notifications@travis-ci.org app@gemnasium.com).map do |from|
22
+ base_query.dup.from(from)
23
+ end.each do |query|
24
+ guard.move query, 'INBOX.Github'
25
+ end
26
+
27
+ # To Do
28
+ guard.move base_query.dup.from("me").to("me"), 'INBOX.TODO'
29
+
30
+ # Ops
31
+ guard.select 'INBOX.Ops'
32
+ query = base_query.dup.seen
33
+ guard.delete query.dup.subject("monit alert -- ").before(7)
34
+ guard.delete query.dup.subject("CRON-APT completed on ").before(3)
35
+ guard.delete query.dup.subject("Logwatch for ").before(7)
36
+ guard.select 'INBOX'
37
+
38
+ # Uni
39
+ guard.move base_query.dup.or.from("uni.tld").to("uni.tld"), 'INBOX.Uni'
40
+
41
+ # Bye!
42
+ guard.disconnect
43
+
data/imap_guard.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency 'mail', '~> 2.5.3'
22
- spec.add_dependency 'colored', '~> 1.2'
22
+ spec.add_dependency 'term-ansicolor', '~> 1.2.2'
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 1.3'
25
25
  spec.add_development_dependency 'rake'
@@ -29,4 +29,5 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency 'rb-inotify'
30
30
  spec.add_development_dependency 'cane'
31
31
  spec.add_development_dependency 'yard'
32
+ spec.add_development_dependency 'redcarpet' # for yardoc
32
33
  end
@@ -1,18 +1,27 @@
1
1
  require 'net/imap'
2
2
  require 'ostruct'
3
3
  require 'mail'
4
- require 'colored'
4
+ require 'term/ansicolor'
5
+ String.send(:include, Term::ANSIColor)
6
+ Term::ANSIColor::coloring = STDOUT.isatty
5
7
 
6
- module IMAPGuard
8
+ module ImapGuard
7
9
  # Guard allows you to process your mailboxes.
8
10
  class Guard
9
- # [Proc] Matched emails are passed to this debug lambda if present
11
+ # List of required settings
12
+ REQUIRED_SETTINGS = [:host, :port, :username, :password]
13
+
14
+ # List of optional settings
15
+ OPTIONAL_SETTINGS = [:read_only, :verbose]
16
+
17
+ # @return [Proc, nil] Matched emails are passed to this debug lambda if present
10
18
  attr_accessor :debug
11
19
 
12
- # @return [OpenStruct] IMAPGuard settings
20
+ # @note The settings are frozen
21
+ # @return [OpenStruct] ImapGuard settings
13
22
  attr_reader :settings
14
23
 
15
- # @return [String] Currently selected mailbox
24
+ # @return [String, nil] Currently selected mailbox
16
25
  attr_reader :mailbox
17
26
 
18
27
  def initialize settings
@@ -29,7 +38,6 @@ module IMAPGuard
29
38
  end
30
39
 
31
40
  # Selects a mailbox (folder)
32
- # @see {settings.read_only}
33
41
  # @return [void]
34
42
  def select mailbox
35
43
  if @settings.read_only
@@ -72,7 +80,7 @@ module IMAPGuard
72
80
  process query, operation, &filter
73
81
  end
74
82
 
75
- # @return [Array] Sorted list of all mailboxes
83
+ # @return [Array<String>] Sorted list of all mailboxes
76
84
  def list
77
85
  @imap.list("", "*").map(&:name).sort
78
86
  end
@@ -138,7 +146,7 @@ module IMAPGuard
138
146
 
139
147
  def search query
140
148
  unless [Array, String].any? { |type| query.is_a? type }
141
- raise TypeError, "query must be either a string holding the entire search string, or a single-dimension array of search keywords and arguments"
149
+ raise TypeError, "Query must be either a string holding the entire search string, or a single-dimension array of search keywords and arguments."
142
150
  end
143
151
 
144
152
  messages = @imap.search query
@@ -161,16 +169,14 @@ module IMAPGuard
161
169
  end
162
170
 
163
171
  def settings= settings
164
- required = %w(host port username password).map!(&:to_sym)
165
- missing = required - settings.keys
172
+ missing = REQUIRED_SETTINGS - settings.keys
166
173
  raise ArgumentError, "Missing settings: #{missing}" unless missing.empty?
167
174
 
168
- optional = %w(read_only verbose).map!(&:to_sym)
169
- unknown = settings.keys - required - optional
175
+ unknown = settings.keys - REQUIRED_SETTINGS - OPTIONAL_SETTINGS
170
176
  raise ArgumentError, "Unknown settings: #{unknown}" unless unknown.empty?
171
177
 
172
178
  @settings = OpenStruct.new(settings).freeze
173
- puts "DRY-RUN MODE ENABLED".yellow.bold.reversed if @settings.read_only
179
+ puts "DRY-RUN MODE ENABLED".yellow.bold.negative if @settings.read_only
174
180
  end
175
181
  end
176
182
  end
@@ -1,49 +1,82 @@
1
- module IMAPGuard
1
+ module ImapGuard
2
2
  # Query is a neat DSL to help you generate IMAP search queries.
3
+ # @note All methods return self so they can be chained.
3
4
  class Query < Array
4
- # Messages that have the \Seen flag set.
5
- # @return [Query] self
5
+ # Messages that have the +\Seen+ flag set.
6
+ # @return [self]
6
7
  def seen
7
8
  self << 'SEEN'
8
9
  end
9
10
 
10
- # Messages that do not have the \Answered flag set.
11
- # @return [Query] self
11
+ # Messages that do not have the +\Answered+ flag set.
12
+ # @return [self]
12
13
  def unanswered
13
14
  self << 'UNANSWERED'
14
15
  end
15
16
 
16
- # Messages that do not have the \Flagged flag set.
17
- # @return [Query] self
17
+ # Messages that do not have the +\Flagged+ flag set.
18
+ # @return [self]
18
19
  def unflagged
19
20
  self << 'UNFLAGGED'
20
21
  end
21
22
 
23
+ # Messages with the +\Deleted+ flag set.
24
+ # @return [self]
25
+ def deleted
26
+ self << 'DELETED'
27
+ end
28
+
22
29
  # Messages that match either search key.
30
+ # @param search_key1 Optional search key to pass to +OR+
31
+ # @param search_key2 Optional search key to pass to +OR+
23
32
  # @note Reverse polish notation is expected,
24
33
  # i.e. OR <search-key1> <search-key2>
25
- # @return [Query] self
26
- def or
34
+ # @example
35
+ # or.unanswered.unflagged #=> ["OR", "UNANSWERED", "UNFLAGGED"]
36
+ # or(:unanswered, :unflagged) #=> ["OR", "UNANSWERED", "UNFLAGGED"]
37
+ # @return [self]
38
+ def or search_key1 = nil, search_key2 = nil
27
39
  self << 'OR'
40
+
41
+ if search_key1 and search_key2
42
+ send(search_key1)
43
+ send(search_key2)
44
+ elsif search_key1 or search_key2
45
+ raise ArgumentError, "You must give either zero or two arguments."
46
+ end
47
+
48
+ self
49
+ end
50
+
51
+ # Messages that do not match the specified search key.
52
+ # @param search_key Optional search key to pass to +NOT+
53
+ # @example
54
+ # not.deleted #=> ["NOT", "DELETED"]
55
+ # not(:deleted) #=> ["NOT", "DELETED"]
56
+ # @return [self]
57
+ def not search_key = nil
58
+ self << 'NOT'
59
+ send(search_key) if search_key
60
+ self
28
61
  end
29
62
 
30
63
  # Messages that contain the specified string in the envelope
31
64
  # structure's SUBJECT field.
32
- # @return [Query] self
65
+ # @return [self]
33
66
  def subject string
34
67
  self << 'SUBJECT' << string
35
68
  end
36
69
 
37
70
  # Messages that contain the specified string in the envelope
38
71
  # structure's FROM field.
39
- # @return [Query] self
72
+ # @return [self]
40
73
  def from string
41
74
  self << 'FROM' << string
42
75
  end
43
76
 
44
77
  # Messages that contain the specified string in the envelope
45
78
  # structure's TO field.
46
- # @return [Query] self
79
+ # @return [self]
47
80
  def to string
48
81
  self << 'TO' << string
49
82
  end
@@ -51,10 +84,10 @@ module IMAPGuard
51
84
  # Messages whose internal date (disregarding time and timezone)
52
85
  # is earlier than the specified date.
53
86
  # @param date Depending of its type:
54
- # - String: uses it as is
55
- # - Fixnum: _n_ days before today
56
- # - Date: uses this date
57
- # @return [Query] self
87
+ # - [String]: uses it as is
88
+ # - [Fixnum]: _n_ days before today
89
+ # - [Date]: uses this date
90
+ # @return [self]
58
91
  def before date
59
92
  case date
60
93
  when String
@@ -64,7 +97,7 @@ module IMAPGuard
64
97
  when Date
65
98
  date = date.strftime '%e-%b-%Y'
66
99
  else
67
- raise ArgumentError, "#{date.inspect} is invalid"
100
+ raise ArgumentError, "#{date.inspect} is invalid."
68
101
  end
69
102
 
70
103
  self << 'BEFORE' << date
@@ -1,4 +1,4 @@
1
1
  module ImapGuard
2
2
  # [String] ImapGuard version
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- module IMAPGuard
3
+ module ImapGuard
4
4
  describe Guard do
5
5
  before do
6
6
  $stdout = StringIO.new # mute stdout - comment to debug
@@ -216,9 +216,11 @@ module IMAPGuard
216
216
  it "freezes the settings" do
217
217
  guard = Guard.new(settings)
218
218
 
219
+ exception = (RUBY_VERSION >= "2.1.0" ? RuntimeError : TypeError)
220
+
219
221
  expect {
220
222
  guard.settings.host = 'example.net'
221
- }.to raise_error(TypeError, /frozen/)
223
+ }.to raise_error(exception, /frozen/)
222
224
  end
223
225
 
224
226
  it "raises ArgumentError if any required key is missing" do
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- module IMAPGuard
3
+ module ImapGuard
4
4
  describe Query do
5
5
  describe "#initialize" do
6
6
  it { should be_empty }
@@ -27,10 +27,38 @@ module IMAPGuard
27
27
  end
28
28
  end
29
29
 
30
+ describe "#deleted" do
31
+ it "adds 'DELETED'" do
32
+ subject.deleted
33
+ subject.last.should eq 'DELETED'
34
+ end
35
+ end
36
+
30
37
  describe "#or" do
31
- it "adds 'OR'" do
32
- subject.or
33
- subject.last.should eq 'OR'
38
+ context "without a search key" do
39
+ it "adds 'OR'" do
40
+ subject.or
41
+ subject.last.should eq 'OR'
42
+ end
43
+ end
44
+
45
+ context "with search keys" do
46
+ it "adds 'OR UNANSWERED UNFLAGGED '" do
47
+ subject.or(:unanswered, :unflagged)
48
+ subject.last(3).should eq ["OR", "UNANSWERED", "UNFLAGGED"]
49
+ end
50
+ end
51
+
52
+ context "with only one non-nil search key" do
53
+ it "raises ArgumentError" do
54
+ expect {
55
+ subject.or(:whatever)
56
+ }.to raise_error(ArgumentError)
57
+
58
+ expect {
59
+ subject.or(nil, :whatever)
60
+ }.to raise_error(ArgumentError)
61
+ end
34
62
  end
35
63
  end
36
64
 
@@ -55,6 +83,22 @@ module IMAPGuard
55
83
  end
56
84
  end
57
85
 
86
+ describe "#not" do
87
+ context "without a search key" do
88
+ it "adds 'NOT'" do
89
+ subject.not.deleted
90
+ subject.last(2).should eq ["NOT", "DELETED"]
91
+ end
92
+ end
93
+
94
+ context "with a search key" do
95
+ it "adds 'NOT DELETED'" do
96
+ subject.not(:deleted)
97
+ subject.last(2).should eq ["NOT", "DELETED"]
98
+ end
99
+ end
100
+ end
101
+
58
102
  describe "#before" do
59
103
  context "when I pass 'nil' as an argument" do
60
104
  it "raises" do
metadata CHANGED
@@ -1,174 +1,167 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imap_guard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Cédric Félizard
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-04 00:00:00.000000000 Z
11
+ date: 2014-01-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: mail
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: 2.5.3
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: 2.5.3
30
27
  - !ruby/object:Gem::Dependency
31
- name: colored
28
+ name: term-ansicolor
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
- version: '1.2'
33
+ version: 1.2.2
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
- version: '1.2'
40
+ version: 1.2.2
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: bundler
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
47
  version: '1.3'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
54
  version: '1.3'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rake
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: simplecov
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: rspec
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - ">="
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - ">="
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: guard-rspec
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - ">="
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - ">="
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: rb-inotify
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - ">="
132
116
  - !ruby/object:Gem::Version
133
117
  version: '0'
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - ">="
140
123
  - !ruby/object:Gem::Version
141
124
  version: '0'
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: cane
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
- - - ! '>='
129
+ - - ">="
148
130
  - !ruby/object:Gem::Version
149
131
  version: '0'
150
132
  type: :development
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
- - - ! '>='
136
+ - - ">="
156
137
  - !ruby/object:Gem::Version
157
138
  version: '0'
158
139
  - !ruby/object:Gem::Dependency
159
140
  name: yard
160
141
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
142
  requirements:
163
- - - ! '>='
143
+ - - ">="
164
144
  - !ruby/object:Gem::Version
165
145
  version: '0'
166
146
  type: :development
167
147
  prerelease: false
168
148
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
149
  requirements:
171
- - - ! '>='
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: redcarpet
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
172
165
  - !ruby/object:Gem::Version
173
166
  version: '0'
174
167
  description: A guard for your IMAP server
@@ -178,15 +171,16 @@ executables: []
178
171
  extensions: []
179
172
  extra_rdoc_files: []
180
173
  files:
181
- - .gitignore
182
- - .rspec
183
- - .ruby-version
184
- - .travis.yml
174
+ - ".gitignore"
175
+ - ".rspec"
176
+ - ".ruby-version"
177
+ - ".travis.yml"
185
178
  - Gemfile
186
179
  - Guardfile
187
180
  - LICENSE.txt
188
181
  - README.md
189
182
  - Rakefile
183
+ - examples/example.rb
190
184
  - imap_guard.gemspec
191
185
  - lib/imap_guard.rb
192
186
  - lib/imap_guard/guard.rb
@@ -198,33 +192,26 @@ files:
198
192
  homepage: https://github.com/infertux/imap_guard
199
193
  licenses:
200
194
  - MIT
195
+ metadata: {}
201
196
  post_install_message:
202
197
  rdoc_options: []
203
198
  require_paths:
204
199
  - lib
205
200
  required_ruby_version: !ruby/object:Gem::Requirement
206
- none: false
207
201
  requirements:
208
- - - ! '>='
202
+ - - ">="
209
203
  - !ruby/object:Gem::Version
210
204
  version: '0'
211
- segments:
212
- - 0
213
- hash: 903698273
214
205
  required_rubygems_version: !ruby/object:Gem::Requirement
215
- none: false
216
206
  requirements:
217
- - - ! '>='
207
+ - - ">="
218
208
  - !ruby/object:Gem::Version
219
209
  version: '0'
220
- segments:
221
- - 0
222
- hash: 903698273
223
210
  requirements: []
224
211
  rubyforge_project:
225
- rubygems_version: 1.8.25
212
+ rubygems_version: 2.2.0
226
213
  signing_key:
227
- specification_version: 3
214
+ specification_version: 4
228
215
  summary: A guard for your IMAP server
229
216
  test_files:
230
217
  - spec/imap_guard/guard_spec.rb