tailor 1.0.0.alpha2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. data/.gitignore +1 -0
  2. data/.tailor +10 -2
  3. data/Gemfile.lock +2 -2
  4. data/History.rdoc +20 -0
  5. data/README.rdoc +176 -26
  6. data/features/configurable.feature +19 -39
  7. data/features/horizontal_spacing.feature +3 -2
  8. data/features/indentation.feature +2 -2
  9. data/features/indentation/bad_files_with_no_trailing_newline.feature +9 -8
  10. data/features/indentation/good_files_with_no_trailing_newline.feature +19 -6
  11. data/features/name_detection.feature +2 -2
  12. data/features/support/env.rb +0 -2
  13. data/features/support/file_cases/horizontal_spacing_cases.rb +5 -4
  14. data/features/support/file_cases/indentation_cases.rb +105 -54
  15. data/features/support/file_cases/naming_cases.rb +0 -1
  16. data/features/support/file_cases/vertical_spacing_cases.rb +0 -1
  17. data/features/support/legacy/bad_ternary_colon_spacing.rb +1 -1
  18. data/features/valid_ruby.feature +17 -0
  19. data/features/vertical_spacing.feature +40 -19
  20. data/lib/ext/string_ext.rb +12 -0
  21. data/lib/tailor/cli.rb +7 -5
  22. data/lib/tailor/cli/options.rb +13 -3
  23. data/lib/tailor/composite_observable.rb +17 -2
  24. data/lib/tailor/configuration.rb +83 -72
  25. data/lib/tailor/configuration/style.rb +85 -0
  26. data/lib/tailor/critic.rb +67 -117
  27. data/lib/tailor/formatter.rb +38 -0
  28. data/lib/tailor/formatters/text.rb +35 -10
  29. data/lib/tailor/lexed_line.rb +38 -5
  30. data/lib/tailor/lexer.rb +150 -14
  31. data/lib/tailor/{lexer_constants.rb → lexer/lexer_constants.rb} +9 -7
  32. data/lib/tailor/lexer/token.rb +6 -2
  33. data/lib/tailor/logger.rb +4 -0
  34. data/lib/tailor/problem.rb +8 -73
  35. data/lib/tailor/reporter.rb +1 -1
  36. data/lib/tailor/ruler.rb +67 -6
  37. data/lib/tailor/rulers/allow_camel_case_methods_ruler.rb +9 -1
  38. data/lib/tailor/rulers/allow_hard_tabs_ruler.rb +9 -1
  39. data/lib/tailor/rulers/allow_invalid_ruby_ruler.rb +38 -0
  40. data/lib/tailor/rulers/allow_screaming_snake_case_classes_ruler.rb +9 -2
  41. data/lib/tailor/rulers/allow_trailing_line_spaces_ruler.rb +10 -5
  42. data/lib/tailor/rulers/indentation_spaces_ruler.rb +93 -26
  43. data/lib/tailor/rulers/indentation_spaces_ruler/indentation_manager.rb +128 -84
  44. data/lib/tailor/rulers/max_code_lines_in_class_ruler.rb +9 -5
  45. data/lib/tailor/rulers/max_code_lines_in_method_ruler.rb +9 -5
  46. data/lib/tailor/rulers/max_line_length_ruler.rb +10 -5
  47. data/lib/tailor/rulers/spaces_after_comma_ruler.rb +13 -4
  48. data/lib/tailor/rulers/spaces_after_lbrace_ruler.rb +8 -4
  49. data/lib/tailor/rulers/spaces_after_lbracket_ruler.rb +8 -4
  50. data/lib/tailor/rulers/spaces_after_lparen_ruler.rb +8 -4
  51. data/lib/tailor/rulers/spaces_before_comma_ruler.rb +8 -4
  52. data/lib/tailor/rulers/spaces_before_lbrace_ruler.rb +13 -6
  53. data/lib/tailor/rulers/spaces_before_rbrace_ruler.rb +12 -8
  54. data/lib/tailor/rulers/spaces_before_rbracket_ruler.rb +12 -5
  55. data/lib/tailor/rulers/spaces_before_rparen_ruler.rb +13 -6
  56. data/lib/tailor/rulers/spaces_in_empty_braces_ruler.rb +13 -9
  57. data/lib/tailor/rulers/trailing_newlines_ruler.rb +10 -5
  58. data/lib/tailor/tailorrc.erb +3 -3
  59. data/lib/tailor/version.rb +1 -1
  60. data/m.rb +15 -0
  61. data/spec/spec_helper.rb +0 -1
  62. data/spec/tailor/cli_spec.rb +8 -9
  63. data/spec/tailor/composite_observable_spec.rb +41 -0
  64. data/spec/tailor/configuration/style_spec.rb +197 -0
  65. data/spec/tailor/configuration_spec.rb +52 -33
  66. data/spec/tailor/critic_spec.rb +7 -8
  67. data/spec/tailor/formatter_spec.rb +52 -0
  68. data/spec/tailor/lexed_line_spec.rb +236 -88
  69. data/spec/tailor/lexer_spec.rb +8 -63
  70. data/spec/tailor/problem_spec.rb +14 -46
  71. data/spec/tailor/reporter_spec.rb +8 -8
  72. data/spec/tailor/ruler_spec.rb +1 -1
  73. data/spec/tailor/rulers/indentation_spaces_ruler/indentation_manager_spec.rb +132 -176
  74. data/spec/tailor/rulers/indentation_spaces_ruler_spec.rb +41 -33
  75. data/spec/tailor/rulers/{spaces_after_comma_spec.rb → spaces_after_comma_ruler_spec.rb} +5 -5
  76. data/spec/tailor/rulers/spaces_after_lbrace_ruler_spec.rb +14 -14
  77. data/spec/tailor/rulers/spaces_before_lbrace_ruler_spec.rb +1 -1
  78. data/spec/tailor/rulers/spaces_before_rbrace_ruler_spec.rb +1 -1
  79. data/spec/tailor/version_spec.rb +1 -1
  80. data/spec/tailor_spec.rb +3 -1
  81. data/tailor.gemspec +11 -3
  82. data/uest.rb +9 -0
  83. metadata +66 -41
  84. data/features/step_definitions/spacing/commas_steps.rb +0 -14
