shoulda_runner 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a238eb33e8bbd09efb385afec8c9316ce4cddbf
4
- data.tar.gz: 44e83cd242f17fd8826701ee964cbbc7af8da0fb
3
+ metadata.gz: 6e7ecb2e4bf49a484c9cf9b8f7a50df3710ebd2d
4
+ data.tar.gz: e03a306cea3bb6a867dd1b4c294bb414466e352a
5
5
  SHA512:
6
- metadata.gz: d24161a3d5bbbf2b9b6082f3dd7fbb5592947d71ae2515d411e77600b48c910270302b23bfa66ee00ec16e2130340c5eae355751f449aa37e74919bce77281df
7
- data.tar.gz: edabe3365584a35c6a14ec297b2c6d14182af24a31bce458385a8a97bdf001a939cbce5703b203f155fe61ec66d6764ef0750433b37769df2fb5938bb67ced41
6
+ metadata.gz: 8df88b064f43b2af6dac7a552d63ac41e5a1d0628a9d8d6065f2a794ba0ec9e80346a1c03d228ecebc08237e330f629ac73a6b79cba62a3be6399998a8084993
7
+ data.tar.gz: 3b4dd38f7b06c47920b55c349df4812c0ebfd8a194feac4bf6665908f2d5a8d5af956bdc5f5a115d5f8e1ee42b413f6a82fcfa8ca6daf0d5f8a9daf70c89ef89
@@ -23,7 +23,7 @@ module ShouldaRunner
23
23
  stack.push should_node(line, number)
24
24
  elsif line =~ /^def\s/
25
25
  stack.push disposable_node(line)
26
- elsif line =~ /(do|do\s\|.+\|$)/
26
+ elsif line =~ /(do|do\s\|.+\|)$/
27
27
  stack.push disposable_node(line)
28
28
  elsif line =~ /^end$/
29
29
  node = stack.pop
@@ -39,19 +39,6 @@ module ShouldaRunner
39
39
  end
40
40
  end
41
41
  end
42
-
43
- unless stack.empty?
44
- while !stack.empty?
45
- node = stack.pop
46
- unless stack.empty?
47
- parent = stack.pop
48
- parent << node
49
- stack.push parent
50
- end
51
- end
52
-
53
- @asts << node
54
- end
55
42
  end
56
43
 
57
44
  private
@@ -87,7 +74,7 @@ module ShouldaRunner
87
74
  end
88
75
 
89
76
  def each_source_code_line
90
- @source.each_line.map(&:chomp).map(&:lstrip).each.with_index do |line, index|
77
+ @source.each_line.map(&:chomp).map(&:strip).each.with_index do |line, index|
91
78
  yield line, index + 1
92
79
  end
93
80
  end
@@ -1,3 +1,3 @@
1
1
  module ShouldaRunner
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoulda_runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giuseppe Modarelli