mhenrixon/active_campaign

View on GitHub

Showing 24 of 24 total issues

Method safe_http_call has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def safe_http_call # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
response = yield
response.body
rescue ::Oj::ParseError => e
raise ParsingError, e
Severity: Minor
Found in lib/active_campaign/client.rb - About 1 hr to fix

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    module API
    #
    # Interface to dealCustomMetum endpoints
    #
    # @author Mikael Henriksson <mikael@mhenrixon.com>
    Severity: Major
    Found in lib/active_campaign/api/deal_custom_field_meta.rb and 2 other locations - About 1 hr to fix
    lib/active_campaign/api/account_custom_field_data.rb on lines 4..101
    lib/active_campaign/api/account_custom_field_meta.rb on lines 4..101

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    module API
    #
    # Interface to accountCustomMetum endpoints
    #
    # @author Mikael Henriksson <mikael@mhenrixon.com>
    Severity: Major
    Found in lib/active_campaign/api/account_custom_field_meta.rb and 2 other locations - About 1 hr to fix
    lib/active_campaign/api/account_custom_field_data.rb on lines 4..101
    lib/active_campaign/api/deal_custom_field_meta.rb on lines 4..101

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    module API
    #
    # Interface to accountCustomMetum endpoints
    #
    # @author Mikael Henriksson <mikael@mhenrixon.com>
    Severity: Major
    Found in lib/active_campaign/api/account_custom_field_data.rb and 2 other locations - About 1 hr to fix
    lib/active_campaign/api/account_custom_field_meta.rb on lines 4..101
    lib/active_campaign/api/deal_custom_field_meta.rb on lines 4..101

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    module API
    #
    # Interface to group endpoints
    #
    # @author Mikael Henriksson <mikael@mhenrixon.com>
    Severity: Major
    Found in lib/active_campaign/api/groups.rb and 1 other location - About 1 hr to fix
    lib/active_campaign/api/accounts.rb on lines 4..86

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    module API
    #
    # Interface to account endpoints
    #
    # @author Mikael Henriksson <mikael@mhenrixon.com>
    Severity: Major
    Found in lib/active_campaign/api/accounts.rb and 1 other location - About 1 hr to fix
    lib/active_campaign/api/groups.rb on lines 4..201

    Complex method ActiveCampaign::Client#safe_http_call (25.9)
    Open

    def safe_http_call # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
    response = yield
    response.body
    rescue ::Oj::ParseError => e
    raise ParsingError, e
    Severity: Minor
    Found in lib/active_campaign/client.rb by flog

    Method add_request_middleware has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    def self.add_request_middleware(faraday, config = {})
    faraday.request :active_campaign,
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'Api-Token' => config[:api_token],
    Severity: Minor
    Found in lib/active_campaign/faraday/middleware.rb - About 25 mins to fix

    Complex method ActiveCampaign::Client#connection (20.9)
    Open

    def connection # rubocop:disable Metrics/AbcSize
    @connection ||= ::Faraday.new(url: config[:api_url]) do |faraday|
    ActiveCampaign::Faraday::Middleware.add_request_middleware(faraday, config)
    ActiveCampaign::Faraday::Middleware.add_response_middleware(faraday, config[:response_middleware])
     
     
    Severity: Minor
    Found in lib/active_campaign/client.rb by flog

    Code block style
    Open

    gem install active_campaign
    Severity: Info
    Found in README.md by markdownlint

    Code block style
    Open

    bundle
    Severity: Info
    Found in README.md by markdownlint

    Line length
    Open

    [![Build Status](https://travis-ci.org/mhenrixon/active_campaign.svg?branch=master)](https://travis-ci.org/mhenrixon/active_campaign)[![Code Climate](https://codeclimate.com/github/mhenrixon/active_campaign/badges/gpa.svg)](https://codeclimate.com/github/mhenrixon/active_campaign)[![Test Coverage](https://codeclimate.com/github/mhenrixon/active_campaign/badges/coverage.svg)](https://codeclimate.com/github/mhenrixon/active_campaign/coverage)
    Severity: Info
    Found in README.md by markdownlint

    Ordered list item prefix
    Open

    4. Rebase against master we want 1 commit per feature please
    Severity: Info
    Found in README.md by markdownlint

    Code block style
    Open

    gem 'active_campaign'
    Severity: Info
    Found in README.md by markdownlint

    Ordered list item prefix
    Open

    2. Create your feature branch (`git checkout -b my-new-feature`)
    Severity: Info
    Found in README.md by markdownlint

    First header should be a top level header
    Open

    ## 0.1.15
    Severity: Info
    Found in Changelog.md by markdownlint

    Ordered list item prefix
    Open

    3. Commit your changes (`git commit -am 'Add some feature'`)
    Severity: Info
    Found in README.md by markdownlint

    Multiple consecutive blank lines
    Open

     
     
    Severity: Info
    Found in README.md by markdownlint

    Headers should be surrounded by blank lines
    Open

    ## License
    Severity: Info
    Found in README.md by markdownlint

    Ordered list item prefix
    Open

    6. Create new Pull Request
    Severity: Info
    Found in README.md by markdownlint
    Severity
    Category
    Status
    Source
    Language