tailor 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +0 -1
- data/Gemfile.lock +6 -19
- data/History.rdoc +8 -0
- data/README.rdoc +3 -3
- data/Rakefile +51 -3
- data/features/continuous_integration.feature +9 -1
- data/lib/tailor/configuration.rb +1 -1
- data/lib/tailor/rake_task.rb +12 -52
- data/lib/tailor/version.rb +1 -1
- data/spec/functional/rake_task_spec.rb +83 -0
- data/spec/support/rake_task_config_no_problems.rb +5 -0
- data/spec/support/rake_task_config_problems.rb +5 -0
- data/spec/unit/tailor/version_spec.rb +1 -1
- data/tailor.gemspec +1 -4
- metadata +10 -58
- data/tasks/features.rake +0 -7
- data/tasks/roodi.rake +0 -9
- data/tasks/roodi_config.yaml +0 -14
- data/tasks/spec.rake +0 -21
- data/tasks/stats.rake +0 -12
- data/tasks/yard.rake +0 -14
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
tailor (1.1.
|
4
|
+
tailor (1.1.4)
|
5
5
|
log_switch (>= 0.3.0)
|
6
6
|
term-ansicolor (>= 1.0.5)
|
7
7
|
text-table (>= 1.2.2)
|
@@ -16,7 +16,6 @@ GEM
|
|
16
16
|
builder (3.1.4)
|
17
17
|
childprocess (0.3.7)
|
18
18
|
ffi (~> 1.0, >= 1.0.6)
|
19
|
-
code_statistics (0.2.13)
|
20
19
|
cucumber (1.2.1)
|
21
20
|
builder (>= 2.1.2)
|
22
21
|
diff-lcs (>= 1.1.3)
|
@@ -26,17 +25,15 @@ GEM
|
|
26
25
|
fakefs (0.4.2)
|
27
26
|
ffi (1.3.1)
|
28
27
|
ffi (1.3.1-java)
|
29
|
-
gherkin (2.11.
|
30
|
-
json (>= 1.
|
31
|
-
gherkin (2.11.
|
32
|
-
json (>= 1.
|
28
|
+
gherkin (2.11.6)
|
29
|
+
json (>= 1.7.6)
|
30
|
+
gherkin (2.11.6-java)
|
31
|
+
json (>= 1.7.6)
|
33
32
|
json (1.7.6)
|
34
33
|
json (1.7.6-java)
|
35
34
|
log_switch (0.4.0)
|
36
35
|
multi_json (1.5.0)
|
37
36
|
rake (10.0.3)
|
38
|
-
roodi (2.2.0)
|
39
|
-
ruby_parser (~> 2.3.0)
|
40
37
|
rspec (2.12.0)
|
41
38
|
rspec-core (~> 2.12.0)
|
42
39
|
rspec-expectations (~> 2.12.0)
|
@@ -45,9 +42,6 @@ GEM
|
|
45
42
|
rspec-expectations (2.12.1)
|
46
43
|
diff-lcs (~> 1.1.3)
|
47
44
|
rspec-mocks (2.12.2)
|
48
|
-
ruby_parser (2.3.1)
|
49
|
-
sexp_processor (~> 3.0)
|
50
|
-
sexp_processor (3.2.0)
|
51
45
|
simplecov (0.7.1)
|
52
46
|
multi_json (~> 1.0)
|
53
47
|
simplecov-html (~> 0.7.1)
|
@@ -55,10 +49,6 @@ GEM
|
|
55
49
|
term-ansicolor (1.0.7)
|
56
50
|
text-table (1.2.2)
|
57
51
|
yard (0.8.3)
|
58
|
-
yard-cucumber (2.2.2)
|
59
|
-
cucumber (>= 0.7.5)
|
60
|
-
gherkin (>= 2.2.9)
|
61
|
-
yard (>= 0.8.1)
|
62
52
|
|
63
53
|
PLATFORMS
|
64
54
|
java
|
@@ -67,13 +57,10 @@ PLATFORMS
|
|
67
57
|
DEPENDENCIES
|
68
58
|
aruba
|
69
59
|
bundler
|
70
|
-
code_statistics
|
71
60
|
cucumber (>= 1.0.2)
|
72
|
-
fakefs (>= 0.4.
|
61
|
+
fakefs (>= 0.4.2)
|
73
62
|
rake
|
74
|
-
roodi (>= 2.1.0)
|
75
63
|
rspec (>= 2.5.0)
|
76
64
|
simplecov (>= 0.4.0)
|
77
65
|
tailor!
|
78
66
|
yard (>= 0.7.0)
|
79
|
-
yard-cucumber (>= 2.1.7)
|
data/History.rdoc
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
=== 1.1.4 2013-01-29
|
2
|
+
|
3
|
+
* gh-127[https://github.com/turboladen/tailor/issues/127]
|
4
|
+
* RakeTask now actually does something (works).
|
5
|
+
* tailor should now abort (and let you know) when it can't find the config file
|
6
|
+
that you told it to use. Previously, it would just fall back to default
|
7
|
+
settings.
|
8
|
+
|
1
9
|
=== 1.1.3 2013-01-28
|
2
10
|
|
3
11
|
* gh-121[https://github.com/turboladen/tailor/issues/121]
|
data/README.rdoc
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
* http://github.com/turboladen/tailor
|
4
4
|
|
5
5
|
{<img src="https://secure.travis-ci.org/turboladen/tailor.png?branch=master" alt="Build Status" />}[http://travis-ci.org/turboladen/tailor]
|
6
|
+
{<img src="https://codeclimate.com/badge.png" />}[https://codeclimate.com/github/turboladen/tailor]
|
6
7
|
|
7
8
|
== DESCRIPTION:
|
8
9
|
|
@@ -93,7 +94,7 @@ Check defaults (lib/**/*.rb):
|
|
93
94
|
|
94
95
|
$ tailor
|
95
96
|
|
96
|
-
Use defaults via a Rake task:
|
97
|
+
Use defaults via a Rake task (if you have a .tailor file, it'll use those settings):
|
97
98
|
|
98
99
|
require 'tailor/rake_task'
|
99
100
|
|
@@ -345,7 +346,6 @@ Next time you run tailor, your Ruler will get initialized and used.
|
|
345
346
|
== REQUIREMENTS:
|
346
347
|
|
347
348
|
* Rubies (tested)
|
348
|
-
* 1.9.2
|
349
349
|
* 1.9.3
|
350
350
|
* Gems
|
351
351
|
* log_switch
|
@@ -360,7 +360,7 @@ Next time you run tailor, your Ruler will get initialized and used.
|
|
360
360
|
|
361
361
|
(The MIT License)
|
362
362
|
|
363
|
-
Copyright (c) 2010-
|
363
|
+
Copyright (c) 2010-2013 Steve Loveless
|
364
364
|
|
365
365
|
Permission is hereby granted, free of charge, to any person obtaining
|
366
366
|
a copy of this software and associated documentation files (the
|
data/Rakefile
CHANGED
@@ -1,8 +1,56 @@
|
|
1
1
|
require 'bundler/gem_tasks'
|
2
|
+
require 'cucumber'
|
3
|
+
require 'cucumber/rake/task'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
require 'yard'
|
2
6
|
|
3
|
-
# Load rakefile extensions
|
4
|
-
Dir["tasks/*.rake"].each { |ext| load ext }
|
5
7
|
|
6
|
-
|
8
|
+
#------------------------------------------------------------------------------
|
9
|
+
# spec
|
10
|
+
#------------------------------------------------------------------------------
|
11
|
+
RSpec::Core::RakeTask.new
|
12
|
+
|
13
|
+
namespace :spec do
|
14
|
+
desc "Run specs with Ruby warnings turned on"
|
15
|
+
RSpec::Core::RakeTask.new(:warn) do |t|
|
16
|
+
t.ruby_opts = %w(-w)
|
17
|
+
end
|
18
|
+
|
19
|
+
desc "Run unit tests"
|
20
|
+
RSpec::Core::RakeTask.new(:unit) do |t|
|
21
|
+
t.pattern = "./spec/unit/**/*_spec.rb"
|
22
|
+
end
|
23
|
+
|
24
|
+
desc "Run functional tests"
|
25
|
+
RSpec::Core::RakeTask.new(:functional) do |t|
|
26
|
+
t.pattern = "./spec/functional/**/*_spec.rb"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
#------------------------------------------------------------------------------
|
31
|
+
# features
|
32
|
+
#------------------------------------------------------------------------------
|
33
|
+
Cucumber::Rake::Task.new(:features) do |t|
|
34
|
+
t.cucumber_opts = %w(--format progress features --tags ~@wip)
|
35
|
+
end
|
36
|
+
|
37
|
+
#------------------------------------------------------------------------------
|
38
|
+
# yard
|
39
|
+
#------------------------------------------------------------------------------
|
40
|
+
YARD::Rake::YardocTask.new do |t|
|
41
|
+
t.files = %w(lib/**/*.rb - History.rdoc)
|
42
|
+
t.options = %w(--private --protected --verbose)
|
43
|
+
end
|
44
|
+
|
45
|
+
namespace :yard do
|
46
|
+
YARD::Rake::YardocTask.new(:with_features) do |t|
|
47
|
+
YARD::Config.load_plugin 'cucumber'
|
48
|
+
|
49
|
+
t.files = %w(lib/**/*.rb features/**/*.feature - History.rdoc)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
desc "Run RSpec examples and Cucumber features"
|
7
55
|
task test: [:spec, :features]
|
8
56
|
task default: [:test]
|
@@ -22,7 +22,15 @@ Feature: Continuous Integration
|
|
22
22
|
And the exit status should be 0
|
23
23
|
|
24
24
|
Scenario: Errors found
|
25
|
-
Given
|
25
|
+
Given my configuration file ".tailor" looks like:
|
26
|
+
"""
|
27
|
+
Tailor.config do |config|
|
28
|
+
config.file_set do |style|
|
29
|
+
style.trailing_newlines 0, level: :error
|
30
|
+
end
|
31
|
+
end
|
32
|
+
"""
|
33
|
+
And a file named "errors.rb" with:
|
26
34
|
"""
|
27
35
|
puts 'hi'
|
28
36
|
|
data/lib/tailor/configuration.rb
CHANGED
data/lib/tailor/rake_task.rb
CHANGED
@@ -3,8 +3,7 @@ require 'rake/tasklib'
|
|
3
3
|
require_relative 'critic'
|
4
4
|
require_relative 'configuration'
|
5
5
|
require_relative 'logger'
|
6
|
-
require_relative '
|
7
|
-
require_relative 'cli/options'
|
6
|
+
require_relative 'cli'
|
8
7
|
|
9
8
|
begin
|
10
9
|
# Support Rake > 0.8.7
|
@@ -50,13 +49,12 @@ class Tailor
|
|
50
49
|
# set in your config file.
|
51
50
|
attr_accessor :tailor_opts
|
52
51
|
|
52
|
+
# @return [Array] The list of formatters to use. (not really used yet)
|
53
53
|
attr_accessor :formatters
|
54
54
|
|
55
55
|
# @param [String] name The task name.
|
56
56
|
# @param [String] desc Description of the task.
|
57
57
|
def initialize(name = "tailor", desc = "Check style")
|
58
|
-
Tailor::Logger.log = false
|
59
|
-
|
60
58
|
@name, @desc = name, desc
|
61
59
|
@tailor_opts = []
|
62
60
|
@file_sets = []
|
@@ -93,55 +91,17 @@ class Tailor
|
|
93
91
|
@tailor_opts.concat %W(--config-file=#{config_file})
|
94
92
|
end
|
95
93
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
@reporter.file_report(problems_for_file, label)
|
94
|
+
begin
|
95
|
+
failure = Tailor::CLI.run(@tailor_opts)
|
96
|
+
exit(1) if failure
|
97
|
+
rescue Tailor::RuntimeError => ex
|
98
|
+
STDERR.puts ex.message
|
99
|
+
STDERR.puts ex.backtrace.join("\n")
|
100
|
+
rescue Exception => ex
|
101
|
+
STDERR.puts("#{ex.message} (#{ex.class})")
|
102
|
+
STDERR.puts(ex.backtrace.join("\n"))
|
103
|
+
exit(1)
|
107
104
|
end
|
108
|
-
|
109
|
-
@reporter.summary_report(critic.problems)
|
110
|
-
|
111
|
-
critic.problem_count > 0
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
# @return [Tailor::Configuration]
|
116
|
-
def create_config
|
117
|
-
configuration = Tailor::Configuration.new([],
|
118
|
-
Tailor::CLI::Options.parse!(@tailor_opts))
|
119
|
-
configuration.load!
|
120
|
-
configuration.formatters(formatters) if formatters
|
121
|
-
|
122
|
-
configuration
|
123
|
-
end
|
124
|
-
|
125
|
-
# @param [Tailor::Configuration] config
|
126
|
-
def create_recursive_file_sets_for config
|
127
|
-
unless @recursive_file_sets.empty?
|
128
|
-
@recursive_file_sets.each do |fs|
|
129
|
-
config.recursive_file_set(fs[0], fs[1], &fs[2])
|
130
|
-
end
|
131
|
-
end
|
132
|
-
end
|
133
|
-
|
134
|
-
# @param [Tailor::Configuration] config
|
135
|
-
def create_file_sets_for config
|
136
|
-
unless @file_sets.empty?
|
137
|
-
@file_sets.each { |fs| config.file_set(fs[0], fs[1], &fs[2]) }
|
138
|
-
end
|
139
|
-
end
|
140
|
-
|
141
|
-
# @param [Tailor::Configuration] config
|
142
|
-
def check_default_file_set_in config
|
143
|
-
if @file_sets.none? { |fs| fs[1] == :default }
|
144
|
-
config.file_sets.delete(:default)
|
145
105
|
end
|
146
106
|
end
|
147
107
|
end
|
data/lib/tailor/version.rb
CHANGED
@@ -0,0 +1,83 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "tailor/rake_task"
|
3
|
+
|
4
|
+
|
5
|
+
describe Tailor::RakeTask do
|
6
|
+
let(:rake) do
|
7
|
+
Rake::Application.new
|
8
|
+
end
|
9
|
+
|
10
|
+
before do
|
11
|
+
FakeFS.deactivate!
|
12
|
+
Rake.application = rake
|
13
|
+
end
|
14
|
+
|
15
|
+
describe 'rake tailor' do
|
16
|
+
context "with problematic files" do
|
17
|
+
subject do
|
18
|
+
Tailor::RakeTask.new do |t|
|
19
|
+
t.config_file = File.expand_path 'spec/support/rake_task_config_problems.rb'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
it "finds problems" do
|
24
|
+
subject
|
25
|
+
|
26
|
+
expect {
|
27
|
+
rake['tailor'].invoke
|
28
|
+
}.to raise_error SystemExit
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
context "with OK files" do
|
33
|
+
subject do
|
34
|
+
Tailor::RakeTask.new do |t|
|
35
|
+
t.config_file = File.expand_path 'spec/support/rake_task_config_no_problems.rb'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
it "doesn't find problems" do
|
40
|
+
subject
|
41
|
+
|
42
|
+
expect {
|
43
|
+
rake['tailor'].invoke
|
44
|
+
}.to_not raise_error
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
context "using a custom task name" do
|
50
|
+
subject do
|
51
|
+
Tailor::RakeTask.new(task_name) do |t|
|
52
|
+
t.config_file = File.expand_path 'spec/support/rake_task_config_problems.rb'
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
let(:task_name) { 'my_neat_task' }
|
57
|
+
|
58
|
+
it "runs the task" do
|
59
|
+
subject
|
60
|
+
|
61
|
+
expect {
|
62
|
+
rake[task_name].invoke
|
63
|
+
}.to_not raise_error RuntimeError, "Don't know how to build task '#{task_name}''"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
context "overriding tailor opts within the task" do
|
68
|
+
subject do
|
69
|
+
Tailor::RakeTask.new do |t|
|
70
|
+
t.config_file = File.expand_path 'spec/support/rake_task_config_problems.rb'
|
71
|
+
t.tailor_opts = %w[--max-line-length=1000]
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
it "uses the options from the rake task" do
|
76
|
+
subject
|
77
|
+
|
78
|
+
expect {
|
79
|
+
rake['tailor'].invoke
|
80
|
+
}.to_not raise_error
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
data/tailor.gemspec
CHANGED
@@ -31,14 +31,11 @@ project, whatever style that may be.
|
|
31
31
|
|
32
32
|
s.add_development_dependency %q<aruba>
|
33
33
|
s.add_development_dependency %q<bundler>
|
34
|
-
s.add_development_dependency %q<code_statistics>
|
35
34
|
s.add_development_dependency %q<cucumber>, ">= 1.0.2"
|
36
|
-
s.add_development_dependency %q<fakefs>, ">= 0.4.
|
35
|
+
s.add_development_dependency %q<fakefs>, ">= 0.4.2"
|
37
36
|
s.add_development_dependency %q<rake>
|
38
|
-
s.add_development_dependency %q<roodi>, ">= 2.1.0"
|
39
37
|
s.add_development_dependency %q<rspec>, ">= 2.5.0"
|
40
38
|
s.add_development_dependency %q<simplecov>, ">= 0.4.0"
|
41
39
|
s.add_development_dependency %q<yard>, ">= 0.7.0"
|
42
|
-
s.add_development_dependency %q<yard-cucumber>, ">= 2.1.7"
|
43
40
|
end
|
44
41
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tailor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: log_switch
|
@@ -91,22 +91,6 @@ dependencies:
|
|
91
91
|
- - ! '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: code_statistics
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
|
-
requirements:
|
99
|
-
- - ! '>='
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '0'
|
102
|
-
type: :development
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
|
-
requirements:
|
107
|
-
- - ! '>='
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
110
94
|
- !ruby/object:Gem::Dependency
|
111
95
|
name: cucumber
|
112
96
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,7 +114,7 @@ dependencies:
|
|
130
114
|
requirements:
|
131
115
|
- - ! '>='
|
132
116
|
- !ruby/object:Gem::Version
|
133
|
-
version: 0.4.
|
117
|
+
version: 0.4.2
|
134
118
|
type: :development
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -138,7 +122,7 @@ dependencies:
|
|
138
122
|
requirements:
|
139
123
|
- - ! '>='
|
140
124
|
- !ruby/object:Gem::Version
|
141
|
-
version: 0.4.
|
125
|
+
version: 0.4.2
|
142
126
|
- !ruby/object:Gem::Dependency
|
143
127
|
name: rake
|
144
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,22 +139,6 @@ dependencies:
|
|
155
139
|
- - ! '>='
|
156
140
|
- !ruby/object:Gem::Version
|
157
141
|
version: '0'
|
158
|
-
- !ruby/object:Gem::Dependency
|
159
|
-
name: roodi
|
160
|
-
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
|
-
requirements:
|
163
|
-
- - ! '>='
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: 2.1.0
|
166
|
-
type: :development
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
|
-
requirements:
|
171
|
-
- - ! '>='
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: 2.1.0
|
174
142
|
- !ruby/object:Gem::Dependency
|
175
143
|
name: rspec
|
176
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -219,22 +187,6 @@ dependencies:
|
|
219
187
|
- - ! '>='
|
220
188
|
- !ruby/object:Gem::Version
|
221
189
|
version: 0.7.0
|
222
|
-
- !ruby/object:Gem::Dependency
|
223
|
-
name: yard-cucumber
|
224
|
-
requirement: !ruby/object:Gem::Requirement
|
225
|
-
none: false
|
226
|
-
requirements:
|
227
|
-
- - ! '>='
|
228
|
-
- !ruby/object:Gem::Version
|
229
|
-
version: 2.1.7
|
230
|
-
type: :development
|
231
|
-
prerelease: false
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
none: false
|
234
|
-
requirements:
|
235
|
-
- - ! '>='
|
236
|
-
- !ruby/object:Gem::Version
|
237
|
-
version: 2.1.7
|
238
190
|
description: ! 'tailor parses Ruby files and measures them with some style and static
|
239
191
|
analysis
|
240
192
|
|
@@ -340,6 +292,7 @@ files:
|
|
340
292
|
- spec/functional/naming/camel_case_methods_spec.rb
|
341
293
|
- spec/functional/naming/screaming_snake_case_classes_spec.rb
|
342
294
|
- spec/functional/naming_spec.rb
|
295
|
+
- spec/functional/rake_task_spec.rb
|
343
296
|
- spec/functional/vertical_spacing/class_length_spec.rb
|
344
297
|
- spec/functional/vertical_spacing/method_length_spec.rb
|
345
298
|
- spec/functional/vertical_spacing_spec.rb
|
@@ -348,6 +301,8 @@ files:
|
|
348
301
|
- spec/support/good_indentation_cases.rb
|
349
302
|
- spec/support/horizontal_spacing_cases.rb
|
350
303
|
- spec/support/naming_cases.rb
|
304
|
+
- spec/support/rake_task_config_no_problems.rb
|
305
|
+
- spec/support/rake_task_config_problems.rb
|
351
306
|
- spec/support/vertical_spacing_cases.rb
|
352
307
|
- spec/unit/tailor/cli_spec.rb
|
353
308
|
- spec/unit/tailor/composite_observable_spec.rb
|
@@ -373,12 +328,6 @@ files:
|
|
373
328
|
- spec/unit/tailor/version_spec.rb
|
374
329
|
- spec/unit/tailor_spec.rb
|
375
330
|
- tailor.gemspec
|
376
|
-
- tasks/features.rake
|
377
|
-
- tasks/roodi.rake
|
378
|
-
- tasks/roodi_config.yaml
|
379
|
-
- tasks/spec.rake
|
380
|
-
- tasks/stats.rake
|
381
|
-
- tasks/yard.rake
|
382
331
|
homepage: http://github.com/turboladen/tailor
|
383
332
|
licenses: []
|
384
333
|
post_install_message:
|
@@ -429,6 +378,7 @@ test_files:
|
|
429
378
|
- spec/functional/naming/camel_case_methods_spec.rb
|
430
379
|
- spec/functional/naming/screaming_snake_case_classes_spec.rb
|
431
380
|
- spec/functional/naming_spec.rb
|
381
|
+
- spec/functional/rake_task_spec.rb
|
432
382
|
- spec/functional/vertical_spacing/class_length_spec.rb
|
433
383
|
- spec/functional/vertical_spacing/method_length_spec.rb
|
434
384
|
- spec/functional/vertical_spacing_spec.rb
|
@@ -437,6 +387,8 @@ test_files:
|
|
437
387
|
- spec/support/good_indentation_cases.rb
|
438
388
|
- spec/support/horizontal_spacing_cases.rb
|
439
389
|
- spec/support/naming_cases.rb
|
390
|
+
- spec/support/rake_task_config_no_problems.rb
|
391
|
+
- spec/support/rake_task_config_problems.rb
|
440
392
|
- spec/support/vertical_spacing_cases.rb
|
441
393
|
- spec/unit/tailor/cli_spec.rb
|
442
394
|
- spec/unit/tailor/composite_observable_spec.rb
|
data/tasks/features.rake
DELETED
data/tasks/roodi.rake
DELETED
data/tasks/roodi_config.yaml
DELETED
@@ -1,14 +0,0 @@
|
|
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
DELETED
@@ -1,21 +0,0 @@
|
|
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 unit tests"
|
12
|
-
RSpec::Core::RakeTask.new(:unit) do |t|
|
13
|
-
t.pattern = "./spec/unit/**/*_spec.rb"
|
14
|
-
end
|
15
|
-
|
16
|
-
desc "Run functional tests"
|
17
|
-
RSpec::Core::RakeTask.new(:functional) do |t|
|
18
|
-
t.pattern = "./spec/functional/**/*_spec.rb"
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
data/tasks/stats.rake
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
require 'code_statistics'
|
2
|
-
|
3
|
-
STATS_DIRECTORIES = [
|
4
|
-
%w(Library lib/),
|
5
|
-
%w(Feature\ tests features/),
|
6
|
-
%w(Unit\ tests spec/)
|
7
|
-
].collect { |name, dir| [ name, "#{dir}" ] }.select { |name, dir| File.directory?(dir) }
|
8
|
-
|
9
|
-
desc "Report code statistics (KLOCs, etc) from the application"
|
10
|
-
task :stats do
|
11
|
-
CodeStatistics.new(*STATS_DIRECTORIES).to_s
|
12
|
-
end
|
data/tasks/yard.rake
DELETED
@@ -1,14 +0,0 @@
|
|
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
|