-
Notifications
You must be signed in to change notification settings - Fork 651
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
Chore/ch109279/migrate organization model to activerecord #15884
Chore/ch109279/migrate organization model to activerecord #15884
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
rubocop
app/models/carto/organization.rb|221 col 9| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|222 col 9| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|223 col 9| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|224 col 9| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|225 col 9| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|226 col 9| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|227 col 9| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|228 col 9| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|229 col 9| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|237 col 27| Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. [6/5]
app/models/carto/organization.rb|239 col 11| Layout/FirstArgumentIndentation: Indent the first argument one step more than the start of the previous line.
app/models/carto/organization.rb|239 col 11| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|239 col 21| Style/RedundantSelf: Redundant self detected.
app/models/carto/organization.rb|240 col 11| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|241 col 11| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|242 col 11| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|244 col 11| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|245 col 11| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|246 col 11| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|247 col 11| Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb|248 col 7| Layout/ClosingParenthesisIndentation: Indent ) to column 8 (not 6)
CartoDB::SharedEntity.join(:visualizations, id: :entity_id).where(user_id: id) | ||
end | ||
|
||
def has_shared_entities? |
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.
[rubocop] reported by reviewdog 🐶
Naming/PredicateName: Rename has_shared_entities? to shared_entities?.
app/models/carto/organization.rb
Outdated
def quota_dates(options) | ||
date_to = (options[:to] ? options[:to].to_date : Date.today) | ||
date_from = (options[:from] ? options[:from].to_date : last_billing_cycle) | ||
return date_from, date_to |
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.
[rubocop] reported by reviewdog 🐶
Style/RedundantReturn: Redundant return detected. To return multiple values, use an array.
app/models/carto/organization.rb
Outdated
@@ -135,6 +184,70 @@ def remaining_obs_general_quota(options = {}) | |||
(remaining > 0 ? remaining : 0) | |||
end | |||
|
|||
def to_poro |
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.
[rubocop] reported by reviewdog 🐶
Metrics/AbcSize: Assignment Branch Condition size for to_poro is too high. [<2, 58, 9> 58.73/30]
app/models/carto/organization.rb
Outdated
@@ -135,6 +184,70 @@ def remaining_obs_general_quota(options = {}) | |||
(remaining > 0 ? remaining : 0) | |||
end | |||
|
|||
def to_poro | |||
{ | |||
created_at: created_at, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb
Outdated
def to_poro | ||
{ | ||
created_at: created_at, | ||
description: description, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb
Outdated
obs_snapshot_quota: obs_snapshot_quota, | ||
obs_snapshot_block_price: obs_snapshot_block_price, | ||
obs_general_quota: obs_general_quota, | ||
obs_general_block_price: obs_general_block_price, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb
Outdated
obs_snapshot_block_price: obs_snapshot_block_price, | ||
obs_general_quota: obs_general_quota, | ||
obs_general_block_price: obs_general_block_price, | ||
geocoder_provider: geocoder_provider, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb
Outdated
obs_general_quota: obs_general_quota, | ||
obs_general_block_price: obs_general_block_price, | ||
geocoder_provider: geocoder_provider, | ||
isolines_provider: isolines_provider, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb
Outdated
obs_general_block_price: obs_general_block_price, | ||
geocoder_provider: geocoder_provider, | ||
isolines_provider: isolines_provider, | ||
routing_provider: routing_provider, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb
Outdated
geocoder_provider: geocoder_provider, | ||
isolines_provider: isolines_provider, | ||
routing_provider: routing_provider, | ||
mapzen_routing_quota: mapzen_routing_quota, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb
Outdated
routing_provider: routing_provider, | ||
mapzen_routing_quota: mapzen_routing_quota, | ||
mapzen_routing_block_price: mapzen_routing_block_price, | ||
seats: seats, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb
Outdated
mapzen_routing_quota: mapzen_routing_quota, | ||
mapzen_routing_block_price: mapzen_routing_block_price, | ||
seats: seats, | ||
twitter_username: twitter_username, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb
Outdated
mapzen_routing_block_price: mapzen_routing_block_price, | ||
seats: seats, | ||
twitter_username: twitter_username, | ||
location: twitter_username, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb
Outdated
seats: seats, | ||
twitter_username: twitter_username, | ||
location: twitter_username, | ||
updated_at: updated_at, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
app/models/carto/organization.rb
Outdated
twitter_username: twitter_username, | ||
location: twitter_username, | ||
updated_at: updated_at, | ||
website: website, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
privacy: CartoDB::Visualization::Member::PRIVACY_PUBLIC, | ||
page: page_num, | ||
per_page: items_per_page, | ||
tags: tags, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
page: page_num, | ||
per_page: items_per_page, | ||
tags: tags, | ||
order: order, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
per_page: items_per_page, | ||
tags: tags, | ||
order: order, | ||
o: { updated_at: :desc }, |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
tags: tags, | ||
order: order, | ||
o: { updated_at: :desc }, | ||
version: version |
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.
[rubocop] reported by reviewdog 🐶
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
order: order, | ||
o: { updated_at: :desc }, | ||
version: version | ||
) |
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.
[rubocop] reported by reviewdog 🐶
Layout/ClosingParenthesisIndentation: Indent ) to column 8 (not 6)
58bd593
to
be40869
Compare
936dfff
to
4276c05
Compare
4276c05
to
646eb2c
Compare
No description provided.