puppet-lint-strict_indent-check 2.0.1 → 2.0.2

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
  SHA1:
3
- metadata.gz: 8324391476697257f038a0e343dbc2156914a594
4
- data.tar.gz: ee31978ca8e9d3cc4cfed3b852ad3f2b5205a3b6
3
+ metadata.gz: 6cdc48dbfe8a1166bd3d3f6a5054c0ae29230812
4
+ data.tar.gz: 78256bc4eeecb05ac105aa6ce748d5e0039393bc
5
5
  SHA512:
6
- metadata.gz: e2fbb0796d73e9f920d7002c33c0725ccd3176243d7ef311305e02cce3e566a1472114eac422230aa98bc0fb46c070a9348978b935e9f2164dc487fa313c1a77
7
- data.tar.gz: 5b66a8d938e9d4042039e8432956f529679730427bbff07c2ab97f14569ce4ae910a141e74a385177dfb5c47b16b3b506878631d1b41a2887f92c94eb55c76cf
6
+ metadata.gz: ad277b7f1442525bba2994ed4c7d50d58bf0b563b6ee99e14cbdbb8d200c8e7efc78a384949c1ab75c6b0317ac09d635b1c4dee4b5de577a88cd5e30a89c3b21
7
+ data.tar.gz: bcc499b868fbcee0ccceb02ffb545d1859797c219f3e50580c9b506f015448488cb3d9ba589dd3bcaac53a3be6505d6a8b78c7950b8437467e7069e997d33d55
@@ -145,10 +145,13 @@ PuppetLint.new_check(:'strict_indent') do
145
145
 
146
146
  def fix(problem)
147
147
  char_for_indent = ' '
148
- if problem[:token].next_token.type == :INDENT
148
+ if [:INDENT,:WHITESPACE].include?(problem[:token].next_token.type)
149
149
  problem[:token].next_token.value = char_for_indent * problem[:indent]
150
150
  else
151
- problem[:token].next_token.value = char_for_indent * problem[:indent] + problem[:token].next_token.value
151
+ tokens.insert(
152
+ tokens.find_index(problem[:token]) + 1,
153
+ PuppetLint::Lexer::Token.new(:INDENT, char_for_indent * problem[:indent], problem[:line], problem[:column]),
154
+ )
152
155
  end
153
156
  end
154
157
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-lint-strict_indent-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Thornton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-02 00:00:00.000000000 Z
11
+ date: 2016-06-27 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: '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
@@ -80,8 +80,8 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- description: |2
84
- Extends puppet-lint to ensure that your manifests follow a strict indentation pattern.
83
+ description: " Extends puppet-lint to ensure that your manifests follow a strict
84
+ indentation pattern.\n"
85
85
  email: daniel@relud.com
86
86
  executables: []
87
87
  extensions: []
@@ -114,12 +114,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  version: '0'
115
115
  requirements: []
116
116
  rubyforge_project:
117
- rubygems_version: 2.2.2
117
+ rubygems_version: 2.6.6
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: puppet-lint strict indent check
121
121
  test_files:
122
- - spec/puppet-lint/plugins/check_strict_indent_spec.rb
123
122
  - spec/fixtures/fail/1.pp
124
123
  - spec/fixtures/pass/1.pp
124
+ - spec/puppet-lint/plugins/check_strict_indent_spec.rb
125
125
  - spec/spec_helper.rb