inspecstyle 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/config/default.yml +7 -0
  3. data/doc/RuboCop.html +3 -3
  4. data/doc/RuboCop/Cop.html +3 -3
  5. data/doc/RuboCop/Cop/InSpecStyle.html +4 -4
  6. data/doc/RuboCop/Cop/InSpecStyle/Apache.html +306 -0
  7. data/doc/RuboCop/Cop/InSpecStyle/AwsIamUserProperty.html +358 -0
  8. data/doc/RuboCop/Cop/InSpecStyle/AzureGenericResource.html +6 -5
  9. data/doc/RuboCop/Cop/InSpecStyle/DeprecatedAttributes.html +3 -2
  10. data/doc/RuboCop/Cop/InSpecStyle/DeprecatedAttributes1.html +311 -0
  11. data/doc/RuboCop/Cop/InSpecStyle/FileBeMounted.html +250 -0
  12. data/doc/RuboCop/Cop/InSpecStyle/FileSize.html +315 -0
  13. data/doc/RuboCop/Cop/InSpecStyle/HostProto.html +315 -0
  14. data/doc/RuboCop/Cop/InSpecStyle/IisWebsite.html +294 -0
  15. data/doc/RuboCop/Cop/InSpecStyle/LinuxKernelParameter.html +296 -0
  16. data/doc/RuboCop/Cop/InSpecStyle/MSSQLSessionPass.html +319 -0
  17. data/doc/RuboCop/Cop/InSpecStyle/OracleDbSessionPass.html +319 -0
  18. data/doc/RuboCop/Cop/InSpecStyle/PPAResource.html +294 -0
  19. data/doc/RuboCop/Cop/InSpecStyle/ProcessesList.html +315 -0
  20. data/doc/RuboCop/Cop/InSpecStyle/ScriptResource.html +298 -0
  21. data/doc/RuboCop/Cop/InSpecStyle/ShadowProperties.html +334 -0
  22. data/doc/RuboCop/Cop/InSpecStyle/UsersResourceMatchers.html +357 -0
  23. data/doc/RuboCop/Cop/InSpecStyle/WindowsRegistryKey.html +294 -0
  24. data/doc/RuboCop/Cop/InSpecStyle/WmiWmisClass.html +294 -0
  25. data/doc/RuboCop/InSpecStyle.html +2 -2
  26. data/doc/RuboCop/InSpecStyle/Error.html +1 -1
  27. data/doc/RuboCop/InSpecStyle/Inject.html +1 -1
  28. data/doc/_index.html +181 -2
  29. data/doc/class_list.html +1 -1
  30. data/doc/file.README.html +24 -2
  31. data/doc/index.html +24 -2
  32. data/doc/method_list.html +254 -6
  33. data/doc/top-level-namespace.html +1 -1
  34. data/lib/rubocop/cop/inspecstyle/deprecated_attributes1.rb +52 -0
  35. data/lib/rubocop/cop/inspecstyle_cops.rb +2 -1
  36. data/lib/rubocop/inspecstyle/version.rb +1 -1
  37. metadata +20 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c51bedfaba90e6e4cf18d3a51f66198bf2fa16a497b49b0df0463090f8405104
4
- data.tar.gz: '090fe9248bb711be0f8c77c845317c98a1acc66dd377c6f7f24923338afd9638'
3
+ metadata.gz: 6a10b0d0e49d2184cf0d39a8bbad38dfe5080419679a0c27cc7b4d2d79a2b8af
4
+ data.tar.gz: 036ca77c943772b0244b8274ca387a0b1c8195dada9f4881aceeefb99d09c734
5
5
  SHA512:
6
- metadata.gz: 0fa18de10357a081e004f385a8635d658eb878779468db447d2584f8bc4697a6b6a6a7f348811a697cfce61cd61c7928669dbd779331bc0585f93b4079ac42a6
7
- data.tar.gz: b3082f4bc9201180cd09aa31bcfde73e2ec6c6ac157da1b6307e50eb83161cc97c8943ba4eec6ebeb691e4296a31846bc5322c4adca85789170471be5a9ebbe1
6
+ metadata.gz: f1eadb21266f0d8b8f534ef50efd8ad12c9deb6349ce5c7e6f6f6561472c651880e28f7ca1c5ad6c6daa3b01809277742b88be127237a4f874b76a8dbbad9df8
7
+ data.tar.gz: 6410d357bfdc98444d6aa8bcc34e0678c81053adf760cba5f59e0ebb313d771242e8ccfa175540e829043af0eac0444f478662b0578a539d86fd2a8b70b6ad59
@@ -15,6 +15,13 @@ InSpecStyle/AzureGenericResource:
15
15
  VersionAdded: '0.82'
