best_practice_project 0.0.3 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6a03a30e37d96eb2b4c872098a93d1715184fbf
4
- data.tar.gz: 3ef0ccbf70a7a5eb44c0c6027ba6e7cc0e2425a4
3
+ metadata.gz: b261b120ec527cc114e33b9a9a527ad2694a083e
4
+ data.tar.gz: 3ffa272f8f77bd9d6ea8946fc6bb7163e8da3d3f
5
5
  SHA512:
6
- metadata.gz: 8eab271030250e7d4eaa943be8e89584498089cafcb0b349027e31f12d5ded5c829b3298589744cac06d3660ec078a202aa9e34d6f55b206b7aafcea0c6836c5
7
- data.tar.gz: 524dd44b8db85126d4eaeb5888af61e19f2b55bfca0fada7d2371bfe39403e4401c7a500055a13254470df537da8caa039dee7a351bd1a2e9b241ff073864162
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.3
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.3 ruby lib
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.3"
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"]
@@ -33,6 +33,9 @@ StringLiterals:
33
33
  StringLiteralsInInterpolation:
34
34
  Enabled: false
35
35
 
36
+ Style/NilComparison:
37
+ Enabled: false
38
+
36
39
  Style/SignalException:
37
40
  EnforcedStyle: only_raise
38
41
 
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  namespace "best_practice_project" do
2
- task "run" do
2
+ task "run" do |t, args|
3
3
  exit BestPracticeProject.new.execute
4
4
  end
5
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: best_practice_project
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaspernj