Use the new Ruby 1.9 hash syntax. task :default => :test Found in Rakefile by rubocop
Prefer single-quoted strings when you don't need string interpolation or special symbols. OPEN desc "Run tests" - Found in Rakefile by rubocop
Final newline missing. task :default => :test - Found in Rakefile by rubocop
Unnecessary spacing detected. host = 'https://api.sendgrid.com' - Found in examples/example.rb by rubocop
Operator = should be surrounded by a single space. host = 'https://api.sendgrid.com' - Found in examples/example.rb by rubocop
Use && instead of and. elsif !@request_body and (name.to_s == "post") - Found in lib/ruby_http_client.rb by rubocop
Align ) with (. - line 147 - Found in lib/ruby_http_client.rb by rubocop
Use Hash#key? instead of Hash#has_key?. (!@request_headers.has_key?('Content-Type') || - Found in lib/ruby_http_client.rb by rubocop
When using method_missing, define respond_to_missing? and fall back on super. ```
def method_missing(name, *args, &_block)
Capture the version
if name.tos == 'version'
@version = args[0]
return ``` - Found in lib/ruby_http_client.rb by rubocop
Don't use parentheses around the condition of an if. if (@request_body && (!@request_headers.has_key?('Content-Type') || @request_headers['Content-Type'] == 'application/json') ) - Found in lib/ruby_http_client.rb by rubocop
%w-literals should be delimited by [ and ]. @methods = %w(delete get patch post put) - Found in lib/ruby_http_client.rb by rubocop
Prefer single-quoted strings when you don't need string interpolation or special symbols. elsif !@request_body and (name.to_s == "post") - Found in lib/ruby_http_client.rb by rubocop
Add an empty line after magic comments. lib = File.expand_path('../lib', __FILE__) - Found in ruby_http_client.gemspec by rubocop
Steps to Reproduce
Once done, make a PR and wait for the build
Codeclimate should not be reporting these issues for these files any longer
Issue Summary
Use the new Ruby 1.9 hash syntax.
task :default => :test
Found in Rakefile by rubocopPrefer single-quoted strings when you don't need string interpolation or special symbols. OPEN
desc "Run tests"
- Found in Rakefile by rubocopFinal newline missing.
task :default => :test
- Found in Rakefile by rubocopUnnecessary spacing detected.
host = 'https://api.sendgrid.com'
- Found in examples/example.rb by rubocopOperator = should be surrounded by a single space.
host = 'https://api.sendgrid.com'
- Found in examples/example.rb by rubocopUse && instead of and.
elsif !@request_body and (name.to_s == "post")
- Found in lib/ruby_http_client.rb by rubocopAlign ) with (. - line 147 - Found in lib/ruby_http_client.rb by rubocop
Use Hash#key? instead of Hash#has_key?.
(!@request_headers.has_key?('Content-Type') ||
- Found in lib/ruby_http_client.rb by rubocopWhen using method_missing, define respond_to_missing? and fall back on super. ``` def method_missing(name, *args, &_block)
Capture the version
if name.tos == 'version' @version = args[0] return ``` - Found in lib/ruby_http_client.rb by rubocop
Don't use parentheses around the condition of an if.
if (@request_body && (!@request_headers.has_key?('Content-Type') || @request_headers['Content-Type'] == 'application/json') )
- Found in lib/ruby_http_client.rb by rubocop%w-literals should be delimited by [ and ].
@methods = %w(delete get patch post put)
- Found in lib/ruby_http_client.rb by rubocopPrefer single-quoted strings when you don't need string interpolation or special symbols.
elsif !@request_body and (name.to_s == "post")
- Found in lib/ruby_http_client.rb by rubocopAdd an empty line after magic comments.
lib = File.expand_path('../lib', __FILE__)
- Found in ruby_http_client.gemspec by rubocopSteps to Reproduce