16
16
  StyleGuide: 'https://github.com/inspec/inspec/issues/3131'
17
17
 
18
+ InSpecStyle/DeprecatedAttributes1:
19
+ Description: 'Attributes are deprecated in favor of inputs'
20
+ Enabled: true
21
+ VersionAdded: '0.82'
22
+ StyleGuide: 'https://github.com/inspec/inspec/issues/3802'
23
+ PreferredReplacement: 'input'
24
+
18
25
  InSpecStyle/DeprecatedAttributes:
19
26
  Description: 'Attributes are deprecated in favor of inputs'
20
27
  Enabled: true
@@ -79,7 +79,7 @@
79
79
  <dl>
80
80
  <dt>Defined in:</dt>
81
81
  <dd>lib/rubocop/inspecstyle/inject.rb<span class="defines">,<br />
82
- lib/rubocop/inspecstyle.rb,<br /> lib/rubocop/inspecstyle/version.rb,<br /> lib/rubocop/cop/inspecstyle/first_cop.rb,<br /> lib/rubocop/cop/inspecstyle/deprecated_attributes.rb,<br /> lib/rubocop/cop/inspecstyle/azure_generic_resource.rb</span>
82
+ lib/rubocop/inspecstyle.rb,<br /> lib/rubocop/inspecstyle/version.rb,<br /> lib/rubocop/cop/inspecstyle/apache.rb,<br /> lib/rubocop/cop/inspecstyle/file_size.rb,<br /> lib/rubocop/cop/inspecstyle/host_proto.rb,<br /> lib/rubocop/cop/inspecstyle/iis_website.rb,<br /> lib/rubocop/cop/inspecstyle/ppa_resource.rb,<br /> lib/rubocop/cop/inspecstyle/processes_list.rb,<br /> lib/rubocop/cop/inspecstyle/wmi_wmis_class.rb,<br /> lib/rubocop/cop/inspecstyle/file_be_mounted.rb,<br /> lib/rubocop/cop/inspecstyle/script_resource.rb,<br /> lib/rubocop/cop/inspecstyle/shadow_properties.rb,<br /> lib/rubocop/cop/inspecstyle/mssql_session_pass.rb,<br /> lib/rubocop/cop/inspecstyle/windows_registry_key.rb,<br /> lib/rubocop/cop/inspecstyle/aws_iam_user_property.rb,<br /> lib/rubocop/cop/inspecstyle/deprecated_attributes.rb,<br /> lib/rubocop/cop/inspecstyle/azure_generic_resource.rb,<br /> lib/rubocop/cop/inspecstyle/deprecated_attributes1.rb,<br /> lib/rubocop/cop/inspecstyle/linux_kernel_parameter.rb,<br /> lib/rubocop/cop/inspecstyle/oracle_db_session_pass.rb,<br /> lib/rubocop/cop/inspecstyle/users_resource_matchers.rb</span>
83
83
  </dd>
84
84
  </dl>
85
85
 
@@ -88,7 +88,7 @@
88
88
  <h2>Overview</h2><div class="docstring">
89
89
  <div class="discussion">
90
90
 
91
- <p>TODO: when finished, run `rake generate_cops_documentation` to update the docs</p>
91
+ <p>NOTE TO SELF - this one works BUT not if other its statements are defined. Needs to work in any arrangement. This is a powerful one to crack as this pattern will be used in a LOT of other cops.</p>
92
92
 
93
93
 
94
94
  </div>
@@ -118,7 +118,7 @@
118
118
  </div>
119
119
 
120
120
  <div id="footer">
121
- Generated on Thu Jun 11 11:57:48 2020 by
121
+ Generated on Thu Jul 2 15:33:00 2020 by
122
122
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
123
123
  0.9.25 (ruby-2.6.6).
124
124
  </div>
@@ -78,8 +78,8 @@
78
78
 
79
79
  <dl>
80
80
  <dt>Defined in:</dt>
81
- <dd>lib/rubocop/cop/inspecstyle/first_cop.rb<span class="defines">,<br />
82
- lib/rubocop/cop/inspecstyle/deprecated_attributes.rb,<br /> lib/rubocop/cop/inspecstyle/azure_generic_resource.rb</span>
81
+ <dd>lib/rubocop/cop/inspecstyle/apache.rb<span class="defines">,<br />
82
+ lib/rubocop/cop/inspecstyle/file_size.rb,<br /> lib/rubocop/cop/inspecstyle/host_proto.rb,<br /> lib/rubocop/cop/inspecstyle/iis_website.rb,<br /> lib/rubocop/cop/inspecstyle/ppa_resource.rb,<br /> lib/rubocop/cop/inspecstyle/processes_list.rb,<br /> lib/rubocop/cop/inspecstyle/wmi_wmis_class.rb,<br /> lib/rubocop/cop/inspecstyle/file_be_mounted.rb,<br /> lib/rubocop/cop/inspecstyle/script_resource.rb,<br /> lib/rubocop/cop/inspecstyle/shadow_properties.rb,<br /> lib/rubocop/cop/inspecstyle/mssql_session_pass.rb,<br /> lib/rubocop/cop/inspecstyle/windows_registry_key.rb,<br /> lib/rubocop/cop/inspecstyle/aws_iam_user_property.rb,<br /> lib/rubocop/cop/inspecstyle/deprecated_attributes.rb,<br /> lib/rubocop/cop/inspecstyle/azure_generic_resource.rb,<br /> lib/rubocop/cop/inspecstyle/deprecated_attributes1.rb,<br /> lib/rubocop/cop/inspecstyle/linux_kernel_parameter.rb,<br /> lib/rubocop/cop/inspecstyle/oracle_db_session_pass.rb,<br /> lib/rubocop/cop/inspecstyle/users_resource_matchers.rb</span>
83
83
  </dd>
84
84
  </dl>
85
85
 
@@ -107,7 +107,7 @@
107
107
  </div>
108
108
 
109
109
  <div id="footer">
110
- Generated on Thu Jun 11 11:57:48 2020 by
110
+ Generated on Thu Jul 2 15:33:00 2020 by
111
111
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
112
  0.9.25 (ruby-2.6.6).
113
113
  </div>
@@ -78,8 +78,8 @@
78
78
 
79
79
  <dl>
80
80
  <dt>Defined in:</dt>
81
- <dd>lib/rubocop/cop/inspecstyle/first_cop.rb<span class="defines">,<br />
82
- lib/rubocop/cop/inspecstyle/deprecated_attributes.rb,<br /> lib/rubocop/cop/inspecstyle/azure_generic_resource.rb</span>
81
+ <dd>lib/rubocop/cop/inspecstyle/apache.rb<span class="defines">,<br />
82
+ lib/rubocop/cop/inspecstyle/file_size.rb,<br /> lib/rubocop/cop/inspecstyle/host_proto.rb,<br /> lib/rubocop/cop/inspecstyle/iis_website.rb,<br /> lib/rubocop/cop/inspecstyle/ppa_resource.rb,<br /> lib/rubocop/cop/inspecstyle/processes_list.rb,<br /> lib/rubocop/cop/inspecstyle/wmi_wmis_class.rb,<br /> lib/rubocop/cop/inspecstyle/file_be_mounted.rb,<br /> lib/rubocop/cop/inspecstyle/script_resource.rb,<br /> lib/rubocop/cop/inspecstyle/shadow_properties.rb,<br /> lib/rubocop/cop/inspecstyle/mssql_session_pass.rb,<br /> lib/rubocop/cop/inspecstyle/windows_registry_key.rb,<br /> lib/rubocop/cop/inspecstyle/aws_iam_user_property.rb,<br /> lib/rubocop/cop/inspecstyle/deprecated_attributes.rb,<br /> lib/rubocop/cop/inspecstyle/azure_generic_resource.rb,<br /> lib/rubocop/cop/inspecstyle/deprecated_attributes1.rb,<br /> lib/rubocop/cop/inspecstyle/linux_kernel_parameter.rb,<br /> lib/rubocop/cop/inspecstyle/oracle_db_session_pass.rb,<br /> lib/rubocop/cop/inspecstyle/users_resource_matchers.rb</span>
83
83
  </dd>
84
84
  </dl>
85
85
 
@@ -91,7 +91,7 @@
91
91
 
92
92
 
93
93
 
94
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="InSpecStyle/AzureGenericResource.html" title="RuboCop::Cop::InSpecStyle::AzureGenericResource (class)">AzureGenericResource</a></span>, <span class='object_link'><a href="InSpecStyle/DeprecatedAttributes.html" title="RuboCop::Cop::InSpecStyle::DeprecatedAttributes (class)">DeprecatedAttributes</a></span>, <span class='object_link'><a href="InSpecStyle/FirstCop.html" title="RuboCop::Cop::InSpecStyle::FirstCop (class)">FirstCop</a></span>
94
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="InSpecStyle/Apache.html" title="RuboCop::Cop::InSpecStyle::Apache (class)">Apache</a></span>, <span class='object_link'><a href="InSpecStyle/AwsIamUserProperty.html" title="RuboCop::Cop::InSpecStyle::AwsIamUserProperty (class)">AwsIamUserProperty</a></span>, <span class='object_link'><a href="InSpecStyle/AzureGenericResource.html" title="RuboCop::Cop::InSpecStyle::AzureGenericResource (class)">AzureGenericResource</a></span>, <span class='object_link'><a href="InSpecStyle/DeprecatedAttributes.html" title="RuboCop::Cop::InSpecStyle::DeprecatedAttributes (class)">DeprecatedAttributes</a></span>, <span class='object_link'><a href="InSpecStyle/DeprecatedAttributes1.html" title="RuboCop::Cop::InSpecStyle::DeprecatedAttributes1 (class)">DeprecatedAttributes1</a></span>, <span class='object_link'><a href="InSpecStyle/FileBeMounted.html" title="RuboCop::Cop::InSpecStyle::FileBeMounted (class)">FileBeMounted</a></span>, <span class='object_link'><a href="InSpecStyle/FileSize.html" title="RuboCop::Cop::InSpecStyle::FileSize (class)">FileSize</a></span>, <span class='object_link'><a href="InSpecStyle/HostProto.html" title="RuboCop::Cop::InSpecStyle::HostProto (class)">HostProto</a></span>, <span class='object_link'><a href="InSpecStyle/IisWebsite.html" title="RuboCop::Cop::InSpecStyle::IisWebsite (class)">IisWebsite</a></span>, <span class='object_link'><a href="InSpecStyle/LinuxKernelParameter.html" title="RuboCop::Cop::InSpecStyle::LinuxKernelParameter (class)">LinuxKernelParameter</a></span>, <span class='object_link'><a href="InSpecStyle/MSSQLSessionPass.html" title="RuboCop::Cop::InSpecStyle::MSSQLSessionPass (class)">MSSQLSessionPass</a></span>, <span class='object_link'><a href="InSpecStyle/OracleDbSessionPass.html" title="RuboCop::Cop::InSpecStyle::OracleDbSessionPass (class)">OracleDbSessionPass</a></span>, <span class='object_link'><a href="InSpecStyle/PPAResource.html" title="RuboCop::Cop::InSpecStyle::PPAResource (class)">PPAResource</a></span>, <span class='object_link'><a href="InSpecStyle/ProcessesList.html" title="RuboCop::Cop::InSpecStyle::ProcessesList (class)">ProcessesList</a></span>, <span class='object_link'><a href="InSpecStyle/ScriptResource.html" title="RuboCop::Cop::InSpecStyle::ScriptResource (class)">ScriptResource</a></span>, <span class='object_link'><a href="InSpecStyle/ShadowProperties.html" title="RuboCop::Cop::InSpecStyle::ShadowProperties (class)">ShadowProperties</a></span>, <span class='object_link'><a href="InSpecStyle/UsersResourceMatchers.html" title="RuboCop::Cop::InSpecStyle::UsersResourceMatchers (class)">UsersResourceMatchers</a></span>, <span class='object_link'><a href="InSpecStyle/WindowsRegistryKey.html" title="RuboCop::Cop::InSpecStyle::WindowsRegistryKey (class)">WindowsRegistryKey</a></span>, <span class='object_link'><a href="InSpecStyle/WmiWmisClass.html" title="RuboCop::Cop::InSpecStyle::WmiWmisClass (class)">WmiWmisClass</a></span>
95
95
 
96
96
 
97
97
  </p>
@@ -107,7 +107,7 @@
107
107
  </div>
108
108
 
109
109
  <div id="footer">
110
- Generated on Thu Jun 11 11:57:48 2020 by
110
+ Generated on Thu Jul 2 15:33:00 2020 by
111
111
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
112
  0.9.25 (ruby-2.6.6).
113
113
  </div>
@@ -0,0 +1,306 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: RuboCop::Cop::InSpecStyle::Apache
8
+
9
+ &mdash; Documentation by YARD 0.9.25
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "RuboCop::Cop::InSpecStyle::Apache";
19
+ relpath = '../../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../../_index.html">Index (A)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../../RuboCop.html" title="RuboCop (module)">RuboCop</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Cop.html" title="RuboCop::Cop (module)">Cop</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../InSpecStyle.html" title="RuboCop::Cop::InSpecStyle (module)">InSpecStyle</a></span></span>
41
+ &raquo;
42
+ <span class="title">Apache</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: RuboCop::Cop::InSpecStyle::Apache
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="../../Cop.html" title="RuboCop::Cop (module)">RuboCop::Cop</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="../../Cop.html" title="RuboCop::Cop (module)">RuboCop::Cop</a></span></li>
78
+
79
+ <li class="next">RuboCop::Cop::InSpecStyle::Apache</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/rubocop/cop/inspecstyle/apache.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Do not use apache</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+ <div class="examples">
115
+ <p class="tag_title">Examples:</p>
116
+
117
+
118
+ <p class="example_title"><div class='inline'>
119
+ <p>EnforcedStyle: InSpecStyle (default)</p>
120
+ </div></p>
121
+
122
+ <pre class="example code"><code><span class='comment'># apache has been deprecated
123
+ </span><span class='comment'># &#39;https://github.com/inspec/inspec/issues/3131&#39;
124
+ </span><span class='comment'># Since there are multiples replacements autocorrect is not supported.
125
+ </span>
126
+ <span class='comment'># bad
127
+ </span><span class='id identifier rubyid_apache'>apache</span>
128
+
129
+ <span class='comment'># good
130
+ </span><span class='id identifier rubyid_azurerm_virtual_machine'>azurerm_virtual_machine</span> <span class='comment'># use a specific resource pack resource</span></code></pre>
131
+
132
+ </div>
133
+
134
+
135
+ </div>
136
+
137
+ <h2>
138
+ Constant Summary
139
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
140
+ </h2>
141
+
142
+ <dl class="constants">
143
+
144
+ <dt id="MSG-constant" class="">MSG =
145
+
146
+ </dt>
147
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Use a `apache_conf` instead of `#apache`. </span><span class='tstring_end'>&#39;</span></span>\
148
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>This resource will be removed in InSpec 5.</span><span class='tstring_end'>&#39;</span></span></pre></dd>
149
+
150
+ </dl>
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+ <h2>
161
+ Instance Method Summary
162
+ <small><a href="#" class="summary_toggle">collapse</a></small>
163
+ </h2>
164
+
165
+ <ul class="summary">
166
+
167
+ <li class="public ">
168
+ <span class="summary_signature">
169
+
170
+ <a href="#autocorrect-instance_method" title="#autocorrect (instance method)">#<strong>autocorrect</strong>(node) &#x21d2; Object </a>
171
+
172
+
173
+
174
+ </span>
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+ <span class="summary_desc"><div class='inline'></div></span>
185
+
186
+ </li>
187
+
188
+
189
+ <li class="public ">
190
+ <span class="summary_signature">
191
+
192
+ <a href="#on_send-instance_method" title="#on_send (instance method)">#<strong>on_send</strong>(node) &#x21d2; Object </a>
193
+
194
+
195
+
196
+ </span>
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+ <span class="summary_desc"><div class='inline'></div></span>
207
+
208
+ </li>
209
+
210
+
211
+ </ul>
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+ <div id="instance_method_details" class="method_details_list">
223
+ <h2>Instance Method Details</h2>
224
+
225
+
226
+ <div class="method_details first">
227
+ <h3 class="signature first" id="autocorrect-instance_method">
228
+
229
+ #<strong>autocorrect</strong>(node) &#x21d2; <tt>Object</tt>
230
+
231
+
232
+
233
+
234
+
235
+ </h3><table class="source_code">
236
+ <tr>
237
+ <td>
238
+ <pre class="lines">
239
+
240
+
241
+ 39
242
+ 40
243
+ 41
244
+ 42
245
+ 43</pre>
246
+ </td>
247
+ <td>
248
+ <pre class="code"><span class="info file"># File 'lib/rubocop/cop/inspecstyle/apache.rb', line 39</span>
249
+
250
+ <span class='kw'>def</span> <span class='id identifier rubyid_autocorrect'>autocorrect</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
251
+ <span class='id identifier rubyid_lambda'>lambda</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_corrector'>corrector</span><span class='op'>|</span>
252
+ <span class='id identifier rubyid_corrector'>corrector</span><span class='period'>.</span><span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_loc'>loc</span><span class='period'>.</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='id identifier rubyid_preferred_replacement'>preferred_replacement</span><span class='rparen'>)</span>
253
+ <span class='kw'>end</span>
254
+ <span class='kw'>end</span></pre>
255
+ </td>
256
+ </tr>
257
+ </table>
258
+ </div>
259
+
260
+ <div class="method_details ">
261
+ <h3 class="signature " id="on_send-instance_method">
262
+
263
+ #<strong>on_send</strong>(node) &#x21d2; <tt>Object</tt>
264
+
265
+
266
+
267
+
268
+
269
+ </h3><table class="source_code">
270
+ <tr>
271
+ <td>
272
+ <pre class="lines">
273
+
274
+
275
+ 33
276
+ 34
277
+ 35
278
+ 36
279
+ 37</pre>
280
+ </td>
281
+ <td>
282
+ <pre class="code"><span class="info file"># File 'lib/rubocop/cop/inspecstyle/apache.rb', line 33</span>
283
+
284
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_send'>on_send</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
285
+ <span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_apache?'>apache?</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
286
+
287
+ <span class='id identifier rubyid_add_offense'>add_offense</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='comma'>,</span> <span class='label'>location:</span> <span class='symbol'>:selector</span><span class='rparen'>)</span>
288
+ <span class='kw'>end</span></pre>
289
+ </td>
290
+ </tr>
291
+ </table>
292
+ </div>
293
+
294
+ </div>
295
+
296
+ </div>
297
+
298
+ <div id="footer">
299
+ Generated on Thu Jul 2 15:33:00 2020 by
300
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
301
+ 0.9.25 (ruby-2.6.6).
302
+ </div>
303
+
304
+ </div>
305
+ </body>
306
+ </html>
@@ -0,0 +1,358 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: RuboCop::Cop::InSpecStyle::AwsIamUserProperty
8
+
9
+ &mdash; Documentation by YARD 0.9.25
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "RuboCop::Cop::InSpecStyle::AwsIamUserProperty";
19
+ relpath = '../../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../../_index.html">Index (A)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../../RuboCop.html" title="RuboCop (module)">RuboCop</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Cop.html" title="RuboCop::Cop (module)">Cop</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../InSpecStyle.html" title="RuboCop::Cop::InSpecStyle (module)">InSpecStyle</a></span></span>
41
+ &raquo;
42
+ <span class="title">AwsIamUserProperty</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: RuboCop::Cop::InSpecStyle::AwsIamUserProperty
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="../../Cop.html" title="RuboCop::Cop (module)">RuboCop::Cop</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="../../Cop.html" title="RuboCop::Cop (module)">RuboCop::Cop</a></span></li>
78
+
79
+ <li class="next">RuboCop::Cop::InSpecStyle::AwsIamUserProperty</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+ <dl>
93
+ <dt>Includes:</dt>
94
+ <dd>RangeHelp</dd>
95
+ </dl>
96
+
97
+
98
+
99
+
100
+
101
+
102
+ <dl>
103
+ <dt>Defined in:</dt>
104
+ <dd>lib/rubocop/cop/inspecstyle/aws_iam_user_property.rb</dd>
105
+ </dl>
106
+
107
+ </div>
108
+
109
+ <h2>Overview</h2><div class="docstring">
110
+ <div class="discussion">
111
+
112
+ <p>aws_iam_users resource properties `user|password|last_change|expiry_date|line` is deprecated in favor of `users|passwords|last_changes|expiry_dates|lines`</p>
113
+
114
+
115
+ </div>
116
+ </div>
117
+ <div class="tags">
118
+
119
+ <div class="examples">
120
+ <p class="tag_title">Examples:</p>
121
+
122
+
123
+ <p class="example_title"><div class='inline'>
124
+ <p>EnforcedStyle: InSpecStyle (default)</p>
125
+ </div></p>
126
+
127
+ <pre class="example code"><code><span class='comment'># Use users instead
128
+ </span>
129
+ <span class='comment'># bad
130
+ </span><span class='id identifier rubyid_describe'>describe</span> <span class='id identifier rubyid_aws_iam_user'>aws_iam_user</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/etc/my-custom-place/aws_iam_user</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='kw'>do</span>
131
+ <span class='id identifier rubyid_its'>its</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>name</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_should'>should</span> <span class='id identifier rubyid_eq'>eq</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>user</span><span class='tstring_end'>&#39;</span></span> <span class='rbrace'>}</span>
132
+ <span class='kw'>end</span>
133
+
134
+ <span class='comment'># good
135
+ </span><span class='id identifier rubyid_describe'>describe</span> <span class='id identifier rubyid_aws_iam_user'>aws_iam_user</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/etc/my-custom-place/aws_iam_user</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='kw'>do</span>
136
+ <span class='id identifier rubyid_its'>its</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>username</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_should'>should</span> <span class='id identifier rubyid_eq'>eq</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>user</span><span class='tstring_end'>&#39;</span></span> <span class='rbrace'>}</span>
137
+ <span class='kw'>end</span></code></pre>
138
+
139
+ </div>
140
+
141
+
142
+ </div>
143
+
144
+ <h2>
145
+ Constant Summary
146
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
147
+ </h2>
148
+
149
+ <dl class="constants">
150
+
151
+ <dt id="MSG-constant" class="">MSG =
152
+
153
+ </dt>
154
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Use `:%&lt;solution&gt;s` instead of `:%&lt;violation&gt;s` as a property </span><span class='tstring_end'>&#39;</span></span> \
155
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>for the `aws_iam_user` resource. This property will be removed in InSpec 5</span><span class='tstring_end'>&#39;</span></span></pre></dd>
156
+
157
+ <dt id="MAP-constant" class="">MAP =
158
+
159
+ </dt>
160
+ <dd><pre class="code"><span class='lbrace'>{</span>
161
+ <span class='label'>user:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>aws_user_struct</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
162
+ <span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>username</span><span class='tstring_end'>&quot;</span></span>
163
+ <span class='rbrace'>}</span></pre></dd>
164
+
165
+ </dl>
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+ <h2>
176
+ Instance Method Summary
177
+ <small><a href="#" class="summary_toggle">collapse</a></small>
178
+ </h2>
179
+
180
+ <ul class="summary">
181
+
182
+ <li class="public ">
183
+ <span class="summary_signature">
184
+
185
+ <a href="#autocorrect-instance_method" title="#autocorrect (instance method)">#<strong>autocorrect</strong>(node) &#x21d2; Object </a>
186
+
187
+
188
+
189
+ </span>
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+ <span class="summary_desc"><div class='inline'></div></span>
200
+
201
+ </li>
202
+
203
+
204
+ <li class="public ">
205
+ <span class="summary_signature">
206
+
207
+ <a href="#on_block-instance_method" title="#on_block (instance method)">#<strong>on_block</strong>(node) &#x21d2; Object </a>
208
+
209
+
210
+
211
+ </span>
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+ <span class="summary_desc"><div class='inline'></div></span>
222
+
223
+ </li>
224
+
225
+
226
+ </ul>
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+ <div id="instance_method_details" class="method_details_list">
239
+ <h2>Instance Method Details</h2>
240
+
241
+
242
+ <div class="method_details first">
243
+ <h3 class="signature first" id="autocorrect-instance_method">
244
+
245
+ #<strong>autocorrect</strong>(node) &#x21d2; <tt>Object</tt>
246
+
247
+
248
+
249
+
250
+
251
+ </h3><table class="source_code">
252
+ <tr>
253
+ <td>
254
+ <pre class="lines">
255
+
256
+
257
+ 70
258
+ 71
259
+ 72
260
+ 73
261
+ 74
262
+ 75
263
+ 76
264
+ 77
265
+ 78
266
+ 79
267
+ 80
268
+ 81</pre>
269
+ </td>
270
+ <td>
271
+ <pre class="code"><span class="info file"># File 'lib/rubocop/cop/inspecstyle/aws_iam_user_property.rb', line 70</span>
272
+
273
+ <span class='kw'>def</span> <span class='id identifier rubyid_autocorrect'>autocorrect</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
274
+ <span class='id identifier rubyid_lambda'>lambda</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_corrector'>corrector</span><span class='op'>|</span>
275
+ <span class='kw'>case</span> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_children'>children</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_children'>children</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span>
276
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>s(:str, \&quot;name\&quot;)</span><span class='tstring_end'>&quot;</span></span>
277
+ <span class='id identifier rubyid_corrector'>corrector</span><span class='period'>.</span><span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_offense_range'>offense_range</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>username</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
278
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>s(:str, \&quot;user\&quot;)</span><span class='tstring_end'>&quot;</span></span>
279
+ <span class='id identifier rubyid_corrector'>corrector</span><span class='period'>.</span><span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_offense_range'>offense_range</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>aws_user_struct</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
280
+ <span class='kw'>else</span>
281
+ <span class='kw'>break</span>
282
+ <span class='kw'>end</span>
283
+ <span class='kw'>end</span>
284
+ <span class='kw'>end</span></pre>
285
+ </td>
286
+ </tr>
287
+ </table>
288
+ </div>
289
+
290
+ <div class="method_details ">
291
+ <h3 class="signature " id="on_block-instance_method">
292
+
293
+ #<strong>on_block</strong>(node) &#x21d2; <tt>Object</tt>
294
+
295
+
296
+
297
+
298
+
299
+ </h3><table class="source_code">
300
+ <tr>
301
+ <td>
302
+ <pre class="lines">
303
+
304
+
305
+ 53
306
+ 54
307
+ 55
308
+ 56
309
+ 57
310
+ 58
311
+ 59
312
+ 60
313
+ 61
314
+ 62
315
+ 63
316
+ 64
317
+ 65
318
+ 66
319
+ 67
320
+ 68</pre>
321
+ </td>
322
+ <td>
323
+ <pre class="code"><span class="info file"># File 'lib/rubocop/cop/inspecstyle/aws_iam_user_property.rb', line 53</span>
324
+
325
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_block'>on_block</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
326
+ <span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_inside_aws_iam_users_spec?'>inside_aws_iam_users_spec?</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
327
+ <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_descendants'>descendants</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_descendant'>descendant</span><span class='op'>|</span>
328
+ <span class='id identifier rubyid_deprecated_aws_iam_users_property?'>deprecated_aws_iam_users_property?</span><span class='lparen'>(</span><span class='id identifier rubyid_descendant'>descendant</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_violation'>violation</span><span class='op'>|</span>
329
+ <span class='id identifier rubyid_add_offense'>add_offense</span><span class='lparen'>(</span>
330
+ <span class='id identifier rubyid_descendant'>descendant</span><span class='comma'>,</span>
331
+ <span class='label'>location:</span> <span class='id identifier rubyid_offense_range'>offense_range</span><span class='lparen'>(</span><span class='id identifier rubyid_descendant'>descendant</span><span class='rparen'>)</span><span class='comma'>,</span>
332
+ <span class='label'>message:</span> <span class='id identifier rubyid_format'>format</span><span class='lparen'>(</span>
333
+ <span class='const'><span class='object_link'><a href="#MSG-constant" title="RuboCop::Cop::InSpecStyle::AwsIamUserProperty::MSG (constant)">MSG</a></span></span><span class='comma'>,</span>
334
+ <span class='label'>violation:</span> <span class='id identifier rubyid_violation'>violation</span><span class='comma'>,</span>
335
+ <span class='label'>solution:</span> <span class='const'><span class='object_link'><a href="#MAP-constant" title="RuboCop::Cop::InSpecStyle::AwsIamUserProperty::MAP (constant)">MAP</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_violation'>violation</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span>
336
+ <span class='rparen'>)</span>
337
+ <span class='rparen'>)</span>
338
+ <span class='kw'>end</span>
339
+ <span class='kw'>end</span>
340
+ <span class='kw'>end</span></pre>
341
+ </td>
342
+ </tr>
343
+ </table>
344
+ </div>
345
+
346
+ </div>
347
+
348
+ </div>
349
+
350
+ <div id="footer">
351
+ Generated on Thu Jul 2 15:33:00 2020 by
352
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
353
+ 0.9.25 (ruby-2.6.6).
354
+ </div>
355
+
356
+ </div>
357
+ </body>
358
+ </html>