./jruby-maven-plugins-1.0.10.ds1.orig/ 0000755 0000000 0000000 00000000000 12604247413 014162 5 ustar ./jruby-maven-plugins-1.0.10.ds1.orig/.gitignore 0000644 0000000 0000000 00000000062 12522366550 016153 0 ustar *~
target
*.gpg
.classpath
.settings
.project
tmp
./jruby-maven-plugins-1.0.10.ds1.orig/pom.xml 0000644 0000000 0000000 00000007460 12522366550 015511 0 ustar
* Command line -Drails.args=...
*
* @parameter default-value="${rails.args}"
*/
protected String railsArgs = null;
/**
* the path to the application to be generated
*
* Command line -Dapp_path=...
*
* @parameter default-value="${app_path}"
*/
protected File appPath = null;
/**
* the database to use
*
* Command line -Ddatabase=...
*
* @parameter expression="${database}" default-value="sqlite3"
*/
protected String database = null;
/**
* rails template to apply after create the application
*
* Command line -Dtemplate=...
*
* @parameter expression="${template}"
*/
protected String template = null;
/**
* the rails version to use
*
* Command line -Drails.version=...
*
* @parameter expression="${rails.version}"
*/
protected String railsVersion = null;
/**
* the groupId of the new pom
*
* Command line -DgroupId=...
*
* @parameter default-value="rails" expression="${groupId}"
*/
protected String groupId = null;
/**
* the version of the new pom
*
* Command line -Dversion=...
*
* @parameter default-value="1.0-SNAPSHOT" expression="${version}"
*/
protected String artifactVersion = null;
/**
* select the ORM to use
*
* Command line -Dorm=activerecord or -Dorm=datamapper
*
* @parameter expression="${orm}" default-value="activerecord"
*/
protected String railsORM;
/**
* when the gwt package is given then the rails gets GWT as view component
*
* Command line -Dgwt.package=...
*
* @parameter expression="${gwt.package}"
*/
protected String gwtPackage;
/**
* setup GWT with session support
*
* Command line -Dgwt.session=true
*
* @parameter expression="${gwt.session}" default-value="false"
*/
protected boolean gwtSession;
/**
* setup GWT with menu support
*
* Command line -Dgwt.menu=true
*
* @parameter expression="${gwt.menu}" default-value="false"
*/
protected boolean gwtMenu;
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
// make sure the whole things run in the same process
this.jrubyFork = false;
super.execute();
}
@Override
void executeRails() throws MojoExecutionException, ScriptException,
IOException, GemException, RailsException {
getLog().warn( "DEPRECATED: just do not use that anymore. use gem:exec or bundler:exec instead" );
if(railsVersion != null && !this.railsVersion.startsWith("3.")) {
throw new MojoExecutionException("given rails version is not rails-3.x.y : "
+ this.railsVersion);
}
try {
if (this.database == null) {
final Pattern pattern = Pattern.compile(".*-d\\s+([a-z0-9]+).*");
final Matcher matcher = pattern.matcher((this.railsArgs == null
? ""
: this.railsArgs)
+ (this.args == null ? "" : this.args));
if (matcher.matches()) {
this.database = matcher.group(1);
}
else {
this.database = "sqlite3";
}
}
final String[] combArgs = joinArgs(this.railsArgs, this.args);
if (this.appPath == null) {
// find appPath
int index = 0;
for (final String arg : combArgs) {
if (this.appPath == null && !arg.startsWith("-")) {
this.appPath = new File(arg);
break;
}
index++;
}
// remove found appPath from arg list
if (index < combArgs.length) {
combArgs[index] = null;
}
}
getLog().info("use ORM " + ORM.valueOf(this.railsORM));
GwtOptions gwt = new GwtOptions(gwtPackage, gwtSession, gwtMenu);
this.railsManager.createNew(this.gemsInstaller,
this.repoSession,
this.appPath,
this.database,
this.railsVersion,
ORM.valueOf(this.railsORM),
this.template,
gwt,
combArgs);
}
catch (final RailsException e) {
throw new MojoExecutionException("error creating new rails application",
e);
}
}
}
././@LongLink 0000644 0000000 0000000 00000000156 00000000000 011605 L ustar root root ./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/java/de/saumya/mojo/rails3/ServerMojo.java ./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/java/de/saumya/mojo/rails3/Server0000644 0000000 0000000 00000001722 12522366550 027641 0 ustar package de.saumya.mojo.rails3;
import java.io.IOException;
import org.apache.maven.plugin.MojoExecutionException;
import de.saumya.mojo.ruby.script.ScriptException;
/**
* goal to run the rails server.
*
* @goal server
* @requiresDependencyResolution runtime
*/
@Deprecated
public class ServerMojo extends AbstractRailsMojo {
/**
* arguments for the generate command
*
* @parameter default-value="${server.args}"
*/
protected String serverArgs = null;
@Override
protected void executeRails() throws MojoExecutionException,
ScriptException, IOException {
getLog().warn( "DEPRECATED: just do not use that anymore. use gem:exec or bundler:exec instead" );
this.factory.newScript(railsScriptFile())
.addArg("server")
.addArgs(this.serverArgs)
.addArgs(this.args)
.addArg("-e", this.env)
.executeIn(launchDirectory());
}
}
././@LongLink 0000644 0000000 0000000 00000000157 00000000000 011606 L ustar root root ./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/java/de/saumya/mojo/rails3/ConsoleMojo.java ./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/java/de/saumya/mojo/rails3/Consol0000644 0000000 0000000 00000002730 12522366550 027630 0 ustar package de.saumya.mojo.rails3;
import java.io.IOException;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import de.saumya.mojo.ruby.script.ScriptException;
/**
* goal to run the rails console. it will ignore the fork parameter since
* forking does not work with a console.
*
* @goal console
* @requiresDependencyResolution compile
*/
@Deprecated
public class ConsoleMojo extends AbstractRailsMojo {
/**
* arguments for the console command
*
* @parameter default-value="${console.args}"
*/
protected String consoleArgs = null;
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
getLog().warn( "DEPRECATED: just do not use that anymore. use gem:exec or bundler:exec instead" );
if (getJrubyVersion().toString().compareTo("1.5.0") < 0) {
throw new MojoExecutionException("does not work with jruby version < 1.5.0");
}
// make sure the whole things run in the same process
this.jrubyFork = false;
super.execute();
}
@Override
public void executeRails() throws MojoExecutionException,
ScriptException, IOException {
this.factory.newScript(railsScriptFile())
.addArg("console")
.addArgs(this.consoleArgs)
.addArgs(this.args)
.addArg(this.env)
.executeIn(launchDirectory());
}
}
././@LongLink 0000644 0000000 0000000 00000000153 00000000000 011602 L ustar root root ./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/java/de/saumya/mojo/rails3/PomMojo.java ./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/java/de/saumya/mojo/rails3/PomMoj0000644 0000000 0000000 00000004732 12522366550 027600 0 ustar package de.saumya.mojo.rails3;
import java.io.File;
import java.io.IOException;
import org.apache.maven.plugin.MojoExecutionException;
import de.saumya.mojo.ruby.script.ScriptException;
/**
* @goal pom
*/
@Deprecated
public class PomMojo extends AbstractRailsMojo {
/**
* @parameter expression="${pom}" default-value="pom.xml"
*/
File pom;
/** @parameter expression="${pom.force}" default-value="false" */
boolean force;
/**
* @parameter expression="${pom.gemfile}"
* default-value="${basedir}/Gemfile"
*/
File gemfile;
@Override
protected void executeRails() throws MojoExecutionException, IOException,
ScriptException {
getLog().warn( "DEPRECATED: just do not use that anymore. use gem:pom instead" );
if (this.pom.exists() && !this.force) {
getLog().info(this.pom.getName()
+ " already exists. use '-Dpom.force=true' to overwrite");
return;
}
if (this.gemfile.exists()) {
if (!(this.pom.exists() && this.gemfile.lastModified() > this.pom.lastModified())
|| this.force) {
long stamp = -1;
if (this.pom.exists()) {
stamp = this.pom.lastModified();
}
if (this.jrubyVerbose) {
getLog().info("create pom using following versions:");
getLog().info("\tjruby-plugins-version: "
+ this.plugin.getVersion());
getLog().info("\tjruby-version: " + getJrubyVersion());
}
this.factory.newScriptFromResource("maven/tools/pom_generator.rb")
.addArg("rails")
.addArg(this.gemfile.getAbsoluteFile())
.addArg(this.plugin.getVersion())
.addArg(getJrubyVersion().toString())
.executeIn(launchDirectory(), this.pom);
if (stamp > -1) {
this.pom.setLastModified(stamp);
}
}
else {
if (this.jrubyVerbose) {
getLog().info("pom is newer then Gemfile. skip creation of pom. force creation with -Drails.pom.force");
}
}
}
else {
getLog().warn("no Gemfile. nothing to do. please specify one with -Drails.gemfile=...");
}
}
}
././@LongLink 0000644 0000000 0000000 00000000154 00000000000 011603 L ustar root root ./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/java/de/saumya/mojo/rails3/RakeMojo.java ./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/java/de/saumya/mojo/rails3/RakeMo0000644 0000000 0000000 00000002437 12522366550 027555 0 ustar package de.saumya.mojo.rails3;
import java.io.IOException;
import org.apache.maven.plugin.MojoExecutionException;
import de.saumya.mojo.ruby.gems.GemException;
import de.saumya.mojo.ruby.rails.RailsException;
import de.saumya.mojo.ruby.script.ScriptException;
/**
* goal to run rails rake with the given arguments.
*
* @goal rake
* @requiresDependencyResolution test
*/
@Deprecated
public class RakeMojo extends AbstractRailsMojo {
/**
* arguments for the generate command
*
* @parameter default-value="${rake.args}"
*/
protected String rakeArgs = null;
/**
* the path to the application to be generated
*
* @parameter default-value="${task}"
*/
protected String task = null;
@Override
public void executeRails() throws MojoExecutionException, ScriptException,
IOException, GemException, RailsException {
getLog().warn( "DEPRECATED: just do not use that anymore. use rake:rails instead" );
this.railsManager.rake(this.gemsInstaller,
this.repoSession,
launchDirectory(),
this.env,
this.task == null ? null : this.task.trim(),
joinArgs(this.rakeArgs, this.args));
}
}
././@LongLink 0000644 0000000 0000000 00000000165 00000000000 011605 L ustar root root ./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/java/de/saumya/mojo/rails3/AbstractRailsMojo.java ./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/java/de/saumya/mojo/rails3/Abstra0000644 0000000 0000000 00000004512 12522366550 027607 0 ustar package de.saumya.mojo.rails3;
import java.io.File;
import java.io.IOException;
import org.apache.maven.plugin.MojoExecutionException;
import de.saumya.mojo.gem.AbstractGemMojo;
import de.saumya.mojo.ruby.gems.GemException;
import de.saumya.mojo.ruby.rails.RailsException;
import de.saumya.mojo.ruby.rails.RailsManager;
import de.saumya.mojo.ruby.script.ScriptException;
/**
* abstract rails mojo which provides a few helper methods and the rails.args
* parameter.
*/
@Deprecated
public abstract class AbstractRailsMojo extends AbstractGemMojo {
/**
* @parameter expression="${rails.dir}"
* default-value="${project.basedir}/src/main/rails"
*/
protected File railsDir;
/**
* either development or test or production or whatever else is possible
* with your config
*
* @parameter expression="${rails.env}"
*/
protected String env;
/**
* @parameter default-value="${repositorySystemSession}"
* @readonly
*/
protected Object repoSession;
/** @component */
protected RailsManager railsManager;
protected String[] joinArgs(final String args1, final String args2) {
final String args = ((args1 == null ? "" : args1) + " " + (args2 == null
? ""
: args2)).trim();
if ("".equals(args)) {
return new String[0];
}
else {
return args.split("\\s+");
}
}
@Override
public void executeWithGems() throws MojoExecutionException,
ScriptException, IOException, GemException {
try {
this.railsManager.initInstaller(this.gemsInstaller, launchDirectory());
executeRails();
}
catch (final RailsException e) {
throw new MojoExecutionException("error executing rails", e);
}
}
abstract void executeRails() throws MojoExecutionException,
ScriptException, IOException, GemException, RailsException;
@Override
protected File launchDirectory() {
if (this.railsDir.exists()) {
return this.railsDir;
}
else {
return super.launchDirectory();
}
}
protected File railsScriptFile() {
return new File(new File(launchDirectory(), "script"), "rails");
}
}
././@LongLink 0000644 0000000 0000000 00000000160 00000000000 011600 L ustar root root ./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/java/de/saumya/mojo/rails3/GenerateMojo.java ./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/java/de/saumya/mojo/rails3/Genera0000644 0000000 0000000 00000003006 12522366550 027571 0 ustar package de.saumya.mojo.rails3;
import java.io.IOException;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import de.saumya.mojo.ruby.gems.GemException;
import de.saumya.mojo.ruby.rails.RailsException;
import de.saumya.mojo.ruby.script.ScriptException;
/**
* goal to run a generator
*
* @goal generate
* @requiresDependencyResolution test
*/
@Deprecated
public class GenerateMojo extends AbstractRailsMojo {
/**
* arguments for the generate command
*
* @parameter default-value="${generate.args}"
*/
protected String generateArgs = null;
/**
* the name of the generator
*
* @parameter default-value="${generator}"
*/
protected String generator = null;
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
getLog().warn( "DEPRECATED: just do not use that anymore. use gem:exec or bundler:exec instead" );
// make sure the whole things run in the same process
this.jrubyFork = false;
super.execute();
}
@Override
protected void executeRails() throws MojoExecutionException,
ScriptException, IOException, GemException, RailsException {
this.railsManager.generate(this.gemsInstaller,
this.repoSession,
launchDirectory(),
this.generator,
joinArgs(this.generateArgs, this.args));
}
}
./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/resources/ 0000755 0000000 0000000 00000000000 12522366550 023507 5 ustar ./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/resources/boot.rb.orig 0000644 0000000 0000000 00000000506 12522366550 025737 0 ustar require 'rubygems'
# Set up gems listed in the Gemfile.
gemfile = File.expand_path('../../Gemfile', __FILE__)
begin
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'
Bundler.setup
rescue Bundler::GemNotFound => e
STDERR.puts e.message
STDERR.puts "Try running `bundle install`."
exit!
end if File.exist?(gemfile)
./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/src/main/resources/boot.rb 0000644 0000000 0000000 00000001425 12522366550 025001 0 ustar #patched my rail3-maven-plugin to allow custom Gemfile names
require 'rubygems'
gemfile = ''
if defined?(JRUBY_VERSION)
require 'java'
ENV['BUNDLE_GEMFILE'] ||= java.lang.System.getProperty("bundle.gemfile")
gemfile = ENV['BUNDLE_GEMFILE'].to_s
File.delete(gemfile + ".lock") if File.exist?(gemfile + ".lock")
end
# Set up gems listed in the Gemfile.
gemfile = File.expand_path('../../Gemfile', __FILE__) unless File.exist?(gemfile)
begin
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'
Bundler.setup
rescue Bundler::GemNotFound => e
STDERR.puts e.message
STDERR.puts "Try running `bundle install`." if defined?(JRUBY_VERSION) && java.lang.System.getProperty("maven.home").nil? || !defined?(JRUBY_VERSION)
exit!
end if File.exist?(gemfile) || ENV['BUNDLE_GEMFILE']
./jruby-maven-plugins-1.0.10.ds1.orig/rails3-maven-plugin/pom.xml 0000644 0000000 0000000 00000007732 12522366550 021310 0 ustar
Name | |||
---|---|---|---|
<%= user.name %> | <%= link_to 'Show', user %> | <%= link_to 'Edit', edit_user_path(user) %> | <%= link_to 'Destroy', user, :confirm => 'Are you sure?', :method => :delete %> |
<%= notice %>
Name: <%= @user.name %>
<%= link_to 'Edit', edit_user_path(@user) %> | <%= link_to 'Back', users_path %> ././@LongLink 0000644 0000000 0000000 00000000156 00000000000 011605 L ustar root root ./jruby-maven-plugins-1.0.10.ds1.orig/integration-tests/src/it/big_gemfile2pom/app/views/users/_form.html.erb ./jruby-maven-plugins-1.0.10.ds1.orig/integration-tests/src/it/big_gemfile2pom/app/views/users/_form0000644 0000000 0000000 00000000754 12522366550 030213 0 ustar <%= form_for(@user) do |f| %> <% if @user.errors.any? %>We've been notified about this issue and we'll take a look at it shortly.