posifile 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/posifile.rb CHANGED
@@ -73,7 +73,7 @@ class Posifile
73
73
  end
74
74
 
75
75
  def self.valid_specification?
76
- unless gap_in_specification?(@@specifications[self]) && overlap_in_specification?(@@specifications[self])
76
+ if gap_in_specification?(@@specifications[self]) || overlap_in_specification?(@@specifications[self])
77
77
  false
78
78
  else
79
79
  true
@@ -91,10 +91,10 @@ class Posifile
91
91
  end
92
92
  end
93
93
  end
94
- valid = true
94
+ valid = false
95
95
  num_ar.each do |array|
96
96
  if array.include?(2)
97
- valid = false
97
+ valid = true
98
98
  end
99
99
  end
100
100
  valid
@@ -111,10 +111,10 @@ class Posifile
111
111
  end
112
112
  end
113
113
  end
114
- valid = true
114
+ valid = false
115
115
  num_ar.each do |array|
116
116
  if array.include? nil
117
- valid = false
117
+ valid = true
118
118
  end
119
119
  end
120
120
  valid
data/posifile.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'posifile'
3
- s.version = '0.2.1'
4
- s.summary = 'Ruby library to make it easier to read position files.'
3
+ s.version = '0.2.2'
4
+ s.summary = 'Ruby library to make it easier to read position files. '
5
5
  s.description = 'Ruby library to make it easier to read position files.'
6
6
  s.files = `git ls-files`.split("\n")
7
7
  s.homepage = 'http://github.com/marcofognog/posifile'
@@ -37,18 +37,18 @@ class TestValidations < Test::Unit::TestCase
37
37
 
38
38
  # specifics -------------
39
39
  def test_overlap_in_specification_false
40
- assert !WithOverlap.overlap_in_specification?([{"name"=>0..8, "address" => 8..20, "job" => 16..30}])
40
+ assert WithOverlap.overlap_in_specification?([{"name"=>0..8, "address" => 8..20, "job" => 16..30}])
41
41
  end
42
42
 
43
43
  def test_overlap_in_specification_true
44
- assert Client.overlap_in_specification?([{"name"=>0..10, "city"=>11..31,"country"=>32..42}])
44
+ assert !Client.overlap_in_specification?([{"name"=>0..10, "city"=>11..31,"country"=>32..42}])
45
45
  end
46
46
 
47
47
  def test_gap_in_specification_false
48
- assert !WithGap.gap_in_specification?([{"name"=>0..10, "city"=>11..31,"country"=>36..52}])
48
+ assert WithGap.gap_in_specification?([{"name"=>0..10, "city"=>11..31,"country"=>36..52}])
49
49
  end
50
50
 
51
51
  def test_gap_in_specification_true
52
- assert Client.gap_in_specification?([{"name"=>0..10, "city"=>11..31,"country"=>32..42}])
52
+ assert !Client.gap_in_specification?([{"name"=>0..10, "city"=>11..31,"country"=>32..42}])
53
53
  end
54
54
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: posifile
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
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
  - "Marco Antonio Foga\xC3\xA7a Nogueira"