rakuten-ws/rws-ruby-sdk

View on GitHub
lib/rakuten_web_service/client.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
96%

Assignment Branch Condition size for get is too high. [15.33/15]
Open

    def get(params)
      params = RakutenWebService.configuration.generate_parameters(params)
      response = request(url.path, params)
      body = JSON.parse(response.body)

Severity: Minor
Found in lib/rakuten_web_service/client.rb by rubocop

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Line is too long. [86/80]
Open

      path = "#{path}?#{params.map { |k, v| "#{k}=#{CGI.escape(v.to_s)}" }.join('&')}"
Severity: Minor
Found in lib/rakuten_web_service/client.rb by rubocop

Missing top-level class documentation comment.
Open

  class Client
Severity: Minor
Found in lib/rakuten_web_service/client.rb by rubocop

This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.

The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.

Example:

# bad
class Person
  # ...
end

# good
# Description/Explanation of Person class
class Person
  # ...
end

Line is too long. [94/80]
Open

      raise RakutenWebService::Error.repository[response.code.to_i], body['error_description']
Severity: Minor
Found in lib/rakuten_web_service/client.rb by rubocop

Avoid the use of the case equality operator ===.
Open

      if Net::HTTPSuccess === response
Severity: Minor
Found in lib/rakuten_web_service/client.rb by rubocop

This cop checks for uses of the case equality operator(===).

Example:

# bad
Array === something
(1..100) === 7
/something/ === some_string

# good
something.is_a?(Array)
(1..100).include?(7)
some_string =~ /something/

Line is too long. [114/80]
Open

        'User-Agent' => "RakutenWebService SDK for Ruby v#{RWS::VERSION}(ruby-#{RUBY_VERSION} [#{RUBY_PLATFORM}])"
Severity: Minor
Found in lib/rakuten_web_service/client.rb by rubocop

There are no issues that match your filters.

Category
Status