<commit_before>import shopping.list.ShoppingList
import shopping.list.ListItem

class BootStrap {

    def init = { servletContext ->
    	ShoppingList.withTransaction { status ->
			def list = new ShoppingList([
				description: 'My shopping list', completed: false, items: []
			])
			
			list.items.addAll([
				new ListItem([name: 'Green pepper', quantity: 3, obtained: false, order: 1]),
				new ListItem([name: 'Butter', quantity: 1, obtained: false, order: 2]),
				new ListItem([name: 'Frozen pizza', quantity: 2, obtained: false, order: 3])
			])
		
			list.save()
    	}
    }
    def destroy = {
    }
}<commit_msg>Only generate test data when in dev<commit_after>import grails.util.Environment

import shopping.list.ShoppingList
import shopping.list.ListItem

class BootStrap {

    def init = { servletContext ->
		switch (Environment.current) {
		case Environment.DEVELOPMENT:
			ShoppingList.withTransaction { status ->
				def list = new ShoppingList([
					description: 'My shopping list', completed: false, items: []
				])

				list.items.addAll([
					new ListItem([name: 'Green pepper', quantity: 3, obtained: false, order: 1]),
					new ListItem([name: 'Butter', quantity: 1, obtained: false, order: 2]),
					new ListItem([name: 'Frozen pizza', quantity: 2, obtained: false, order: 3])
				])

				list.save()
			}

			break
		}
    }
    def destroy = {
    }
}
{'fraction_non_alphanumeric': 0.13068592057761733, 'fraction_numerical': 0.008664259927797834, 'mean_word_length': 3.291021671826625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3845700', 'n_tokens_mistral': 510, 'n_tokens_neox': 423, 'n_words': 123}