tailor 0.1.5 → 1.0.0.alpha
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -1
- data/.rspec +2 -1
- data/.tailor +6 -0
- data/Gemfile.lock +47 -78
- data/{ChangeLog.rdoc → History.rdoc} +0 -0
- data/README.rdoc +157 -24
- data/Rakefile +0 -9
- data/bin/tailor +16 -69
- data/features/configurable.feature +78 -0
- data/features/horizontal_spacing.feature +262 -0
- data/features/indentation.feature +17 -21
- data/features/indentation/bad_files_with_no_trailing_newline.feature +90 -0
- data/features/indentation/good_files_with_no_trailing_newline.feature +206 -0
- data/features/name_detection.feature +72 -0
- data/features/step_definitions/indentation_steps.rb +10 -133
- data/features/support/env.rb +7 -15
- data/features/support/file_cases/horizontal_spacing_cases.rb +265 -0
- data/features/support/file_cases/indentation_cases.rb +972 -0
- data/features/support/file_cases/naming_cases.rb +52 -0
- data/features/support/file_cases/vertical_spacing_cases.rb +70 -0
- data/features/support/hooks.rb +8 -0
- data/features/support/{1_file_with_bad_operator_spacing → legacy}/bad_op_spacing.rb +0 -0
- data/features/support/{1_file_with_bad_ternary_colon_spacing → legacy}/bad_ternary_colon_spacing.rb +0 -0
- data/features/support/{1_long_file_with_indentation/my_project.rb → legacy/long_file_with_indentation.rb} +1 -1
- data/features/support/world.rb +14 -0
- data/features/vertical_spacing.feature +114 -0
- data/lib/ext/string_ext.rb +5 -0
- data/lib/tailor.rb +6 -252
- data/lib/tailor/cli.rb +49 -0
- data/lib/tailor/cli/options.rb +251 -0
- data/lib/tailor/composite_observable.rb +56 -0
- data/lib/tailor/configuration.rb +263 -0
- data/lib/tailor/critic.rb +162 -0
- data/lib/tailor/formatters/text.rb +126 -0
- data/lib/tailor/lexed_line.rb +246 -0
- data/lib/tailor/lexer.rb +428 -0
- data/lib/tailor/lexer/token.rb +103 -0
- data/lib/tailor/lexer_constants.rb +75 -0
- data/lib/tailor/logger.rb +28 -0
- data/lib/tailor/problem.rb +100 -0
- data/lib/tailor/reporter.rb +48 -0
- data/lib/tailor/ruler.rb +39 -0
- data/lib/tailor/rulers.rb +7 -0
- data/lib/tailor/rulers/allow_camel_case_methods_ruler.rb +30 -0
- data/lib/tailor/rulers/allow_hard_tabs_ruler.rb +22 -0
- data/lib/tailor/rulers/allow_screaming_snake_case_classes_ruler.rb +32 -0
- data/lib/tailor/rulers/allow_trailing_line_spaces_ruler.rb +33 -0
- data/lib/tailor/rulers/indentation_spaces_ruler.rb +199 -0
- data/lib/tailor/rulers/indentation_spaces_ruler/indentation_manager.rb +362 -0
- data/lib/tailor/rulers/max_code_lines_in_class_ruler.rb +84 -0
- data/lib/tailor/rulers/max_code_lines_in_method_ruler.rb +84 -0
- data/lib/tailor/rulers/max_line_length_ruler.rb +31 -0
- data/lib/tailor/rulers/spaces_after_comma_ruler.rb +83 -0
- data/lib/tailor/rulers/spaces_after_lbrace_ruler.rb +114 -0
- data/lib/tailor/rulers/spaces_after_lbracket_ruler.rb +123 -0
- data/lib/tailor/rulers/spaces_after_lparen_ruler.rb +116 -0
- data/lib/tailor/rulers/spaces_before_comma_ruler.rb +67 -0
- data/lib/tailor/rulers/spaces_before_lbrace_ruler.rb +93 -0
- data/lib/tailor/rulers/spaces_before_rbrace_ruler.rb +98 -0
- data/lib/tailor/rulers/spaces_before_rbracket_ruler.rb +70 -0
- data/lib/tailor/rulers/spaces_before_rparen_ruler.rb +70 -0
- data/lib/tailor/rulers/spaces_in_empty_braces_ruler.rb +94 -0
- data/lib/tailor/rulers/trailing_newlines_ruler.rb +36 -0
- data/lib/tailor/runtime_error.rb +3 -0
- data/lib/tailor/tailorrc.erb +88 -0
- data/lib/tailor/version.rb +2 -2
- data/spec/spec_helper.rb +7 -5
- data/spec/tailor/cli_spec.rb +94 -0
- data/spec/tailor/configuration_spec.rb +147 -0
- data/spec/tailor/critic_spec.rb +63 -0
- data/spec/tailor/lexed_line_spec.rb +569 -0
- data/spec/tailor/lexer/token_spec.rb +46 -0
- data/spec/tailor/lexer_spec.rb +181 -0
- data/spec/tailor/options_spec.rb +6 -0
- data/spec/tailor/problem_spec.rb +74 -0
- data/spec/tailor/reporter_spec.rb +53 -0
- data/spec/tailor/ruler_spec.rb +56 -0
- data/spec/tailor/rulers/indentation_spaces_ruler/indentation_manager_spec.rb +454 -0
- data/spec/tailor/rulers/indentation_spaces_ruler_spec.rb +128 -0
- data/spec/tailor/rulers/spaces_after_comma_spec.rb +31 -0
- data/spec/tailor/rulers/spaces_after_lbrace_ruler_spec.rb +145 -0
- data/spec/tailor/rulers/spaces_before_lbrace_ruler_spec.rb +63 -0
- data/spec/tailor/rulers/spaces_before_rbrace_ruler_spec.rb +63 -0
- data/spec/tailor/rulers_spec.rb +9 -0
- data/spec/tailor/version_spec.rb +6 -0
- data/spec/tailor_spec.rb +9 -21
- data/tailor.gemspec +22 -35
- data/tasks/features.rake +7 -0
- data/tasks/roodi.rake +9 -0
- data/tasks/roodi_config.yaml +14 -0
- data/tasks/spec.rake +16 -0
- data/tasks/yard.rake +14 -0
- metadata +224 -77
- data/features/case_checking.feature +0 -38
- data/features/spacing.feature +0 -97
- data/features/spacing/commas.feature +0 -44
- data/features/step_definitions/case_checking_steps.rb +0 -42
- data/features/step_definitions/spacing_steps.rb +0 -156
- data/features/support/1_file_with_bad_comma_spacing/bad_comma_spacing.rb +0 -43
- data/features/support/1_file_with_bad_curly_brace_spacing/bad_curly_brace_spacing.rb +0 -60
- data/features/support/1_file_with_bad_parenthesis/bad_parenthesis.rb +0 -4
- data/features/support/1_file_with_bad_square_brackets/bad_square_brackets.rb +0 -62
- data/features/support/1_file_with_camel_case_class/camel_case_class.rb +0 -5
- data/features/support/1_file_with_camel_case_method/camel_case_method.rb +0 -3
- data/features/support/1_file_with_hard_tabs/hard_tab.rb +0 -3
- data/features/support/1_file_with_long_lines/long_lines.rb +0 -5
- data/features/support/1_file_with_snake_case_class/snake_case_class.rb +0 -5
- data/features/support/1_file_with_snake_case_method/snake_case_method.rb +0 -3
- data/features/support/1_file_with_trailing_whitespace/trailing_whitespace.rb +0 -5
- data/features/support/1_good_simple_file/simple_project.rb +0 -5
- data/features/support/common.rb +0 -102
- data/features/support/matchers.rb +0 -11
- data/lib/tailor/file_line.rb +0 -220
- data/lib/tailor/indentation.rb +0 -245
- data/lib/tailor/spacing.rb +0 -237
- data/spec/file_line_spec.rb +0 -70
- data/spec/indentation_spec.rb +0 -259
- data/spec/spacing/colon_spacing_spec.rb +0 -71
- data/spec/spacing/comma_spacing_spec.rb +0 -159
- data/spec/spacing/curly_brace_spacing_spec.rb +0 -257
- data/spec/spacing/parentheses_spacing_spec.rb +0 -28
- data/spec/spacing/square_bracket_spacing_spec.rb +0 -116
- data/spec/spacing_spec.rb +0 -167
- data/tasks/metrics.rake +0 -23
data/spec/tailor_spec.rb
CHANGED
@@ -1,27 +1,15 @@
|
|
1
1
|
require_relative 'spec_helper'
|
2
|
+
require 'tailor'
|
2
3
|
|
3
|
-
describe
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
fn.chomp!(File.extname(fn))
|
4
|
+
describe Tailor do
|
5
|
+
describe "::config" do
|
6
|
+
it "creates a new Configuration object" do
|
7
|
+
Tailor::Configuration.should_receive(:new)
|
8
|
+
Tailor.config
|
9
9
|
end
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
# Try to require each of the files in Tailor
|
14
|
-
get_requires.each do |r|
|
15
|
-
it "should require #{r}" do
|
16
|
-
# A require returns true if it was required, false if it had already been
|
17
|
-
# required, and nil if it couldn't require.
|
18
|
-
Kernel.require(r.to_s).should_not be_nil
|
10
|
+
|
11
|
+
it "returns a Configuration object" do
|
12
|
+
Tailor.config.should be_a Tailor::Configuration
|
19
13
|
end
|
20
14
|
end
|
21
15
|
end
|
22
|
-
|
23
|
-
describe Tailor do
|
24
|
-
it "should have a VERSION constant" do
|
25
|
-
Tailor.const_defined?('VERSION').should == true
|
26
|
-
end
|
27
|
-
end
|
data/tailor.gemspec
CHANGED
@@ -6,44 +6,31 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.name = "tailor"
|
7
7
|
s.version = Tailor::VERSION
|
8
8
|
|
9
|
-
s.
|
10
|
-
s.
|
11
|
-
s.
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
|
15
|
-
s.extra_rdoc_files =
|
16
|
-
"ChangeLog.rdoc",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
9
|
+
s.author = "Steve Loveless"
|
10
|
+
s.summary = "ruby style checking tool"
|
11
|
+
s.description = "Utility for checking style of Ruby files."
|
12
|
+
s.email = "steve.loveless@gmail.com"
|
13
|
+
s.homepage = "http://github.com/turboladen/tailor"
|
14
|
+
|
15
|
+
s.extra_rdoc_files = %w(History.rdoc README.rdoc)
|
19
16
|
s.files = `git ls-files`.split("\n")
|
20
17
|
s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
|
21
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
22
|
-
s.extra_rdoc_files = %w(ChangeLog.rdoc README.rdoc)
|
23
|
-
s.homepage = "http://github.com/turboladen/tailor"
|
24
|
-
s.post_install_message = <<MSG
|
25
|
-
Thanks for checking out tailor. To check Ruby style, simply do:
|
26
|
-
$ tailor [directory to check]
|
27
|
-
|
28
|
-
-OR-
|
29
|
-
|
30
|
-
$ tailor [.rb/.erb file to check]
|
31
|
-
|
32
|
-
For more information on tailor, see http://github.com/turboladen/tailor)
|
33
|
-
|
34
|
-
MSG
|
35
|
-
|
36
|
-
s.require_paths = ["lib"]
|
37
|
-
s.rubygems_version = "1.8.10"
|
38
|
-
s.summary = "Utility for checking style of Ruby files."
|
39
|
-
s.test_files = Dir.glob "{feature,spec}/**/*_spec.rb"
|
40
19
|
|
41
|
-
s.add_runtime_dependency(%q<
|
42
|
-
s.
|
43
|
-
s.
|
44
|
-
|
45
|
-
s.add_development_dependency(%q<
|
46
|
-
s.add_development_dependency(%q<
|
47
|
-
s.add_development_dependency(%q<
|
20
|
+
s.add_runtime_dependency(%q<log_switch>, ">= 0.2.0")
|
21
|
+
s.add_runtime_dependency(%q<term-ansicolor>, ">= 1.0.5")
|
22
|
+
s.add_runtime_dependency(%q<text-table>, ">= 1.2.2")
|
23
|
+
|
24
|
+
s.add_development_dependency(%q<aruba>, ">=0")
|
25
|
+
s.add_development_dependency(%q<bundler>, ">=0")
|
26
|
+
s.add_development_dependency(%q<code_statistics>, ">=0")
|
27
|
+
s.add_development_dependency(%q<cucumber>, ">= 1.0.2")
|
28
|
+
s.add_development_dependency(%q<fakefs>, ">= 0.4.0")
|
29
|
+
s.add_development_dependency(%q<rake>, ">= 0")
|
30
|
+
s.add_development_dependency(%q<roodi>, ">= 2.1.0")
|
31
|
+
s.add_development_dependency(%q<rspec>, ">= 2.5.0")
|
32
|
+
s.add_development_dependency(%q<simplecov>, ">= 0.4.0")
|
33
|
+
s.add_development_dependency(%q<yard>, ">= 0.7.0")
|
34
|
+
s.add_development_dependency(%q<yard-cucumber>, ">= 2.1.7")
|
48
35
|
end
|
49
36
|
|
data/tasks/features.rake
ADDED
data/tasks/roodi.rake
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
---
|
2
|
+
AssignmentInConditionalCheck: { }
|
3
|
+
CaseMissingElseCheck: { }
|
4
|
+
ClassLineCountCheck: { line_count: 300 }
|
5
|
+
ClassNameCheck: { pattern: !ruby/regexp '/^[A-Z][a-zA-Z0-9]*$/' }
|
6
|
+
CyclomaticComplexityBlockCheck: { complexity: 4 }
|
7
|
+
CyclomaticComplexityMethodCheck: { complexity: 8 }
|
8
|
+
EmptyRescueBodyCheck: { }
|
9
|
+
ForLoopCheck: { }
|
10
|
+
MethodLineCountCheck: { line_count: 30 }
|
11
|
+
MethodNameCheck: { pattern: !ruby/regexp '/^[_a-z<>=\[\]|+-\/\*`]+[_a-z0-9_<>=~@\[\]]*[=!\?]?$/' }
|
12
|
+
ModuleLineCountCheck: { line_count: 300 }
|
13
|
+
ModuleNameCheck: { pattern: !ruby/regexp '/^[A-Z][a-zA-Z0-9]*$/' }
|
14
|
+
ParameterNumberCheck: { parameter_count: 5 }
|
data/tasks/spec.rake
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rspec/core/rake_task'
|
2
|
+
|
3
|
+
RSpec::Core::RakeTask.new
|
4
|
+
|
5
|
+
namespace :spec do
|
6
|
+
desc "Run specs with Ruby warnings turned on"
|
7
|
+
RSpec::Core::RakeTask.new(:warn) do |t|
|
8
|
+
t.ruby_opts = %w(-w)
|
9
|
+
end
|
10
|
+
|
11
|
+
desc "Run specs for Tailor::Lexer"
|
12
|
+
RSpec::Core::RakeTask.new(:lexer) do |t|
|
13
|
+
t.pattern = "./spec/tailor/lexer_spec.rb"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
data/tasks/yard.rake
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'yard'
|
2
|
+
|
3
|
+
YARD::Rake::YardocTask.new do |t|
|
4
|
+
t.files = %w(lib/**/*.rb - History.rdoc)
|
5
|
+
t.options = %w(--private --protected --verbose)
|
6
|
+
end
|
7
|
+
|
8
|
+
namespace :yard do
|
9
|
+
YARD::Rake::YardocTask.new(:with_features) do |t|
|
10
|
+
YARD::Config.load_plugin 'cucumber'
|
11
|
+
|
12
|
+
t.files = %w(lib/**/*.rb features/**/*.feature - History.rdoc)
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,19 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tailor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.0.alpha
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Steve Loveless
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-04-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: log_switch
|
16
|
+
requirement: &70183412557480 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.2.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70183412557480
|
14
25
|
- !ruby/object:Gem::Dependency
|
15
26
|
name: term-ansicolor
|
16
|
-
requirement: &
|
27
|
+
requirement: &70183412556980 !ruby/object:Gem::Requirement
|
17
28
|
none: false
|
18
29
|
requirements:
|
19
30
|
- - ! '>='
|
@@ -21,43 +32,98 @@ dependencies:
|
|
21
32
|
version: 1.0.5
|
22
33
|
type: :runtime
|
23
34
|
prerelease: false
|
24
|
-
version_requirements: *
|
35
|
+
version_requirements: *70183412556980
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: text-table
|
38
|
+
requirement: &70183412556520 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 1.2.2
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70183412556520
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: aruba
|
49
|
+
requirement: &70183412556060 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70183412556060
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: bundler
|
60
|
+
requirement: &70183412555600 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
type: :development
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70183412555600
|
25
69
|
- !ruby/object:Gem::Dependency
|
26
70
|
name: code_statistics
|
27
|
-
requirement: &
|
71
|
+
requirement: &70183412555140 !ruby/object:Gem::Requirement
|
28
72
|
none: false
|
29
73
|
requirements:
|
30
|
-
- -
|
74
|
+
- - ! '>='
|
31
75
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0
|
76
|
+
version: '0'
|
33
77
|
type: :development
|
34
78
|
prerelease: false
|
35
|
-
version_requirements: *
|
79
|
+
version_requirements: *70183412555140
|
36
80
|
- !ruby/object:Gem::Dependency
|
37
81
|
name: cucumber
|
38
|
-
requirement: &
|
82
|
+
requirement: &70183412554680 !ruby/object:Gem::Requirement
|
39
83
|
none: false
|
40
84
|
requirements:
|
41
85
|
- - ! '>='
|
42
86
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.
|
87
|
+
version: 1.0.2
|
44
88
|
type: :development
|
45
89
|
prerelease: false
|
46
|
-
version_requirements: *
|
90
|
+
version_requirements: *70183412554680
|
47
91
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
49
|
-
requirement: &
|
92
|
+
name: fakefs
|
93
|
+
requirement: &70183412570600 !ruby/object:Gem::Requirement
|
50
94
|
none: false
|
51
95
|
requirements:
|
52
96
|
- - ! '>='
|
53
97
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
98
|
+
version: 0.4.0
|
55
99
|
type: :development
|
56
100
|
prerelease: false
|
57
|
-
version_requirements: *
|
101
|
+
version_requirements: *70183412570600
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: rake
|
104
|
+
requirement: &70183412570140 !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: *70183412570140
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: roodi
|
115
|
+
requirement: &70183412569680 !ruby/object:Gem::Requirement
|
116
|
+
none: false
|
117
|
+
requirements:
|
118
|
+
- - ! '>='
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: 2.1.0
|
121
|
+
type: :development
|
122
|
+
prerelease: false
|
123
|
+
version_requirements: *70183412569680
|
58
124
|
- !ruby/object:Gem::Dependency
|
59
125
|
name: rspec
|
60
|
-
requirement: &
|
126
|
+
requirement: &70183412569220 !ruby/object:Gem::Requirement
|
61
127
|
none: false
|
62
128
|
requirements:
|
63
129
|
- - ! '>='
|
@@ -65,10 +131,10 @@ dependencies:
|
|
65
131
|
version: 2.5.0
|
66
132
|
type: :development
|
67
133
|
prerelease: false
|
68
|
-
version_requirements: *
|
134
|
+
version_requirements: *70183412569220
|
69
135
|
- !ruby/object:Gem::Dependency
|
70
136
|
name: simplecov
|
71
|
-
requirement: &
|
137
|
+
requirement: &70183412568760 !ruby/object:Gem::Requirement
|
72
138
|
none: false
|
73
139
|
requirements:
|
74
140
|
- - ! '>='
|
@@ -76,88 +142,138 @@ dependencies:
|
|
76
142
|
version: 0.4.0
|
77
143
|
type: :development
|
78
144
|
prerelease: false
|
79
|
-
version_requirements: *
|
145
|
+
version_requirements: *70183412568760
|
80
146
|
- !ruby/object:Gem::Dependency
|
81
147
|
name: yard
|
82
|
-
requirement: &
|
148
|
+
requirement: &70183412568300 !ruby/object:Gem::Requirement
|
83
149
|
none: false
|
84
150
|
requirements:
|
85
151
|
- - ! '>='
|
86
152
|
- !ruby/object:Gem::Version
|
87
|
-
version: 0.
|
153
|
+
version: 0.7.0
|
88
154
|
type: :development
|
89
155
|
prerelease: false
|
90
|
-
version_requirements: *
|
91
|
-
|
92
|
-
|
93
|
-
|
156
|
+
version_requirements: *70183412568300
|
157
|
+
- !ruby/object:Gem::Dependency
|
158
|
+
name: yard-cucumber
|
159
|
+
requirement: &70183412567840 !ruby/object:Gem::Requirement
|
160
|
+
none: false
|
161
|
+
requirements:
|
162
|
+
- - ! '>='
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: 2.1.7
|
165
|
+
type: :development
|
166
|
+
prerelease: false
|
167
|
+
version_requirements: *70183412567840
|
168
|
+
description: Utility for checking style of Ruby files.
|
169
|
+
email: steve.loveless@gmail.com
|
94
170
|
executables:
|
95
171
|
- tailor
|
96
172
|
extensions: []
|
97
173
|
extra_rdoc_files:
|
98
|
-
-
|
174
|
+
- History.rdoc
|
99
175
|
- README.rdoc
|
100
176
|
files:
|
101
177
|
- .gemtest
|
102
178
|
- .gitignore
|
103
179
|
- .infinity_test
|
104
180
|
- .rspec
|
105
|
-
-
|
181
|
+
- .tailor
|
106
182
|
- Gemfile
|
107
183
|
- Gemfile.lock
|
184
|
+
- History.rdoc
|
108
185
|
- README.rdoc
|
109
186
|
- Rakefile
|
110
187
|
- bin/tailor
|
111
|
-
- features/
|
188
|
+
- features/configurable.feature
|
189
|
+
- features/horizontal_spacing.feature
|
112
190
|
- features/indentation.feature
|
113
|
-
- features/
|
114
|
-
- features/
|
115
|
-
- features/
|
191
|
+
- features/indentation/bad_files_with_no_trailing_newline.feature
|
192
|
+
- features/indentation/good_files_with_no_trailing_newline.feature
|
193
|
+
- features/name_detection.feature
|
116
194
|
- features/step_definitions/indentation_steps.rb
|
117
195
|
- features/step_definitions/spacing/commas_steps.rb
|
118
|
-
- features/step_definitions/spacing_steps.rb
|
119
|
-
- features/support/1_file_with_bad_comma_spacing/bad_comma_spacing.rb
|
120
|
-
- features/support/1_file_with_bad_curly_brace_spacing/bad_curly_brace_spacing.rb
|
121
|
-
- features/support/1_file_with_bad_operator_spacing/bad_op_spacing.rb
|
122
|
-
- features/support/1_file_with_bad_parenthesis/bad_parenthesis.rb
|
123
|
-
- features/support/1_file_with_bad_square_brackets/bad_square_brackets.rb
|
124
|
-
- features/support/1_file_with_bad_ternary_colon_spacing/bad_ternary_colon_spacing.rb
|
125
|
-
- features/support/1_file_with_camel_case_class/camel_case_class.rb
|
126
|
-
- features/support/1_file_with_camel_case_method/camel_case_method.rb
|
127
|
-
- features/support/1_file_with_hard_tabs/hard_tab.rb
|
128
|
-
- features/support/1_file_with_long_lines/long_lines.rb
|
129
|
-
- features/support/1_file_with_snake_case_class/snake_case_class.rb
|
130
|
-
- features/support/1_file_with_snake_case_method/snake_case_method.rb
|
131
|
-
- features/support/1_file_with_trailing_whitespace/trailing_whitespace.rb
|
132
|
-
- features/support/1_good_simple_file/simple_project.rb
|
133
|
-
- features/support/1_long_file_with_indentation/my_project.rb
|
134
|
-
- features/support/common.rb
|
135
196
|
- features/support/env.rb
|
136
|
-
- features/support/
|
197
|
+
- features/support/file_cases/horizontal_spacing_cases.rb
|
198
|
+
- features/support/file_cases/indentation_cases.rb
|
199
|
+
- features/support/file_cases/naming_cases.rb
|
200
|
+
- features/support/file_cases/vertical_spacing_cases.rb
|
201
|
+
- features/support/hooks.rb
|
202
|
+
- features/support/legacy/bad_op_spacing.rb
|
203
|
+
- features/support/legacy/bad_ternary_colon_spacing.rb
|
204
|
+
- features/support/legacy/long_file_with_indentation.rb
|
137
205
|
- features/support/world.rb
|
206
|
+
- features/vertical_spacing.feature
|
207
|
+
- lib/ext/string_ext.rb
|
138
208
|
- lib/tailor.rb
|
139
|
-
- lib/tailor/
|
140
|
-
- lib/tailor/
|
141
|
-
- lib/tailor/
|
209
|
+
- lib/tailor/cli.rb
|
210
|
+
- lib/tailor/cli/options.rb
|
211
|
+
- lib/tailor/composite_observable.rb
|
212
|
+
- lib/tailor/configuration.rb
|
213
|
+
- lib/tailor/critic.rb
|
214
|
+
- lib/tailor/formatters/text.rb
|
215
|
+
- lib/tailor/lexed_line.rb
|
216
|
+
- lib/tailor/lexer.rb
|
217
|
+
- lib/tailor/lexer/token.rb
|
218
|
+
- lib/tailor/lexer_constants.rb
|
219
|
+
- lib/tailor/logger.rb
|
220
|
+
- lib/tailor/problem.rb
|
221
|
+
- lib/tailor/reporter.rb
|
222
|
+
- lib/tailor/ruler.rb
|
223
|
+
- lib/tailor/rulers.rb
|
224
|
+
- lib/tailor/rulers/allow_camel_case_methods_ruler.rb
|
225
|
+
- lib/tailor/rulers/allow_hard_tabs_ruler.rb
|
226
|
+
- lib/tailor/rulers/allow_screaming_snake_case_classes_ruler.rb
|
227
|
+
- lib/tailor/rulers/allow_trailing_line_spaces_ruler.rb
|
228
|
+
- lib/tailor/rulers/indentation_spaces_ruler.rb
|
229
|
+
- lib/tailor/rulers/indentation_spaces_ruler/indentation_manager.rb
|
230
|
+
- lib/tailor/rulers/max_code_lines_in_class_ruler.rb
|
231
|
+
- lib/tailor/rulers/max_code_lines_in_method_ruler.rb
|
232
|
+
- lib/tailor/rulers/max_line_length_ruler.rb
|
233
|
+
- lib/tailor/rulers/spaces_after_comma_ruler.rb
|
234
|
+
- lib/tailor/rulers/spaces_after_lbrace_ruler.rb
|
235
|
+
- lib/tailor/rulers/spaces_after_lbracket_ruler.rb
|
236
|
+
- lib/tailor/rulers/spaces_after_lparen_ruler.rb
|
237
|
+
- lib/tailor/rulers/spaces_before_comma_ruler.rb
|
238
|
+
- lib/tailor/rulers/spaces_before_lbrace_ruler.rb
|
239
|
+
- lib/tailor/rulers/spaces_before_rbrace_ruler.rb
|
240
|
+
- lib/tailor/rulers/spaces_before_rbracket_ruler.rb
|
241
|
+
- lib/tailor/rulers/spaces_before_rparen_ruler.rb
|
242
|
+
- lib/tailor/rulers/spaces_in_empty_braces_ruler.rb
|
243
|
+
- lib/tailor/rulers/trailing_newlines_ruler.rb
|
244
|
+
- lib/tailor/runtime_error.rb
|
245
|
+
- lib/tailor/tailorrc.erb
|
142
246
|
- lib/tailor/version.rb
|
143
|
-
- spec/file_line_spec.rb
|
144
|
-
- spec/indentation_spec.rb
|
145
|
-
- spec/spacing/colon_spacing_spec.rb
|
146
|
-
- spec/spacing/comma_spacing_spec.rb
|
147
|
-
- spec/spacing/curly_brace_spacing_spec.rb
|
148
|
-
- spec/spacing/parentheses_spacing_spec.rb
|
149
|
-
- spec/spacing/square_bracket_spacing_spec.rb
|
150
|
-
- spec/spacing_spec.rb
|
151
247
|
- spec/spec_helper.rb
|
248
|
+
- spec/tailor/cli_spec.rb
|
249
|
+
- spec/tailor/configuration_spec.rb
|
250
|
+
- spec/tailor/critic_spec.rb
|
251
|
+
- spec/tailor/lexed_line_spec.rb
|
252
|
+
- spec/tailor/lexer/token_spec.rb
|
253
|
+
- spec/tailor/lexer_spec.rb
|
254
|
+
- spec/tailor/options_spec.rb
|
255
|
+
- spec/tailor/problem_spec.rb
|
256
|
+
- spec/tailor/reporter_spec.rb
|
257
|
+
- spec/tailor/ruler_spec.rb
|
258
|
+
- spec/tailor/rulers/indentation_spaces_ruler/indentation_manager_spec.rb
|
259
|
+
- spec/tailor/rulers/indentation_spaces_ruler_spec.rb
|
260
|
+
- spec/tailor/rulers/spaces_after_comma_spec.rb
|
261
|
+
- spec/tailor/rulers/spaces_after_lbrace_ruler_spec.rb
|
262
|
+
- spec/tailor/rulers/spaces_before_lbrace_ruler_spec.rb
|
263
|
+
- spec/tailor/rulers/spaces_before_rbrace_ruler_spec.rb
|
264
|
+
- spec/tailor/rulers_spec.rb
|
265
|
+
- spec/tailor/version_spec.rb
|
152
266
|
- spec/tailor_spec.rb
|
153
267
|
- tailor.gemspec
|
154
|
-
- tasks/
|
268
|
+
- tasks/features.rake
|
269
|
+
- tasks/roodi.rake
|
270
|
+
- tasks/roodi_config.yaml
|
271
|
+
- tasks/spec.rake
|
155
272
|
- tasks/stats.rake
|
273
|
+
- tasks/yard.rake
|
156
274
|
homepage: http://github.com/turboladen/tailor
|
157
275
|
licenses: []
|
158
|
-
post_install_message:
|
159
|
-
do:\n $ tailor [directory to check]\n\n -OR-\n\n $ tailor [.rb/.erb file to check]\n\nFor
|
160
|
-
more information on tailor, see http://github.com/turboladen/tailor)\n\n"
|
276
|
+
post_install_message:
|
161
277
|
rdoc_options: []
|
162
278
|
require_paths:
|
163
279
|
- lib
|
@@ -170,22 +286,53 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
170
286
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
287
|
none: false
|
172
288
|
requirements:
|
173
|
-
- - ! '
|
289
|
+
- - ! '>'
|
174
290
|
- !ruby/object:Gem::Version
|
175
|
-
version:
|
291
|
+
version: 1.3.1
|
176
292
|
requirements: []
|
177
293
|
rubyforge_project:
|
178
|
-
rubygems_version: 1.8.
|
294
|
+
rubygems_version: 1.8.17
|
179
295
|
signing_key:
|
180
296
|
specification_version: 3
|
181
|
-
summary:
|
297
|
+
summary: ruby style checking tool
|
182
298
|
test_files:
|
183
|
-
-
|
184
|
-
-
|
185
|
-
-
|
186
|
-
-
|
187
|
-
-
|
188
|
-
-
|
189
|
-
-
|
190
|
-
-
|
299
|
+
- features/configurable.feature
|
300
|
+
- features/horizontal_spacing.feature
|
301
|
+
- features/indentation.feature
|
302
|
+
- features/indentation/bad_files_with_no_trailing_newline.feature
|
303
|
+
- features/indentation/good_files_with_no_trailing_newline.feature
|
304
|
+
- features/name_detection.feature
|
305
|
+
- features/step_definitions/indentation_steps.rb
|
306
|
+
- features/step_definitions/spacing/commas_steps.rb
|
307
|
+
- features/support/env.rb
|
308
|
+
- features/support/file_cases/horizontal_spacing_cases.rb
|
309
|
+
- features/support/file_cases/indentation_cases.rb
|
310
|
+
- features/support/file_cases/naming_cases.rb
|
311
|
+
- features/support/file_cases/vertical_spacing_cases.rb
|
312
|
+
- features/support/hooks.rb
|
313
|
+
- features/support/legacy/bad_op_spacing.rb
|
314
|
+
- features/support/legacy/bad_ternary_colon_spacing.rb
|
315
|
+
- features/support/legacy/long_file_with_indentation.rb
|
316
|
+
- features/support/world.rb
|
317
|
+
- features/vertical_spacing.feature
|
318
|
+
- spec/spec_helper.rb
|
319
|
+
- spec/tailor/cli_spec.rb
|
320
|
+
- spec/tailor/configuration_spec.rb
|
321
|
+
- spec/tailor/critic_spec.rb
|
322
|
+
- spec/tailor/lexed_line_spec.rb
|
323
|
+
- spec/tailor/lexer/token_spec.rb
|
324
|
+
- spec/tailor/lexer_spec.rb
|
325
|
+
- spec/tailor/options_spec.rb
|
326
|
+
- spec/tailor/problem_spec.rb
|
327
|
+
- spec/tailor/reporter_spec.rb
|
328
|
+
- spec/tailor/ruler_spec.rb
|
329
|
+
- spec/tailor/rulers/indentation_spaces_ruler/indentation_manager_spec.rb
|
330
|
+
- spec/tailor/rulers/indentation_spaces_ruler_spec.rb
|
331
|
+
- spec/tailor/rulers/spaces_after_comma_spec.rb
|
332
|
+
- spec/tailor/rulers/spaces_after_lbrace_ruler_spec.rb
|
333
|
+
- spec/tailor/rulers/spaces_before_lbrace_ruler_spec.rb
|
334
|
+
- spec/tailor/rulers/spaces_before_rbrace_ruler_spec.rb
|
335
|
+
- spec/tailor/rulers_spec.rb
|
336
|
+
- spec/tailor/version_spec.rb
|
191
337
|
- spec/tailor_spec.rb
|
338
|
+
has_rdoc:
|