-
Notifications
You must be signed in to change notification settings - Fork 898
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
[WIP] Rubocop all the things #22919
base: master
Are you sure you want to change the base?
[WIP] Rubocop all the things #22919
Changes from all commits
3ab431e
a2b0ede
e93c342
c17d08e
fbeae64
60c7c36
c5085c6
5c11e0e
b30e83e
cdea9bb
66fc796
56f86c6
9673ced
deda507
0c7dec9
db24a23
ef64dc8
e6aee5c
0359d19
7758303
35f894b
0125221
a01a06d
15b59fe
473778e
4d42d57
a68ec06
e43c15d
6008a35
8f46ac6
9c04d6c
48e9936
d132a70
0d3785e
c15bd2f
40e74f6
6d6f9a9
11c5a78
d01a76d
96d5e55
be5a973
5d7e38b
c1b6513
551ec01
ec330e0
2bf370b
1c154b4
5e820dd
6205af5
42880c3
a5117d0
4ea944d
d9dd670
35d5d82
22cca16
00679c5
75a6ec5
e880c29
a233789
3391d7b
f91cce3
74fd130
dc68e37
29ffeeb
3377702
75ebb12
8c6b978
29fd459
e15050f
85a62ff
1d086e1
d347e4a
b5d6ef9
a64577f
7c1d63e
863917e
4876626
fa59f02
ac4798a
dd36bca
9aa955a
53aa34a
ea3424f
e828324
67728f6
ae737cb
af8745c
5094c33
225816b
26da9f3
893cdc6
679b16a
c009644
342cca2
6a324e5
35dd991
c8ed579
efe9291
0a05379
759aebe
d662a8d
c5eca7e
ee3bea6
4bfceb2
b068888
8aef328
79c240f
c4278ba
9e75cd2
3c810b0
c11d1ea
3e328f7
597cfc3
2c5fc7a
6d7da75
b4f7f30
45e3430
ae7f451
c334dfc
434ba42
5a6ec33
28fc6df
a1abb42
b9b30e7
d6df9eb
c09dc36
324c8b7
d513b35
8e02fdc
8cc3a47
4949aa4
6fd83d0
1e8f1e1
3c1ca73
973925d
a527752
2f6e83a
fe4a742
916593f
38d8786
0f170fb
01e3107
b16b9ee
55758cf
f7c9cb8
fe9f154
ccdcec2
700ce74
02fff1a
bb2deb4
95f2155
e535510
0623866
bf11339
c08a056
1a9a4b5
13d9a58
e0813a1
82ac784
41e453a
c81a486
e9ce040
ba3704a
deb6ca4
eb09596
ba869ee
625dfb4
1c50c5b
548bde0
2de05c8
891d2c6
d36675e
8a53f18
b237fe0
0cd8257
0c0a6ae
4a2c467
16ced30
eed1448
efa3224
dd59d35
70db5e7
e98de78
85a0260
e90092b
e6f8ed7
7afb463
6f37ffa
3b31943
2323122
50badb5
1e18928
155a575
1327c80
c9e70bd
16b498e
ae6f512
065aa2c
8da62b9
d430c26
9c15725
4bd50b4
4aa31b1
97835c7
a0fe6fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,7 @@ def self.xml_to_hashes(xmlNode, findPath, typeName) | |
nh[:acctid] = nh.delete("#{typeName}id".to_sym) | ||
nh[:acctid] = nil unless nh[:acctid].respond_to?(:to_int) || nh[:acctid].to_s =~ /^-?[0-9]+$/ | ||
# Convert to signed integer values for acctid | ||
nh[:acctid] = [nh[:acctid].to_i].pack("I").unpack("i")[0] unless nh[:acctid].nil? | ||
nh[:acctid] = [nh[:acctid].to_i].pack("I").unpack1("i") unless nh[:acctid].nil? | ||
|
||
# Find the users for this group / groups for this user | ||
nh[:members] = [] | ||
|
@@ -93,7 +93,7 @@ def with_valid_account_type(valid_account_type) | |
if accttype == valid_account_type | ||
yield | ||
else | ||
raise _("Cannot call method '%{caller}' on an Account of type '%{type}'") % {:caller => caller[0][/`.*'/][1..-2], | ||
raise _("Cannot call method '%{caller}' on an Account of type '%{type}'") % {:caller => caller(1..1).first[/`.*'/][1..-2], | ||
:type => accttype} | ||
Comment on lines
+96
to
97
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this also looks strange to me maybe this is a performance statement where caller() only builds an array for the line in question so you don't create a large backtrace to throw away most of it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct - this prevents it from returning the entire payload |
||
end | ||
end | ||
|
@@ -136,18 +136,18 @@ def remove_all_groups | |
# FIXME: Why not use .pluralize? | ||
# | ||
def members | ||
send("#{accttype_opposite}s") | ||
send(:"#{accttype_opposite}s") | ||
end | ||
|
||
def add_member(member) | ||
send("add_#{accttype_opposite}", member) | ||
send(:"add_#{accttype_opposite}", member) | ||
end | ||
|
||
def remove_member(member) | ||
send("remove_#{accttype_opposite}", member) | ||
send(:"remove_#{accttype_opposite}", member) | ||
end | ||
|
||
def remove_all_members | ||
send("remove_all_#{accttype_opposite}s") | ||
send(:"remove_all_#{accttype_opposite}s") | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::AutomationManagerConfiguredSystem = ::ManageIQ::Providers::AnsibleTower::AutomationManager::ConfiguredSystem | ||
AutomationManagerConfiguredSystem = ManageIQ::Providers::AnsibleTower::AutomationManager::ConfiguredSystem |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::EmsAutomation = ::ManageIQ::Providers::ExternalAutomationManager | ||
EmsAutomation = ManageIQ::Providers::ExternalAutomationManager |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::EmsCloud = ::ManageIQ::Providers::CloudManager | ||
EmsCloud = ManageIQ::Providers::CloudManager |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::EmsConfiguration = ::ManageIQ::Providers::ConfigurationManager | ||
EmsConfiguration = ManageIQ::Providers::ConfigurationManager |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::EmsInfra = ::ManageIQ::Providers::InfraManager | ||
EmsInfra = ManageIQ::Providers::InfraManager |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::EmsNetwork = ::ManageIQ::Providers::NetworkManager | ||
EmsNetwork = ManageIQ::Providers::NetworkManager |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::EmsPhysicalInfra = ::ManageIQ::Providers::PhysicalInfraManager | ||
EmsPhysicalInfra = ManageIQ::Providers::PhysicalInfraManager |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::EmsRefresh::Refreshers::BaseRefresher = ManageIQ::Providers::BaseManager::Refresher | ||
EmsRefresh::Refreshers::BaseRefresher = ManageIQ::Providers::BaseManager::Refresher |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::EmsStorage = ::ManageIQ::Providers::StorageManager | ||
EmsStorage = ManageIQ::Providers::StorageManager |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::MiqEmsMetricsCollectorWorker = ManageIQ::Providers::BaseManager::MetricsCollectorWorker | ||
MiqEmsMetricsCollectorWorker = ManageIQ::Providers::BaseManager::MetricsCollectorWorker |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::MiqEmsOperationsWorker = ManageIQ::Providers::BaseManager::OperationsWorker | ||
MiqEmsOperationsWorker = ManageIQ::Providers::BaseManager::OperationsWorker |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::MiqEmsRefreshWorker = ManageIQ::Providers::BaseManager::RefreshWorker | ||
MiqEmsRefreshWorker = ManageIQ::Providers::BaseManager::RefreshWorker |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::MiqEventCatcher = ManageIQ::Providers::BaseManager::EventCatcher | ||
MiqEventCatcher = ManageIQ::Providers::BaseManager::EventCatcher |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::MiqProvisionCloud = ::ManageIQ::Providers::CloudManager::Provision | ||
MiqProvisionCloud = ManageIQ::Providers::CloudManager::Provision |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::MiqProvisionCloudWorkflow = ::ManageIQ::Providers::CloudManager::ProvisionWorkflow | ||
MiqProvisionCloudWorkflow = ManageIQ::Providers::CloudManager::ProvisionWorkflow |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::MiqProvisionInfraWorkflow = ::ManageIQ::Providers::InfraManager::ProvisionWorkflow | ||
MiqProvisionInfraWorkflow = ManageIQ::Providers::InfraManager::ProvisionWorkflow |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::TemplateCloud = ManageIQ::Providers::CloudManager::Template | ||
TemplateCloud = ManageIQ::Providers::CloudManager::Template |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
require 'manageiq/providers/infra_manager/template' | ||
::TemplateInfra = ManageIQ::Providers::InfraManager::Template | ||
TemplateInfra = ManageIQ::Providers::InfraManager::Template |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::VmCloud = ManageIQ::Providers::CloudManager::Vm | ||
VmCloud = ManageIQ::Providers::CloudManager::Vm |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::VmInfra = ManageIQ::Providers::InfraManager::Vm | ||
VmInfra = ManageIQ::Providers::InfraManager::Vm |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
::EmsRefreshWorker = ManageIQ::Providers::BaseManager::RefreshWorker::Runner | ||
EmsRefreshWorker = ManageIQ::Providers::BaseManager::RefreshWorker::Runner |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
::EventCatcher = ManageIQ::Providers::BaseManager::EventCatcher::Runner | ||
::EventCatcherHandledException = ::EventCatcher::EventCatcherHandledException | ||
EventCatcher = ManageIQ::Providers::BaseManager::EventCatcher::Runner | ||
EventCatcherHandledException = EventCatcher::EventCatcherHandledException |
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.
oops
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.
I think that's actually correct - I agree it does look strange though.