best_practice_project 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ac02c1babdd1ad02b8a984339c36617283294e9
4
- data.tar.gz: d6917c5650e11826ec7f6d2a84ef3f5aa72466dd
3
+ metadata.gz: 25d6deb53c867de3827c6c0feb826bb956de00db
4
+ data.tar.gz: 14aa89b1142ee2c4da23406a426e800647c86e74
5
5
  SHA512:
6
- metadata.gz: 0e1b622177296a2381f530a29af7662c9f01932549baabb56ad83d2e28da108d61d9a48caf82644703f5a0c1f2a6cf9602749435e58cc6267ab63bee59f59836
7
- data.tar.gz: bce5d11f08347122560701a17497d9169341ec743cf9bde4d68147f8afdfe461b4bf283bdbe2f1ad78681f1b6662917fef636cd808c5578ff44a452009a710e9
6
+ metadata.gz: f2d4f1ee416fe64bc91a10fdaccbcfa4d675f6bf632c68bd4b93696e40677ce8a0aa87d6dedaa676a0846a711d22f7d2a16a8f6f1463837022fd371822308fd1
7
+ data.tar.gz: f60724f23b156a11b579f816d8abd77e2797a8c690a6b609a3891a8e8cc723eb1e1455891170094c970c0c8975458871a3315721345f6d2537d00a25b77840c7
@@ -52,3 +52,7 @@ Style/SpaceInsideHashLiteralBraces:
52
52
  Style/TrivialAccessors:
53
53
  ExactNameMatch: true
54
54
  Enabled: true
55
+
56
+ # Disabled on purpose: https://github.com/bbatsov/rubocop/issues/1758
57
+ Style/ClosingParenthesisIndentation:
58
+ Enabled: false
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.5
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 ruby lib
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.5"
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 = "2015-12-03"
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.2.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
- @scss_config_path = Rails.root.join("config", "scss-lint.yml").to_s if scss_installed?
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 scss_installed?
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
- begin
79
- require "rubocop"
80
- true
81
- rescue LoadError
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
- begin
88
- require "scss_lint"
89
- true
90
- rescue LoadError
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
- begin
97
- require "coffeelint"
98
- true
99
- rescue LoadError
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
- begin
106
- require "rails_best_practices"
107
- true
108
- rescue LoadError
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
@@ -52,3 +52,7 @@ Style/SpaceInsideHashLiteralBraces:
52
52
  Style/TrivialAccessors:
53
53
  ExactNameMatch: true
54
54
  Enabled: true
55
+
56
+ # Disabled on purpose: https://github.com/bbatsov/rubocop/issues/1758
57
+ Style/ClosingParenthesisIndentation:
58
+ Enabled: false
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/spec_helper")
1
+ require "spec_helper"
2
2
 
3
3
  describe "BestPracticeProject" do
4
4
  end
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.5
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: 2015-12-03 00:00:00.000000000 Z
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.2.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