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 +4 -4
- data/lib/govuk/lint/cli.rb +3 -1
- data/lib/govuk/lint/config_file.rb +8 -9
- data/lib/govuk/lint/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 850266441437675c278f35b18f05c504f6daad5bacbd9902e1112433a5cfd99b
|
4
|
+
data.tar.gz: f21f481d8eec4c6b9b958c83f5a18b19e7824d99891bdc4c7dbd575bf5f0abd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e44f99b8c4caaab5947f46097a79e7d9ad9596bf8aec5013da152d76c2238da401723ca91face340e00178fffcec2de632ea75058aaf10016c3803f86df1bac
|
7
|
+
data.tar.gz: a7903ac26e2fa6a0cc0b92620f63b42420386710c2d0142acba485a7d2e01d48c771583554c12a949f7dc67a233906fe48c3b1f6377da1212edaa373fd27edb8
|
data/lib/govuk/lint/cli.rb
CHANGED
@@ -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
|
-
|
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
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
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
|
data/lib/govuk/lint/version.rb
CHANGED
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.
|
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-
|
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
|