diff --git a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/generateIdFromNumbers.st b/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/generateIdFromNumbers.st new file mode 100644 index 00000000..3978ef30 --- /dev/null +++ b/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/generateIdFromNumbers.st @@ -0,0 +1,10 @@ +generation +generateIdFromNumbers + | randomGen | + randomGen := Random new. + ^ (self randomNumberWith: randomGen) + , (self randomNumberWith: randomGen) + , (self randomNumberWith: randomGen) + , (self randomNumberWith: randomGen) + , (self randomNumberWith: randomGen) + \ No newline at end of file diff --git a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/generateIdFromRealWords.st b/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/generateIdFromRealWords.st deleted file mode 100644 index 2ffc2bfa..00000000 --- a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/generateIdFromRealWords.st +++ /dev/null @@ -1,6 +0,0 @@ -generation -generateIdFromRealWords - - ^ ((self randomSubject), '-', - (self randomVerb) , '-', - (self randomObject)) asLowercase \ No newline at end of file diff --git a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/randomNumberWith..st b/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/randomNumberWith..st new file mode 100644 index 00000000..0e2aecde --- /dev/null +++ b/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/randomNumberWith..st @@ -0,0 +1,6 @@ +generation +randomNumberWith: randomGen + | randomNumber | + randomNumber := randomGen nextInt: 10. + ^ randomNumber asString + \ No newline at end of file diff --git a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/randomObject.st b/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/randomObject.st deleted file mode 100644 index 4974af47..00000000 --- a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/randomObject.st +++ /dev/null @@ -1,4 +0,0 @@ -generation -randomObject - - ^ self storedObjects atRandom \ No newline at end of file diff --git a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/randomSubject.st b/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/randomSubject.st deleted file mode 100644 index b9ea91c4..00000000 --- a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/randomSubject.st +++ /dev/null @@ -1,4 +0,0 @@ -generation -randomSubject - - ^ self storedSubjects atRandom \ No newline at end of file diff --git a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/randomVerb.st b/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/randomVerb.st deleted file mode 100644 index dce12f46..00000000 --- a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/randomVerb.st +++ /dev/null @@ -1,4 +0,0 @@ -generation -randomVerb - - ^ self storedVerbs atRandom \ No newline at end of file diff --git a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/storedObjects.st b/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/storedObjects.st deleted file mode 100644 index 702c4b1c..00000000 --- a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/storedObjects.st +++ /dev/null @@ -1,47 +0,0 @@ -wordstorage -storedObjects - - ^ { - 'Abstract-Factory' . - 'Builder' . - 'Factory-Method' . - 'ObjectPool' . - 'Singleton' . - 'Prototype' . - 'Adapter' . - 'Bridge' . - 'Composite' . - 'Decorator' . - 'Facade' . - 'Flyweight' . - 'Proxy'. - 'Command'. - 'Scrum'. - 'Lifecycle'. - 'RUP'. - 'Requirements'. - 'RDD'. - 'LSD'. - 'XP'. - 'TDD'. - 'Refactoring'. - 'Reverse-Engineering'. - 'Conways-Law'. - 'Code-Ownership'. - 'User-Stories'. - 'Customer-Satisfaction'. - 'Project-Management'. - 'Software-Quality'. - 'Pair-Programming'. - 'Refactoring'. - 'Planning-Game'. - 'Test-First-Programming'. - 'Simple-Design'. - 'Collective-Code-Ownership'. - 'Continuous-Integration'. - 'Coding-Standards'. - 'Small-Releases'. - 'On-site-Customer'. - 'Planning'. - 'Agile-Manifesto' - } \ No newline at end of file diff --git a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/storedSubjects.st b/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/storedSubjects.st deleted file mode 100644 index 79d2a8ed..00000000 --- a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/storedSubjects.st +++ /dev/null @@ -1,215 +0,0 @@ -wordstorage -storedSubjects - - ^ { - 'Tim'. - 'Paul'. - 'Dave'. - 'Max'. - 'Alexey'. - 'Jimmy'. - 'Michael'. - 'Jamie'. - 'Kent'. - 'James'. - 'Mary'. - 'Robert'. - 'Patricia'. - 'John'. - 'Jennifer'. - 'Michael'. - 'Linda'. - 'David'. - 'Elizabeth'. - 'William'. - 'Barbara'. - 'Richard'. - 'Susan'. - 'Joseph'. - 'Jessica'. - 'Thomas'. - 'Sarah'. - 'Charles'. - 'Karen'. - 'Christopher'. - 'Lisa'. - 'Daniel'. - 'Nancy'. - 'Matthew'. - 'Betty'. - 'Anthony'. - 'Margaret'. - 'Mark'. - 'Sandra'. - 'Donald'. - 'Ashley'. - 'Steven'. - 'Kimberly'. - 'Paul'. - 'Emily'. - 'Andrew'. - 'Donna'. - 'Joshua'. - 'Michelle'. - 'Kenneth'. - 'Carol'. - 'Kevin'. - 'Amanda'. - 'Brian'. - 'Dorothy'. - 'George'. - 'Melissa'. - 'Timothy'. - 'Deborah'. - 'Ronald'. - 'Stephanie'. - 'Edward'. - 'Rebecca'. - 'Jason'. - 'Sharon'. - 'Jeffrey'. - 'Laura'. - 'Ryan'. - 'Cynthia'. - 'Jacob'. - 'Kathleen'. - 'Gary'. - 'Amy'. - 'Nicholas'. - 'Angela'. - 'Eric'. - 'Shirley'. - 'Jonathan'. - 'Anna'. - 'Stephen'. - 'Brenda'. - 'Larry'. - 'Pamela'. - 'Justin'. - 'Emma'. - 'Scott'. - 'Nicole'. - 'Brandon'. - 'Helen'. - 'Benjamin'. - 'Samantha'. - 'Samuel'. - 'Katherine'. - 'Gregory'. - 'Christine'. - 'Alexander'. - 'Debra'. - 'Frank'. - 'Rachel'. - 'Patrick'. - 'Carolyn'. - 'Raymond'. - 'Janet'. - 'Jack'. - 'Catherine'. - 'Dennis'. - 'Maria'. - 'Jerry'. - 'Heather'. - 'Tyler'. - 'Diane'. - 'Aaron'. - 'Ruth'. - 'Jose'. - 'Julie'. - 'Adam'. - 'Olivia'. - 'Nathan'. - 'Joyce'. - 'Henry'. - 'Virginia'. - 'Douglas'. - 'Victoria'. - 'Zachary'. - 'Kelly'. - 'Peter'. - 'Lauren'. - 'Kyle'. - 'Christina'. - 'Ethan'. - 'Joan'. - 'Walter'. - 'Evelyn'. - 'Noah'. - 'Judith'. - 'Jeremy'. - 'Megan'. - 'Christian'. - 'Andrea'. - 'Keith'. - 'Cheryl'. - 'Roger'. - 'Hannah'. - 'Terry'. - 'Jacqueline'. - 'Gerald'. - 'Martha'. - 'Harold'. - 'Gloria'. - 'Sean'. - 'Teresa'. - 'Austin'. - 'Ann'. - 'Carl'. - 'Sara'. - 'Arthur'. - 'Madison'. - 'Lawrence'. - 'Frances'. - 'Dylan'. - 'Kathryn'. - 'Jesse'. - 'Janice'. - 'Jordan'. - 'Jean'. - 'Bryan'. - 'Abigail'. - 'Billy'. - 'Alice'. - 'Joe'. - 'Julia'. - 'Bruce'. - 'Judy'. - 'Gabriel'. - 'Sophia'. - 'Logan'. - 'Grace'. - 'Albert'. - 'Denise'. - 'Willie'. - 'Amber'. - 'Alan'. - 'Doris'. - 'Juan'. - 'Marilyn'. - 'Wayne'. - 'Danielle'. - 'Elijah'. - 'Beverly'. - 'Randy'. - 'Isabella'. - 'Roy'. - 'Theresa'. - 'Vincent'. - 'Diana'. - 'Ralph'. - 'Natalie'. - 'Eugene'. - 'Brittany'. - 'Russell'. - 'Charlotte'. - 'Bobby'. - 'Marie'. - 'Mason'. - 'Kayla'. - 'Philip'. - 'Alexis'. - 'Louis'. - 'Lori' - } - \ No newline at end of file diff --git a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/storedVerbs.st b/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/storedVerbs.st deleted file mode 100644 index 8b0cf9e1..00000000 --- a/packages/Liquid-Core.package/LQPollIdGenerator.class/instance/storedVerbs.st +++ /dev/null @@ -1,19 +0,0 @@ -wordstorage -storedVerbs - - ^ { - 'loves'. - 'enjoys'. - 'uses'. - 'strugglesWith'. - 'likes'. - 'implements'. - 'adores'. - 'isLearning'. - 'knows' . - 'invented'. - 'found'. - 'underline'. - 'examines' - } - \ No newline at end of file diff --git a/packages/Liquid-Core.package/LQPollIdGenerator.class/methodProperties.json b/packages/Liquid-Core.package/LQPollIdGenerator.class/methodProperties.json index c784d3a4..aac73aa7 100644 --- a/packages/Liquid-Core.package/LQPollIdGenerator.class/methodProperties.json +++ b/packages/Liquid-Core.package/LQPollIdGenerator.class/methodProperties.json @@ -2,10 +2,5 @@ "class" : { }, "instance" : { - "generateIdFromRealWords" : "JT 8/4/2022 21:39", - "randomObject" : "JT 8/2/2022 17:14", - "randomSubject" : "JT 8/2/2022 17:14", - "randomVerb" : "JT 8/2/2022 17:14", - "storedObjects" : "JT 8/2/2022 17:18", - "storedSubjects" : "JT 8/2/2022 17:18", - "storedVerbs" : "JT 8/2/2022 17:18" } } + "generateIdFromNumbers" : "leli 6/12/2024 13:55", + "randomNumberWith:" : "leli 6/12/2024 13:55" } } diff --git a/packages/Liquid-Tests.package/LQRandomIdGeneratorTests.class/instance/testLowercase.st b/packages/Liquid-Tests.package/LQRandomIdGeneratorTests.class/instance/testLowercase.st deleted file mode 100644 index 9a015a00..00000000 --- a/packages/Liquid-Tests.package/LQRandomIdGeneratorTests.class/instance/testLowercase.st +++ /dev/null @@ -1,9 +0,0 @@ -testing -testLowercase - - | generator generatedPollId | - - generator := LQPollIdGenerator new. - generatedPollId := generator generateIdFromRealWords. - - self assert: (generatedPollId asLowercase) equals: generatedPollId \ No newline at end of file diff --git a/packages/Liquid-Tests.package/LQRandomIdGeneratorTests.class/instance/testUniqueness.st b/packages/Liquid-Tests.package/LQRandomIdGeneratorTests.class/instance/testUniqueness.st index 92f13fd6..8aac95f6 100644 --- a/packages/Liquid-Tests.package/LQRandomIdGeneratorTests.class/instance/testUniqueness.st +++ b/packages/Liquid-Tests.package/LQRandomIdGeneratorTests.class/instance/testUniqueness.st @@ -5,4 +5,4 @@ testUniqueness generator := LQPollIdGenerator new. - self assert: false equals: ((generator generateIdFromRealWords) == (generator generateIdFromRealWords)) \ No newline at end of file + self assert: false equals: ((generator generateIdFromNumbers) == (generator generateIdFromNumbers)) \ No newline at end of file diff --git a/packages/Liquid-Tests.package/LQRandomIdGeneratorTests.class/methodProperties.json b/packages/Liquid-Tests.package/LQRandomIdGeneratorTests.class/methodProperties.json index 9c7b544f..9be05198 100644 --- a/packages/Liquid-Tests.package/LQRandomIdGeneratorTests.class/methodProperties.json +++ b/packages/Liquid-Tests.package/LQRandomIdGeneratorTests.class/methodProperties.json @@ -2,5 +2,4 @@ "class" : { }, "instance" : { - "testLowercase" : "JT 8/2/2022 17:56", - "testUniqueness" : "JT 8/2/2022 17:56" } } + "testUniqueness" : "leli 6/3/2024 17:12" } } diff --git a/packages/Liquid-UI.package/LQPollDraftBuilder.class/instance/generateRandomID.st b/packages/Liquid-UI.package/LQPollDraftBuilder.class/instance/generateRandomID.st index 110d930f..4233803e 100644 --- a/packages/Liquid-UI.package/LQPollDraftBuilder.class/instance/generateRandomID.st +++ b/packages/Liquid-UI.package/LQPollDraftBuilder.class/instance/generateRandomID.st @@ -1,4 +1,4 @@ supporting generateRandomID - ^ LQPollIdGenerator new generateIdFromRealWords \ No newline at end of file + ^ LQPollIdGenerator new generateIdFromNumbers \ No newline at end of file diff --git a/packages/Liquid-UI.package/LQPollDraftBuilder.class/methodProperties.json b/packages/Liquid-UI.package/LQPollDraftBuilder.class/methodProperties.json index f121e1c5..ca088830 100644 --- a/packages/Liquid-UI.package/LQPollDraftBuilder.class/methodProperties.json +++ b/packages/Liquid-UI.package/LQPollDraftBuilder.class/methodProperties.json @@ -18,7 +18,7 @@ "currentQuestion" : "bn 8/2/2022 16:58", "currentQuestion:" : "bn 6/23/2022 22:15", "frame:fromTop:fromLeft:width:" : "bn 8/2/2022 16:58", - "generateRandomID" : "JT 6/23/2022 19:34", + "generateRandomID" : "leli 6/3/2024 17:12", "getIndex" : "bn 8/2/2022 16:58", "initialize" : "bn 6/27/2022 13:49", "list" : "bn 8/2/2022 16:58", diff --git a/packages/Liquid-UI.package/LQStartMenu.class/instance/enterParticipantMode.st b/packages/Liquid-UI.package/LQStartMenu.class/instance/enterParticipantMode.st index 4f0366c1..80f9d663 100644 --- a/packages/Liquid-UI.package/LQStartMenu.class/instance/enterParticipantMode.st +++ b/packages/Liquid-UI.package/LQStartMenu.class/instance/enterParticipantMode.st @@ -1,12 +1,15 @@ modifying enterParticipantMode - | pollId menu url | + | pollId menu url lastSlashIndex input | LQPollRepo reset. - url := UIManager default request: 'What''s your server''s url and port? format: http://your.server.tld:8000'. + input := UIManager default request: 'Add your poll id.', Symbol cr,'Format: http://your.server.tld:8000/pollId' initialAnswer: 'http://localhost:8000/'. + lastSlashIndex := input lastIndexOf: $/. + lastSlashIndex = input size ifTrue:[UIManager default inform: 'Please enter a valid Poll ID']. + url := input copyFrom: 1 to: lastSlashIndex. + pollId := input copyFrom: (lastSlashIndex+1) to: input size. LQPollRepo default: (LQPollRepo new url: url). - pollId := UIManager default request: 'What''s your Poll ID?'. pollId ifEmpty: [^ self]. (LQParticipantMenu answeredPollIds includes: pollId) ifTrue: [ UIManager default inform: 'You have already answered this Poll.'. diff --git a/packages/Liquid-UI.package/LQStartMenu.class/methodProperties.json b/packages/Liquid-UI.package/LQStartMenu.class/methodProperties.json index b4c03d59..818ddc54 100644 --- a/packages/Liquid-UI.package/LQStartMenu.class/methodProperties.json +++ b/packages/Liquid-UI.package/LQStartMenu.class/methodProperties.json @@ -8,5 +8,5 @@ "buildStopServerButtonWith:" : "kge 6/19/2022 19:00", "buildWith:" : "JT 8/4/2022 21:51", "enterHostMode" : "JT 8/5/2022 21:56", - "enterParticipantMode" : "JT 8/5/2022 19:13", + "enterParticipantMode" : "leli 6/4/2024 16:01", "stopServer" : "bn 8/2/2022 17:02" } }