redcar-dev 0.13.2dev → 0.13.3dev

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -7,6 +7,7 @@ Version 0.13 (TBA)
7
7
  * implemented project-wide Find declaration (Project/Find declaration) (Dan Lucraft)
8
8
  * Don't use Bundler when running as a gem (Dan Lucraft)
9
9
  * Parse Ruby with 1.9 syntax instead of 1.8 (Dan Lucraft)
10
+ * Made the auto indenter ignore blank lines when deciding on indentation. (Dan Lucraft)
10
11
 
11
12
  Version 0.12 (7th January 2012)
12
13
  ===============================
@@ -69,7 +69,7 @@ end
69
69
  #
70
70
  # and so on.
71
71
  module Redcar
72
- VERSION = '0.13.2dev' # also change in the gemspec!
72
+ VERSION = '0.13.3dev' # also change in the gemspec!
73
73
  VERSION_MAJOR = 0
74
74
  VERSION_MINOR = 13
75
75
  VERSION_RELEASE = 0
@@ -52,7 +52,7 @@ module Redcar
52
52
  return 0, indent_next_line
53
53
  end
54
54
  line = @doc.get_line(current)
55
- if rules.unindented_line?(line)
55
+ if rules.unindented_line?(line) or line =~ /^\s*$/
56
56
  current -= 1
57
57
  else
58
58
  if indent_next_line == nil
@@ -58,6 +58,15 @@ RUBY
58
58
  should_indent(<<RUBY, :line => 1, :indent => 0)
59
59
  def foo
60
60
  end # should be dedented
61
+ RUBY
62
+ end
63
+
64
+ it "should ignore blank lines as part of the indentation" do
65
+ should_indent(<<RUBY, :line => 3, :indent => 1)
66
+ def foo
67
+ end
68
+
69
+ def foo
61
70
  RUBY
62
71
  end
63
72
  end
@@ -29,7 +29,7 @@ end
29
29
 
30
30
  Gem::Specification.new do |s|
31
31
  s.name = "redcar-dev"
32
- s.version = "0.13.2dev" # also change in lib/redcar.rb
32
+ s.version = "0.13.3dev" # also change in lib/redcar.rb
33
33
  s.platform = "ruby"
34
34
  s.authors = ["Daniel Lucraft"]
35
35
  s.email = ["dan@fluentradical.com"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: redcar-dev
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 0.13.2dev
5
+ version: 0.13.3dev
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Lucraft
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-01-10 00:00:00 Z
13
+ date: 2012-01-11 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: git