puppet-lint-legacy_facts-check 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/lib/puppet-lint/plugins/legacy_facts.rb +2 -2
- metadata +32 -17
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NTc3MTg5NWQ3MmQwMTA3M2I3NGUwNTNkOGE4ZjQxNDI2NjM0MDQ2MA==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5df51a154367eb04ff197dfcf45c3398442b9470
|
4
|
+
data.tar.gz: ec60551e8b1ed914526d1b6b615acade910db4c3
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
OGQ2NGIyNWM1ODY4OWVmNDlmZTg3MTdjNGVhMDMxNDQwYzkwMTljMTU5NTc2
|
11
|
-
ZWMyZjFkZGY0MGRlOGMyN2Y5MDY0NDRhYzAyM2Q1YTJhODM0ZWU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
M2I4Y2I4YjU2MDY2YWEyNjRjZDFmZTkwMTA4ODhjODVmYmVjMWU3ZDQ2NWMz
|
14
|
-
ZWVlZjliY2Y0YmY5ZTQyNjgzNWJlMTU2ZWJlNzg1Y2QzYmJjNTEwNTJlYzMy
|
15
|
-
MzA4YzlhMTliYjI4MGM0MGY4YzcwZmI4YTNjYjBiNmIwYzc1NzY=
|
6
|
+
metadata.gz: f98d366343aec0e5df666dd92727e9f001fe18a2b3f7571d757a6bd64e414c8d0e92e4c6c18955955f881ce15371e8d7b7d81c85e111bc0043e634a8125abc15
|
7
|
+
data.tar.gz: ce089ee8a469d627ff36f245399e8cb6a5aee48bd1f5d41efd23d836e81aefd0d5de499d66f646cff7ad78717f86439ed517ad8c8235dc86c51d59ed8411faf0
|
@@ -87,7 +87,7 @@ PuppetLint.new_check(:legacy_facts) do
|
|
87
87
|
fact_name = ''
|
88
88
|
if token.value.start_with?('::') then
|
89
89
|
fact_name = token.value.sub(/^::/, '')
|
90
|
-
elsif token.value.start_with?(
|
90
|
+
elsif token.value.start_with?("facts['") then
|
91
91
|
fact_name = token.value.match(/facts\['(.*)'\]/)[1]
|
92
92
|
end
|
93
93
|
if EASY_FACTS.include?(fact_name) or UNCONVERTIBLE_FACTS.include?(fact_name) or fact_name.match(Regexp.union(REGEX_FACTS)) then
|
@@ -104,7 +104,7 @@ PuppetLint.new_check(:legacy_facts) do
|
|
104
104
|
def fix(problem)
|
105
105
|
if problem[:token].value.start_with?('::') then
|
106
106
|
fact_name = problem[:token].value.sub(/^::/, '')
|
107
|
-
elsif problem[:token].value.start_with?(
|
107
|
+
elsif problem[:token].value.start_with?("facts['") then
|
108
108
|
fact_name = problem[:token].value.match(/facts\['(.*)'\]/)[1]
|
109
109
|
end
|
110
110
|
if EASY_FACTS.include?(fact_name)
|
metadata
CHANGED
@@ -1,88 +1,103 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-lint-legacy_facts-check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark McKinstry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puppet-lint
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '3.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '3.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec-its
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-json_expectations
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rspec-collection_matchers
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - ~>
|
73
|
+
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
75
|
version: '1.0'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - ~>
|
80
|
+
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '1.0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rake
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- -
|
87
|
+
- - ">="
|
74
88
|
- !ruby/object:Gem::Version
|
75
89
|
version: '0'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- -
|
94
|
+
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
83
|
-
description:
|
84
|
-
|
85
|
-
|
97
|
+
description: |2
|
98
|
+
A pupet-lint to check you are not using legacy facts like `$::operatingsystem`
|
99
|
+
or `$facts['operatingsystem']`. You should use the new structured facts like
|
100
|
+
`$facts['os']['name']` instead
|
86
101
|
email: mmckinst@umich.edu
|
87
102
|
executables: []
|
88
103
|
extensions: []
|
@@ -103,12 +118,12 @@ require_paths:
|
|
103
118
|
- lib
|
104
119
|
required_ruby_version: !ruby/object:Gem::Requirement
|
105
120
|
requirements:
|
106
|
-
- -
|
121
|
+
- - ">="
|
107
122
|
- !ruby/object:Gem::Version
|
108
123
|
version: '0'
|
109
124
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
125
|
requirements:
|
111
|
-
- -
|
126
|
+
- - ">="
|
112
127
|
- !ruby/object:Gem::Version
|
113
128
|
version: '0'
|
114
129
|
requirements: []
|