This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% view do %> | |
<% entry 'tasks', :description => 'list of tasks' do %> | |
<%= expandable_textbox :tasks %> | |
<% end %> | |
<% entry 'working directory' do %> | |
<%= textbox :directory %> | |
<% end %> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" | |
xmlns:t="/lib/hudson" xmlns:f="/lib/form" > | |
<f:entry name="tasks" description="list of tasks"> | |
<f:expandableTextbox name="tasks" value="${instance.tasks}"/> | |
</f:entry> | |
<f:entry name="working directory"> | |
<f:textbox name="directory" value="${instance.directory}"/> | |
</f:entry> | |
</j:jelly> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<plugins> | |
... | |
<plugin> | |
<groupId>org.mirah.hudson</groupId> | |
<artifactId>hudson-erb-plugin</artifactId> | |
<executions> | |
<execution> | |
<goals><goal>erb-compile</goal></goals> | |
</execution> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File | |
import org.apache.commons.io.FileUtils | |
class Foo | |
def foo | |
ext = String[1] | |
ext[0] = 'erb' | |
erb_files = FileUtils.listFiles(File.new('.'), ext, true) | |
puts erb_files.size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MirahInterpreter < CommandInterpreter | |
$Extension | |
def self.getExtension | |
@@extension ||= DescriptorImpl.new(MirahInterpreter.class) | |
end | |
$DataBoundConstructor | |
def initialize(command:String, verbose:boolean) | |
super(command) | |
@verbose = verbose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated from foo.mirah | |
package org.mirah; | |
public class Foo extends java.lang.Object { | |
@hudson.Extension() | |
private java.lang.String extension; | |
public static void main(java.lang.String[] argv) { | |
this.extension = "fooooo"; | |
public java.lang.String getExtension() { | |
return "helo"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.mirah.maven</groupId> | |
<artifactId>maven-mirah-plugin</artifactId> | |
<executions> | |
<execution> | |
<phase>validate</phase> | |
<goals><goal>compile</goal></goals> | |
</execution> | |
</executions> | |
<configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
* [Duby::Compiler::JVM] Starting main method | |
* [Duby::Compiler::JVM] Class Foo complete (201) | |
* [Duby::Compiler::JVM] Class Foo complete (203) | |
* [Duby::Compiler::JVM] Class Bar complete (72) | |
* [Duby::Compiler::JVM] Class Bar complete (74) | |
* [Duby::Compiler::JVM] Main method complete! | |
* [Duby::Compiler::JVM] Generating source files... | |
* [Duby::Compiler::JVM] Foo | |
* [Duby::Compiler::JVM] Bar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mirah | |
import hudson.* | |
import hudson.model.* | |
import hudson.tasks.* | |
import net.sf.json.JSONObject | |
import org.kohsuke.stapler.* | |
class HelloMirahBuilder < Builder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ javap -c -private -s -classpath target/classes org.mirah.HelloWorldBuilder | |
Compiled from "hello_world_builder.mirah" | |
public class org.mirah.HelloWorldBuilder extends hudson.tasks.Builder{ | |
public static final org.mirah.DescriptorImpl extension; | |
Signature: Lorg/mirah/DescriptorImpl; | |
private java.lang.String name; | |
Signature: Ljava/lang/String; | |
public static void main(java.lang.String[]); |