@@ -6,40 +6,30 @@ describe Tailor::Rulers::IndentationSpacesRuler do
6
6
  let!(:spaces) { 5 }
7
7
 
8
8
  subject do
9
- Tailor::Rulers::IndentationSpacesRuler.new(spaces)
9
+ Tailor::Rulers::IndentationSpacesRuler.new(spaces, level: :error)
10
10
  end
11
11
 
12
- describe "#initialize" do
13
- it "sets @proper to an Hash with :this_line and :next_line keys = 0" do
14
- proper_indentation = subject.instance_variable_get(:@proper)
15
- proper_indentation.should be_a Hash
16
- proper_indentation[:this_line].should be_zero
17
- proper_indentation[:next_line].should be_zero
18
- end
19
- end
20
-
21
-
22
12
  describe "#comment_update" do
23
13
  pending
24
14
  context "token does not contain a trailing newline" do
25
-
15
+
26
16
  end
27
-
17
+
28
18
  context "token contains a trailing newline" do
29
19
  context "lexed_line is spaces then a comment" do
30
-
20
+
31
21
  end
32
-
22
+
33
23
  context "lexed_line is no spaces and a comment" do
34
-
24
+
35
25
  end
36
-
26
+
37
27
  context "lexed_line ends with an operator" do
38
-
28
+
39
29
  end
40
-
30
+
41
31
  context "lexed_line ends with a comma" do
42
-
32
+
43
33
  end
44
34
  end
45
35
  end
@@ -102,27 +92,45 @@ describe Tailor::Rulers::IndentationSpacesRuler do
102
92
  end
103
93
 
104
94
  describe "#tstring_beg_update" do
105
- it "calls #stop" do
106
- subject.should_receive(:stop)
107
- subject.tstring_beg_update 1
95
+ let(:lexed_line) { double "LexedLine" }
96
+ let(:manager) { double "IndentationManager" }
97
+
98
+ it "calls #stop on the indentation_manager object" do
99
+ manager.should_receive(:update_actual_indentation).with lexed_line
100
+ manager.should_receive(:stop)
101
+ subject.instance_variable_set(:@manager, manager)
102
+ subject.tstring_beg_update(lexed_line, 1)
108
103
  end
109
-
104
+
110
105
  it "adds the lineno to @tstring_nesting" do
111
- subject.tstring_beg_update 1
106
+ manager.stub(:update_actual_indentation)
107
+ manager.stub(:stop)
108
+ subject.instance_variable_set(:@manager, manager)
109
+ subject.tstring_beg_update(lexed_line, 1)
112
110
  subject.instance_variable_get(:@tstring_nesting).should == [1]
113
111
  end
114
112
  end
115
113
 
116
114
  describe "#tstring_end_update" do
117
- it "calls #start" do
118
- subject.should_receive(:start)
119
- subject.tstring_end_update
120
- end
115
+ context "@tstring_nesting is not empty" do
116
+ let(:lexed_line) { double "LexedLine" }
117
+ let(:manager) { double "IndentationManager" }
118
+
119
+ it "calls #start" do
120
+ manager.should_receive(:start)
121
+ subject.instance_variable_set(:@manager, manager)
122
+ subject.tstring_end_update(2)
123
+ end
121
124
 
122
- it "removes the lineno to @tstring_nesting" do
123
- subject.instance_variable_set(:@tstring_nesting, [1])
124
- subject.tstring_end_update
125
- subject.instance_variable_get(:@tstring_nesting).should be_empty
125
+ it "removes the lineno to @tstring_nesting then calls @manager.start" do
126
+ manager.should_receive(:actual_indentation)
127
+ manager.should_receive(:start)
128
+ subject.instance_variable_set(:@manager, manager)
129
+ subject.instance_variable_set(:@tstring_nesting, [1])
130
+ subject.should_receive(:measure)
131
+ subject.tstring_end_update(2)
132
+ subject.instance_variable_get(:@tstring_nesting).should be_empty
133
+ end
126
134
  end
127
135
  end
128
136
  end
@@ -2,25 +2,25 @@ require_relative '../../spec_helper'
2
2
  require 'tailor/rulers/spaces_after_comma_ruler'
3
3
 
4
4
  describe Tailor::Rulers::SpacesAfterCommaRuler do
5
- subject { Tailor::Rulers::SpacesAfterCommaRuler.new({}) }
6
-
5
+ subject { Tailor::Rulers::SpacesAfterCommaRuler.new(nil, {}) }
6
+
7
7
  describe "#comma_update" do
8
8
  it "adds the column number to @comma_columns" do
9
9
  subject.comma_update(",", 2, 1)
10
10
  subject.instance_variable_get(:@comma_columns).should == [1]
11
11
  end
12
12
  end
13
-
13
+
14
14
  describe "#check_spaces_after_comma" do
15
15
  context "no event after comma" do
16
16
  let(:lexed_line) do
17
17
  l = double "LexedLine"
18
18
  l.stub(:event_at)
19
19
  l.stub(:index)
20
-
20
+
21
21
  l
22
22
  end
23
-
23
+
24
24
  it "doesn't detect any problems" do
25
25
  Tailor::Problem.should_not_receive(:new)
26
26
  expect { subject.check_spaces_after_comma(lexed_line, 1) }.
@@ -2,8 +2,8 @@ require_relative '../../spec_helper'
2
2
  require 'tailor/rulers/spaces_after_lbrace_ruler'
3
3
 
4
4
  describe Tailor::Rulers::SpacesAfterLbraceRuler do
5
- subject { Tailor::Rulers::SpacesAfterLbraceRuler.new('')}
6
-
5
+ subject { Tailor::Rulers::SpacesAfterLbraceRuler.new('', {}) }
6
+
7
7
  describe "#comment_update" do
8
8
  context "token has a trailing newline" do
9
9
  it "calls #ignored_nl_update" do
@@ -11,7 +11,7 @@ describe Tailor::Rulers::SpacesAfterLbraceRuler do
11
11
  subject.comment_update("\n", '', '', 1, 1)
12
12
  end
13
13
  end
14
-
14
+
15
15
  context "token does not have a trailing newline" do
16
16
  it "does not call #ignored_nl_update" do
17
17
  subject.should_not_receive(:ignored_nl_update)
@@ -19,43 +19,43 @@ describe Tailor::Rulers::SpacesAfterLbraceRuler do
19
19
  end
20
20
  end
21
21
  end
22
-
22
+
23
23
  describe "#ignored_nl_update" do
24
24
  it "calls #check_spaces_after_lbrace" do
25
25
  subject.should_receive(:check_spaces_after_lbrace)
26
26
  subject.ignored_nl_update('', 1, 1)
27
27
  end
28
28
  end
29
-
29
+
30
30
  describe "#lbrace_update" do
31
31
  it "adds column to @lbrace_columns" do
32
32
  subject.lbrace_update('', 1, 1)
