Skip to content

Commit f538b34

Browse files
committed
Tighten length of lines over 100-chars (style).
1 parent 414f431 commit f538b34

File tree

4 files changed

+26
-24
lines changed

4 files changed

+26
-24
lines changed

.cane

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--abc-max 20
2-
--style-measure 120
2+
--style-measure 100
33
--abc-exclude Kitchen::ThorTasks#define
44
--style-exclude lib/vendor/**/*.rb
55
--doc-exclude lib/vendor/**/.rb

lib/kitchen/logger.rb

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -83,44 +83,44 @@ def delegate_to_all_loggers(meth)
8383
end
8484

8585
# @return [Integer] the logging severity threshold
86-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#level
86+
# @see http://is.gd/Okuy5p
8787
delegate_to_first_logger :level
8888

8989
# Sets the logging severity threshold.
9090
#
9191
# @param level [Integer] the logging severity threshold
92-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#level=
92+
# @see http://is.gd/H1VBFH
9393
delegate_to_all_loggers :level=
9494

9595
# @return [String] program name to include in log messages
96-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#progname
96+
# @see http://is.gd/5uHGK0
9797
delegate_to_first_logger :progname
9898

9999
# Sets the program name to include in log messages.
100100
#
101101
# @param progname [String] the program name to include in log messages
102-
# @http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#progname=
102+
# @see http://is.gd/f2U5Xj
103103
delegate_to_all_loggers :progname=
104104

105105
# @return [String] the date format being used
106-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-datetime_format
106+
# @see http://is.gd/btmFWJ
107107
delegate_to_first_logger :datetime_format
108108

109109
# Sets the date format being used.
110110
#
111111
# @param format [String] the date format
112-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-datetime_format-3D
112+
# @see http://is.gd/M36ml8
113113
delegate_to_all_loggers :datetime_format=
114114

115115
# Log a message if the given severity is high enough.
116116
#
117-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-add
117+
# @see http://is.gd/5opBW0
118118
delegate_to_all_loggers :add
119119

120120
# Dump one or more messages to info.
121121
#
122122
# @param message [#to_s] the message to log
123-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-3C-3C
123+
# @see http://is.gd/BCp5KV
124124
delegate_to_all_loggers :<<
125125

126126
# Log a message with severity of banner (high level).
@@ -133,7 +133,7 @@ def delegate_to_all_loggers(meth)
133133
# the logger is configured to show them.
134134
# @return [nil,true] when the given severity is not high enough (for this
135135
# particular logger), log no message, and return true
136-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-info
136+
# @see http://is.gd/pYUCYU
137137
delegate_to_all_loggers :banner
138138

139139
# Log a message with severity of debug.
@@ -146,12 +146,12 @@ def delegate_to_all_loggers(meth)
146146
# the logger is configured to show them.
147147
# @return [nil,true] when the given severity is not high enough (for this
148148
# particular logger), log no message, and return true
149-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-debug
149+
# @see http://is.gd/Re97Zp
150150
delegate_to_all_loggers :debug
151151

152152
# @return [true,false] whether or not the current severity level
153153
# allows for the printing of debug messages
154-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-debug-3F
154+
# @see http://is.gd/Iq08xB
155155
delegate_to_first_logger :debug?
156156

157157
# Log a message with severity of info.
@@ -164,12 +164,12 @@ def delegate_to_all_loggers(meth)
164164
# the logger is configured to show them.
165165
# @return [nil,true] when the given severity is not high enough (for this
166166
# particular logger), log no message, and return true
167-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-info
167+
# @see http://is.gd/pYUCYU
168168
delegate_to_all_loggers :info
169169

170170
# @return [true,false] whether or not the current severity level
171171
# allows for the printing of info messages
172-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-info-3F
172+
# @see http://is.gd/lBtJkT
173173
delegate_to_first_logger :info?
174174

175175
# Log a message with severity of error.
@@ -182,12 +182,12 @@ def delegate_to_all_loggers(meth)
182182
# the logger is configured to show them.
183183
# @return [nil,true] when the given severity is not high enough (for this
184184
# particular logger), log no message, and return true
185-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-error
185+
# @see http://is.gd/mLwYMl
186186
delegate_to_all_loggers :error
187187

188188
# @return [true,false] whether or not the current severity level
189189
# allows for the printing of error messages
190-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-error-3F
190+
# @see http://is.gd/QY19JL
191191
delegate_to_first_logger :error?
192192

193193
# Log a message with severity of warn.
@@ -200,12 +200,12 @@ def delegate_to_all_loggers(meth)
200200
# the logger is configured to show them.
201201
# @return [nil,true] when the given severity is not high enough (for this
202202
# particular logger), log no message, and return true
203-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-warn
203+
# @see http://is.gd/PX9AIS
204204
delegate_to_all_loggers :warn
205205

206206
# @return [true,false] whether or not the current severity level
207207
# allows for the printing of warn messages
208-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-warn-3F
208+
# @see http://is.gd/Gdr4lD
209209
delegate_to_first_logger :warn?
210210

211211
# Log a message with severity of fatal.
@@ -218,12 +218,12 @@ def delegate_to_all_loggers(meth)
218218
# the logger is configured to show them.
219219
# @return [nil,true] when the given severity is not high enough (for this
220220
# particular logger), log no message, and return true
221-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-fatal
221+
# @see http://is.gd/5ElFPK
222222
delegate_to_all_loggers :fatal
223223

224224
# @return [true,false] whether or not the current severity level
225225
# allows for the printing of fatal messages
226-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-fatal-3F
226+
# @see http://is.gd/7PgwRl
227227
delegate_to_first_logger :fatal?
228228

229229
# Log a message with severity of unknown.
@@ -236,12 +236,12 @@ def delegate_to_all_loggers(meth)
236236
# the logger is configured to show them.
237237
# @return [nil,true] when the given severity is not high enough (for this
238238
# particular logger), log no message, and return true
239-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-unknown
239+
# @see http://is.gd/Y4hqpf
240240
delegate_to_all_loggers :unknown
241241

242242
# Close the logging devices.
243243
#
244-
# @see http://www.ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html#method-i-close
244+
# @see http://is.gd/b13cVn
245245
delegate_to_all_loggers :close
246246

247247
private

lib/kitchen/ssh.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ def login_command
142142
args += %W{ -o StrictHostKeyChecking=no }
143143
args += %W{ -o IdentitiesOnly=yes } if options[:keys]
144144
args += %W{ -o LogLevel=#{logger.debug? ? "VERBOSE" : "ERROR"} }
145-
args += %W{ -o ForwardAgent=#{options[:forward_agent] ? "yes" : "no"} } if options.key? :forward_agent
145+
if options.key?(:forward_agent)
146+
args += %W{ -o ForwardAgent=#{options[:forward_agent] ? "yes" : "no"} }
147+
end
146148
Array(options[:keys]).each { |ssh_key| args += %W{ -i #{ssh_key}} }
147149
args += %W{ -p #{port}}
148150
args += %W{ #{username}@#{hostname}}

spec/kitchen/ssh_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# filesystem (i.e. lexically sorted, inode insertion, mtime/atime, total
3030
# randomness, etc.)
3131
#
32-
# See: https://github.com/net-ssh/net-scp/blob/a24948d8bd231878f2606196c693768cc78215cb/lib/net/scp/upload.rb#L52
32+
# See: https://github.com/net-ssh/net-scp/blob/a24948/lib/net/scp/upload.rb#L52
3333

3434
def with_sorted_dir_entries
3535
Dir.class_exec do

0 commit comments

Comments
 (0)