best_practice_project 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -5
- data/README.md +20 -0
- data/VERSION +1 -1
- data/best_practice_project.gemspec +2 -2
- data/lib/best_practice_project/config/rubocop.yml +3 -0
- data/lib/best_practice_project/rubocop_handler.rb +2 -0
- data/lib/tasks/best_practice_project.rake +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b261b120ec527cc114e33b9a9a527ad2694a083e
|
4
|
+
data.tar.gz: 3ffa272f8f77bd9d6ea8946fc6bb7163e8da3d3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea011471d688c598eef9b99becefc850f53bd1d6ea4cc60a251d840fff2121222ecd4b658252205293368009d60bdc808ca660cad6b6bc26aa5e9936536ce13f
|
7
|
+
data.tar.gz: 34f122ab457aca0f064469dd2bbce82c0469845d81cb4f38fae53c5c9ad2b638393b4fcee45f1ace2044318ad6763e5aa4754d9e10ae03a48283f25b5c45d616
|
data/Gemfile
CHANGED
@@ -3,11 +3,6 @@ source "http://rubygems.org"
|
|
3
3
|
# Example:
|
4
4
|
# gem "activesupport", ">= 2.3.5"
|
5
5
|
|
6
|
-
#gem "rubocop", "~> 0.35.0", require: false
|
7
|
-
#gem "coffeelint", "~> 1.11.0", require: false
|
8
|
-
#gem "scss_lint", "~> 0.42.2", require: false
|
9
|
-
#gem "rails_best_practices", "~> 1.15.7", require: false
|
10
|
-
|
11
6
|
gem "psych", "~> 2.0.0", require: false
|
12
7
|
|
13
8
|
# Add dependencies to develop your gem here.
|
data/README.md
CHANGED
@@ -20,6 +20,16 @@ Add to your Gemfile and bundle:
|
|
20
20
|
gem "best_practice_project"
|
21
21
|
```
|
22
22
|
|
23
|
+
Also add the linters and cops that you wish to use. These are supported:
|
24
|
+
```ruby
|
25
|
+
group :development do
|
26
|
+
gem "rubocop", "~> 0.35.0", require: false
|
27
|
+
gem "coffeelint", "~> 1.11.0", require: false
|
28
|
+
gem "scss_lint", "~> 0.42.2", require: false
|
29
|
+
gem "rails_best_practices", "~> 1.15.7", require: false
|
30
|
+
end
|
31
|
+
```
|
32
|
+
|
23
33
|
Add this to your Rakefile:
|
24
34
|
```ruby
|
25
35
|
BestPracticeProject.load_tasks
|
@@ -45,6 +55,16 @@ bundle exec rake best_practice_project:run_coffee_lint
|
|
45
55
|
bundle exec rake best_practice_project:run_scss_lint
|
46
56
|
```
|
47
57
|
|
58
|
+
Rubocop supports auto correct. Use it like this:
|
59
|
+
```bash
|
60
|
+
bundle exec rake best_practice_project:run_rubocop --auto-correct
|
61
|
+
```
|
62
|
+
|
63
|
+
Or:
|
64
|
+
```bash
|
65
|
+
bundle exec rake best_practice_project:run --auto-correct
|
66
|
+
```
|
67
|
+
|
48
68
|
## Contributing to best_practice_project
|
49
69
|
|
50
70
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: best_practice_project 0.0.
|
5
|
+
# stub: best_practice_project 0.0.4 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "best_practice_project"
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.4"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
@@ -28,6 +28,8 @@ class BestPracticeProject::RubocopHandler
|
|
28
28
|
command = "bundle exec rubocop --display-cop-names"
|
29
29
|
command << " --rails" if rails?
|
30
30
|
command << " \"--config=#{@config_path}\"" if File.exist?(@config_path)
|
31
|
+
command << " --auto-correct" if ARGV.include?("auto-correct")
|
32
|
+
|
31
33
|
command
|
32
34
|
end
|
33
35
|
|