-
Notifications
You must be signed in to change notification settings - Fork 166
LG 11453 Remove platform device nickname #9657
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
Merged
kevinsmaster5
merged 34 commits into
main
from
kmas-lg-11453-remove-platform-device-nickname
Dec 11, 2023
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
1946209
changelog: User-Facing Improvements, Webauthn, Remove device nickname…
kevinsmaster5 b874bd7
use hidden field for platform authenticator nickname
kevinsmaster5 51405b1
bring device decorator into spec
kevinsmaster5 1633969
fix lint
kevinsmaster5 4180505
refactor how browser agent is captured
kevinsmaster5 b554950
remove fill in nickname helper from webauthn platform based test
kevinsmaster5 770db03
remove fill in nickname from test
kevinsmaster5 f1e22da
remove fill in nickname from test
kevinsmaster5 6ad2140
correct number of arguments error
kevinsmaster5 77422a9
rename method
kevinsmaster5 a932de3
rename method
kevinsmaster5 1d6fe16
reverse name logic to make it more readable
kevinsmaster5 d34542b
move device nice name to service class
kevinsmaster5 df02400
formatting, add device name service to device decorator
kevinsmaster5 0bb905f
append date string if device name is already set
kevinsmaster5 4b71df1
lint fix
kevinsmaster5 9cd6a85
make naming consistent for device
kevinsmaster5 070368c
remove hyphen from duplicate device naming
kevinsmaster5 e0cef14
revise form setup spec to match module
kevinsmaster5 f6eeac9
update device decorator spec to include device name service
kevinsmaster5 f1ce407
add test coverage for name_is_unique changes and change duplicate nam…
kevinsmaster5 da16b91
add test to validate form does not appear on webauth platform setup
kevinsmaster5 e55219a
use an incremental number to label duplicate device name
kevinsmaster5 8ff92ee
put device name service into its own spec
kevinsmaster5 dbfc6c9
fix increment syntax
kevinsmaster5 dce75fe
reorder spec pretext values and add context for non-platform webauthn
kevinsmaster5 4378967
correct naming increment syntax
kevinsmaster5 31c0ff8
revise test to account for duplicate webauthn platform names
kevinsmaster5 ef1a37f
lint fix
kevinsmaster5 e074e57
remove unneeded before do block
kevinsmaster5 8de32b1
remove unneeded code
kevinsmaster5 74b84e8
improve test coverage, remove redundant condition from setup
kevinsmaster5 eabe265
lint fix
kevinsmaster5 05ed26f
Update spec/services/device_name_spec.rb
kevinsmaster5 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| class DeviceName | ||
| def self.from_user_agent(user_agent) | ||
| browser = BrowserCache.parse(user_agent) | ||
| os = browser.platform.name | ||
| os_version = browser.platform.version&.split('.')&.first | ||
| os = "#{os} #{os_version}" if os_version | ||
|
|
||
| I18n.t( | ||
| 'account.index.device', | ||
| browser: "#{browser.name} #{browser.version}", | ||
| os: os, | ||
| ) | ||
| end | ||
| end |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| require 'rails_helper' | ||
|
|
||
| RSpec.describe DeviceName do | ||
| describe '.device_name' do | ||
| let(:device) { create(:device) } | ||
| it 'gives a shortened os and browser name' do | ||
| name = DeviceName.from_user_agent(device.user_agent) | ||
| expect(name).to eq('Chrome 58 on Windows 10') | ||
| end | ||
| end | ||
| end |
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.