Skip to content
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

Added Product name to VMDB::Appliance #16409

Merged
merged 1 commit into from
Nov 17, 2017

Conversation

juliancheal
Copy link
Member

No description provided.

@juliancheal
Copy link
Member Author

@Fryguy something like this ok to access the product name?

@juliancheal juliancheal changed the title Added Product name to VMDB::Applicance Added Product name to VMDB::Appliance Nov 7, 2017
@Fryguy
Copy link
Member

Fryguy commented Nov 7, 2017

Oh I like this. 👍

@juliancheal
Copy link
Member Author

This PR is needed for #16410

@@ -20,6 +20,10 @@ def self.log_config_on_startup
Vmdb::Appliance.log_diagnostics
end

def self.PRODUCT_NAME
Copy link
Member

Choose a reason for hiding this comment

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

why the UPPER_CASE naming for a method?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copying the convention https://github.com/ManageIQ/manageiq/blob/master/lib/vmdb/appliance.rb#L9-L15

I assume it's because they are effectively constants.

@miq-bot
Copy link
Member

miq-bot commented Nov 8, 2017

Checked commit juliancheal@fe184a5 with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 1 offense detected

lib/vmdb/appliance.rb

@carbonin carbonin self-assigned this Nov 17, 2017
@carbonin carbonin merged commit 64842b7 into ManageIQ:master Nov 17, 2017
@carbonin carbonin added this to the Sprint 74 Ending Nov 27, 2017 milestone Nov 17, 2017
juliancheal pushed a commit to juliancheal/manageiq that referenced this pull request Nov 22, 2017
Since PR ManageIQ#16409
we now have a method for product name.
simaishi pushed a commit that referenced this pull request Nov 27, 2017
Added Product name to VMDB::Appliance
(cherry picked from commit 64842b7)
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit e0688357e3fe6ae00e52934969d3fe42083ba012
Author: Nick Carboni <ncarboni@redhat.com>
Date:   Fri Nov 17 16:48:41 2017 -0500

    Merge pull request #16409 from juliancheal/add_product_name
    
    Added Product name to VMDB::Appliance
    (cherry picked from commit 64842b73d30b1f0aef849eca7392e4870ad719ce)

@Loicavenel
Copy link

@juliancheal can you explain me what is this PR for, I don't really understand the use case?

@juliancheal
Copy link
Member Author

@Loicavenel Hi, we didn't want people using the the internationalisation version method all around the code, to get the product name. I18n.t("product.name") Even though this method just wraps that for now, if there is ever a change to how we internationalise the code or if we change how we generate the name of the product. This way by always using VMDB::Appliance.PRODUCT_NAME we only need to change in one place.

@Loicavenel
Copy link

ok make sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants