best_practice_project 0.0.5 → 0.0.6
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/.rubocop.yml +4 -0
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/best_practice_project.gemspec +4 -4
- data/lib/best_practice_project.rb +23 -26
- data/lib/best_practice_project/config/rubocop.yml +4 -0
- data/spec/best_practice_project_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 25d6deb53c867de3827c6c0feb826bb956de00db
|
|
4
|
+
data.tar.gz: 14aa89b1142ee2c4da23406a426e800647c86e74
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2d4f1ee416fe64bc91a10fdaccbcfa4d675f6bf632c68bd4b93696e40677ce8a0aa87d6dedaa676a0846a711d22f7d2a16a8f6f1463837022fd371822308fd1
|
|
7
|
+
data.tar.gz: f60724f23b156a11b579f816d8abd77e2797a8c690a6b609a3891a8e8cc723eb1e1455891170094c970c0c8975458871a3315721345f6d2537d00a25b77840c7
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
|
@@ -3,7 +3,7 @@ source "http://rubygems.org"
|
|
|
3
3
|
# Example:
|
|
4
4
|
# gem "activesupport", ">= 2.3.5"
|
|
5
5
|
|
|
6
|
-
gem "psych", "~> 2.0.0", require: false
|
|
6
|
+
gem "psych", "~> 2.0.0", platform: :ruby, require: false
|
|
7
7
|
|
|
8
8
|
# Add dependencies to develop your gem here.
|
|
9
9
|
# Include everything needed to run rake, tests, features, etc.
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.6
|
|
@@ -2,16 +2,16 @@
|
|
|
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.6 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.6"
|
|
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"]
|
|
13
13
|
s.authors = ["kaspernj"]
|
|
14
|
-
s.date = "
|
|
14
|
+
s.date = "2016-01-02"
|
|
15
15
|
s.description = "A bundle of various linters and code inspection tools"
|
|
16
16
|
s.email = "k@spernj.org"
|
|
17
17
|
s.extra_rdoc_files = [
|
|
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
|
|
|
39
39
|
]
|
|
40
40
|
s.homepage = "http://github.com/kaspernj/best_practice_project"
|
|
41
41
|
s.licenses = ["MIT"]
|
|
42
|
-
s.rubygems_version = "2.
|
|
42
|
+
s.rubygems_version = "2.4.0"
|
|
43
43
|
s.summary = "A bundle of various linters and code inspection tools"
|
|
44
44
|
|
|
45
45
|
if s.respond_to? :specification_version then
|
|
@@ -16,14 +16,17 @@ class BestPracticeProject
|
|
|
16
16
|
@rubocop_handler = BestPracticeProject::RubocopHandler.new(best_practice_project: self) if rubocop_installed?
|
|
17
17
|
|
|
18
18
|
if rails?
|
|
19
|
-
@
|
|
19
|
+
@config_path = Rails.root.join("config")
|
|
20
|
+
@scss_config_path = Rails.root.join("config", "scss-lint.yml").to_s if scss_lint_installed?
|
|
20
21
|
@coffee_lint_config_path = Rails.root.join("config", "coffeelint.json").to_s if coffee_lint_installed?
|
|
22
|
+
else
|
|
23
|
+
@config_path = "config"
|
|
21
24
|
end
|
|
22
25
|
|
|
23
26
|
@commands = []
|
|
24
27
|
|
|
25
28
|
if rails?
|
|
26
|
-
@commands << scss_lint_command if
|
|
29
|
+
@commands << scss_lint_command if scss_lint_installed?
|
|
27
30
|
@commands << coffee_lint_command if coffee_lint_installed?
|
|
28
31
|
@commands << rails_best_practices_command if rails_best_practices_installed?
|
|
29
32
|
end
|
|
@@ -55,6 +58,8 @@ class BestPracticeProject
|
|
|
55
58
|
end
|
|
56
59
|
|
|
57
60
|
def generate_configs
|
|
61
|
+
Dir.mkdir(@config_path) unless File.exist?(@config_path)
|
|
62
|
+
|
|
58
63
|
@rubocop_handler.generate_config if rubocop_installed?
|
|
59
64
|
generate_scss_config if scss_lint_installed?
|
|
60
65
|
generate_coffee_lint_config if coffee_lint_installed?
|
|
@@ -75,39 +80,31 @@ class BestPracticeProject
|
|
|
75
80
|
private
|
|
76
81
|
|
|
77
82
|
def rubocop_installed?
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
false
|
|
83
|
-
end
|
|
83
|
+
require "rubocop"
|
|
84
|
+
true
|
|
85
|
+
rescue LoadError
|
|
86
|
+
false
|
|
84
87
|
end
|
|
85
88
|
|
|
86
89
|
def scss_lint_installed?
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
false
|
|
92
|
-
end
|
|
90
|
+
require "scss_lint"
|
|
91
|
+
true
|
|
92
|
+
rescue LoadError
|
|
93
|
+
false
|
|
93
94
|
end
|
|
94
95
|
|
|
95
96
|
def coffee_lint_installed?
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
false
|
|
101
|
-
end
|
|
97
|
+
require "coffeelint"
|
|
98
|
+
true
|
|
99
|
+
rescue LoadError
|
|
100
|
+
false
|
|
102
101
|
end
|
|
103
102
|
|
|
104
103
|
def rails_best_practices_installed?
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
false
|
|
110
|
-
end
|
|
104
|
+
require "rails_best_practices"
|
|
105
|
+
true
|
|
106
|
+
rescue LoadError
|
|
107
|
+
false
|
|
111
108
|
end
|
|
112
109
|
|
|
113
110
|
def generate_coffee_lint_config
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: best_practice_project
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- kaspernj
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-01-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: psych
|
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
139
139
|
version: '0'
|
|
140
140
|
requirements: []
|
|
141
141
|
rubyforge_project:
|
|
142
|
-
rubygems_version: 2.
|
|
142
|
+
rubygems_version: 2.4.0
|
|
143
143
|
signing_key:
|
|
144
144
|
specification_version: 4
|
|
145
145
|
summary: A bundle of various linters and code inspection tools
|