Skip to content

Instantly share code, notes, and snippets.

@ralph-tice
Forked from matschaffer/Jarfile
Created May 20, 2013 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ralph-tice/5612386 to your computer and use it in GitHub Desktop.
Save ralph-tice/5612386 to your computer and use it in GitHub Desktop.
#!/usr/bin/env jruby
require 'rubygems'
require 'jbundler'
require 'java'
java_import com.netflix.hystrix.HystrixCommand
java_import com.netflix.hystrix.HystrixCommandGroupKey
class TestCommand < HystrixCommand
def initialize(name)
super(HystrixCommandGroupKey::Factory.asKey("ExampleGroup"))
@name = name
end
def run
"Hello #{@name}!"
end
end
puts TestCommand.new("mat").execute
exit(0)
jar 'com.netflix.hystrix:hystrix-core', '~>1.2.16'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment