govuk-lint 3.11.2 → 3.11.3

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
  SHA256:
3
- metadata.gz: 19244bc8d6628cda993458baa6b23a2130c9e15a431b46f2705f0035b42d7bef
4
- data.tar.gz: 30face5595b54a9cbee05abb4a21b7614ab07033b04c0c0ad69ee8cd5efc0e80
3
+ metadata.gz: 850266441437675c278f35b18f05c504f6daad5bacbd9902e1112433a5cfd99b
4
+ data.tar.gz: f21f481d8eec4c6b9b958c83f5a18b19e7824d99891bdc4c7dbd575bf5f0abd1
5
5
  SHA512:
6
- metadata.gz: 909549fb748f9c9381236e4ec7a33116ab0f7b0e77cf25eed5191c0a652c203b4f46c04bb993e34d630352bb31abb71745a8b1525536b63100c4d97ff9f4928e
7
- data.tar.gz: 57512ea8b677e6dc8b7a937d28a22dc8825e34d2c938351fb911f9d33aff831bb849272f6d924cae21b9a4ab170587460faf6e2ba0d3fc5ea68460c924562783
6
+ metadata.gz: 4e44f99b8c4caaab5947f46097a79e7d9ad9596bf8aec5013da152d76c2238da401723ca91face340e00178fffcec2de632ea75058aaf10016c3803f86df1bac
7
+ data.tar.gz: a7903ac26e2fa6a0cc0b92620f63b42420386710c2d0142acba485a7d2e01d48c771583554c12a949f7dc67a233906fe48c3b1f6377da1212edaa373fd27edb8
@@ -8,9 +8,11 @@ module Govuk
8
8
  module Lint
9
9
  class CLI < RuboCop::CLI
10
10
  def run(args = ARGV)
11
+ config = ConfigFile.new
12
+
11
13
  args += [
12
14
  "--config",
13
- ConfigFile.new.config_file_path,
15
+ config.config_file_path,
14
16
  ]
15
17
 
16
18
  Diff.enable!(args) if args.include? "--diff"
@@ -9,10 +9,7 @@ module Govuk
9
9
 
10
10
  def config_file_path
11
11
  return BASE_CONFIG_FILE unless File.exist?(local_config_file_path)
12
-
13
- config = merged_global_and_local_configs
14
- file = create_tempfile_for_configs(config)
15
- file.path
12
+ tempfile_for_configs.path
16
13
  end
17
14
 
18
15
  private
@@ -38,11 +35,13 @@ module Govuk
38
35
  @local_config_file_path ||= File.join(Dir.pwd, ".rubocop.yml")
39
36
  end
40
37
 
41
- def create_tempfile_for_configs(config)
42
- file = Tempfile.new('tmp-rubocop-all.yml')
43
- file.write(config.to_yaml)
44
- file.close
45
- file
38
+ def tempfile_for_configs
39
+ @tempfile_for_configs ||= begin
40
+ file = Tempfile.new('tmp-rubocop-all.yml')
41
+ file.write(merged_global_and_local_configs.to_yaml)
42
+ file.close
43
+ file
44
+ end
46
45
  end
47
46
  end
48
47
  end
@@ -1,5 +1,5 @@
1
1
  module Govuk
2
2
  module Lint
3
- VERSION = "3.11.2".freeze
3
+ VERSION = "3.11.3".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk-lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.2
4
+ version: 3.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Government Digital Service
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-08 00:00:00.000000000 Z
11
+ date: 2019-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.9'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.9'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: rake
29
15
  requirement: !ruby/object:Gem::Requirement