imw 0.2.13 → 0.2.14

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.13
1
+ 0.2.14
@@ -93,10 +93,10 @@ module IMW
93
93
  # @return [String]
94
94
  def most_common_extension
95
95
  return most_common_extension_by_size if most_common_extension_by_size == most_common_extension_by_count # no contest
96
- count_fraction = normalized_extension_counts[most_common_extension_by_count]
97
- size_fraction = normalized_extension_sizes[most_common_extension_by_size]
96
+ count_fraction = (normalized_extension_counts[most_common_extension_by_count] or 0.0)
97
+ size_fraction = (normalized_extension_sizes[most_common_extension_by_size] or 0.0)
98
98
  return most_common_extension_by_count if count_fraction >= 0.5 and size_fraction < 0.5 # FIXME arbitrary
99
- return most_common_extension_by_size if count_fraction < 0.5 and size_fraction >= 0.5
99
+ return most_common_extension_by_size if count_fraction < 0.5 and size_fraction >= 0.5
100
100
  most_common_extension_by_size # default to size
101
101
  end
102
102
 
@@ -50,7 +50,7 @@ module IMW
50
50
  def summary
51
51
  @summary ||= inputs.map do |input|
52
52
  #input.guess_schema! if input.schema.nil? && input.respond_to?(:guess_schema!)
53
- input.respond_to?(:summary) ? input.summary : {}
53
+ (input.respond_to?(:summary) ? input.summary : {}) rescue {}
54
54
  end
55
55
  end
56
56
 
@@ -1,6 +1,8 @@
1
1
  require File.dirname(__FILE__) + "/../../spec_helper"
2
2
 
3
3
  describe IMW::Tools::Summarizer do
4
+
5
+
4
6
  end
5
7
 
6
8
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imw
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 13
10
- version: 0.2.13
9
+ - 14
10
+ version: 0.2.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dhruv Bansal
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-11-22 00:00:00 -06:00
19
+ date: 2010-11-23 00:00:00 -06:00
20
20
  default_executable:
21
21
  dependencies: []
22
22