-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(): introducing option param to sessions (#40)
This pull request introduces support for passing additional options when creating demo mode sessions. The changes involve updates to controllers, models, jobs, and tests to handle the new `options` parameter. Key changes include: ### Controllers: * [`app/controllers/demo_mode/sessions_controller.rb`](diffhunk://#diff-7061eec77ccb3a1217893822312e65f7c45fde9996183101f9abfb0f3e7cc4a4L28-R28): Updated the `create` method to pass `options_params` to `save_and_generate_account_later!` and added the `options_params` method to permit all options parameters. [[1]](diffhunk://#diff-7061eec77ccb3a1217893822312e65f7c45fde9996183101f9abfb0f3e7cc4a4L28-R28) [[2]](diffhunk://#diff-7061eec77ccb3a1217893822312e65f7c45fde9996183101f9abfb0f3e7cc4a4R80-R83) ### Models: * [`app/models/demo_mode/session.rb`](diffhunk://#diff-0f5153bb33011b630b517794bf263bb46b0117d52ced272798cd460e2cf0714cL28-R38): Modified `save_and_generate_account!` and `save_and_generate_account_later!` to accept and pass `options` to the `AccountGenerationJob`. ### Jobs: * [`app/jobs/demo_mode/account_generation_job.rb`](diffhunk://#diff-a49d57b06c5135304ed8fdd1be432a64e25761e477a88123ab4c554a6e6356efL5-R10): Updated the `perform` method to accept and use `options` when generating a persona. ### Library: * [`lib/demo_mode/persona.rb`](diffhunk://#diff-dcad6a8f33f3bdcc74ba2aecae17e21b00aa0ed4ce85c7fa406513ea01f828d9L57-R61): Enhanced the `generate!` method to accept and use `options` during persona generation. ### Tests: * [`spec/requests/demo_mode/sessions_spec.rb`](diffhunk://#diff-c5cfc8d30c2f238c6b2a4add285f4fb65c8cad4e12449097d780f7d1c5c3c4b1R30): Added tests to ensure sessions can be created with options and that these options are correctly processed and saved. [[1]](diffhunk://#diff-c5cfc8d30c2f238c6b2a4add285f4fb65c8cad4e12449097d780f7d1c5c3c4b1R30) [[2]](diffhunk://#diff-c5cfc8d30c2f238c6b2a4add285f4fb65c8cad4e12449097d780f7d1c5c3c4b1R48) [[3]](diffhunk://#diff-c5cfc8d30c2f238c6b2a4add285f4fb65c8cad4e12449097d780f7d1c5c3c4b1R67) [[4]](diffhunk://#diff-c5cfc8d30c2f238c6b2a4add285f4fb65c8cad4e12449097d780f7d1c5c3c4b1R78-R107) Additionally, the version number was incremented to `1.4.1` in `lib/demo_mode/version.rb`.
- Loading branch information
1 parent
8e1fe04
commit ccbccea
Showing
9 changed files
with
50 additions
and
13 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
demo_mode (1.4.0) | ||
demo_mode (1.4.1) | ||
cli-ui | ||
rails (>= 6.1) | ||
sprockets-rails | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
PATH | ||
remote: .. | ||
specs: | ||
demo_mode (1.4.0) | ||
demo_mode (1.4.1) | ||
cli-ui | ||
rails (>= 6.1) | ||
sprockets-rails | ||
|
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,7 +1,7 @@ | ||
PATH | ||
remote: .. | ||
specs: | ||
demo_mode (1.4.0) | ||
demo_mode (1.4.1) | ||
cli-ui | ||
rails (>= 6.1) | ||
sprockets-rails | ||
|
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 @@ | ||
# frozen_string_literal: true | ||
|
||
module DemoMode | ||
VERSION = '1.4.0' | ||
VERSION = '1.4.1' | ||
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