Sha256: 21f26cb7cf4df01d817a53e971d57807230ce59866257d3b4f2676e963e62355

Contents?: true

Size: 700 Bytes

Versions: 7

Compression:

Stored size: 700 Bytes

Contents

# -*- encoding : utf-8 -*-
=begin

    class Shellbox
      def run(cmd)
        Dir.chdir( Rails.root + '/public_scripts')
        IO.popen("/usr/bin/env PATH='.' /bin/bash --restricted", "w+") do |p|
          p.puts cmd
          p.close_write
          p.read
        end
      end
    end


    view :core, :type=>'script' do |args|
      command = process_content_object( card.content )
      begin
        if Wagn.config.enable_server_cards
          Shellbox.new.run( command )
        else
          'sorry, server cards are not enabled' #ENGLISH
        end
      rescue Exception=>e
        e.message
      end
    end

    view( :editor, {:type=>'plain_text'},  {:type=>'script'} )

=end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wagn-1.12.13 mods/standard/sets/type/ruby_and_script.rb
wagn-1.12.12 mods/standard/sets/type/ruby_and_script.rb
wagn-1.12.11 mods/standard/sets/type/ruby_and_script.rb
wagn-1.12.10 mods/standard/sets/type/ruby_and_script.rb
wagn-1.12.9 mods/standard/sets/type/ruby_and_script.rb
wagn-1.12.8 mods/standard/sets/type/ruby_and_script.rb
wagn-1.12.7 mods/standard/sets/type/ruby_and_script.rb