-
Notifications
You must be signed in to change notification settings - Fork 53
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
' in <span class="provider">BuildingConnected</span>', | ||
help: "Retrieve a list of your company's projects", | ||
|
||
input_fields: lambda do |_object_definitions| |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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'], |
There was a problem hiding this comment.
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 @@ | |||
{ |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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]
@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. |
@bennettgo i've added a commit (343a7b9) that resolves the issue with authentication |
This is the connector for BuildingConnected based on their API: https://app.buildingconnected.com/docs/