More cleanup

This commit is contained in:
Marios Zachariou 2025-12-04 23:12:50 +00:00
parent 3ea74ea05a
commit aad0a8d25d
21 changed files with 0 additions and 1001 deletions

View File

@ -1,160 +0,0 @@
Object subclass: #GildedRose
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'GildedRose'!
!GildedRose commentStamp: 'AndreasLeidig 4/21/2012 15:38' prior: 0!
This Kata was originally created by Terry Hughes (http://twitter.com/#!!/TerryHughes). It is already on GitHub as "GildedRose", a sample project for C#. I could have forked it again, but I thought other language users might not want to download a whole C# project environment. In this repository are starting code samples for Java, Python, Ruby, C# and C++.
See also http://iamnotmyself.com/2011/02/13/refactor-this-the-gilded-rose-kata/
====================
How to use this Kata
====================
The simplest way is to just clone the code and start hacking away improving the design. You'll want to look at the "Gilded Rose Background Reading" (below) which explains what the code is for. I strongly advise you that you'll also need some tests if you want to make sure you don't break the code while you refactor.
You could write some unit tests yourself, using the Kata Background Reading (below) to identify suitable test cases. I've provided a failing unit test in a popular test framework as a starting point for most languages.
Alternatively, use the "Text-Based" tests provided in this repository. (Read more about that in the next section)
Whichever testing approach you choose, the idea of the exercise is to do some deliberate practice, and improve your Refactoring skills. The idea is not to re-write the code from scratch, but rather to practice taking small steps, running the tests often, and incrementally improving the design.
==================
Text-Based Testing
==================
This is a testing approach which is very useful when refactoring legacy code. The basic idea is to create tests that use the text which the code produces. Before you change the code, you run it, and save the output as a "Golden Copy". Then after you change the code, you run it again, and compare the output against the Golden Copy. Any differences, and the test fails.
It's basically the same idea as "assertEquals(expected, actual)" in a unit test, except the text you are comparing is typically much longer, and the "expected" value is saved from actual output, rather than being defined in advance.
Typically a piece of legacy code may not produce suitable textual output from the start, so you may need to modify it before you can write your first text-based test. That could involve inserting log statements into the code, or just writing a "main" method that executes the code and prints out what the result is afterwards. It's this latter approach we are using here to test GildedRose.
The Text-Based tests in this repository are designed to be used with the tool "TextTest" (http://texttest.org). This tool helps you to organize and run text-based tests. There is more information in the README file in the "texttests" subdirectory.
===================================
Gilded Rose Kata Background Reading
===================================
Hi and welcome to team Gilded Rose. As you know, we are a small inn with a prime location in a prominent city ran by a friendly innkeeper named Allison. We also buy and sell only the finest goods. Unfortunately, our goods are constantly degrading in quality as they approach their sell by date. We have a system in place that updates our inventory for us. It was developed by a no-nonsense type named Leeroy, who has moved on to new adventures. Your task is to add the new feature to our system so that we can begin selling a new category of items. First an introduction to our system:
- All items have a SellIn value which denotes the number of days we have to sell the item
- All items have a Quality value which denotes how valuable the item is
- At the end of each day our system lowers both values for every item
Pretty simple, right? Well this is where it gets interesting:
- Once the sell by date has passed, Quality degrades twice as fast
- The Quality of an item is never negative
- "Aged Brie" actually increases in Quality the older it gets
- The Quality of an item is never more than 50
- "Sulfuras", being a legendary item, never has to be sold or decreases in Quality
- "Backstage passes", like aged brie, increases in Quality as it's SellIn value approaches; Quality increases by 2 when there are 10 days or less and by 3 when there are 5 days or less but Quality drops to 0 after the concert
We have recently signed a supplier of conjured items. This requires an update to our system:
- "Conjured" items degrade in Quality twice as fast as normal items
Feel free to make any changes to the UpdateQuality method and add any new code as long as everything still works correctly. However, do not alter the Item class or Items property as those belong to the goblin in the corner who will insta-rage and one-shot you as he doesn't believe in shared code ownership (you can make the UpdateQuality method and Items property static if you like, we'll cover for you).
Just for clarification, an item can never have its Quality increase above 50, however "Sulfuras" is a legendary item and as such its Quality is 80 and it never alters.!
!GildedRose methodsFor: 'API' stamp: 'AndreasLeidig 4/21/2012 17:02'!
updateQualityFor: items
items
do: [:item |
(item name ~= 'Aged Brie'
and: [item name ~= 'Backstage passes to a TAFKAL80ETC concert'])
ifTrue: [item quality > 0
ifTrue: [item name ~= 'Sulfuras, Hand of Ragnaros'
ifTrue: [item quality: item quality - 1]]]
ifFalse: [item quality < 50
ifTrue: [item quality: item quality + 1.
item name = 'Backstage passes to a TAFKAL80ETC concert'
ifTrue: [item sellIn < 11
ifTrue: [item quality < 50
ifTrue: [item quality: item quality + 1]].
item sellIn < 6
ifTrue: [item quality < 50
ifTrue: [item quality: item quality + 1]]]]].
item name ~= 'Sulfuras, Hand of Ragnaros'
ifTrue: [item sellIn: item sellIn - 1].
item sellIn < 0
ifTrue: [item name ~= 'Aged Brie'
ifTrue: [item name ~= 'Backstage passes to a TAFKAL80ETC concert'
ifTrue: [item quality > 0
ifTrue: [item name ~= 'Sulfuras, Hand of Ragnaros'
ifTrue: [item quality: item quality - 1]]]
ifFalse: [item quality: item quality - item quality]]
ifFalse: [item quality < 50
ifTrue: [item quality: item quality + 1]]]]! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
GildedRose class
instanceVariableNames: ''!
!GildedRose class methodsFor: 'run Example' stamp: 'AndreasLeidig 4/21/2012 20:26'!
runExamples
"GildedRose runExamples"
| items gildedRose |
items := OrderedCollection new
add: (Item new name: '+5 Dexterity Vest'; sellIn: 10; quality: 20; yourself);
add: (Item new name: 'Aged Brie'; sellIn: 2; quality: 0; yourself);
add: (Item new name: 'Elixir of the Mongoose'; sellIn: 5; quality: 7; yourself);
add: (Item new name: 'Sulfuras, Hand of Ragnaros'; sellIn: 0; quality: 80; yourself);
add: (Item new name: 'Sulfuras, Hand of Ragnaros'; sellIn: -1; quality: 80; yourself);
add: (Item new name: 'Backstage passes to a TAFKAL80ETC concert'; sellIn: 15; quality: 20; yourself);
add: (Item new name: 'Backstage passes to a TAFKAL80ETC concert'; sellIn: 10; quality: 49; yourself);
add: (Item new name: 'Backstage passes to a TAFKAL80ETC concert'; sellIn: 5; quality: 49; yourself);
add: (Item new name: 'Conjured Mana Cake'; sellIn: 3; quality: 6; yourself); "this conjured item does not work properly yet"
yourself.
gildedRose := GildedRose new.
Transcript show: 'OMGHAI!!';
cr.
0 to: 30 do: [:idx |
Transcript show: '-------- day ' , idx printString , ' --------';
cr;
show: 'name, sellIn, quality';
cr.
items
do: [:item |
Transcript show: item name , ', ' , item sellIn printString , ', ' , item quality printString;
cr].
Transcript cr.
gildedRose updateQualityFor: items].
Transcript cr! !
Object subclass: #Item
instanceVariableNames: 'name sellIn quality'
classVariableNames: ''
poolDictionaries: ''
category: 'GildedRose'!
!Item methodsFor: 'accessing' stamp: 'AndreasLeidig 4/21/2012 15:40'!
name
^name! !
!Item methodsFor: 'accessing' stamp: 'AndreasLeidig 4/21/2012 15:41'!
name: aString
name := aString! !
!Item methodsFor: 'accessing' stamp: 'AndreasLeidig 4/21/2012 15:41'!
quality
^quality! !
!Item methodsFor: 'accessing' stamp: 'AndreasLeidig 4/21/2012 15:42'!
quality: aNumber
quality := aNumber! !
!Item methodsFor: 'accessing' stamp: 'AndreasLeidig 4/21/2012 15:41'!
sellIn
^sellIn! !
!Item methodsFor: 'accessing' stamp: 'AndreasLeidig 4/21/2012 15:42'!
sellIn: aNumber
sellIn := aNumber
! !

View File

@ -1,18 +0,0 @@
# Scheme port of the Gilded-Rose Kata
This is a (Gambit) R5RS Scheme port of the *Gilded-Rose-Kata*.
## Building and Running
```shell
gsi texttest-fixture.scm
```
## Unit Test
`assert.scm` is a minimalist implementation of xUnit in Scheme style.
There are two assertions available, e.g. `(assert=)` and `(assert-string=)`.
```shell
gsi gilded-rose-test.scm
```

View File

@ -1,58 +0,0 @@
;;;
;;; Unit test framework for Scheme
;;; Copyright (c) 2018, Peter Kofler, http://www.code-cop.org/
;;; BSD licensed.
;;;
;;; Non S5RS used functions:
;;; * (error) from R6RS
;;;
;; SchemeUnit from http://c2.com/cgi/wiki?SchemeUnit
(define (fail msg)
(error (string-append "AssertionError" ": " msg)))
(define (check msg condition)
(if (not condition)
(fail msg)
#t))
(define (assert msg condition)
(lambda () (check msg condition)))
;; extensions
;; private
(define (make-string-message prefix to-string expected actual)
(make-message prefix
(to-string expected)
(to-string actual)))
;; private
(define (make-message prefix expected actual)
(string-append prefix "expected:<" expected "> but was:<" actual ">"))
(define (assert-equal to-string eq-op expected actual)
(assert (make-string-message "" to-string expected actual)
(eq-op expected actual)))
(define (assert= expected actual)
(assert-equal number->string = expected actual))
(define (assert-string= expected actual)
(assert-equal values string=? expected actual))
;; private
(define (test-case-name name)
(display name)
(display " ... "))
;; private
(define (test-case-success)
(display "OK")
(newline))
(define (test-case name . assertions)
(test-case-name name)
(for-each (lambda (a) (a)) assertions)
(test-case-success))

View File

@ -1,7 +0,0 @@
(include "assert.scm")
(include "gilded-rose.scm")
(test-case "foo"
(let ((items (list (make-item "foo" 0 0))))
(update-quality items)
(assert-string= "fixme" (item-name (car items)))))

View File

@ -1,46 +0,0 @@
;;; Class ITEM
(define-record-type item (make-item name sell-in quality) item? name sell-in quality)
;; define-record-type ... SRFI-9
;; creates make-item, item?, item-name, item-sell-in, item-quality, item-name-set!, item-sell-in-set!, item-quality-set!
(define (item-to-string item)
(string-append (item-name item)
", "
(number->string (item-sell-in item))
", "
(number->string (item-quality item))))
;;; GILDED-ROSE
(define (update-quality items)
(for-each
(lambda (item)
(if (and (not (string=? (item-name item) "Aged Brie"))
(not (string=? (item-name item) "Backstage passes to a TAFKAL80ETC concert")))
(if (> (item-quality item) 0)
(if (not (string=? (item-name item) "Sulfuras, Hand of Ragnaros"))
(item-quality-set! item (- (item-quality item) 1))))
(cond ((< (item-quality item) 50)
(item-quality-set! item (+ (item-quality item) 1))
(if (string=? (item-name item) "Backstage passes to a TAFKAL80ETC concert")
(if (< (item-sell-in item) 11)
(cond ((< (item-quality item) 50)
(item-quality-set! item (+ (item-quality item) 1))
(if (< (item-sell-in item) 6)
(if (< (item-quality item) 50)
(item-quality-set! item (+ (item-quality item) 1)))))))))))
(if (not (string=? (item-name item) "Sulfuras, Hand of Ragnaros"))
(item-sell-in-set! item (- (item-sell-in item) 1)))
(if (< (item-sell-in item) 0)
(if (not (string=? (item-name item) "Aged Brie"))
(if (not (string=? (item-name item) "Backstage passes to a TAFKAL80ETC concert"))
(if (> (item-quality item) 0)
(if (not (string=? (item-name item) "Sulfuras, Hand of Ragnaros"))
(item-quality-set! item (- (item-quality item) 1))))
(item-quality-set! item (- (item-quality item) (item-quality item))))
(if (< (item-quality item) 50)
(item-quality-set! item (+ (item-quality item) 1))))))
items))

View File

@ -1,32 +0,0 @@
(include "gilded-rose.scm")
(display "OMGHAI!")
(newline)
(let ((items (list (make-item "+5 Dexterity Vest" 10 20)
(make-item "Aged Brie" 2 0)
(make-item "Elixir of the Mongoose" 5 7)
(make-item "Sulfuras, Hand of Ragnaros" 0 80)
(make-item "Sulfuras, Hand of Ragnaros" -1 80)
(make-item "Backstage passes to a TAFKAL80ETC concert" 15 20)
(make-item "Backstage passes to a TAFKAL80ETC concert" 10 49)
(make-item "Backstage passes to a TAFKAL80ETC concert" 5 49)
;; this conjured item does not work properly yet
(make-item "Conjured Mana Cake" 3 6)))
(days 2))
(define (loop day)
(cond ((< day days)
(display (string-append "-------- day " (number->string day) " --------"))
(newline)
(display "name, sell-in, quality")
(newline)
(for-each
(lambda (item)
(display (item-to-string item))
(newline))
items)
(newline)
(update-quality items)
(loop (+ day 1)))))
(loop 0))

View File

@ -1,12 +0,0 @@
# Introduction
This code aims to be based on ISO-compliant, therefore database-agnostic.
However, Data Definition Language (DDL) usually involves vendor variants.
# Setup
Create database structure: see ./structure/<VARIANT>/create.sql
Load test data: see ./test/data/load.sql
# Execution
Execute SQL script: see /code/update_quality.sql
TODO: Introduce test framework - vendor specific

View File

@ -1,69 +0,0 @@
UPDATE item
SET
quality = quality - 1
WHERE 1=1
AND ( name <> 'Aged Brie' AND name <> 'Backstage passes to a TAFKAL80ETC concert')
AND quality > 0
AND name <> 'Sulfuras, Hand of Ragnaros'
;
UPDATE item
SET
quality = quality + 1
WHERE 1=1
AND NOT ( name <> 'Aged Brie' AND name <> 'Backstage passes to a TAFKAL80ETC concert')
AND quality < 50
AND name = 'Backstage passes to a TAFKAL80ETC concert'
AND sellIn < 11
AND quality < 50
;
UPDATE item
SET
quality = quality + 1
WHERE 1=1
AND NOT ( name <> 'Aged Brie' AND name <> 'Backstage passes to a TAFKAL80ETC concert')
AND quality < 50
AND name = 'Backstage passes to a TAFKAL80ETC concert'
AND sellIn < 6
AND quality < 50
;
UPDATE item
SET
sellIn = sellIn - 1
WHERE 1=1
AND name <> 'Sulfuras, Hand of Ragnaros'
;
UPDATE item
SET
quality = quality - 1
WHERE 1=1
AND sellIn < 0
AND name <> 'Aged Brie'
AND name <> 'Backstage passes to a TAFKAL80ETC concert'
AND quality > 0
AND name <> 'Sulfuras, Hand of Ragnaros'
;
UPDATE item
SET
quality = quality - quality
WHERE 1=1
AND sellIn < 0
AND name <> 'Aged Brie'
AND NOT (name <> 'Backstage passes to a TAFKAL80ETC concert')
;
UPDATE item
SET
quality = quality + 1
WHERE 1=1
AND sellIn < 0
AND NOT (name <> 'Aged Brie')
AND quality < 50
AND name <> 'Sulfuras, Hand of Ragnaros'
;
COMMIT;

View File

@ -1,9 +0,0 @@
CREATE DATABASE gilded_rose;
\connect gilded_rose;
CREATE TABLE item (
name CHARACTER VARYING(100) NOT NULL,
sellIn INTEGER,
quality INTEGER NOT NULL
);

View File

@ -1,15 +0,0 @@
DELETE FROM item;
INSERT INTO item (name, sellIn, quality) VALUES ('+5 Dexterity Vest', 10, 20);
INSERT INTO item (name, sellIn, quality) VALUES ('Aged Brie', 2, 0);
INSERT INTO item (name, sellIn, quality) VALUES ('Elixir of the Mongoose', 5, 7);
INSERT INTO item (name, sellIn, quality) VALUES ('Sulfuras, Hand of Ragnaros', 0, 80);
INSERT INTO item (name, sellIn, quality) VALUES ('Sulfuras, Hand of Ragnaros', -1, 80);
INSERT INTO item (name, sellIn, quality) VALUES ('Backstage passes to a TAFKAL80ETC concert', 15, 20);
INSERT INTO item (name, sellIn, quality) VALUES ('Backstage passes to a TAFKAL80ETC concert', 10, 49);
INSERT INTO item (name, sellIn, quality) VALUES ('Backstage passes to a TAFKAL80ETC concert', 5, 49);
-- this conjured item does not work properly yet
INSERT INTO item (name, sellIn, quality) VALUES ('Conjured Mana Cake', 3, 6);
COMMIT;

View File

@ -1,5 +0,0 @@
set TEXTTEST_HOME=%~dp0
cd %TEXTTEST_HOME%
texttestc -con

View File

@ -1,7 +0,0 @@
#!/bin/sh
if [ ! -d "venv" ]; then
python -m venv venv
fi
venv/bin/pip install texttest
venv/bin/texttest -d . -con "$@"

View File

@ -1,14 +0,0 @@
set TEXTTEST_HOME=%~dp0
cd %TEXTTEST_HOME%
if not exist "venv" (
py -m venv venv
)
venv\Scripts\pip install texttest
if %ERRORLEVEL% GEQ 1 (
pause
) else (
venv\Scripts\texttestc.exe -con %*
)

View File

@ -1 +0,0 @@
venv

View File

@ -1,88 +0,0 @@
# TextTest regression tests
This folder contains Text-Based Approval tests for the GildedRose Refactoring Kata designed by Emily Bache. They are fairly comprehensive and well worth using if you'd prefer to go straight to the refactoring without writing your own tests first.
These tests are designed to be used with the open source testing tool "TextTest", available from [http://texttest.org](http://texttest.org).
## Configure the language version you want to test
Before you can run the tests you need to tell texttest which language version of GildedRose you plan to refactor. Open the file 'config.gr' and edit it. Several languages are supported. All lines starting with '#' are comments in this file. Find the lines referring to the language you want, and uncomment them.
While you're here, change the settings for editor and diff program to match your preferences. By default it uses 'subl' and 'meld'. It will accept any editors or diff programs that you can run from the command line.
## Running TextTest
The instructions are slightly different depending on your platform.
### Running TextTest on Linux or MacOS
There is a convenience script 'start_texttest.sh' in the root folder of this repo. This script assumes you already have Python installed. This script will first create a virtual python environment and install texttest if you haven't done that before, then run the tests.
### Running TextTest on Windows
Download the installer as explained on [TextTest.org](http://www.texttest.org/getting_started/install_windows.html). Make sure the texttest executable is on your PATH. Then use the convenience script 'start_texttest.bat' in the root folder of this repo to run the tests on the console.
Windows may warn you that it doesn't trust this installer and be reluctant to download it. If you prefer not to continue with this, an alternative is to run TextTest via Python. First install Python then use the convenience script 'start_texttest_from_python.bat'.
For Windows users using start_texttest_from_python.bat, it's recommended to:
1. Install Meld (available at https://meldmerge.org) as your diff viewer
2. Set the text_diff_program to 'fc' in your config.gr file
3. Use Meld as your view_program for its simplicity and ease of use
## Interpreting Test Results
You should see output like this if the test passes:
Using local queues for Application Gilded Rose Refactoring Kata
Q: Submitting Gilded Rose Refactoring Kata test-case ThirtyDays to default local queue
S: Gilded Rose Refactoring Kata test-case ThirtyDays succeeded on Emilys-MBP
If the test fails it might look like this:
Using local queues for Application Gilded Rose Refactoring Kata
Q: Submitting Gilded Rose Refactoring Kata test-case ThirtyDays to default local queue
S: Gilded Rose Refactoring Kata test-case ThirtyDays FAILED on Emilys-MBP : differences in stdout
View details(v), Approve(a) or continue(any other key)?
If you press 'v' it will try to open the diff tool you specified in 'config.gr' to show you the difference in output. If you press 'a' it will update the approved file - you will not want to do this if you are refactoring. Any other key will return you to the terminal prompt.
## TextTest user interface
TextTest has a graphical user interface you can use to manage your test cases. With only one test case it may not be worth it, but if you want to add other tests and/or examine test failures more closely it can be helpful. Be sure to set TEXTTEST_HOME to the root folder of this repository before starting the GUI.
There are instructions for installing TextTest development tools on [texttest.org](https://texttest.org/)
## Running the test without TextTest
This should be perfectly possible, but is probably less convenient than using TextTest.
Write a script that will execute the system under test (see "config.gr" for details of the executables), giving the commandline options listed in "options.gr". Collect the output from standard output in a file, and diff that against the golden copy "stdout.gr". Any diff is a test failure.
## Explaining TextTest test cases
Under the 'texttests' folder each test case has its own subdirectory. The name of the directory is the name of the test - in this case "ThirtyDays". The approved version of the output for that test case is kept in that directory. In this case we have three files:
- __stderr.gr__ - the expected output to Standard Error (stderr)
- __stdout.gr__ - the expected output to Standard Output (stdout)
- __options.gr__ - the options to give on the command line when you run the System Under Test (SUT)
In the directory above, there are configuration files for TextTest:
- __config.gr__ - this tells TextTest where to find the SUT executable, and sets up options for how it runs the SUT and interprets the output.
- __environment.gr__ - this file lists environment variables that will be set before TextTest runs the SUT. This is especially important for Java applications, that need to set the CLASSPATH environment variable in order to run properly.
- __testsuite.gr__ - lists the constituent test cases of this suite. Change the order of the entries here to change the order they appear in the TextTest GUI.
To run a test, click on it in the GUI and select "Run". TextTest will run it in a temporary (sandbox) directory and report the results. If the test fails, you can double click on a file to see the diff against the Golden Copy.
If you run into difficulties with TextTest, there is documentation available on [texttest.org](http://texttest.org), or you can ask a question on the [mailing list](https://lists.sourceforge.net/lists/listinfo/texttest-users).
## Introduction to Text-Based Approval Testing
This is a testing approach which is very useful when refactoring legacy code. Before you change the code, you run it, and gather the output of the code as a plain text file. You review the text, and if it correctly describes the behaviour as you understand it, you can "approve" it, and save it as a "Golden Master". Then after you change the code, you run it again, and compare the new output against the Golden Master. Any differences, and the test fails.
It's basically the same idea as "assertEquals(expected, actual)" in a unit test, except the text you are comparing is typically much longer, and the "expected" value is saved from actual output, rather than being defined in advance.
Typically a piece of legacy code may not produce suitable textual output from the start, so you may need to modify it before you can write your first text-based approval test. One way to do that is to write a "main" method that executes the code and prints out what the result is afterwards. Each language version has implemented a texttest 'fixture' that does this. It runs the GildedRose 'update_quality' method once each day for 30 days, printing the item state each day.

View File

@ -1 +0,0 @@
30

View File

@ -1,373 +0,0 @@
OMGHAI!
-------- day 0 --------
name, sellIn, quality
+5 Dexterity Vest, 10, 20
Aged Brie, 2, 0
Elixir of the Mongoose, 5, 7
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 15, 20
Backstage passes to a TAFKAL80ETC concert, 10, 49
Backstage passes to a TAFKAL80ETC concert, 5, 49
Conjured Mana Cake, 3, 6
-------- day 1 --------
name, sellIn, quality
+5 Dexterity Vest, 9, 19
Aged Brie, 1, 1
Elixir of the Mongoose, 4, 6
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 14, 21
Backstage passes to a TAFKAL80ETC concert, 9, 50
Backstage passes to a TAFKAL80ETC concert, 4, 50
Conjured Mana Cake, 2, 5
-------- day 2 --------
name, sellIn, quality
+5 Dexterity Vest, 8, 18
Aged Brie, 0, 2
Elixir of the Mongoose, 3, 5
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 13, 22
Backstage passes to a TAFKAL80ETC concert, 8, 50
Backstage passes to a TAFKAL80ETC concert, 3, 50
Conjured Mana Cake, 1, 4
-------- day 3 --------
name, sellIn, quality
+5 Dexterity Vest, 7, 17
Aged Brie, -1, 4
Elixir of the Mongoose, 2, 4
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 12, 23
Backstage passes to a TAFKAL80ETC concert, 7, 50
Backstage passes to a TAFKAL80ETC concert, 2, 50
Conjured Mana Cake, 0, 3
-------- day 4 --------
name, sellIn, quality
+5 Dexterity Vest, 6, 16
Aged Brie, -2, 6
Elixir of the Mongoose, 1, 3
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 11, 24
Backstage passes to a TAFKAL80ETC concert, 6, 50
Backstage passes to a TAFKAL80ETC concert, 1, 50
Conjured Mana Cake, -1, 1
-------- day 5 --------
name, sellIn, quality
+5 Dexterity Vest, 5, 15
Aged Brie, -3, 8
Elixir of the Mongoose, 0, 2
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 10, 25
Backstage passes to a TAFKAL80ETC concert, 5, 50
Backstage passes to a TAFKAL80ETC concert, 0, 50
Conjured Mana Cake, -2, 0
-------- day 6 --------
name, sellIn, quality
+5 Dexterity Vest, 4, 14
Aged Brie, -4, 10
Elixir of the Mongoose, -1, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 9, 27
Backstage passes to a TAFKAL80ETC concert, 4, 50
Backstage passes to a TAFKAL80ETC concert, -1, 0
Conjured Mana Cake, -3, 0
-------- day 7 --------
name, sellIn, quality
+5 Dexterity Vest, 3, 13
Aged Brie, -5, 12
Elixir of the Mongoose, -2, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 8, 29
Backstage passes to a TAFKAL80ETC concert, 3, 50
Backstage passes to a TAFKAL80ETC concert, -2, 0
Conjured Mana Cake, -4, 0
-------- day 8 --------
name, sellIn, quality
+5 Dexterity Vest, 2, 12
Aged Brie, -6, 14
Elixir of the Mongoose, -3, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 7, 31
Backstage passes to a TAFKAL80ETC concert, 2, 50
Backstage passes to a TAFKAL80ETC concert, -3, 0
Conjured Mana Cake, -5, 0
-------- day 9 --------
name, sellIn, quality
+5 Dexterity Vest, 1, 11
Aged Brie, -7, 16
Elixir of the Mongoose, -4, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 6, 33
Backstage passes to a TAFKAL80ETC concert, 1, 50
Backstage passes to a TAFKAL80ETC concert, -4, 0
Conjured Mana Cake, -6, 0
-------- day 10 --------
name, sellIn, quality
+5 Dexterity Vest, 0, 10
Aged Brie, -8, 18
Elixir of the Mongoose, -5, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 5, 35
Backstage passes to a TAFKAL80ETC concert, 0, 50
Backstage passes to a TAFKAL80ETC concert, -5, 0
Conjured Mana Cake, -7, 0
-------- day 11 --------
name, sellIn, quality
+5 Dexterity Vest, -1, 8
Aged Brie, -9, 20
Elixir of the Mongoose, -6, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 4, 38
Backstage passes to a TAFKAL80ETC concert, -1, 0
Backstage passes to a TAFKAL80ETC concert, -6, 0
Conjured Mana Cake, -8, 0
-------- day 12 --------
name, sellIn, quality
+5 Dexterity Vest, -2, 6
Aged Brie, -10, 22
Elixir of the Mongoose, -7, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 3, 41
Backstage passes to a TAFKAL80ETC concert, -2, 0
Backstage passes to a TAFKAL80ETC concert, -7, 0
Conjured Mana Cake, -9, 0
-------- day 13 --------
name, sellIn, quality
+5 Dexterity Vest, -3, 4
Aged Brie, -11, 24
Elixir of the Mongoose, -8, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 2, 44
Backstage passes to a TAFKAL80ETC concert, -3, 0
Backstage passes to a TAFKAL80ETC concert, -8, 0
Conjured Mana Cake, -10, 0
-------- day 14 --------
name, sellIn, quality
+5 Dexterity Vest, -4, 2
Aged Brie, -12, 26
Elixir of the Mongoose, -9, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 1, 47
Backstage passes to a TAFKAL80ETC concert, -4, 0
Backstage passes to a TAFKAL80ETC concert, -9, 0
Conjured Mana Cake, -11, 0
-------- day 15 --------
name, sellIn, quality
+5 Dexterity Vest, -5, 0
Aged Brie, -13, 28
Elixir of the Mongoose, -10, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, 0, 50
Backstage passes to a TAFKAL80ETC concert, -5, 0
Backstage passes to a TAFKAL80ETC concert, -10, 0
Conjured Mana Cake, -12, 0
-------- day 16 --------
name, sellIn, quality
+5 Dexterity Vest, -6, 0
Aged Brie, -14, 30
Elixir of the Mongoose, -11, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -1, 0
Backstage passes to a TAFKAL80ETC concert, -6, 0
Backstage passes to a TAFKAL80ETC concert, -11, 0
Conjured Mana Cake, -13, 0
-------- day 17 --------
name, sellIn, quality
+5 Dexterity Vest, -7, 0
Aged Brie, -15, 32
Elixir of the Mongoose, -12, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -2, 0
Backstage passes to a TAFKAL80ETC concert, -7, 0
Backstage passes to a TAFKAL80ETC concert, -12, 0
Conjured Mana Cake, -14, 0
-------- day 18 --------
name, sellIn, quality
+5 Dexterity Vest, -8, 0
Aged Brie, -16, 34
Elixir of the Mongoose, -13, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -3, 0
Backstage passes to a TAFKAL80ETC concert, -8, 0
Backstage passes to a TAFKAL80ETC concert, -13, 0
Conjured Mana Cake, -15, 0
-------- day 19 --------
name, sellIn, quality
+5 Dexterity Vest, -9, 0
Aged Brie, -17, 36
Elixir of the Mongoose, -14, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -4, 0
Backstage passes to a TAFKAL80ETC concert, -9, 0
Backstage passes to a TAFKAL80ETC concert, -14, 0
Conjured Mana Cake, -16, 0
-------- day 20 --------
name, sellIn, quality
+5 Dexterity Vest, -10, 0
Aged Brie, -18, 38
Elixir of the Mongoose, -15, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -5, 0
Backstage passes to a TAFKAL80ETC concert, -10, 0
Backstage passes to a TAFKAL80ETC concert, -15, 0
Conjured Mana Cake, -17, 0
-------- day 21 --------
name, sellIn, quality
+5 Dexterity Vest, -11, 0
Aged Brie, -19, 40
Elixir of the Mongoose, -16, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -6, 0
Backstage passes to a TAFKAL80ETC concert, -11, 0
Backstage passes to a TAFKAL80ETC concert, -16, 0
Conjured Mana Cake, -18, 0
-------- day 22 --------
name, sellIn, quality
+5 Dexterity Vest, -12, 0
Aged Brie, -20, 42
Elixir of the Mongoose, -17, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -7, 0
Backstage passes to a TAFKAL80ETC concert, -12, 0
Backstage passes to a TAFKAL80ETC concert, -17, 0
Conjured Mana Cake, -19, 0
-------- day 23 --------
name, sellIn, quality
+5 Dexterity Vest, -13, 0
Aged Brie, -21, 44
Elixir of the Mongoose, -18, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -8, 0
Backstage passes to a TAFKAL80ETC concert, -13, 0
Backstage passes to a TAFKAL80ETC concert, -18, 0
Conjured Mana Cake, -20, 0
-------- day 24 --------
name, sellIn, quality
+5 Dexterity Vest, -14, 0
Aged Brie, -22, 46
Elixir of the Mongoose, -19, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -9, 0
Backstage passes to a TAFKAL80ETC concert, -14, 0
Backstage passes to a TAFKAL80ETC concert, -19, 0
Conjured Mana Cake, -21, 0
-------- day 25 --------
name, sellIn, quality
+5 Dexterity Vest, -15, 0
Aged Brie, -23, 48
Elixir of the Mongoose, -20, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -10, 0
Backstage passes to a TAFKAL80ETC concert, -15, 0
Backstage passes to a TAFKAL80ETC concert, -20, 0
Conjured Mana Cake, -22, 0
-------- day 26 --------
name, sellIn, quality
+5 Dexterity Vest, -16, 0
Aged Brie, -24, 50
Elixir of the Mongoose, -21, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -11, 0
Backstage passes to a TAFKAL80ETC concert, -16, 0
Backstage passes to a TAFKAL80ETC concert, -21, 0
Conjured Mana Cake, -23, 0
-------- day 27 --------
name, sellIn, quality
+5 Dexterity Vest, -17, 0
Aged Brie, -25, 50
Elixir of the Mongoose, -22, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -12, 0
Backstage passes to a TAFKAL80ETC concert, -17, 0
Backstage passes to a TAFKAL80ETC concert, -22, 0
Conjured Mana Cake, -24, 0
-------- day 28 --------
name, sellIn, quality
+5 Dexterity Vest, -18, 0
Aged Brie, -26, 50
Elixir of the Mongoose, -23, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -13, 0
Backstage passes to a TAFKAL80ETC concert, -18, 0
Backstage passes to a TAFKAL80ETC concert, -23, 0
Conjured Mana Cake, -25, 0
-------- day 29 --------
name, sellIn, quality
+5 Dexterity Vest, -19, 0
Aged Brie, -27, 50
Elixir of the Mongoose, -24, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -14, 0
Backstage passes to a TAFKAL80ETC concert, -19, 0
Backstage passes to a TAFKAL80ETC concert, -24, 0
Conjured Mana Cake, -26, 0
-------- day 30 --------
name, sellIn, quality
+5 Dexterity Vest, -20, 0
Aged Brie, -28, 50
Elixir of the Mongoose, -25, 0
Sulfuras, Hand of Ragnaros, 0, 80
Sulfuras, Hand of Ragnaros, -1, 80
Backstage passes to a TAFKAL80ETC concert, -15, 0
Backstage passes to a TAFKAL80ETC concert, -20, 0
Backstage passes to a TAFKAL80ETC concert, -25, 0
Conjured Mana Cake, -27, 0

View File

@ -1,81 +0,0 @@
full_name:Gilded Rose Refactoring Kata
# set your preferred editor and diff tool.
view_program:subl
diff_program:meld
#text_diff_program:fc
# Settings for the Python version
#executable:${TEXTTEST_HOME}/python/texttest_fixture.py
#interpreter:python
# Settings for the cpp version
#executable:${TEXTTEST_HOME}/cpp/cmake-build-debug/test/cpp_texttest/GildedRoseTextTests
# Settings for the c (cmocka) version
#executable:${TEXTTEST_HOME}/c_cmocka/cmake-build-debug/main
# Settings for the zig version
#executable:${TEXTTEST_HOME}/zig/zig-out/bin/zig
# Settings for the lua version
#executable:${TEXTTEST_HOME}/lua/texttest
# Settings for the Java version using Gradle wrapped in a python script
#executable:${TEXTTEST_HOME}/Java/texttest_rig.py
#interpreter:python
# Settings for the Java version using the classpath
#executable:com.gildedrose.TexttestFixture
#interpreter:java
# note you'll also need to update the file environment.gr with your classpath if you keep your classfiles somewhere unusual
# Settings for the Kotlin version using Gradle wrapped in a python script
#executable:${TEXTTEST_HOME}/Kotlin/texttest_rig.py
#interpreter:python
# Settings for the Ruby version
executable:${TEXTTEST_HOME}/ruby/texttest_fixture.rb
interpreter:ruby
# Settings for the C# Core version
#executable:${TEXTTEST_HOME}/csharpcore/GildedRoseTests/bin/Debug/net8.0/GildedRoseTests
# Settings for the Perl version
#executable:${TEXTTEST_HOME}/perl/texttest_fixture.pl
#interpreter:perl
# Settings for the TypeScript version
#executable:${TEXTTEST_HOME}/TypeScript/texttest_rig.py
#interpreter:python
# Settings for the Javascript Jest version
#executable:${TEXTTEST_HOME}/js-jest/test/texttest_fixture.js
#interpreter:node
# Settings for the Javascript Mocha version
#executable:${TEXTTEST_HOME}/js-mocha/test/texttest_fixture.js
#interpreter:node
# Settings for the Julia version
#executable:${TEXTTEST_HOME}/julia/texttest_fixture.jl
#interpreter:julia
# Settings for the PHP version
#executable:${TEXTTEST_HOME}/php/fixtures/texttest_fixture.php
#interpreter:php
# Settings for the OCaml version
# executable:${TEXTTEST_HOME}/ocaml/_build/default/bin/main.exe
# Settings for the Odin version
#executable:${TEXTTEST_HOME}/odin/gilded_rose<include your OS executable extension here>
# Settings for the scala version using sbt wrapped in a python script
# executable:${TEXTTEST_HOME}/scala/texttest_rig.py
# interpreter:python
filename_convention_scheme:standard

View File

@ -1,3 +0,0 @@
# If your .class files are somewhere else, add the path to the list
CLASSPATH:${TEXTTEST_HOME}/Java/build/classes/java/test;${TEXTTEST_HOME}/Java/build/classes/java/main;${TEXTTEST_HOME}/Java/target/classes;${TEXTTEST_HOME}/Java/target/test-classes
PERL5OPT:-I${TEXTTEST_HOME}/perl

View File

@ -1,2 +0,0 @@
# With one example of each special item, run for 30 days updating sellIn and quality.
ThirtyDays