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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d216228e3fd5bb68a999d49304c47895417da92a404bd75feed42ae69db21ea
4
- data.tar.gz: ff786f21a35437e08b73dd6d332448e80f10739a2a6a230567cde8a263cca741
3
+ metadata.gz: 28a8c0a6206c5bb869b19628c8823b3346264cf0441dec2f8a7717e38cdbff8e
4
+ data.tar.gz: 91c1a86d1982377d125c0d34d3e044947b7b3adda60675f281be1074042e8a80
5
5
  SHA512:
6
- metadata.gz: 7838ed6360a1312e3dea6f5ce5aa251bd2d6ffec0a791bf628c6189c4b94649d75ed08e0ecc4d66843fdebfdc58acb9c381bf1e16e9f2aab0f1af074a38b3da8
7
- data.tar.gz: 902e575ab27bacb29c201465474ed1fc2bb22af00dfbebcb6dfe7e36e50201faea077157819405e419ac11d1029dabcce149de7aff1c621282e15f7a616128c2
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?maxAge=2592000)](https://rubygems.org/gems/puppet-lint-top_scope_facts-check)
3
- ![](https://img.shields.io/gem/dtv/puppet-lint-top_scope_facts-check.svg?style=flat)
4
- ![](https://img.shields.io/gem/dt/puppet-lint-top_scope_facts-check.svg?style=flat)
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
- VAR_TYPES = Set[:VARIABLE, :UNENC_VARIABLE]
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| VAR_TYPES.include?(x.type) }.each do |token|
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.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-04-13 00:00:00.000000000 Z
11
+ date: 2019-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puppet-lint