puppet-lint-top_scope_facts-check 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/puppet-lint/plugins/top_scope_facts.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28a8c0a6206c5bb869b19628c8823b3346264cf0441dec2f8a7717e38cdbff8e
|
4
|
+
data.tar.gz: 91c1a86d1982377d125c0d34d3e044947b7b3adda60675f281be1074042e8a80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b15c007a7a0a6b7acd0c1d52bf6ca2ac3a3c4a3d31f11f1f6a4bc9812fd7710cc0bbf28b31ab4ae7c87ed3e3f486e6b9582f112f52dc3b12fb6418a16f4f7da1
|
7
|
+
data.tar.gz: f02682b1b94195a15b298bc1af17ac533d3aa6c6c2571b6558ac32646eb2b63225780e3d9c81f88adc2d7ac5330c735f04cf30a1f0a173deaebc63c14abe6d43
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
[![Build Status](https://travis-ci.org/mmckinst/puppet-lint-top_scope_facts-check.svg?branch=master)](https://travis-ci.org/mmckinst/puppet-lint-top_scope_facts-check)
|
2
|
-
[![Gem](https://img.shields.io/gem/v/puppet-lint-top_scope_facts-check.svg
|
3
|
-
![](https://img.shields.io/gem/
|
4
|
-
![](https://img.shields.io/gem/
|
2
|
+
[![Gem](https://img.shields.io/gem/v/puppet-lint-top_scope_facts-check.svg)](https://rubygems.org/gems/puppet-lint-top_scope_facts-check)
|
3
|
+
[![Total Downloads](https://img.shields.io/gem/dt/puppet-lint-top_scope_facts-check.svg)](https://rubygems.org/gems/puppet-lint-top_scope_facts-check)
|
4
|
+
[![Latest Downloads](https://img.shields.io/gem/dtv/puppet-lint-top_scope_facts-check.svg)](https://rubygems.org/gems/puppet-lint-top_scope_facts-check)
|
5
5
|
|
6
6
|
A puppet-lint plugin to check you are not using top scope fact variables like
|
7
7
|
`$::operatingsystem`. You should use the $facts hash like
|
@@ -1,9 +1,9 @@
|
|
1
1
|
PuppetLint.new_check(:top_scope_facts) do
|
2
|
-
|
2
|
+
TOP_SCOPE_FACTS_VAR_TYPES = Set[:VARIABLE, :UNENC_VARIABLE]
|
3
3
|
def check
|
4
4
|
whitelist = ['trusted', 'facts'] + (PuppetLint.configuration.top_scope_variables || [])
|
5
5
|
whitelist = whitelist.join('|')
|
6
|
-
tokens.select { |x|
|
6
|
+
tokens.select { |x| TOP_SCOPE_FACTS_VAR_TYPES.include?(x.type) }.each do |token|
|
7
7
|
if token.value.match(/^::/) and not token.value.match(/^::(#{whitelist})\[?/)
|
8
8
|
notify :warning, {
|
9
9
|
:message => 'top scope fact instead of facts hash',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-lint-top_scope_facts-check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark McKinstry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puppet-lint
|