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: e7b2910c76fd88f141b0ee8a8c244b0ad8baf0d6
4
- data.tar.gz: 9d0121c3a6a7b4795a8f74822066103294747a5b
3
+ metadata.gz: 6c362db322dac2b1caaccd8af75d793c8c29ae1a
4
+ data.tar.gz: a74519ab6dee820ebf1958266a32029d61284c6b
5
5
  SHA512:
6
- metadata.gz: dc0939cda7439b3f6b2d04989653e35f5474e009d44fad29b78574d22993a3358b821de6f78613ac7a0a48e4912da409c21d27aae837bf128f00ceae6dc4d579
7
- data.tar.gz: dbca9ee10439aed0112473664ffb72b3accd1db1e6d19ca08d61a0d6bd46c7a3d3bb0d3f9b414d37c283637abd2567d3da59c8a2ca6a133840510b708504934d
6
+ metadata.gz: d9734460dbe25ce9ae4794d91daa5125bfa78edece1970e439fbbe5e23ec84bce806bd51c768ee7da7a376258ca4700cd0451b6e0639e8213ed88d3ccebd1e00
7
+ data.tar.gz: 2513d7fd30d7e1d2da6ec0c52b4f6c3e47d627074f52ab845328f4914bd8809dc2da3885ba836806d2397e1d41d53211164f2a47897e3d07c288575ee1290576
data/config/rubocop.yml CHANGED
@@ -73,6 +73,9 @@ Style/EachWithObject:
73
73
  Lint/AssignmentInCondition:
74
74
  Enabled: false
75
75
 
76
+ Style/Documentation:
77
+ Enabled: false
78
+
76
79
  ##################### Metrics ##################################
77
80
 
78
81
  Metrics/AbcSize:
@@ -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
 
@@ -0,0 +1,5 @@
1
+ inherit_gem:
2
+ ragnarson-stylecheck: config/rubocop.yml
3
+
4
+ AllCops:
5
+ TargetRubyVersion: 2.3
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.7
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.1
93
+ rubygems_version: 2.6.3
93
94
  signing_key:
94
95
  specification_version: 4
95
96
  summary: Automatic style check for ragnarson projects