Sha256: 4412b1a3e232c6307e87d9770b27d6c3f2a4881559cc331f8dcb3e58a6e99c6a

Contents?: true

Size: 342 Bytes

Versions: 6

Compression:

Stored size: 342 Bytes

Contents

require 'coffee-script'

# Compiles coffeescript specs on the fly
class SpecsController < ApplicationController
  def show
    spec_path = params[:id].gsub("__", "/")
    path = "../../../../../spec/mocha/#{spec_path}.js.coffee"
    coffee = File.read(File.expand_path(path, __FILE__))
    render text: CoffeeScript.compile(coffee)
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
netzke-basepack-0.8.4 test/basepack_test_app/app/controllers/specs_controller.rb
netzke-core-0.8.4 test/core_test_app/app/controllers/specs_controller.rb
netzke-basepack-0.8.3 test/basepack_test_app/app/controllers/specs_controller.rb
netzke-core-0.8.3 test/core_test_app/app/controllers/specs_controller.rb
netzke-basepack-0.8.2 test/basepack_test_app/app/controllers/specs_controller.rb
netzke-core-0.8.2 test/core_test_app/app/controllers/specs_controller.rb