luggage 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +4 -0
- data/.gitignore +4 -0
- data/.rspec +1 -0
- data/ChangeLog.rdoc +4 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +20 -0
- data/README.md +221 -0
- data/Rakefile +35 -0
- data/lib/luggage/factory.rb +63 -0
- data/lib/luggage/mailbox.rb +101 -0
- data/lib/luggage/mailbox_array.rb +58 -0
- data/lib/luggage/mailbox_query_builder.rb +77 -0
- data/lib/luggage/message.rb +151 -0
- data/lib/luggage/version.rb +3 -0
- data/lib/luggage.rb +16 -0
- data/luggage.gemspec +30 -0
- data/spec/luggage/factory_spec.rb +83 -0
- data/spec/luggage/mailbox_query_builder_spec.rb +48 -0
- data/spec/luggage/mailbox_spec.rb +135 -0
- data/spec/luggage/message_spec.rb +181 -0
- data/spec/luggage_spec.rb +16 -0
- data/spec/net_imap.rb +15 -0
- data/spec/spec_helper.rb +36 -0
- metadata +201 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'rspec/mocks'
|
3
|
+
require 'rspec/expectations'
|
4
|
+
require 'active_support/time'
|
5
|
+
require 'pry'
|
6
|
+
|
7
|
+
require 'luggage'
|
8
|
+
require 'net_imap'
|
9
|
+
|
10
|
+
include Luggage
|
11
|
+
|
12
|
+
RSpec.configure do |config|
|
13
|
+
require File.dirname(__FILE__) + "/net_imap"
|
14
|
+
end
|
15
|
+
|
16
|
+
shared_context "factories" do
|
17
|
+
let(:connection) do
|
18
|
+
c = Net::IMAP.new("imap.foo.com")
|
19
|
+
c.stub(:append)
|
20
|
+
c.stub(:authenticate)
|
21
|
+
c.stub(:create)
|
22
|
+
c.stub(:delete)
|
23
|
+
c.stub(:expunge)
|
24
|
+
c.stub(:select)
|
25
|
+
c.stub(:send_command)
|
26
|
+
c.stub(:uid_store)
|
27
|
+
c.stub(:uid_fetch).and_return( [{:attr => {"BODY[]" => "raw_body", "FLAGS" => [], "INTERNALDATE" => 1.day.ago.to_s}}] )
|
28
|
+
c.stub(:uid_search).and_return([1])
|
29
|
+
c.stub(:list).and_return([])
|
30
|
+
c
|
31
|
+
end
|
32
|
+
let(:factory) { Luggage.new(:connection => connection) }
|
33
|
+
let(:mailbox) { Luggage::Mailbox.new(connection, :mailbox) }
|
34
|
+
let(:message) { Luggage::Message.new_local(connection, "Inbox") }
|
35
|
+
let(:query_builder) { Luggage::MailboxQueryBuilder.new(mailbox) }
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: luggage
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ryan Michael
|
8
|
+
- Eric Pinzur
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-03-13 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: mail
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ~>
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 2.5.0
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ~>
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 2.5.0
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: uuidtools
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 2.1.3
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ~>
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 2.1.3
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: bundler
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ~>
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '1.0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rake
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ~>
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0.8'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0.8'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: rdoc
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '3.0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ~>
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '3.0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: rspec
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ~>
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '2.4'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ~>
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '2.4'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: activesupport
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ~>
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 3.2.9
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ~>
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 3.2.9
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: fuubar
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ~>
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: 1.1.0
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 1.1.0
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: pry
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ~>
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: 0.9.10
|
133
|
+
type: :development
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ~>
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: 0.9.10
|
140
|
+
description: Easily interact with IMAP servers
|
141
|
+
email: ryanmichael@otherinbox.com
|
142
|
+
executables: []
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- .document
|
147
|
+
- .gitignore
|
148
|
+
- .rspec
|
149
|
+
- ChangeLog.rdoc
|
150
|
+
- Gemfile
|
151
|
+
- LICENSE.txt
|
152
|
+
- README.md
|
153
|
+
- Rakefile
|
154
|
+
- lib/luggage.rb
|
155
|
+
- lib/luggage/factory.rb
|
156
|
+
- lib/luggage/mailbox.rb
|
157
|
+
- lib/luggage/mailbox_array.rb
|
158
|
+
- lib/luggage/mailbox_query_builder.rb
|
159
|
+
- lib/luggage/message.rb
|
160
|
+
- lib/luggage/version.rb
|
161
|
+
- luggage.gemspec
|
162
|
+
- spec/luggage/factory_spec.rb
|
163
|
+
- spec/luggage/mailbox_query_builder_spec.rb
|
164
|
+
- spec/luggage/mailbox_spec.rb
|
165
|
+
- spec/luggage/message_spec.rb
|
166
|
+
- spec/luggage_spec.rb
|
167
|
+
- spec/net_imap.rb
|
168
|
+
- spec/spec_helper.rb
|
169
|
+
homepage: https://github.com/otherinbox/luggage
|
170
|
+
licenses:
|
171
|
+
- MIT
|
172
|
+
metadata: {}
|
173
|
+
post_install_message:
|
174
|
+
rdoc_options: []
|
175
|
+
require_paths:
|
176
|
+
- lib
|
177
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - '>='
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - '>='
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
requirements: []
|
188
|
+
rubyforge_project:
|
189
|
+
rubygems_version: 2.0.3
|
190
|
+
signing_key:
|
191
|
+
specification_version: 4
|
192
|
+
summary: Net::IMAP DSL
|
193
|
+
test_files:
|
194
|
+
- spec/luggage/factory_spec.rb
|
195
|
+
- spec/luggage/mailbox_query_builder_spec.rb
|
196
|
+
- spec/luggage/mailbox_spec.rb
|
197
|
+
- spec/luggage/message_spec.rb
|
198
|
+
- spec/luggage_spec.rb
|
199
|
+
- spec/net_imap.rb
|
200
|
+
- spec/spec_helper.rb
|
201
|
+
has_rdoc:
|