inbox-sync 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -95,9 +95,9 @@ The (optional) folder on the source to create and archive (move) source inbox me
95
95
 
96
96
  A logger to use. Defaults to ruby's `Logger` on `STDOUT`.
97
97
 
98
- ### `max_threads`
98
+ ### `num_workers`
99
99
 
100
- This is the number of threads to sync mail items with. Each time a sync is run, the number of mail items that need to sync'd will be broken into `max_threads` groups and each group will sync its mail items in its own thread. The default is `1` which means each message will be sync'd sequentially.
100
+ This is the number of worker threads to sync mail items with. Each time a sync is run, the number of mail items that need to sync'd will be broken into `num_workers` groups and each group will sync its mail items in its own thread. The default is `1` which means only 1 worker thread will be spawned and each message will be sync'd sequentially.
101
101
 
102
102
  ## Running
103
103
 
@@ -16,7 +16,7 @@ module InboxSync
16
16
  opt :archive_folder, :default => 'Archived'
17
17
  opt :logger, Logger, :required => true, :default => STDOUT
18
18
  opt :filters, :default => [], :required => true
19
- opt :max_threads, :default => 1, :required => true
19
+ opt :num_workers, :default => 1, :required => true
20
20
 
21
21
  def filter(*args, &block)
22
22
  filters << Filter.new(*args, &block)
@@ -54,12 +54,12 @@ module InboxSync
54
54
  logger.info "=== #{config_log_detail(@config.source)} sync finished. ==="
55
55
  end
56
56
 
57
- # this splits the mail_items list into `@config.max_threads` lists
58
- # this spreads mails evenly across the groups with earlier items
57
+ # this splits the mail_items list into `@config.num_workers` lists
58
+ # this spreads mail evenly across the groups with earlier items
59
59
  # appearing earliest in each list
60
60
 
61
61
  def mail_item_groups
62
- num_groups = @config.max_threads
62
+ num_groups = @config.num_workers
63
63
  groups = []
64
64
  num_groups.times { groups << MailItemGroup.new(self) }
65
65
  get_mail_items.each_with_index do |item, i|
@@ -1,3 +1,3 @@
1
1
  module InboxSync
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -42,7 +42,7 @@ module InboxSync
42
42
  :required => true
43
43
  }
44
44
 
45
- should have_option :max_threads, {
45
+ should have_option :num_workers, {
46
46
  :default => 1,
47
47
  :required => true
48
48
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inbox-sync
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kelly Redding
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-06-16 00:00:00 Z
18
+ date: 2012-06-18 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  type: :development