tailor 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/Gemfile.lock +27 -25
- data/History.md +36 -0
- data/README.md +10 -4
- data/Rakefile +6 -6
- data/features/support/env.rb +2 -2
- data/features/support/legacy/bad_ternary_colon_spacing.rb +1 -1
- data/features/support/legacy/long_file_with_indentation.rb +2 -2
- data/features/support/world.rb +1 -1
- data/features/valid_ruby.feature +1 -1
- data/lib/tailor/cli/options.rb +19 -1
- data/lib/tailor/configuration.rb +2 -2
- data/lib/tailor/configuration/style.rb +6 -0
- data/lib/tailor/lexed_line.rb +2 -2
- data/lib/tailor/lexer/lexer_constants.rb +1 -0
- data/lib/tailor/lexer/token.rb +2 -2
- data/lib/tailor/logger.rb +2 -2
- data/lib/tailor/rake_task.rb +2 -2
- data/lib/tailor/ruler.rb +0 -1
- data/lib/tailor/rulers/allow_camel_case_methods_ruler.rb +0 -1
- data/lib/tailor/rulers/allow_conditional_parentheses.rb +65 -0
- data/lib/tailor/rulers/allow_unnecessary_double_quotes_ruler.rb +61 -0
- data/lib/tailor/rulers/allow_unnecessary_interpolation_ruler.rb +87 -0
- data/lib/tailor/rulers/indentation_spaces_ruler.rb +40 -50
- data/lib/tailor/rulers/indentation_spaces_ruler/argument_alignment.rb +63 -0
- data/lib/tailor/rulers/indentation_spaces_ruler/ast_xml.rb +89 -0
- data/lib/tailor/rulers/indentation_spaces_ruler/indentation_manager.rb +2 -14
- data/lib/tailor/rulers/indentation_spaces_ruler/line_continuations.rb +58 -0
- data/lib/tailor/rulers/max_code_lines_in_class_ruler.rb +3 -3
- data/lib/tailor/rulers/max_code_lines_in_method_ruler.rb +3 -3
- data/lib/tailor/rulers/spaces_after_comma_ruler.rb +3 -3
- data/lib/tailor/rulers/spaces_after_conditional_ruler.rb +3 -3
- data/lib/tailor/rulers/spaces_after_lbrace_ruler.rb +3 -3
- data/lib/tailor/rulers/spaces_after_lbracket_ruler.rb +3 -3
- data/lib/tailor/rulers/spaces_after_lparen_ruler.rb +3 -3
- data/lib/tailor/rulers/spaces_before_comma_ruler.rb +3 -3
- data/lib/tailor/rulers/spaces_before_rbrace_ruler.rb +2 -2
- data/lib/tailor/rulers/spaces_in_empty_braces_ruler.rb +2 -2
- data/lib/tailor/tailorrc.erb +28 -0
- data/lib/tailor/version.rb +1 -1
- data/spec/functional/conditional_parentheses_spec.rb +325 -0
- data/spec/functional/conditional_spacing_spec.rb +66 -42
- data/spec/functional/configuration_spec.rb +1 -1
- data/spec/functional/horizontal_spacing/braces_spec.rb +10 -9
- data/spec/functional/horizontal_spacing/hard_tabs_spec.rb +4 -4
- data/spec/functional/horizontal_spacing_spec.rb +5 -5
- data/spec/functional/indentation_spacing/argument_alignment_spec.rb +511 -0
- data/spec/functional/indentation_spacing/line_continuations_spec.rb +181 -0
- data/spec/functional/indentation_spacing_spec.rb +17 -0
- data/spec/functional/string_interpolation_spec.rb +117 -0
- data/spec/functional/string_quoting_spec.rb +97 -0
- data/spec/functional/vertical_spacing/class_length_spec.rb +1 -1
- data/spec/spec_helper.rb +8 -2
- data/spec/support/argument_alignment_cases.rb +93 -0
- data/spec/support/bad_indentation_cases.rb +20 -20
- data/spec/support/conditional_parentheses_cases.rb +60 -0
- data/spec/support/good_indentation_cases.rb +31 -31
- data/spec/support/horizontal_spacing_cases.rb +1 -1
- data/spec/support/line_indentation_cases.rb +71 -0
- data/spec/support/string_interpolation_cases.rb +45 -0
- data/spec/support/string_quoting_cases.rb +25 -0
- data/spec/unit/tailor/configuration/file_set_spec.rb +3 -3
- data/spec/unit/tailor/configuration/style_spec.rb +24 -21
- data/spec/unit/tailor/configuration_spec.rb +4 -1
- data/spec/unit/tailor/formatter_spec.rb +10 -10
- data/spec/unit/tailor/reporter_spec.rb +0 -1
- data/spec/unit/tailor/rulers/indentation_spaces_ruler/indentation_manager_spec.rb +0 -11
- data/spec/unit/tailor/rulers/indentation_spaces_ruler_spec.rb +1 -1
- data/spec/unit/tailor/version_spec.rb +1 -1
- data/tailor.gemspec +1 -0
- metadata +72 -33
- data/.infinity_test +0 -4
@@ -0,0 +1,45 @@
|
|
1
|
+
INTERPOLATION = {}
|
2
|
+
|
3
|
+
INTERPOLATION['one_variable_interpolated_only'] =
|
4
|
+
%q{puts "#{bing}"
|
5
|
+
}
|
6
|
+
|
7
|
+
INTERPOLATION['mixed_content_and_expression'] =
|
8
|
+
%q{puts "hello: #{bing}"
|
9
|
+
}
|
10
|
+
|
11
|
+
INTERPOLATION['no_string'] =
|
12
|
+
%q{puts bing
|
13
|
+
}
|
14
|
+
|
15
|
+
INTERPOLATION['two_variables'] =
|
16
|
+
%q{puts "#{bing}#{bar}"
|
17
|
+
}
|
18
|
+
|
19
|
+
INTERPOLATION['two_strings_with_unnecessary_interpolation'] =
|
20
|
+
%q{puts "#{foo}" + "#{bar}"
|
21
|
+
}
|
22
|
+
|
23
|
+
INTERPOLATION['multiline_string_with_unnecessary_interpolation'] =
|
24
|
+
%q{puts "#{foo +
|
25
|
+
bar -
|
26
|
+
baz}"
|
27
|
+
}
|
28
|
+
|
29
|
+
INTERPOLATION['multiline_word_list'] =
|
30
|
+
%q{%w{
|
31
|
+
foo
|
32
|
+
bar
|
33
|
+
baz
|
34
|
+
}}
|
35
|
+
|
36
|
+
INTERPOLATION['nested_interpolation'] =
|
37
|
+
%q[def friendly_time(time)
|
38
|
+
if hours < 24
|
39
|
+
"#{(hours > 0) ? "#{hours} hour" : '' }#{(hours > 1) ? 's' : ''}" +
|
40
|
+
" #{(mins > 0) ? "#{mins} minute" : '' }#{(mins > 1) ? 's' : ''}" +
|
41
|
+
" #{seconds} second#{(seconds > 1) ? "s" : ''} ago"
|
42
|
+
else
|
43
|
+
time.to_s
|
44
|
+
end
|
45
|
+
end]
|
@@ -0,0 +1,25 @@
|
|
1
|
+
QUOTING = {}
|
2
|
+
|
3
|
+
QUOTING['single_quotes_no_interpolation'] =
|
4
|
+
%q{foo = 'bar'
|
5
|
+
}
|
6
|
+
|
7
|
+
QUOTING['double_quotes_with_interpolation'] =
|
8
|
+
%q{foo = "bar#{baz}"
|
9
|
+
}
|
10
|
+
|
11
|
+
QUOTING['double_quotes_no_interpolation'] =
|
12
|
+
%q{foo = "bar"
|
13
|
+
}
|
14
|
+
|
15
|
+
QUOTING['double_quotes_no_interpolation_twice'] =
|
16
|
+
%q{foo = "bar" + "baz"
|
17
|
+
}
|
18
|
+
|
19
|
+
QUOTING['escape_sequence'] =
|
20
|
+
%q{foo = "bar\n"
|
21
|
+
}
|
22
|
+
|
23
|
+
QUOTING['nested_quotes'] =
|
24
|
+
%q{foo = "foo#{bar('baz')}"
|
25
|
+
}
|
@@ -13,7 +13,7 @@ describe Tailor::Configuration::FileSet do
|
|
13
13
|
it 'builds an Array with that file\'s expanded path' do
|
14
14
|
new_list = subject.instance_eval { build_file_list('./test.rb') }
|
15
15
|
new_list.should be_an Array
|
16
|
-
new_list.first.should match
|
16
|
+
new_list.first.should match %r[/test.rb$]
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
@@ -31,7 +31,7 @@ describe Tailor::Configuration::FileSet do
|
|
31
31
|
|
32
32
|
it 'returns the Array with expanded file paths' do
|
33
33
|
subject.instance_eval { build_file_list(['test.rb']) }.
|
34
|
-
first.should match
|
34
|
+
first.should match %r[/test.rb$]
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
@@ -59,7 +59,7 @@ describe Tailor::Configuration::FileSet do
|
|
59
59
|
subject.update_file_list('test2.rb')
|
60
60
|
subject.instance_variable_get(:@file_list).size.should be 2
|
61
61
|
subject.instance_variable_get(:@file_list).last.
|
62
|
-
should match
|
62
|
+
should match %r[/test2.rb]
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|
@@ -156,27 +156,30 @@ describe Tailor::Configuration::Style do
|
|
156
156
|
describe '#to_hash' do
|
157
157
|
let(:default_values) do
|
158
158
|
{
|
159
|
-
:
|
160
|
-
:
|
161
|
-
:
|
162
|
-
:
|
163
|
-
:
|
164
|
-
:
|
165
|
-
:
|
166
|
-
:
|
167
|
-
:
|
168
|
-
:
|
169
|
-
:
|
170
|
-
:
|
171
|
-
:
|
172
|
-
:
|
173
|
-
:
|
174
|
-
:
|
175
|
-
:
|
176
|
-
:
|
177
|
-
:
|
178
|
-
:
|
179
|
-
:
|
159
|
+
allow_camel_case_methods: [false, { level: :error }],
|
160
|
+
allow_conditional_parentheses: [false, { level: :warn }],
|
161
|
+
allow_hard_tabs: [false, { level: :error }],
|
162
|
+
allow_screaming_snake_case_classes: [false, { level: :error }],
|
163
|
+
allow_trailing_line_spaces: [false, { level: :error }],
|
164
|
+
allow_unnecessary_interpolation: [false, { level: :warn }],
|
165
|
+
allow_invalid_ruby: [false, { level: :warn }],
|
166
|
+
allow_unnecessary_double_quotes: [false, { level: :warn }],
|
167
|
+
indentation_spaces: [2, { level: :error }],
|
168
|
+
max_code_lines_in_class: [300, { level: :error }],
|
169
|
+
max_code_lines_in_method: [30, { level: :error }],
|
170
|
+
max_line_length: [80, { level: :error }],
|
171
|
+
spaces_after_comma: [1, { level: :error }],
|
172
|
+
spaces_after_conditional: [1, { level: :error }],
|
173
|
+
spaces_after_lbrace: [1, { level: :error }],
|
174
|
+
spaces_after_lbracket: [0, { level: :error }],
|
175
|
+
spaces_after_lparen: [0, { level: :error }],
|
176
|
+
spaces_before_comma: [0, { level: :error }],
|
177
|
+
spaces_before_lbrace: [1, { level: :error }],
|
178
|
+
spaces_before_rbrace: [1, { level: :error }],
|
179
|
+
spaces_before_rbracket: [0, { level: :error }],
|
180
|
+
spaces_before_rparen: [0, { level: :error }],
|
181
|
+
spaces_in_empty_braces: [0, { level: :error }],
|
182
|
+
trailing_newlines: [1, { level: :error }]
|
180
183
|
}
|
181
184
|
end
|
182
185
|
|
@@ -40,16 +40,19 @@ describe Tailor::Configuration do
|
|
40
40
|
file_list: [],
|
41
41
|
style: {
|
42
42
|
allow_camel_case_methods: [false, { level: :error }],
|
43
|
+
allow_conditional_parentheses: [false, { level: :warn }],
|
43
44
|
allow_hard_tabs: [false, { level: :error }],
|
44
45
|
allow_screaming_snake_case_classes: [false, { level: :error }],
|
45
46
|
allow_trailing_line_spaces: [false, { level: :error }],
|
47
|
+
allow_unnecessary_interpolation: [false, { level: :warn }],
|
46
48
|
allow_invalid_ruby: [false, { level: :warn }],
|
49
|
+
allow_unnecessary_double_quotes: [false, { level: :warn }],
|
47
50
|
indentation_spaces: [2, { level: :error }],
|
48
51
|
max_code_lines_in_class: [300, { level: :error }],
|
49
52
|
max_code_lines_in_method: [30, { level: :error }],
|
50
53
|
max_line_length: [80, { level: :error }],
|
51
54
|
spaces_after_comma: [1, { level: :error }],
|
52
|
-
spaces_after_conditional: [1, { :
|
55
|
+
spaces_after_conditional: [1, { level: :error }],
|
53
56
|
spaces_after_lbrace: [1, { level: :error }],
|
54
57
|
spaces_after_lbracket: [0, { level: :error }],
|
55
58
|
spaces_after_lparen: [0, { level: :error }],
|
@@ -10,11 +10,11 @@ describe Tailor::Formatter do
|
|
10
10
|
{
|
11
11
|
'some_file.rb' => [
|
12
12
|
{
|
13
|
-
:
|
14
|
-
:
|
15
|
-
:
|
16
|
-
:
|
17
|
-
:
|
13
|
+
type: 'allow_invalid_ruby',
|
14
|
+
line: 0,
|
15
|
+
column: 0,
|
16
|
+
message: msg,
|
17
|
+
level: :warn
|
18
18
|
}
|
19
19
|
]
|
20
20
|
}
|
@@ -33,11 +33,11 @@ describe Tailor::Formatter do
|
|
33
33
|
|
34
34
|
subject.problems_at_level(problems, :warn).should == [
|
35
35
|
{
|
36
|
-
:
|
37
|
-
:
|
38
|
-
:
|
39
|
-
:
|
40
|
-
:
|
36
|
+
type: 'allow_invalid_ruby',
|
37
|
+
line: 0,
|
38
|
+
column: 0,
|
39
|
+
message: msg,
|
40
|
+
level: :warn
|
41
41
|
}
|
42
42
|
]
|
43
43
|
end
|
@@ -69,17 +69,6 @@ describe Tailor::Rulers::IndentationSpacesRuler::IndentationManager do
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
describe '#set_up_line_transition' do
|
73
|
-
context '@amount_to_change_this < 0' do
|
74
|
-
before { subject.instance_variable_set(:@amount_to_change_this, -1) }
|
75
|
-
|
76
|
-
it 'should call #decrease_this_line' do
|
77
|
-
subject.should_receive(:decrease_this_line)
|
78
|
-
subject.set_up_line_transition
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
72
|
describe '#transition_lines' do
|
84
73
|
context '#started? is true' do
|
85
74
|
before { subject.stub(:started?).and_return true }
|
@@ -44,7 +44,7 @@ describe Tailor::Rulers::IndentationSpacesRuler do
|
|
44
44
|
|
45
45
|
describe '#embexpr_end_update' do
|
46
46
|
before do
|
47
|
-
lexed_line.should_receive(:
|
47
|
+
lexed_line.should_receive(:only_embexpr_end?).and_return(false)
|
48
48
|
end
|
49
49
|
|
50
50
|
it 'pops @embexpr_nesting' do
|
data/tailor.gemspec
CHANGED
@@ -27,6 +27,7 @@ project, whatever style that may be.
|
|
27
27
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
28
28
|
|
29
29
|
s.add_runtime_dependency 'log_switch', '>= 0.3.0'
|
30
|
+
s.add_runtime_dependency 'nokogiri', '>= 1.6.0'
|
30
31
|
s.add_runtime_dependency 'term-ansicolor', '>= 1.0.5'
|
31
32
|
s.add_runtime_dependency 'text-table', '>= 1.2.2'
|
32
33
|
|
metadata
CHANGED
@@ -1,167 +1,181 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tailor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Loveless
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: log_switch
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.3.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.3.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: nokogiri
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.6.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.6.0
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: term-ansicolor
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- -
|
45
|
+
- - ">="
|
32
46
|
- !ruby/object:Gem::Version
|
33
47
|
version: 1.0.5
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- -
|
52
|
+
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: 1.0.5
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: text-table
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- -
|
59
|
+
- - ">="
|
46
60
|
- !ruby/object:Gem::Version
|
47
61
|
version: 1.2.2
|
48
62
|
type: :runtime
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- -
|
66
|
+
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: 1.2.2
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: aruba
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- -
|
73
|
+
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
75
|
version: '0'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- -
|
80
|
+
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: bundler
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- -
|
87
|
+
- - ">="
|
74
88
|
- !ruby/object:Gem::Version
|
75
89
|
version: '0'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- -
|
94
|
+
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: cucumber
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- -
|
101
|
+
- - ">="
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: 1.0.2
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- -
|
108
|
+
- - ">="
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: 1.0.2
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: fakefs
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- -
|
115
|
+
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: 0.4.2
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- -
|
122
|
+
- - ">="
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: 0.4.2
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: rake
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- -
|
129
|
+
- - ">="
|
116
130
|
- !ruby/object:Gem::Version
|
117
131
|
version: '0'
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- -
|
136
|
+
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: rspec
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
|
-
- -
|
143
|
+
- - ">="
|
130
144
|
- !ruby/object:Gem::Version
|
131
145
|
version: 2.5.0
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
|
-
- -
|
150
|
+
- - ">="
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: 2.5.0
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: simplecov
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
|
-
- -
|
157
|
+
- - ">="
|
144
158
|
- !ruby/object:Gem::Version
|
145
159
|
version: 0.4.0
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
|
-
- -
|
164
|
+
- - ">="
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: 0.4.0
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: yard
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
|
-
- -
|
171
|
+
- - ">="
|
158
172
|
- !ruby/object:Gem::Version
|
159
173
|
version: 0.7.0
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
|
-
- -
|
178
|
+
- - ">="
|
165
179
|
- !ruby/object:Gem::Version
|
166
180
|
version: 0.7.0
|
167
181
|
description: |
|
@@ -180,12 +194,11 @@ extra_rdoc_files:
|
|
180
194
|
- History.md
|
181
195
|
- README.md
|
182
196
|
files:
|
183
|
-
- .gemtest
|
184
|
-
- .gitignore
|
185
|
-
- .
|
186
|
-
- .
|
187
|
-
- .
|
188
|
-
- .travis.yml
|
197
|
+
- ".gemtest"
|
198
|
+
- ".gitignore"
|
199
|
+
- ".rspec"
|
200
|
+
- ".tailor"
|
201
|
+
- ".travis.yml"
|
189
202
|
- Gemfile
|
190
203
|
- Gemfile.lock
|
191
204
|
- History.md
|
@@ -226,12 +239,18 @@ files:
|
|
226
239
|
- lib/tailor/ruler.rb
|
227
240
|
- lib/tailor/rulers.rb
|
228
241
|
- lib/tailor/rulers/allow_camel_case_methods_ruler.rb
|
242
|
+
- lib/tailor/rulers/allow_conditional_parentheses.rb
|
229
243
|
- lib/tailor/rulers/allow_hard_tabs_ruler.rb
|
230
244
|
- lib/tailor/rulers/allow_invalid_ruby_ruler.rb
|
231
245
|
- lib/tailor/rulers/allow_screaming_snake_case_classes_ruler.rb
|
232
246
|
- lib/tailor/rulers/allow_trailing_line_spaces_ruler.rb
|
247
|
+
- lib/tailor/rulers/allow_unnecessary_double_quotes_ruler.rb
|
248
|
+
- lib/tailor/rulers/allow_unnecessary_interpolation_ruler.rb
|
233
249
|
- lib/tailor/rulers/indentation_spaces_ruler.rb
|
250
|
+
- lib/tailor/rulers/indentation_spaces_ruler/argument_alignment.rb
|
251
|
+
- lib/tailor/rulers/indentation_spaces_ruler/ast_xml.rb
|
234
252
|
- lib/tailor/rulers/indentation_spaces_ruler/indentation_manager.rb
|
253
|
+
- lib/tailor/rulers/indentation_spaces_ruler/line_continuations.rb
|
235
254
|
- lib/tailor/rulers/max_code_lines_in_class_ruler.rb
|
236
255
|
- lib/tailor/rulers/max_code_lines_in_method_ruler.rb
|
237
256
|
- lib/tailor/rulers/max_line_length_ruler.rb
|
@@ -250,6 +269,7 @@ files:
|
|
250
269
|
- lib/tailor/runtime_error.rb
|
251
270
|
- lib/tailor/tailorrc.erb
|
252
271
|
- lib/tailor/version.rb
|
272
|
+
- spec/functional/conditional_parentheses_spec.rb
|
253
273
|
- spec/functional/conditional_spacing_spec.rb
|
254
274
|
- spec/functional/configuration_spec.rb
|
255
275
|
- spec/functional/horizontal_spacing/braces_spec.rb
|
@@ -261,23 +281,32 @@ files:
|
|
261
281
|
- spec/functional/horizontal_spacing/parens_spec.rb
|
262
282
|
- spec/functional/horizontal_spacing/trailing_whitespace_spec.rb
|
263
283
|
- spec/functional/horizontal_spacing_spec.rb
|
284
|
+
- spec/functional/indentation_spacing/argument_alignment_spec.rb
|
264
285
|
- spec/functional/indentation_spacing/bad_indentation_spec.rb
|
286
|
+
- spec/functional/indentation_spacing/line_continuations_spec.rb
|
265
287
|
- spec/functional/indentation_spacing_spec.rb
|
266
288
|
- spec/functional/naming/camel_case_methods_spec.rb
|
267
289
|
- spec/functional/naming/screaming_snake_case_classes_spec.rb
|
268
290
|
- spec/functional/naming_spec.rb
|
269
291
|
- spec/functional/rake_task_spec.rb
|
292
|
+
- spec/functional/string_interpolation_spec.rb
|
293
|
+
- spec/functional/string_quoting_spec.rb
|
270
294
|
- spec/functional/vertical_spacing/class_length_spec.rb
|
271
295
|
- spec/functional/vertical_spacing/method_length_spec.rb
|
272
296
|
- spec/functional/vertical_spacing_spec.rb
|
273
297
|
- spec/spec_helper.rb
|
298
|
+
- spec/support/argument_alignment_cases.rb
|
274
299
|
- spec/support/bad_indentation_cases.rb
|
300
|
+
- spec/support/conditional_parentheses_cases.rb
|
275
301
|
- spec/support/conditional_spacing_cases.rb
|
276
302
|
- spec/support/good_indentation_cases.rb
|
277
303
|
- spec/support/horizontal_spacing_cases.rb
|
304
|
+
- spec/support/line_indentation_cases.rb
|
278
305
|
- spec/support/naming_cases.rb
|
279
306
|
- spec/support/rake_task_config_no_problems.rb
|
280
307
|
- spec/support/rake_task_config_problems.rb
|
308
|
+
- spec/support/string_interpolation_cases.rb
|
309
|
+
- spec/support/string_quoting_cases.rb
|
281
310
|
- spec/support/vertical_spacing_cases.rb
|
282
311
|
- spec/unit/tailor/cli/options_spec.rb
|
283
312
|
- spec/unit/tailor/cli_spec.rb
|
@@ -314,17 +343,17 @@ require_paths:
|
|
314
343
|
- lib
|
315
344
|
required_ruby_version: !ruby/object:Gem::Requirement
|
316
345
|
requirements:
|
317
|
-
- -
|
346
|
+
- - ">="
|
318
347
|
- !ruby/object:Gem::Version
|
319
348
|
version: '0'
|
320
349
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
321
350
|
requirements:
|
322
|
-
- -
|
351
|
+
- - ">="
|
323
352
|
- !ruby/object:Gem::Version
|
324
353
|
version: '0'
|
325
354
|
requirements: []
|
326
355
|
rubyforge_project:
|
327
|
-
rubygems_version: 2.0
|
356
|
+
rubygems_version: 2.2.0
|
328
357
|
signing_key:
|
329
358
|
specification_version: 4
|
330
359
|
summary: A Ruby style & complexity measurer
|
@@ -340,6 +369,7 @@ test_files:
|
|
340
369
|
- features/support/legacy/long_file_with_indentation.rb
|
341
370
|
- features/support/world.rb
|
342
371
|
- features/valid_ruby.feature
|
372
|
+
- spec/functional/conditional_parentheses_spec.rb
|
343
373
|
- spec/functional/conditional_spacing_spec.rb
|
344
374
|
- spec/functional/configuration_spec.rb
|
345
375
|
- spec/functional/horizontal_spacing/braces_spec.rb
|
@@ -351,23 +381,32 @@ test_files:
|
|
351
381
|
- spec/functional/horizontal_spacing/parens_spec.rb
|
352
382
|
- spec/functional/horizontal_spacing/trailing_whitespace_spec.rb
|
353
383
|
- spec/functional/horizontal_spacing_spec.rb
|
384
|
+
- spec/functional/indentation_spacing/argument_alignment_spec.rb
|
354
385
|
- spec/functional/indentation_spacing/bad_indentation_spec.rb
|
386
|
+
- spec/functional/indentation_spacing/line_continuations_spec.rb
|
355
387
|
- spec/functional/indentation_spacing_spec.rb
|
356
388
|
- spec/functional/naming/camel_case_methods_spec.rb
|
357
389
|
- spec/functional/naming/screaming_snake_case_classes_spec.rb
|
358
390
|
- spec/functional/naming_spec.rb
|
359
391
|
- spec/functional/rake_task_spec.rb
|
392
|
+
- spec/functional/string_interpolation_spec.rb
|
393
|
+
- spec/functional/string_quoting_spec.rb
|
360
394
|
- spec/functional/vertical_spacing/class_length_spec.rb
|
361
395
|
- spec/functional/vertical_spacing/method_length_spec.rb
|
362
396
|
- spec/functional/vertical_spacing_spec.rb
|
363
397
|
- spec/spec_helper.rb
|
398
|
+
- spec/support/argument_alignment_cases.rb
|
364
399
|
- spec/support/bad_indentation_cases.rb
|
400
|
+
- spec/support/conditional_parentheses_cases.rb
|
365
401
|
- spec/support/conditional_spacing_cases.rb
|
366
402
|
- spec/support/good_indentation_cases.rb
|
367
403
|
- spec/support/horizontal_spacing_cases.rb
|
404
|
+
- spec/support/line_indentation_cases.rb
|
368
405
|
- spec/support/naming_cases.rb
|
369
406
|
- spec/support/rake_task_config_no_problems.rb
|
370
407
|
- spec/support/rake_task_config_problems.rb
|
408
|
+
- spec/support/string_interpolation_cases.rb
|
409
|
+
- spec/support/string_quoting_cases.rb
|
371
410
|
- spec/support/vertical_spacing_cases.rb
|
372
411
|
- spec/unit/tailor/cli/options_spec.rb
|
373
412
|
- spec/unit/tailor/cli_spec.rb
|