33
33
  subject.instance_variable_get(:@lbrace_columns).should == [1]
34
34
  end
35
35
  end
36
-
36
+
37
37
  describe "#nl_update" do
38
38
  it "calls #ignored_nl_update" do
39
39
  subject.should_receive(:ignored_nl_update)
40
40
  subject.nl_update('', 1, 1)
41
41
  end
42
42
  end
43
-
43
+
44
44
  describe "#count_spaces" do
45
45
  context "lexed_line.event_index returns nil" do
46
46
  let(:lexed_line) do
47
47
  l = double "LexedLine"
48
48
  l.stub(:event_index).and_return nil
49
-
49
+
50
50
  l
51
51
  end
52
-
52
+
53
53
  it "breaks from the loop and returns nil" do
54
54
  lexed_line.should_not_receive(:at)
55
55
  subject.count_spaces(lexed_line, 1).should be_nil
56
56
  end
57
57
  end
58
-
58
+
59
59
  context "lexed_line.at returns nil" do
60
60
  let(:lexed_line) do
61
61
  l = double "LexedLine"
@@ -72,7 +72,7 @@ describe Tailor::Rulers::SpacesAfterLbraceRuler do
72
72
 
73
73
  context "next_event is a :on_nl" do
74
74
  let!(:next_event) do
75
- [[1,1], :on_nl, "\n"]
75
+ [[1, 1], :on_nl, "\n"]
76
76
  end
77
77
 
78
78
  let(:lexed_line) do
@@ -90,7 +90,7 @@ describe Tailor::Rulers::SpacesAfterLbraceRuler do
90
90
 
91
91
  context "next_event is a :on_ignored_nl" do
92
92
  let!(:next_event) do
93
- [[1,1], :on_ignored_nl, "\n"]
93
+ [[1, 1], :on_ignored_nl, "\n"]
94
94
  end
95
95
 
96
96
  let(:lexed_line) do
@@ -108,7 +108,7 @@ describe Tailor::Rulers::SpacesAfterLbraceRuler do
108
108
 
109
109
  context "next_event is a non-space event" do
110
110
  let!(:next_event) do
111
- [[1,1], :on_kw, "def"]
111
+ [[1, 1], :on_kw, "def"]
112
112
  end
113
113
 
114
114
  let(:lexed_line) do
@@ -126,7 +126,7 @@ describe Tailor::Rulers::SpacesAfterLbraceRuler do
126
126
 
127
127
  context "next_event is :on_sp" do
128
128
  let!(:next_event) do
129
- [[1,1], :on_sp, " "]
129
+ [[1, 1], :on_sp, " "]
130
130
  end
131
131
 
132
132
  let(:lexed_line) do
@@ -2,7 +2,7 @@ require_relative '../../spec_helper'
2
2
  require 'tailor/rulers/spaces_before_lbrace_ruler'
3
3
 
4
4
  describe Tailor::Rulers::SpacesBeforeLbraceRuler do
5
- subject { Tailor::Rulers::SpacesBeforeLbraceRuler.new 1 }
5
+ subject { Tailor::Rulers::SpacesBeforeLbraceRuler.new(nil, {}) }
6
6
  before { Tailor::Logger.stub(:log) }
7
7
 
8
8
  describe "#count_spaces" do
@@ -2,7 +2,7 @@ require_relative '../../spec_helper'
2
2
  require 'tailor/rulers/spaces_before_rbrace_ruler'
3
3
 
4
4
  describe Tailor::Rulers::SpacesBeforeRbraceRuler do
5
- subject { Tailor::Rulers::SpacesBeforeRbraceRuler.new 1 }
5
+ subject { Tailor::Rulers::SpacesBeforeRbraceRuler.new(nil, {}) }
6
6
  before { Tailor::Logger.stub(:log) }
7
7
 
8
8
  describe "#count_spaces" do
@@ -2,5 +2,5 @@ require_relative '../spec_helper'
2
2
  require 'tailor/version'
3
3
 
4
4
  describe Tailor::VERSION do
5
- it { should == "1.0.0.alpha2" }
5
+ it { should == "1.0.0" }
6
6
  end
data/spec/tailor_spec.rb CHANGED
@@ -2,12 +2,14 @@ require_relative 'spec_helper'
2
2
  require 'tailor'
3
3
 
4
4
  describe Tailor do
5
+ before { Tailor::Logger.log = false }
6
+
5
7
  describe "::config" do
