ragnarson-stylecheck 0.0.7 → 0.1.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c362db322dac2b1caaccd8af75d793c8c29ae1a
|
4
|
+
data.tar.gz: a74519ab6dee820ebf1958266a32029d61284c6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9734460dbe25ce9ae4794d91daa5125bfa78edece1970e439fbbe5e23ec84bce806bd51c768ee7da7a376258ca4700cd0451b6e0639e8213ed88d3ccebd1e00
|
7
|
+
data.tar.gz: 2513d7fd30d7e1d2da6ec0c52b4f6c3e47d627074f52ab845328f4914bd8809dc2da3885ba836806d2397e1d41d53211164f2a47897e3d07c288575ee1290576
|
data/config/rubocop.yml
CHANGED
@@ -6,8 +6,28 @@ module Ragnarson
|
|
6
6
|
module RubocopHelpers
|
7
7
|
class << self
|
8
8
|
def config
|
9
|
+
if project_config_exists?
|
10
|
+
project_config_path
|
11
|
+
else
|
12
|
+
stylecheck_config_path
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def project_config_exists?
|
17
|
+
File.exist?(project_config_path)
|
18
|
+
end
|
19
|
+
|
20
|
+
def project_config_path
|
21
|
+
File.join(Dir.pwd, "config", "rubocop.yml")
|
22
|
+
end
|
23
|
+
|
24
|
+
def stylecheck_config_path
|
9
25
|
File.join(Ragnarson::Stylecheck.root, "config", "rubocop.yml")
|
10
26
|
end
|
27
|
+
|
28
|
+
def template_config_path
|
29
|
+
File.join(Ragnarson::Stylecheck.root, "lib", "ragnarson", "templates", "rubocop.yml")
|
30
|
+
end
|
11
31
|
end
|
12
32
|
end
|
13
33
|
end
|
@@ -23,6 +23,13 @@ namespace :style do
|
|
23
23
|
abort "Fix code style errors" unless ok
|
24
24
|
end
|
25
25
|
end
|
26
|
+
|
27
|
+
desc "Generate local RuboCop config"
|
28
|
+
task :generate_local_config do
|
29
|
+
template_config_path = Ragnarson::Stylecheck::RubocopHelpers.template_config_path
|
30
|
+
project_config_path = Ragnarson::Stylecheck::RubocopHelpers.project_config_path
|
31
|
+
FileUtils.cp(template_config_path, project_config_path)
|
32
|
+
end
|
26
33
|
end
|
27
34
|
end
|
28
35
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ragnarson-stylecheck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grzesiek Kołodziejczyk
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- lib/ragnarson/stylecheck/railtie.rb
|
70
70
|
- lib/ragnarson/stylecheck/rubocop_helpers.rb
|
71
71
|
- lib/ragnarson/tasks/rubocop.rake
|
72
|
+
- lib/ragnarson/templates/rubocop.yml
|
72
73
|
homepage: https://github.com/ragnarson/ragnarson-stylecheck
|
73
74
|
licenses:
|
74
75
|
- MIT
|
@@ -89,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
90
|
version: '0'
|
90
91
|
requirements: []
|
91
92
|
rubyforge_project:
|
92
|
-
rubygems_version: 2.6.
|
93
|
+
rubygems_version: 2.6.3
|
93
94
|
signing_key:
|
94
95
|
specification_version: 4
|
95
96
|
summary: Automatic style check for ragnarson projects
|