This file contains 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
#!/bin/sh | |
# Usage: bootstrap-jenkins.sh trusty ubuntu@some-aws-machine | |
install_puppet() { | |
wget https://apt.puppetlabs.com/puppetlabs-release-${1}.deb && \ | |
sudo dpkg -i puppetlabs-release-${1}.deb && \ | |
sudo apt-get update && \ | |
sudo apt-get install -y puppet && |
This file contains 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
task spec(type: JRubyExec) { | |
classpath configurations.rspec | |
script 'rspec' | |
} |
This file contains 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
buildscript { | |
repositories { jcenter() } | |
dependencies { | |
classpath 'com.github.jengelman.gradle.plugins:shadow:[1.2.2,2.0)' | |
classpath 'com.github.jruby-gradle:jruby-gradle-jar-plugin:[1.1.2,2.0)' | |
} | |
} | |
apply plugin: 'groovy' | |
apply plugin: 'com.github.johnrengelman.shadow' |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<metadata> | |
<groupId>com.github.jruby-gradle</groupId> | |
<artifactId>jruby-gradle-plugin</artifactId> | |
<version>0.3.0</version> | |
<versioning> | |
<latest>0.3.0</latest> | |
<release>0.3.0</release> | |
<versions> | |
<version>0.1.0</version> |
This file contains 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
➜ blick git:(master) ✗ rm -rf build; time ./gradlew -S jrubyPrepare | |
:jrubyPrepare | |
BUILD SUCCESSFUL | |
Total time: 5.223 secs | |
./gradlew -S jrubyPrepare 1.51s user 0.08s system 28% cpu 5.616 total | |
➜ blick git:(master) ✗ |
This file contains 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
# | |
# This /tmp directory was generated by some integration tests installing thor-0.19.1.gem | |
# | |
➜ groovy-gem git:(master) ✗ GEM_PATH= GEM_HOME=/tmp/geminstallerintegrationspec2599869760798060236 irb | |
geminstallerintegrationspec2599869760798060236 :001 > require 'thor/version' | |
=> true | |
geminstallerintegrationspec2599869760798060236 :002 > Thor::VERSION | |
=> "0.19.1" | |
geminstallerintegrationspec2599869760798060236 :003 > |
This file contains 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
// Load the http module to create an http server. | |
var http = require('http'); | |
// Configure our HTTP server to respond with Hello World to all requests. | |
var server = http.createServer(function (request, response) { | |
response.writeHead(200, {"Content-Type": "text/plain"}); | |
response.end("Hello World\n"); | |
}); | |
// Listen on port 8000, IP defaults to 127.0.0.1 |
This file contains 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
>> Starting mega-awesome JavaScripts | |
Doing with math in JavaScript gives us: 3.0 |
This file contains 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
➜ ~ pry | |
[1] pry(main)> require 'java' | |
=> false | |
[2] pry(main)> puts RUBY_PLATFORM; puts RUBY_VERSION | |
java | |
1.9.3 | |
=> nil | |
[3] pry(main)> java_import 'javax.script.ScriptEngineManager' | |
=> [Java::JavaxScript::ScriptEngineManager] | |
[4] pry(main)> engine = ScriptEngineManager.new.get_engine_by_name('nashorn') |
This file contains 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
buildscript { | |
repositories { jcenter() } | |
dependencies { | |
classpath 'com.github.jruby-gradle:jruby-gradle-plugin:0.4.0' | |
} | |
} | |
apply plugin: "com.github.jruby-gradle.base" | |
import com.github.jrubygradle.JRubyExec |