rubocop_config 0.47.1.1 → 0.47.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9df4917b10fda8b5f7abe00c7c277a7a073c120
4
- data.tar.gz: 3addf96f9905fb9a2484e734182e9bb8fb4dafbd
3
+ metadata.gz: 15e365deddc394d1242dee32c785a46114c41de0
4
+ data.tar.gz: 75e6cd86243dfeb04113c5b9c83ee1a798973b68
5
5
  SHA512:
6
- metadata.gz: bc03b0fb5ced39ab2b1306715e3982edc30bcd78510a07f2d3203cf1fb347bf120cc5e64951f7342e7af30c20a68ff516f5195de9b82e31feb13692af5160b0c
7
- data.tar.gz: 648dd856cd8923aba8e599a9a28b025bb8bdfb8c49c55a5169b696d6c3aa5c2f81b4f331ce54f32c974860460415a5decc9d8a598d16fe8c87cd294e23ba9831
6
+ metadata.gz: ef38a30b90fe9255ff70a7f32c4780a2d9c790aa4db9616ebbaf53e0628df209b6dd92b89c6b4db107112f00ad3b4fdd4f3a729d6f817f7889a94741ef2d1460
7
+ data.tar.gz: a9c4f1a9a1295f5285ea0448b12d62ea9e7f5c18c797d2b75a635b7f752a512e26b9a64abf6bba10205b07a887d74093512a3ccd0ebb34dcef6575b3920a4b42
@@ -5,4 +5,4 @@ $LOAD_PATH.unshift(File.dirname(File.realpath(__FILE__)) + "/../lib")
5
5
  require "bundler/setup"
6
6
  require "rubocop_config/runner"
7
7
 
8
- RubocopConfig::Runner.new(Dir.pwd).perform
8
+ RubocopConfig::Runner.new(Dir.pwd, ARGV[0]).perform
@@ -1172,4 +1172,4 @@ AllCops:
1172
1172
  - 'db/**/*'
1173
1173
  - 'Gemfile.lock'
1174
1174
  - 'Rakefile'
1175
- TargetRubyVersion: 2.3
1175
+ TargetRubyVersion: <%= RUBY_VERSION.split(".")[0..1].join('.') %>
@@ -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
- # binding.pry
18
- @config ||= File.read(
19
- File.expand_path("../../../config", __FILE__) + "/default.yml"
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
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module RubocopConfig
3
- VERSION = "0.47.1.1"
3
+ VERSION = "0.47.1.2"
4
4
  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.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-24 00:00:00.000000000 Z
11
+ date: 2017-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler