-
Notifications
You must be signed in to change notification settings - Fork 23
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
Rails 6.0 #95
Merged
Merged
Rails 6.0 #95
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
628dfe8
Rails 6.0 support
NickLaMuro 7527a58
[rails6][spec/models/disk.rb] Fix .present
NickLaMuro 270d3f0
[rails6][spec_helper.rb] Explicitly require ActiveSupport
NickLaMuro 0289dba
[rails6][spec/factories] Use new FactoryBot format
NickLaMuro 5ce534d
[rails6] Fix .update_attributes deprecation
NickLaMuro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
FactoryBot.define do | ||
factory :hardware do | ||
trait(:cpu1x1) do | ||
cpu_sockets 1 | ||
cpu_cores_per_socket 1 | ||
cpu_total_cores 1 | ||
cpu_sockets { 1 } | ||
cpu_cores_per_socket { 1 } | ||
cpu_total_cores { 1 } | ||
end | ||
|
||
trait(:cpu2x2) do | ||
cpu_sockets 2 | ||
cpu_cores_per_socket 2 | ||
cpu_total_cores 4 | ||
cpu_sockets { 2 } | ||
cpu_cores_per_socket { 2 } | ||
cpu_total_cores { 4 } | ||
end | ||
|
||
trait(:cpu1x2) do | ||
cpu_sockets 1 | ||
cpu_cores_per_socket 2 | ||
cpu_total_cores 2 | ||
cpu_sockets { 1 } | ||
cpu_cores_per_socket { 2 } | ||
cpu_total_cores { 2 } | ||
end | ||
|
||
trait(:cpu4x2) do | ||
cpu_sockets 4 | ||
cpu_cores_per_socket 2 | ||
cpu_total_cores 8 | ||
cpu_sockets { 4 } | ||
cpu_cores_per_socket { 2 } | ||
cpu_total_cores { 8 } | ||
end | ||
|
||
trait(:ram1GB) { memory_mb 1024 } | ||
trait(:ram1GB) { memory_mb { 1024 } } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
FactoryBot.define do | ||
factory :physical_server do | ||
vendor "lenovo" | ||
vendor { "lenovo" } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
FactoryBot.define do | ||
factory :vm_or_template do | ||
sequence(:name) { |n| "vm_#{seq_padded_for_sorting(n)}" } | ||
location "unknown" | ||
location { "unknown" } | ||
uid_ems { SecureRandom.uuid } | ||
vendor "unknown" | ||
template false | ||
raw_power_state "running" | ||
vendor { "unknown" } | ||
template { false } | ||
raw_power_state { "running" } | ||
end | ||
|
||
factory :template, :class => "MiqTemplate", :parent => :vm_or_template do | ||
sequence(:name) { |n| "template_#{seq_padded_for_sorting(n)}" } | ||
template true | ||
raw_power_state "never" | ||
template { true } | ||
raw_power_state { "never" } | ||
end | ||
|
||
factory(:vm, :class => "Vm", :parent => :vm_or_template) | ||
factory(:vm_cloud, :class => "ManageIQ::Providers::CloudManager::Vm", :parent => :vm) { cloud true } | ||
factory(:vm_cloud, :class => "ManageIQ::Providers::CloudManager::Vm", :parent => :vm) { cloud { true } } | ||
factory(:miq_template, :parent => :template) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can we apply https://github.com/ManageIQ/activerecord-id_regions/pull/18/files#r537735807 here as well?
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.
Yup, agreed. Since this is a gem we publish, and there is seemingly no other change, just supporting Rails 5 and 6 should be sufficient for our purposes.
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.
Not sure we can do this now, since there is a
.update_attributes
change I did. I probably can remove that change, but wanted to get everyone else's opinion before I do.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.
@NickLaMuro it looks like the only changes from
#update_attributes
to#update
were in specs, I'm good with">=5.0", "< 6.1"
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.
Good point. I think I saw
lib/inventory_refresh/inventory_collection/helpers/initialize_helper.rb
in the files changed diff, and didn't take a look at the contents, which only changes a comment and is fine.