imap-backup 0.0.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +43 -6
- data/bin/imap-backup +0 -1
- data/imap-backup.gemspec +1 -1
- data/lib/email/mboxrd/message.rb +37 -0
- data/lib/imap/backup.rb +2 -0
- data/lib/imap/backup/account/connection.rb +2 -4
- data/lib/imap/backup/account/folder.rb +0 -2
- data/lib/imap/backup/configuration/account.rb +0 -2
- data/lib/imap/backup/configuration/asker.rb +0 -2
- data/lib/imap/backup/configuration/folder_chooser.rb +0 -2
- data/lib/imap/backup/configuration/list.rb +17 -16
- data/lib/imap/backup/configuration/setup.rb +1 -3
- data/lib/imap/backup/configuration/store.rb +19 -13
- data/lib/imap/backup/downloader.rb +0 -2
- data/lib/imap/backup/serializer/base.rb +17 -0
- data/lib/imap/backup/serializer/directory.rb +3 -7
- data/lib/imap/backup/serializer/mbox.rb +96 -0
- data/lib/imap/backup/utils.rb +6 -3
- data/lib/imap/backup/version.rb +2 -2
- data/spec/unit/account/connection_spec.rb +12 -13
- data/spec/unit/account/folder_spec.rb +1 -9
- data/spec/unit/configuration/account_spec.rb +1 -16
- data/spec/unit/configuration/asker_spec.rb +1 -9
- data/spec/unit/configuration/connection_tester_spec.rb +1 -5
- data/spec/unit/configuration/folder_chooser_spec.rb +1 -7
- data/spec/unit/configuration/list_spec.rb +24 -20
- data/spec/unit/configuration/setup_spec.rb +3 -9
- data/spec/unit/configuration/store_spec.rb +11 -20
- data/spec/unit/downloader_spec.rb +1 -11
- data/spec/unit/email/mboxrd/message_spec.rb +51 -0
- data/spec/unit/serializer/base_spec.rb +19 -0
- data/spec/unit/serializer/directory_spec.rb +51 -74
- data/spec/unit/serializer/mbox_spec.rb +113 -0
- data/spec/unit/utils_spec.rb +3 -9
- metadata +29 -4
data/spec/unit/utils_spec.rb
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
|
2
|
+
require 'spec_helper'
|
3
3
|
|
4
4
|
describe Imap::Backup::Utils do
|
5
|
-
|
6
5
|
context '#check_permissions' do
|
7
|
-
|
8
6
|
before :each do
|
9
7
|
File.stub!(:exist?).and_return(true)
|
10
8
|
end
|
@@ -42,11 +40,9 @@ describe Imap::Backup::Utils do
|
|
42
40
|
Imap::Backup::Utils.check_permissions('foobar', 0345)
|
43
41
|
end.to raise_error(RuntimeError, "Permissions on 'foobar' should be 0345, not 0777")
|
44
42
|
end
|
45
|
-
|
46
43
|
end
|
47
44
|
|
48
45
|
context '#make_folder' do
|
49
|
-
|
50
46
|
it 'should do nothing if an empty path is supplied' do
|
51
47
|
FileUtils.should_not_receive(:mkdir_p)
|
52
48
|
|
@@ -64,12 +60,10 @@ describe Imap::Backup::Utils do
|
|
64
60
|
it 'should set permissions on the path' do
|
65
61
|
FileUtils.stub!(:mkdir_p)
|
66
62
|
|
67
|
-
FileUtils.should_receive(:chmod).with(0222, '/base/path/new')
|
63
|
+
FileUtils.should_receive(:chmod).with(0222, '/base/path/new/folder')
|
68
64
|
|
69
|
-
Imap::Backup::Utils.make_folder('/base/path', '
|
65
|
+
Imap::Backup::Utils.make_folder('/base/path/new', 'folder', 0222)
|
70
66
|
end
|
71
|
-
|
72
67
|
end
|
73
|
-
|
74
68
|
end
|
75
69
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imap-backup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -43,6 +43,22 @@ dependencies:
|
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: mail
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
46
62
|
- !ruby/object:Gem::Dependency
|
47
63
|
name: pry
|
48
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,6 +139,7 @@ files:
|
|
123
139
|
- Rakefile
|
124
140
|
- bin/imap-backup
|
125
141
|
- imap-backup.gemspec
|
142
|
+
- lib/email/mboxrd/message.rb
|
126
143
|
- lib/imap/backup.rb
|
127
144
|
- lib/imap/backup/account/connection.rb
|
128
145
|
- lib/imap/backup/account/folder.rb
|
@@ -134,7 +151,9 @@ files:
|
|
134
151
|
- lib/imap/backup/configuration/setup.rb
|
135
152
|
- lib/imap/backup/configuration/store.rb
|
136
153
|
- lib/imap/backup/downloader.rb
|
154
|
+
- lib/imap/backup/serializer/base.rb
|
137
155
|
- lib/imap/backup/serializer/directory.rb
|
156
|
+
- lib/imap/backup/serializer/mbox.rb
|
138
157
|
- lib/imap/backup/utils.rb
|
139
158
|
- lib/imap/backup/version.rb
|
140
159
|
- spec/gather_rspec_coverage.rb
|
@@ -149,7 +168,10 @@ files:
|
|
149
168
|
- spec/unit/configuration/setup_spec.rb
|
150
169
|
- spec/unit/configuration/store_spec.rb
|
151
170
|
- spec/unit/downloader_spec.rb
|
171
|
+
- spec/unit/email/mboxrd/message_spec.rb
|
172
|
+
- spec/unit/serializer/base_spec.rb
|
152
173
|
- spec/unit/serializer/directory_spec.rb
|
174
|
+
- spec/unit/serializer/mbox_spec.rb
|
153
175
|
- spec/unit/utils_spec.rb
|
154
176
|
homepage: https://github.com/joeyates/imap-backup
|
155
177
|
licenses: []
|
@@ -165,7 +187,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
165
187
|
version: '0'
|
166
188
|
segments:
|
167
189
|
- 0
|
168
|
-
hash:
|
190
|
+
hash: -772763455036073334
|
169
191
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
192
|
none: false
|
171
193
|
requirements:
|
@@ -174,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
196
|
version: '0'
|
175
197
|
segments:
|
176
198
|
- 0
|
177
|
-
hash:
|
199
|
+
hash: -772763455036073334
|
178
200
|
requirements: []
|
179
201
|
rubyforge_project:
|
180
202
|
rubygems_version: 1.8.23
|
@@ -194,6 +216,9 @@ test_files:
|
|
194
216
|
- spec/unit/configuration/setup_spec.rb
|
195
217
|
- spec/unit/configuration/store_spec.rb
|
196
218
|
- spec/unit/downloader_spec.rb
|
219
|
+
- spec/unit/email/mboxrd/message_spec.rb
|
220
|
+
- spec/unit/serializer/base_spec.rb
|
197
221
|
- spec/unit/serializer/directory_spec.rb
|
222
|
+
- spec/unit/serializer/mbox_spec.rb
|
198
223
|
- spec/unit/utils_spec.rb
|
199
224
|
has_rdoc:
|