rubocop_config 0.47.1.1 → 0.47.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rubocop-config +1 -1
- data/config/default.yml +1 -1
- data/lib/rubocop_config/runner.rb +14 -8
- data/lib/rubocop_config/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15e365deddc394d1242dee32c785a46114c41de0
|
4
|
+
data.tar.gz: 75e6cd86243dfeb04113c5b9c83ee1a798973b68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef38a30b90fe9255ff70a7f32c4780a2d9c790aa4db9616ebbaf53e0628df209b6dd92b89c6b4db107112f00ad3b4fdd4f3a729d6f817f7889a94741ef2d1460
|
7
|
+
data.tar.gz: a9c4f1a9a1295f5285ea0448b12d62ea9e7f5c18c797d2b75a635b7f752a512e26b9a64abf6bba10205b07a887d74093512a3ccd0ebb34dcef6575b3920a4b42
|
data/bin/rubocop-config
CHANGED
data/config/default.yml
CHANGED
@@ -1,23 +1,29 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
require "erb"
|
3
|
+
require "yaml"
|
4
|
+
|
2
5
|
module RubocopConfig
|
3
6
|
class Runner
|
4
|
-
attr_accessor :pwd
|
7
|
+
attr_accessor :pwd, :config_override_file
|
5
8
|
|
6
|
-
def initialize(pwd)
|
9
|
+
def initialize(pwd, config_override_file = nil)
|
7
10
|
@pwd = pwd
|
11
|
+
@config_override_file = config_override_file
|
8
12
|
end
|
9
13
|
|
10
14
|
def perform
|
11
15
|
file_name = "#{pwd}/.rubocop.yml"
|
12
|
-
|
13
|
-
File.open(file_name, "w") { |f| f << config }
|
16
|
+
puts "Building .rubocop.yml file..."
|
17
|
+
File.open(file_name, "w") { |f| f << config.to_yaml }
|
14
18
|
end
|
15
19
|
|
16
20
|
def config
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
+
@config ||= YAML.safe_load(ERB.new(File.read(config_file)).result)
|
22
|
+
end
|
23
|
+
|
24
|
+
def config_file
|
25
|
+
config_override_file ||
|
26
|
+
(File.expand_path("../../../config", __FILE__) + "/default.yml")
|
21
27
|
end
|
22
28
|
end
|
23
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.47.1.
|
4
|
+
version: 0.47.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- npezza93
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|