unit_validator 0.2.1 → 0.2.2

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.1
1
+ 0.2.2
@@ -36,7 +36,7 @@ module CF
36
36
  rule_labels = Array.new
37
37
  @rules.each do |rule|
38
38
  label = rule[:label] || rule["label"]
39
- rule_labels << label
39
+ rule_labels << label.strip
40
40
  end
41
41
 
42
42
  if rule_labels == csv_header
@@ -62,7 +62,7 @@ module CF
62
62
 
63
63
  end
64
64
  else
65
- @errors << "Headers doesnot match the column counts"
65
+ @errors << "Headers doesnot match the column counts: Rule => #{rule_labels} against CSV => #{csv_header}"
66
66
  end
67
67
 
68
68
  # calculate valid_units
@@ -35,7 +35,6 @@ module ValidatorHelpers
35
35
  return true
36
36
  else
37
37
  @errors << "Validation format not supported:: #{format}"
38
- # puts "error message:: #{@errors.inspect}"
39
38
  return false
40
39
  end
41
40
 
@@ -38,7 +38,7 @@ describe CF::InputValidator do
38
38
 
39
39
  cloud_validator = CF::InputValidator.new(rules)
40
40
  cloud_validator.parse_and_validate(inputs)[:valid_units].should_not == output
41
- cloud_validator.errors.should include("Headers doesnot match the column counts")
41
+ cloud_validator.errors.should include("Headers doesnot match the column counts: Rule => company name against CSV => company nameemail")
42
42
  end
43
43
 
44
44
  it "should not validate the csv file with invalid headers as per rules" do
@@ -53,7 +53,7 @@ describe CF::InputValidator do
53
53
 
54
54
  cloud_validator = CF::InputValidator.new(rules)
55
55
  cloud_validator.parse_and_validate(inputs).should_not == output
56
- cloud_validator.errors.should include("Headers doesnot match the column counts")
56
+ cloud_validator.errors.should include("Headers doesnot match the column counts: Rule => company nameemail against CSV => company name")
57
57
  end
58
58
 
59
59
  it "should validate the input email by format rules" do
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{unit_validator}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["millisami", "zoras"]
12
- s.date = %q{2010-11-12}
12
+ s.date = %q{2010-11-29}
13
13
  s.description = %q{Takes the Instruction Input as Rule, parse the CSV files and applies the validation and returns valid and invalid units}
14
14
  s.email = %q{saroj@sprout-technology.com}
15
15
  s.files = [
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
30
30
  "lib/tasks/rcov_custom.rb",
31
31
  "lib/validator_helpers.rb",
32
32
  "pkg/unit_validator-0.2.0.gem",
33
+ "pkg/unit_validator-0.2.1.gem",
33
34
  "spec/.rspec",
34
35
  "spec/cf_input_validator_spec.rb",
35
36
  "spec/cf_result_validator_spec.rb",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unit_validator
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - millisami
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-11-12 00:00:00 +05:45
19
+ date: 2010-11-29 00:00:00 +05:45
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -221,6 +221,7 @@ files:
221
221
  - lib/tasks/rcov_custom.rb
222
222
  - lib/validator_helpers.rb
223
223
  - pkg/unit_validator-0.2.0.gem
224
+ - pkg/unit_validator-0.2.1.gem
224
225
  - spec/.rspec
225
226
  - spec/cf_input_validator_spec.rb
226
227
  - spec/cf_result_validator_spec.rb