reevoocop 0.0.6 → 0.0.7
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.
- checksums.yaml +4 -4
- data/.travis.yml +5 -0
- data/Gemfile +2 -2
- data/Rakefile +3 -3
- data/bin/reevoocop +3 -3
- data/lib/reevoocop/rake_task.rb +2 -2
- data/lib/reevoocop/version.rb +1 -1
- data/lib/reevoocop.rb +2 -2
- data/lib/reevoocop.yml +36 -2
- data/reevoocop.gemspec +13 -13
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12143b030d02ebc1472a0bea19cc70a4e7903c37
|
4
|
+
data.tar.gz: e248efbcc1dbfdc8576d2e9536b5b51963b5b33e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dcf7d227b2c43577b9ae0fa38b0737397504f5ed4aae7a0a29a6ec5367a194ef45b1941a406504292e7809e1a0bd0236062e7f38a4bcd7e42dc78ce76274605
|
7
|
+
data.tar.gz: 85d5a678890979f117eca6206327c51d6084147c4ca5bcf8919ef1a276d4fa851d8a9e12c6c7a8db914fa56d2fc736995bd17401315f2edae614497f3caf3acc
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
require "reevoocop/rake_task"
|
5
5
|
|
6
6
|
ReevooCop::RakeTask.new(:reevoocop)
|
7
7
|
|
8
8
|
task :reevoocop_cli do
|
9
|
-
sh
|
9
|
+
sh "bin/reevoocop"
|
10
10
|
end
|
11
11
|
|
12
12
|
task default: [:reevoocop, :reevoocop_cli]
|
data/bin/reevoocop
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# encoding: utf-8
|
3
3
|
|
4
|
-
$LOAD_PATH.unshift(File.dirname(File.realpath(__FILE__)) +
|
4
|
+
$LOAD_PATH.unshift(File.dirname(File.realpath(__FILE__)) + "/../lib")
|
5
5
|
|
6
|
-
require
|
7
|
-
require
|
6
|
+
require "reevoocop"
|
7
|
+
require "benchmark"
|
8
8
|
|
9
9
|
cli = RuboCop::CLI.new
|
10
10
|
result = 0
|
data/lib/reevoocop/rake_task.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
require
|
3
|
+
require "rubocop/rake_task"
|
4
4
|
|
5
5
|
module ReevooCop
|
6
6
|
class RakeTask < RuboCop::RakeTask
|
7
7
|
def run_cli(verbose, options)
|
8
|
-
require
|
8
|
+
require "reevoocop"
|
9
9
|
super(verbose, options)
|
10
10
|
end
|
11
11
|
end
|
data/lib/reevoocop/version.rb
CHANGED
data/lib/reevoocop.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
require
|
3
|
+
require "rubocop"
|
4
4
|
|
5
5
|
module RuboCop
|
6
6
|
class ConfigLoader
|
7
7
|
class << self
|
8
8
|
def configuration_file_for(_target_dir)
|
9
|
-
File.join(File.realpath(File.dirname(__FILE__)),
|
9
|
+
File.join(File.realpath(File.dirname(__FILE__)), "reevoocop.yml")
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
data/lib/reevoocop.yml
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
LineLength:
|
2
2
|
Max: 120
|
3
|
+
|
4
|
+
# See https://github.com/reevoo/reevoocop/pull/13
|
5
|
+
# * Other metrics like complexity should discorage complexity
|
6
|
+
# * Sometimes it is less clear to squeese things on too few lines
|
3
7
|
Metrics/MethodLength:
|
4
8
|
Enabled: false
|
9
|
+
|
5
10
|
Documentation:
|
6
11
|
Enabled: false
|
7
12
|
AndOr:
|
@@ -10,17 +15,46 @@ AndOr:
|
|
10
15
|
# Allow use of empty lines to visually group code into 'paragraphs'
|
11
16
|
EmptyLines:
|
12
17
|
Enabled: false
|
18
|
+
|
19
|
+
# Keeping parameters in a line makes them easier to read, but in long lines the
|
20
|
+
# parameters look ridiculous if using the "with_first_parameter" option, making
|
21
|
+
# it more difficult to read the code
|
22
|
+
Style/AlignParameters:
|
23
|
+
EnforcedStyle: with_fixed_indentation
|
24
|
+
|
25
|
+
# Blank lines are useful in separating methods, specs, etc. from one another,
|
26
|
+
# and improves the aesthetics of the code. Consequently, we've enabled
|
27
|
+
# EmptyLines around blocks and methods. This is less desirable for Classes and
|
28
|
+
# Modules where the definitions may be usefully put on consecutive lines, e.g.:
|
29
|
+
#
|
30
|
+
# module API
|
31
|
+
# module Auth
|
32
|
+
# class Person
|
33
|
+
# ... etc
|
34
|
+
#
|
13
35
|
Style/EmptyLinesAroundBlockBody:
|
14
|
-
Enabled:
|
36
|
+
Enabled: true
|
15
37
|
Style/EmptyLinesAroundClassBody:
|
16
38
|
Enabled: false
|
17
39
|
Style/EmptyLinesAroundMethodBody:
|
18
|
-
Enabled:
|
40
|
+
Enabled: true
|
19
41
|
Style/EmptyLinesAroundModuleBody:
|
20
42
|
Enabled: false
|
43
|
+
|
44
|
+
|
45
|
+
# See https://github.com/reevoo/reevoocop/issues/10
|
21
46
|
Style/ModuleFunction:
|
22
47
|
Enabled: false
|
23
48
|
|
49
|
+
# See more here: https://viget.com/extend/just-use-double-quoted-ruby-strings
|
50
|
+
Style/StringLiterals:
|
51
|
+
EnforcedStyle: double_quotes
|
52
|
+
Style/StringLiteralsInInterpolation:
|
53
|
+
EnforcedStyle: double_quotes
|
54
|
+
|
55
|
+
# See https://github.com/reevoo/reevoocop/issues/1
|
56
|
+
# * For cleaner git diffs
|
57
|
+
# * Simpler :sort:
|
24
58
|
TrailingComma:
|
25
59
|
Enabled: true
|
26
60
|
EnforcedStyleForMultiline: comma
|
data/reevoocop.gemspec
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
# coding: utf-8
|
2
|
-
lib = File.expand_path(
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
4
|
+
require "reevoocop/version"
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = "reevoocop"
|
8
8
|
spec.version = ReevooCop::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
11
|
-
spec.summary =
|
12
|
-
spec.description =
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
9
|
+
spec.authors = ["Ed Robinson"]
|
10
|
+
spec.email = ["ed.robinson@reevoo.com"]
|
11
|
+
spec.summary = "Like RuboCop only for Reevoo"
|
12
|
+
spec.description = "RuboCop patched for to enforce the use of Reevoo Style Guidelines"
|
13
|
+
spec.homepage = "http://reevoo.github.io"
|
14
|
+
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
17
17
|
spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(/^(test|spec|features)\//)
|
19
|
-
spec.require_paths = [
|
19
|
+
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency
|
22
|
-
spec.add_development_dependency
|
23
|
-
spec.add_development_dependency
|
21
|
+
spec.add_dependency "rubocop", "0.28.0"
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.5"
|
23
|
+
spec.add_development_dependency "rake"
|
24
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reevoocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ed Robinson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -61,6 +61,7 @@ extensions: []
|
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
63
|
- ".gitignore"
|
64
|
+
- ".travis.yml"
|
64
65
|
- Gemfile
|
65
66
|
- LICENSE.txt
|
66
67
|
- README.md
|
@@ -91,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
92
|
version: '0'
|
92
93
|
requirements: []
|
93
94
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.
|
95
|
+
rubygems_version: 2.4.5.1
|
95
96
|
signing_key:
|
96
97
|
specification_version: 4
|
97
98
|
summary: Like RuboCop only for Reevoo
|