team_effort 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -0
  3. data/lib/team_effort/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd78f953296ae896e5e3c7adff6b079b04203376c2cddf7e57a0fdde2c7757ca
4
- data.tar.gz: 97bbea07471ca7c8e84a53db5e25ce113f03d8c505bce7c73b6c0327c73f2b53
3
+ metadata.gz: d5dd797a1ea8ba584a6996ed284b6183029dc606ea72ec52b40fed097dd334d1
4
+ data.tar.gz: cd339ee81904aa3363ed327eb5d0744d77320387ee56f810e9d11b4f06a08e1d
5
5
  SHA512:
6
- metadata.gz: 9fce2986ca5a3812d5d2e6af686ae8ab423c5f2c2cf80a55eff218a42fef43257e2cfe5e815bd49b1378f2393185b82b141eed3f76d0d3dfc8af9a8cd5fcc26c
7
- data.tar.gz: 309b7f39b82f8cf0e4de1294f6742689c4fc85caa6d28ff904959d2517391a4c1fb4c8670f61a0afe571d0b40f4e3b65d0be1acb26d825fbd45d572f81a46965
6
+ metadata.gz: c438a4fcc22b383dc89581b36c9bf3aa8b33ccf241b88511b18d09347f6a7dfac3e68a2fedd6cafc1d6d504089b87da7682ed6e92982595edf1bac40838eaa4f
7
+ data.tar.gz: d97a2620da7bf4230d6710ab9108547e4c684eec5507ce16add664a4eb76185cf4a472234cc1d0eecb16d0acd4312270cf5f10ed521e02404654ede40e9f9e04
data/README.md CHANGED
@@ -64,6 +64,25 @@ You can pass in a proc to receive completion notifications.
64
64
  100%
65
65
  ```
66
66
 
67
+ Your proc can return a result that will be provided the next time the proc is called.
68
+
69
+ ```irb
70
+ > data = 1..1_000
71
+ > progress_proc = ->(index, max_index, previous_percent_complete) {
72
+ > percent_complete = sprintf("%3i%", index.to_f / max_index * 100)
73
+ > if percent_complete != previous_percent_complete # Only print when the percent complete changes
74
+ > puts "#{ percent_complete }"
75
+ > end
76
+ > percent_complete
77
+ > }
78
+ > TeamEffort.work(data, progress_proc: progress_proc) {}
79
+ 0%
80
+ 1%
81
+ 2%
82
+ 3%
83
+ ...
84
+ ```
85
+
67
86
  In rails you need to reestablish your ActiveRecord connection in the
68
87
  child process:
69
88
 
@@ -1,3 +1,3 @@
1
1
  module TeamEffort
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: team_effort
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Felkins