veritable 0.1.1.28 → 0.1.2.30

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.txt CHANGED
@@ -1,3 +1,6 @@
1
+ veritable-ruby 0.1.2 - July 9, 2012
2
+ * Added check for maximum count value (100000)
3
+
1
4
  veritable-ruby 0.1.1 - June 12, 2012
2
5
  * Added batch predictions via analysis.batch_predict
3
6
 
@@ -356,6 +356,8 @@ module Veritable
356
356
 
357
357
  private
358
358
 
359
+ COUNT_LIMIT = 100000
360
+
359
361
  # Private helper function for form encoding
360
362
  def flatten_params(params, parent=nil)
361
363
  result = []
@@ -520,11 +522,11 @@ module Veritable
520
522
  end
521
523
  if rows[i][c].nil?
522
524
  rows[i].delete c # remove flagged values
523
- elsif opts['remove_invalids'] and (rows[i][c].is_a? Fixnum) and (rows[i][c] < 0)
525
+ elsif opts['remove_invalids'] and (rows[i][c].is_a? Fixnum) and (rows[i][c] < 0 or rows[i][c] > COUNT_LIMIT)
524
526
  rows[i].delete c
525
527
  else
526
- if not (rows[i][c].is_a? Fixnum) or not (rows[i][c] >= 0) # catch invalids
527
- raise VeritableError.new("Validate -- row #{i}, key #{c}, value #{rows[i][c]} is #{rows[i][c].class}, not a non-negative integer.", {'row' => i, 'col' => c})
528
+ if not (rows[i][c].is_a? Fixnum) or not (rows[i][c] >= 0) or not (rows[i][c] <= COUNT_LIMIT) # catch invalids
529
+ raise VeritableError.new("Validate -- row #{i}, key #{c}, value #{rows[i][c]} is #{rows[i][c].class}, not an integer between 0 and #{COUNT_LIMIT}.", {'row' => i, 'col' => c})
528
530
  end
529
531
  end
530
532
  elsif coltype == 'real'
@@ -1,5 +1,5 @@
1
1
  module Veritable
2
2
 
3
3
  # The current version of veritable-ruby
4
- VERSION = "0.1.1.28"
4
+ VERSION = "0.1.2.30"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: veritable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.28
4
+ version: 0.1.2.30
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: 2012-06-19 00:00:00.000000000 Z
12
+ date: 2012-07-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -173,7 +173,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  segments:
175
175
  - 0
176
- hash: -3982800694673724426
176
+ hash: 810707972233102190
177
177
  required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  none: false
179
179
  requirements:
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  version: '0'
183
183
  segments:
184
184
  - 0
185
- hash: -3982800694673724426
185
+ hash: 810707972233102190
186
186
  requirements: []
187
187
  rubyforge_project:
188
188
  rubygems_version: 1.8.24