6
8
  it "creates a new Configuration object" do
7
9
  Tailor::Configuration.should_receive(:new)
8
10
  Tailor.config
9
11
  end
10
-
12
+
11
13
  it "returns a Configuration object" do
12
14
  Tailor.config.should be_a Tailor::Configuration
13
15
  end
data/tailor.gemspec CHANGED
@@ -7,8 +7,16 @@ Gem::Specification.new do |s|
7
7
  s.version = Tailor::VERSION
8
8
 
9
9
  s.author = "Steve Loveless"
10
- s.summary = "ruby style checking tool"
11
- s.description = "Utility for checking style of Ruby files."
10
+ s.summary = "A Ruby style & complexity measurer"
11
+ s.description = <<-DESC
12
+ tailor parses Ruby files and measures them with some style and static analysis
13
+ "rulers". Default values for the Rulers are based on a number of style guides
14
+ in the Ruby community as well as what seems to be common. More on this here
15
+ http://wiki.github.com/turboladen/tailor.
16
+
17
+ tailor's goal is to help you be consistent with your code, throughout your
18
+ project, whatever style that may be.
19
+ DESC
12
20
  s.email = "steve.loveless@gmail.com"
13
21
  s.homepage = "http://github.com/turboladen/tailor"
14
22
 
@@ -17,7 +25,7 @@ Gem::Specification.new do |s|
17
25
  s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
18
26
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
19
27
 
20
- s.add_runtime_dependency(%q<log_switch>, ">= 0.2.0")
28
+ s.add_runtime_dependency(%q<log_switch>, ">= 0.3.0")
21
29
  s.add_runtime_dependency(%q<term-ansicolor>, ">= 1.0.5")
22
30
  s.add_runtime_dependency(%q<text-table>, ">= 1.2.2")
23
31
 
data/uest.rb ADDED
@@ -0,0 +1,9 @@
1
+ begin
2
+ ssh.upload source, dest
3
+ @logger.info "Successfully copied the file #{source} to " +
4
+ "#{@config[:scp_hostname]}:#{dest}."
5
+ rescue SocketError, ArgumentError, SystemCallError,
6
+ Net::SCP::Exception, Timeout::Error => ex
7
+ @logger.error "Failed to copy the file #{source} to #{dest} due to " +
8
+ "#{ex.message}"
9
+ end
metadata CHANGED
@@ -1,30 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha2
5
- prerelease: 6
4
+ version: 1.0.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Steve Loveless
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-09 00:00:00.000000000 Z
12
+ date: 2012-04-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: log_switch
16
- requirement: &70263733074740 !ruby/object:Gem::Requirement
16
+ requirement: &70277621236500 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.2.0
21
+ version: 0.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70263733074740
24
+ version_requirements: *70277621236500
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: term-ansicolor
27
- requirement: &70263733074240 !ruby/object:Gem::Requirement
27
+ requirement: &70277621235980 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.5
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70263733074240
35
+ version_requirements: *70277621235980
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: text-table
38
- requirement: &70263733073740 !ruby/object:Gem::Requirement
38
+ requirement: &70277621235500 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.2.2
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70263733073740
46
+ version_requirements: *70277621235500
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: aruba
49
- requirement: &70263733073260 !ruby/object:Gem::Requirement
49
+ requirement: &70277621235040 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70263733073260
57
+ version_requirements: *70277621235040
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: bundler
60
- requirement: &70263733072680 !ruby/object:Gem::Requirement
60
+ requirement: &70277621234580 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70263733072680
68
+ version_requirements: *70277621234580
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: code_statistics
71
- requirement: &70263733072080 !ruby/object:Gem::Requirement
71
+ requirement: &70277621234120 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70263733072080
79
+ version_requirements: *70277621234120
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: cucumber
82
- requirement: &70263733071460 !ruby/object:Gem::Requirement
82
+ requirement: &70277621233660 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 1.0.2
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70263733071460
90
+ version_requirements: *70277621233660
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: fakefs
93
- requirement: &70263733070680 !ruby/object:Gem::Requirement
93
+ requirement: &70277621233200 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 0.4.0
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70263733070680
101
+ version_requirements: *70277621233200
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: rake
104
- requirement: &70263733070220 !ruby/object:Gem::Requirement
104
+ requirement: &70277621232740 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *70263733070220
112
+ version_requirements: *70277621232740
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: roodi
115
- requirement: &70263733069620 !ruby/object:Gem::Requirement
115
+ requirement: &70277621258360 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 2.1.0
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *70263733069620
123
+ version_requirements: *70277621258360
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: rspec
126
- requirement: &70263733087360 !ruby/object:Gem::Requirement
126
+ requirement: &70277621257900 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: 2.5.0
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *70263733087360
134
+ version_requirements: *70277621257900
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: simplecov
137
- requirement: &70263733086880 !ruby/object:Gem::Requirement
137
+ requirement: &70277621257440 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: 0.4.0
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *70263733086880
145
+ version_requirements: *70277621257440
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: yard
148
- requirement: &70263733086420 !ruby/object:Gem::Requirement
148
+ requirement: &70277621256980 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: 0.7.0
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *70263733086420
156
+ version_requirements: *70277621256980
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: yard-cucumber
159
- requirement: &70263733085960 !ruby/object:Gem::Requirement
159
+ requirement: &70277621256520 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,8 +164,22 @@ dependencies:
164
164
  version: 2.1.7
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *70263733085960
168
- description: Utility for checking style of Ruby files.
167
+ version_requirements: *70277621256520
168
+ description: ! 'tailor parses Ruby files and measures them with some style and static
169
+ analysis
170
+
171
+ "rulers". Default values for the Rulers are based on a number of style guides
172
+
173
+ in the Ruby community as well as what seems to be common. More on this here
174
+
175
+ http://wiki.github.com/turboladen/tailor.
176
+
177
+
178
+ tailor''s goal is to help you be consistent with your code, throughout your
179
+
180
+ project, whatever style that may be.
181
+
182
+ '
169
183
  email: steve.loveless@gmail.com
