dalliance 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ module Dalliance
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- TINY = 4
5
+ TINY = 5
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
data/lib/dalliance.rb CHANGED
@@ -216,11 +216,15 @@ module Dalliance
216
216
  end
217
217
  end
218
218
 
219
- #If the progress_meter_total_count_method is not implemented just use 1...
219
+ #If the progress_meter_total_count_method is not implemented or raises and error just use 1...
220
220
  def calculate_dalliance_progress_meter_total_count
221
- if respond_to?(self.class.dalliance_options[:dalliance_progress_meter_total_count_method])
222
- self.send(self.class.dalliance_options[:dalliance_progress_meter_total_count_method])
223
- else
221
+ begin
222
+ if respond_to?(self.class.dalliance_options[:dalliance_progress_meter_total_count_method])
223
+ self.send(self.class.dalliance_options[:dalliance_progress_meter_total_count_method])
224
+ else
225
+ 1
226
+ end
227
+ rescue
224
228
  1
225
229
  end
226
230
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dalliance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
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: 2013-02-14 00:00:00.000000000 Z
12
+ date: 2013-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord