puppet-lint-absolute_classname-check 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8437e370185c8090d4636c84bd768494805e7b1f
4
- data.tar.gz: e32f3fb4b8d06c037d7f26426dbea2299b7a92a9
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZTE5NTQ1ZmIwYjNmOTJkMDAxNTIwNThiZTk5NzkzNmY4MGI2NWM5OA==
5
+ data.tar.gz: !binary |-
6
+ MDg2NWMyNWEwNmVhODdmYzlhYzVlZjgwZDgyYTVjMjc0MTJmODgyYQ==
5
7
  SHA512:
6
- metadata.gz: addf9e4414d87f42d1cb3a2ff06e2bed4aa54753eebb13f0fcdb01d42cfd82082101f15bfb3000037c574f62f226b7656bc85f279e91f69a5c7659b10d2612c4
7
- data.tar.gz: 9d8133bbb2a241b918bd7fe170dd3a6d832a11dfcfff7616c83907342df87fa67ef3728fd9f724a69d4cca124063a2e1e66d17003215b8fff7d7b057487a200d
8
+ metadata.gz: !binary |-
9
+ MjkwMzFhMmYwYWU2OGI2OWRhZGYyMDUzN2I1YjhiMzU2YzU1ZWE1YTc5ZjI1
10
+ MDY5NjFjMmNkMjE4YWIwMjY2NDNmYTQ3OTc3M2I5ZmQ2NTMwNTBlMGJiOTBl
11
+ ZTNlNDhiMjUzNmFkOGZiZjE3ZGE4ZDgxODE3NjgxZjU2YTNiNGQ=
12
+ data.tar.gz: !binary |-
13
+ ZGJiNWRjYzFmYzBhYmE0ZTYwNTk4M2Q4MDk4ZTJiZWFkMzcyNzgzZGExNzNh
14
+ M2FmNzU0ODUwYzJlOGI0ZGIyZGY0NWQyMjE1MTBkODY4MjExMDcxMjU3YjEx
15
+ YTgwM2ZmMjRmMmQwNTQ4YjFjMGU0YjU5ZTI5YmNjZmUxNWVkYzQ=
@@ -1,5 +1,3 @@
1
- require 'pp'
2
-
3
1
  PuppetLint.new_check(:relative_classname_inclusion) do
4
2
  def check
5
3
  tokens.each_with_index do |token, token_idx|
@@ -16,7 +14,7 @@ PuppetLint.new_check(:relative_classname_inclusion) do
16
14
  end
17
15
  s = s.next_token
18
16
  end
19
- elsif token.type == :CLASS
17
+ elsif token.type == :CLASS and token.next_code_token.type == :LBRACE
20
18
  s = token.next_code_token
21
19
  while s.type != :COLON
22
20
  if (s.type == :NAME || s.type == :SSTRING) && s.value !~ /^::/
@@ -11,6 +11,9 @@ describe 'relative_classname_inclusion' do
11
11
  include('::foobar')
12
12
 
13
13
  class { '::foobar': }
14
+
15
+ class foobar {
16
+ }
14
17
  EOS
15
18
  end
16
19
 
@@ -56,6 +59,9 @@ describe 'relative_classname_inclusion' do
56
59
  include('::foobar')
57
60
 
58
61
  class { '::foobar': }
62
+
63
+ class foobar {
64
+ }
59
65
  EOS
60
66
  end
61
67
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-lint-absolute_classname-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camptocamp
@@ -14,102 +14,104 @@ dependencies:
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: '1.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: '1.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
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec-collection_matchers
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mime-types
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: coveralls
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0.7'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.7'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - ! '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - ! '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- description: |2
112
- A puppet-lint plugin to check that classes are included by their absolute name.
111
+ description: ! ' A puppet-lint plugin to check that classes are included by their
112
+ absolute name.
113
+
114
+ '
113
115
  email: raphael.pinson@camptocamp.com
114
116
  executables: []
115
117
  extensions: []
@@ -130,21 +132,21 @@ require_paths:
130
132
  - lib
131
133
  required_ruby_version: !ruby/object:Gem::Requirement
132
134
  requirements:
133
- - - ">="
135
+ - - ! '>='
134
136
  - !ruby/object:Gem::Version
135
137
  version: '0'
136
138
  required_rubygems_version: !ruby/object:Gem::Requirement
137
139
  requirements:
138
- - - ">="
140
+ - - ! '>='
139
141
  - !ruby/object:Gem::Version
140
142
  version: '0'
141
143
  requirements: []
142
144
  rubyforge_project:
143
- rubygems_version: 2.2.2
145
+ rubygems_version: 2.4.5
144
146
  signing_key:
145
147
  specification_version: 4
146
148
  summary: A puppet-lint plugin to check that classes are included by their absolute
147
149
  name.
148
150
  test_files:
149
- - spec/spec_helper.rb
150
151
  - spec/puppet-lint/plugins/check_absolute_classname/relative_classname_inclusion_spec.rb
152
+ - spec/spec_helper.rb