170
184
  executables:
171
185
  - tailor
@@ -192,7 +206,6 @@ files:
192
206
  - features/indentation/good_files_with_no_trailing_newline.feature
193
207
  - features/name_detection.feature
194
208
  - features/step_definitions/indentation_steps.rb
195
- - features/step_definitions/spacing/commas_steps.rb
196
209
  - features/support/env.rb
197
210
  - features/support/file_cases/horizontal_spacing_cases.rb
198
211
  - features/support/file_cases/indentation_cases.rb
@@ -203,6 +216,7 @@ files:
203
216
  - features/support/legacy/bad_ternary_colon_spacing.rb
204
217
  - features/support/legacy/long_file_with_indentation.rb
205
218
  - features/support/world.rb
219
+ - features/valid_ruby.feature
206
220
  - features/vertical_spacing.feature
207
221
  - lib/ext/string_ext.rb
208
222
  - lib/tailor.rb
@@ -210,12 +224,14 @@ files:
210
224
  - lib/tailor/cli/options.rb
211
225
  - lib/tailor/composite_observable.rb
212
226
  - lib/tailor/configuration.rb
227
+ - lib/tailor/configuration/style.rb
213
228
  - lib/tailor/critic.rb
229
+ - lib/tailor/formatter.rb
214
230
  - lib/tailor/formatters/text.rb
215
231
  - lib/tailor/lexed_line.rb
216
232
  - lib/tailor/lexer.rb
233
+ - lib/tailor/lexer/lexer_constants.rb
217
234
  - lib/tailor/lexer/token.rb
218
- - lib/tailor/lexer_constants.rb
219
235
  - lib/tailor/logger.rb
220
236
  - lib/tailor/problem.rb
221
237
  - lib/tailor/reporter.rb
@@ -223,6 +239,7 @@ files:
223
239
  - lib/tailor/rulers.rb
224
240
  - lib/tailor/rulers/allow_camel_case_methods_ruler.rb
225
241
  - lib/tailor/rulers/allow_hard_tabs_ruler.rb
242
+ - lib/tailor/rulers/allow_invalid_ruby_ruler.rb
226
243
  - lib/tailor/rulers/allow_screaming_snake_case_classes_ruler.rb
227
244
  - lib/tailor/rulers/allow_trailing_line_spaces_ruler.rb
228
245
  - lib/tailor/rulers/indentation_spaces_ruler.rb
@@ -244,10 +261,14 @@ files:
244
261
  - lib/tailor/runtime_error.rb
245
262
  - lib/tailor/tailorrc.erb
246
263
  - lib/tailor/version.rb
264
+ - m.rb
247
265
  - spec/spec_helper.rb
