<commit_before>package ox.softeng.burst.grails.plugin

import grails.plugins.Plugin
import grails.util.Environment
import ox.softeng.burst.grails.plugin.rabbitmq.databinding.StringXmlDataBindingSourceCreator
import ox.softeng.burst.grails.plugin.test.BrokenXmlDataBindingSourceCreator

class BurstGrailsPlugin extends Plugin {

    // the version or versions of Grails the plugin is designed for
    def grailsVersion = "3.1.1 > *"
    // resources that are excluded from plugin packaging
    def pluginExcludes = [
            "grails-app/views/error.gsp",
            '**/ox/softeng/burst/grails/plugin/test/**'
    ]

    def title = "Grails Burst Plugin"
    // Headline display name of the plugin
    def author = "<NAME>"
    def authorEmail = "<EMAIL>"
    def description = '''\
Ties the BuRST system in with Grails.

Provides the following classes which can be extended, each will produce BuRST messages in the event of any errors or exceptions:

* Grails Controller
* Grails Restful Controller
* RabbitMQ Consumer
'''
    def profiles = ['web']

    // URL to the plugin's documentation
    //def documentation = "http://grails.org/plugin/grails-burst-plugin"

    // Extra (optional) plugin metadata

    // License: one of 'APACHE', 'GPL2', 'GPL3'
    def license = "APACHE"

    // Details of company behind the plugin (if there is one)
    def organization = [name: "Oxford University BRC Informatics", url: "http://oxfordbrc.nihr.ac.uk/working_groups/clinical-informatics/"]

    // Any additional developers beyond the author specified above.
    def developers = [[name: "<NAME>", email: "<EMAIL>"]]

    // Location of the plugin's issue tracker.
    //    def issueManagement = [ system: "JIRA", url: "http://jira.grails.org/browse/GPMYPLUGIN" ]

    // Online location of the plugin's browseable source code.
    def scm = [url: "https://github.com/olliefreeman/BuRST"]

    def dependsOn = [core       : grailsVersion,
                     dataBinding: grailsVersion]

    Closure doWithSpring() {
        {->

            xmlDataBindingSourceCreator(StringXmlDataBindingSourceCreator)
/*
            if (Environment.current == Environment.TEST) {
                xmlDataBindingSourceCreator(BrokenXmlDataBindingSourceCreator)
            }
            */
        }
    }

    void doWithDynamicMethods() {
        // TODO Implement registering dynamic methods to classes (optional)
    }

    void doWithApplicationContext() {
        // TODO Implement post initialization spring config (optional)
    }

    void onChange(Map<String, Object> event) {
        // TODO Implement code that is executed when any artefact that this plugin is
        // watching is modified and reloaded. The event contains: event.source,
        // event.application, event.manager, event.ctx, and event.plugin.
    }

    void onConfigChange(Map<String, Object> event) {
        // TODO Implement code that is executed when the project configuration changes.
        // The event is the same as for 'onChange'.
    }

    void onShutdown(Map<String, Object> event) {
        // TODO Implement code that is executed when the application shuts down (optional)
    }
}<commit_msg>fixup! Set spring beans for testing<commit_after>package ox.softeng.burst.grails.plugin

import grails.plugins.Plugin
import grails.util.Environment
import ox.softeng.burst.grails.plugin.rabbitmq.databinding.StringXmlDataBindingSourceCreator
import ox.softeng.burst.grails.plugin.test.BrokenXmlDataBindingSourceCreator

class BurstGrailsPlugin extends Plugin {

    // the version or versions of Grails the plugin is designed for
    def grailsVersion = "3.1.1 > *"
    // resources that are excluded from plugin packaging
    def pluginExcludes = [
            "grails-app/views/error.gsp",
            '**/ox/softeng/burst/grails/plugin/test/**'
    ]

    def title = "Grails Burst Plugin"
    // Headline display name of the plugin
    def author = "<NAME>"
    def authorEmail = "<EMAIL>"
    def description = '''\
Ties the BuRST system in with Grails.

Provides the following classes which can be extended, each will produce BuRST messages in the event of any errors or exceptions:

* Grails Controller
* Grails Restful Controller
* RabbitMQ Consumer
'''
    def profiles = ['web']

    // URL to the plugin's documentation
    //def documentation = "http://grails.org/plugin/grails-burst-plugin"

    // Extra (optional) plugin metadata

    // License: one of 'APACHE', 'GPL2', 'GPL3'
    def license = "APACHE"

    // Details of company behind the plugin (if there is one)
    def organization = [name: "Oxford University BRC Informatics", url: "http://oxfordbrc.nihr.ac.uk/working_groups/clinical-informatics/"]

    // Any additional developers beyond the author specified above.
    def developers = [[name: "<NAME>", email: "<EMAIL>"]]

    // Location of the plugin's issue tracker.
    //    def issueManagement = [ system: "JIRA", url: "http://jira.grails.org/browse/GPMYPLUGIN" ]

    // Online location of the plugin's browseable source code.
    def scm = [url: "https://github.com/olliefreeman/BuRST"]

    def dependsOn = [core       : grailsVersion,
                     dataBinding: grailsVersion]

    Closure doWithSpring() {
        {->

            xmlDataBindingSourceCreator(StringXmlDataBindingSourceCreator)
/*

            */
        }
    }

    void doWithDynamicMethods() {
        // TODO Implement registering dynamic methods to classes (optional)
    }

    void doWithApplicationContext() {
        // TODO Implement post initialization spring config (optional)
    }

    void onChange(Map<String, Object> event) {
        // TODO Implement code that is executed when any artefact that this plugin is
        // watching is modified and reloaded. The event contains: event.source,
        // event.application, event.manager, event.ctx, and event.plugin.
    }

    void onConfigChange(Map<String, Object> event) {
        // TODO Implement code that is executed when the project configuration changes.
        // The event is the same as for 'onChange'.
    }

    void onShutdown(Map<String, Object> event) {
        // TODO Implement code that is executed when the application shuts down (optional)
    }
}
{'fraction_non_alphanumeric': 0.09709516931471673, 'fraction_numerical': 0.0016048788316482105, 'mean_word_length': 2.8612143742255265, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, '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': '22246', 'n_tokens_mistral': 1772, 'n_tokens_neox': 1692, 'n_words': 553}