Sha256: 90b326ce20f02315932e5c5e49a5ebff074cdd9aca440a027e804fffda160c73

Contents?: true

Size: 591 Bytes

Versions: 22

Compression:

Stored size: 591 Bytes

Contents

module Kuroko2
  module Workflow
    module Task
      class KurokoRunner < Execute
        def before_execute
          env = token.context['ENV'] || {}
          env.merge!('BUNDLE_GEMFILE' => Rails.root.join('Gemfile').to_s)

          token.context['ENV'] = env
        end

        def chdir
          Rails.root.to_s
        end

        def shell
          rails = Rails.root.join('bin/rails').to_s
          kuroko_script = Kuroko2::Engine.root.join("bin/#{option}.rb")
          "bundle exec #{rails} runner -e #{Rails.env} #{kuroko_script}"
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
kuroko2-0.8.0 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.7.0 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.6.0 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.5.2 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.5.1 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.5.0 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.4.6 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.4.5 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.4.4 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.4.3 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.4.2 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.4.1 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.4.0 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.3.4 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.3.3 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.3.2 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.3.1 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.3.0 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.2.3 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb
kuroko2-0.2.2 lib/autoload/kuroko2/workflow/task/kuroko_runner.rb