operation 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 240fa15d0de09d2362be3f5dc553378fdf3ef7d6
4
- data.tar.gz: 8157c76386132a5ada8bdfe1b60d51238859f297
3
+ metadata.gz: e7e8a1eefcc41e4464a3c86e301dbcbae4b0f7ef
4
+ data.tar.gz: af2e7a02187ea51123404fb7e89279faba1a64ad
5
5
  SHA512:
6
- metadata.gz: 80e05ca1686e0c1f676db56678fdb923af2c4a5d883af563f8f6f75c3e10aed435b02ae2726abfcaa2a3bad9a9c1a4cb57ef7d6566863553c7828b07b83a2ce1
7
- data.tar.gz: 1db9224e66d2911afe79783ce5875afd0234b148f354ad4f1b55df88a341c7697c104d7b2db6a1c72262c9cae965dc6d18c0305df34a68cea3b52d16573d77c0
6
+ metadata.gz: 88838ab8ebb3bd7e56086d7947386f80c07d62efd74e3e87e36a1e40c31d4ee9e672bf4e5988f8cb335412cfff8946abc665e4f17522e8f754b7a9c5d9ef4764
7
+ data.tar.gz: 66506b9496bea6a25f47c67c7e5b9aaae966ff62c40e0b7006247a1bf40e0f4114ab2977c7869d67bec8d56189da3be7d0aa58e3cd964e879fbce2ef2011bbb3
@@ -60,11 +60,15 @@ class Operation
60
60
  end
61
61
  end
62
62
 
63
- def progress(percent, code)
63
+ def progress(percent, code = nil)
64
64
  return if succeeded? || failed?
65
65
 
66
66
  progressables.each do |callback|
67
- callback.call ::Operation::Progress.new(percent, code)
67
+ if percent.is_a?(::Operation::Progress)
68
+ callback.call percent
69
+ else
70
+ callback.call ::Operation::Progress.new(percent, code)
71
+ end
68
72
  end
69
73
  end
70
74
 
@@ -2,7 +2,7 @@ class Operation
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 2
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join '.'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: operation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - halo