@Override
  protected void executeWithGems()
      throws MojoExecutionException, ScriptException, IOException, GemException {

    if (includeRubyResources != null) {
      // add it to the classpath so java classes can find the ruby files
      Resource resource = new Resource();
      resource.setDirectory(project.getBasedir().getAbsolutePath());
      for (String include : includeRubyResources) {
        resource.addInclude(include);
      }
      if (excludeRubyResources != null) {
        for (String exclude : excludeRubyResources) {
          resource.addExclude(exclude);
        }
      }
      addResource(project.getBuild().getResources(), resource);
    }

    if (includeBinStubs) {
      Resource resource = new Resource();
      resource.setDirectory(gemsConfig.getBinDirectory().getAbsolutePath());
      resource.addInclude("*");
      resource.setTargetPath("META-INF/jruby.home/bin");
      addResource(project.getBuild().getResources(), resource);
    }
  }
  /**
   * todo: javadocs
   *
   * @param testResources
   */
  private void includeConfigurationFile(final List<Resource> testResources) {

    for (final Resource rawResource : testResources) {

      if (rawResource.getDirectory() != null) {

        rawResource.addInclude(configurationFileName);
      }
    }
  }