248
266
  - spec/tailor/cli_spec.rb
267
+ - spec/tailor/composite_observable_spec.rb
268
+ - spec/tailor/configuration/style_spec.rb
249
269
  - spec/tailor/configuration_spec.rb
250
270
  - spec/tailor/critic_spec.rb
271
+ - spec/tailor/formatter_spec.rb
251
272
  - spec/tailor/lexed_line_spec.rb
252
273
  - spec/tailor/lexer/token_spec.rb
253
274
  - spec/tailor/lexer_spec.rb
@@ -257,7 +278,7 @@ files:
257
278
  - spec/tailor/ruler_spec.rb
258
279
  - spec/tailor/rulers/indentation_spaces_ruler/indentation_manager_spec.rb
259
280
  - spec/tailor/rulers/indentation_spaces_ruler_spec.rb
260
- - spec/tailor/rulers/spaces_after_comma_spec.rb
281
+ - spec/tailor/rulers/spaces_after_comma_ruler_spec.rb
261
282
  - spec/tailor/rulers/spaces_after_lbrace_ruler_spec.rb
262
283
  - spec/tailor/rulers/spaces_before_lbrace_ruler_spec.rb
263
284
  - spec/tailor/rulers/spaces_before_rbrace_ruler_spec.rb
@@ -271,6 +292,7 @@ files:
271
292
  - tasks/spec.rake
272
293
  - tasks/stats.rake
273
294
  - tasks/yard.rake
295
+ - uest.rb
274
296
  homepage: http://github.com/turboladen/tailor
275
297
  licenses: []
276
298
  post_install_message:
@@ -286,15 +308,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
286
308
  required_rubygems_version: !ruby/object:Gem::Requirement
287
309
  none: false
288
310
  requirements:
289
- - - ! '>'
311
+ - - ! '>='
290
312
  - !ruby/object:Gem::Version
291
- version: 1.3.1
313
+ version: '0'
292
314
  requirements: []
293
315
  rubyforge_project:
294
316
  rubygems_version: 1.8.17
295
317
  signing_key:
296
318
  specification_version: 3
297
- summary: ruby style checking tool
319
+ summary: A Ruby style & complexity measurer
298
320
  test_files:
299
321
  - features/configurable.feature
300
322
  - features/horizontal_spacing.feature
@@ -303,7 +325,6 @@ test_files:
303
325
  - features/indentation/good_files_with_no_trailing_newline.feature
304
326
  - features/name_detection.feature
305
327
  - features/step_definitions/indentation_steps.rb
306
- - features/step_definitions/spacing/commas_steps.rb
307
328
  - features/support/env.rb
308
329
  - features/support/file_cases/horizontal_spacing_cases.rb
309
330
  - features/support/file_cases/indentation_cases.rb
@@ -314,11 +335,15 @@ test_files:
314
335
  - features/support/legacy/bad_ternary_colon_spacing.rb
315
336
  - features/support/legacy/long_file_with_indentation.rb
316
337
  - features/support/world.rb
338
+ - features/valid_ruby.feature
317
339
  - features/vertical_spacing.feature
318
340
  - spec/spec_helper.rb
319
341
  - spec/tailor/cli_spec.rb
342
+ - spec/tailor/composite_observable_spec.rb
343
+ - spec/tailor/configuration/style_spec.rb
320
344
  - spec/tailor/configuration_spec.rb
321
345
  - spec/tailor/critic_spec.rb
346
+ - spec/tailor/formatter_spec.rb
322
347
  - spec/tailor/lexed_line_spec.rb
323
348
  - spec/tailor/lexer/token_spec.rb
324
349
  - spec/tailor/lexer_spec.rb
@@ -328,7 +353,7 @@ test_files:
328
353
  - spec/tailor/ruler_spec.rb
329
354
  - spec/tailor/rulers/indentation_spaces_ruler/indentation_manager_spec.rb
330
355
  - spec/tailor/rulers/indentation_spaces_ruler_spec.rb
331
- - spec/tailor/rulers/spaces_after_comma_spec.rb
356
+ - spec/tailor/rulers/spaces_after_comma_ruler_spec.rb
332
357
  - spec/tailor/rulers/spaces_after_lbrace_ruler_spec.rb
333
358
  - spec/tailor/rulers/spaces_before_lbrace_ruler_spec.rb
334
359
  - spec/tailor/rulers/spaces_before_rbrace_ruler_spec.rb