Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add BuildingConnected connector #97

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

sophatsam
Copy link

This is the connector for BuildingConnected based on their API: https://app.buildingconnected.com/docs/

Copy link
Contributor

@bennettgo bennettgo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some hound violations! But looks good

custom_connectors/custom_auth/buildingconnected.rb Outdated Show resolved Hide resolved
' in <span class="provider">BuildingConnected</span>',
help: "Retrieve a list of your company's projects",

input_fields: lambda do |_object_definitions|
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/BlockLength: Block has too many lines. [32/25]

'in <span class="provider">BuildingConnected</span>',
help: "Retrieve a list of your company's contacts",

input_fields: lambda do |_object_definitions|
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/BlockLength: Block has too many lines. [40/25]

case input['verb']
when 'get'
response = get(input['path'], data)
.after_error_response(/.*/) do |_code, body, _header, message|
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [83/80]

object_definitions['custom_action_input']
end,

execute: lambda do |_connection, input|
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/BlockLength: Block has too many lines. [35/25]

{
events: response['results'] || [],
next_poll: closure,
can_poll_more: response['results'].length > 0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/NumericPredicate: Use response['results'].length.positive? instead of response['results'].length > 0.
Style/ZeroLengthPredicate: Use !empty? instead of length > 0.

.params(updatedAfter: updatedAfter)
end

closure = if response['results'].length > 0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/NumericPredicate: Use response['results'].length.positive? instead of response['results'].length > 0.
Style/ZeroLengthPredicate: Use !empty? instead of length > 0.

},

custom_action_input: {
fields: lambda do |connection, config_fields|
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/BlockLength: Block has too many lines. [76/25]

optional: false,
control_type: :select,
pick_list: [
['Production', 'app'],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/WordArray: Use %w or %W for an array of words.

@@ -0,0 +1,1082 @@
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

object_definitions: {

project: {
fields: lambda do |_connection|
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/BlockLength: Block has too many lines. [38/25]

},

qualification_submission: {
fields: lambda do |_connection|
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/BlockLength: Block has too many lines. [142/25]

},

qualification_form: {
fields: lambda do |_connection|
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/BlockLength: Block has too many lines. [35/25]

},

submission: {
fields: lambda do |_connection|
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/BlockLength: Block has too many lines. [31/25]

},

contact: {
fields: lambda do |_connection|
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/BlockLength: Block has too many lines. [72/25]

@sophatsam
Copy link
Author

@bennettgo most of the hound violations have been fixed, although there's still a few regarding too many lines in a block. not sure how you want those resolved.

@sophatsam
Copy link
Author

@bennettgo i've added a commit (343a7b9) that resolves the issue with authentication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants