Module: Integrations::Base::DiffblueCover

Extended by:
ActiveSupport::Concern
Included in:
DiffblueCover
Defined in:
app/models/concerns/integrations/base/diffblue_cover.rb

Instance Method Summary collapse

Instance Method Details

#avatar_urlObject



90
91
92
# File 'app/models/concerns/integrations/base/diffblue_cover.rb', line 90

def avatar_url
  ActionController::Base.helpers.image_path('illustrations/third-party-logos/integrations-logos/diffblue.svg')
end

#ci_variablesObject



119
120
121
122
123
124
125
126
127
# File 'app/models/concerns/integrations/base/diffblue_cover.rb', line 119

def ci_variables
  return [] unless activated?

  [
    { key: 'DIFFBLUE_LICENSE_KEY', value: diffblue_license_key, public: false, masked: true },
    { key: 'DIFFBLUE_ACCESS_TOKEN_NAME', value: diffblue_access_token_name, public: false, masked: true },
    { key: 'DIFFBLUE_ACCESS_TOKEN', value: diffblue_access_token_secret, public: false, masked: true }
  ]
end

#execute(_data) ⇒ Object



117
# File 'app/models/concerns/integrations/base/diffblue_cover.rb', line 117

def execute(_data) end

#sectionsObject



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'app/models/concerns/integrations/base/diffblue_cover.rb', line 94

def sections
  [
    {
      type: Integrations::Base::Integration::SECTION_TYPE_CONNECTION,
      title: s_('DiffblueCover|Integration details'),
      description:
        s_(
          'DiffblueCover|Diffblue Cover is a generative AI platform that automatically ' \
            'writes comprehensive, human-like Java unit tests. Integrate Diffblue ' \
            'Cover into your CI/CD workflow for fully autonomous operation.'
        )
    },
    {
      type: Integrations::Base::Integration::SECTION_TYPE_CONFIGURATION,
      title: s_('DiffblueCover|Access token'),
      description:
        'You must have a GitLab access token for Diffblue Cover to access your project. ' \
        'Use a GitLab access token with at least the Developer role and ' \
        'the <code>api</code> and <code>write_repository</code> permissions.'
    }
  ]
end

#testable?Boolean

Returns:

  • (Boolean)


129
130
131
# File 'app/models/concerns/integrations/base/diffblue_cover.rb', line 129

def testable?
  false
end