Permalink
Browse files

Added support for sh runtime.

  • Loading branch information...
1 parent 2e1288a commit f9a78578b8bc639ec2d29cf2258fb440d5d40fde @treeder treeder committed Apr 4, 2012
Showing with 22 additions and 2 deletions.
  1. +2 −0 lib/iron_worker_ng.rb
  2. +2 −2 lib/iron_worker_ng/code/base.rb
  3. +18 −0 lib/iron_worker_ng/code/sh.rb
@@ -2,6 +2,8 @@
require_relative 'iron_worker_ng/logger'
require_relative 'iron_worker_ng/client'
require_relative 'iron_worker_ng/code/base'
+require_relative 'iron_worker_ng/code/sh'
require_relative 'iron_worker_ng/code/ruby'
require_relative 'iron_worker_ng/code/java'
require_relative 'iron_worker_ng/code/node'
+
@@ -8,7 +8,7 @@
module IronWorkerNG
module Code
class Base
- attr_reader :name
+ attr_accessor :name
attr_reader :features
@@registered_types = []
@@ -82,7 +82,7 @@ def create_zip
zip_name
end
- def create_runner(zip)
+ def create_runner(zip, init_code)
end
def runtime
@@ -0,0 +1,18 @@
+module IronWorkerNG
+ module Code
+ class Sh < IronWorkerNG::Code::Base
+
+ attr_accessor :file_name
+
+ def runtime
+ 'sh'
+ end
+
+ def runner
+ file_name
+ end
+ end
+ end
+end
+
+IronWorkerNG::Code::Base.register_type(:name => 'sh', :klass => IronWorkerNG::Code::Sh)

0 comments on commit f9a7857

Please sign in to comment.