Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion runtime/ms_rest_azure/lib/ms_rest_azure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
require 'ms_rest_azure/cloud_error_data.rb'
require 'ms_rest_azure/credentials/application_token_provider.rb'
require 'ms_rest_azure/polling_state.rb'
require 'ms_rest_azure/sub_resource.rb'
require 'ms_rest_azure/resource.rb'
require 'ms_rest_azure/serialization.rb'
require 'ms_rest_azure/sub_resource.rb'
require 'ms_rest_azure/version'

module MsRestAzure end
Expand Down
6 changes: 2 additions & 4 deletions runtime/ms_rest_azure/lib/ms_rest_azure/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.


module MsRestAzure
#
# Class which represents any Azure resource.
#
class Resource

# @return [String] the id of the resource.
attr_accessor :id
class Resource < SubResource
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious why not use full namespace while inhering to avoid conflicts like class Resource < MsRestAzure::SubResource. That should also eliminate need for require_relative 'sub_resource'.

Moreover the name Sub_Resource inherited into Resource doesn't make sense as developer. I'd suggest renaming it as you mentioned that SubResource is not at all Azure concept so we better avoid explicitly referring it as SubResource.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This needs change in the order in another file. It has been done with the latest commit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding renaming, I think it has some more items to discuss. Let me create a WI and add it to the backlog #664

Copy link
Contributor

Choose a reason for hiding this comment

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

@sarangan12 sorry, I'm not sure I understand your first comment here (in reply to Vishrut), can you clarify?
Also, what type of items are your referring to that need discussion for renaming?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@veronicagg Added detailed context

Copy link
Contributor

Choose a reason for hiding this comment

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

@sarangan12 Here is my view, If you think naming sounds perfect today and we are good with that I'd keep the names as-is and not even open backlog items. If you have even a slight concern on naming, I'd like that to be fix with this changes rather than a backlog item.

That's what I think but i'll leave it up to you.


# @return [String] the name of the resource.
attr_accessor :name
Expand Down