lib/middleman/jasmine/jasmine_sprockets_proxy.rb in middleman-jasmine-0.1.1 vs lib/middleman/jasmine/jasmine_sprockets_proxy.rb in middleman-jasmine-0.2.0
- old
+ new
@@ -10,11 +10,11 @@
@@sprockets_app
end
def configure(middleman_sprockets)
Jasmine.load_configuration_from_yaml
- @@jasmine_app = Jasmine::Application.app(Jasmine.config)
+ @@jasmine_app = Jasmine::Application.app(Jasmine.config)
@@sprockets_app =
if defined?(::Sprockets::Environment)
sprockets = ::Sprockets::Environment.new
middleman_sprockets.paths.each do |path|
sprockets.append_path(path)
@@ -25,11 +25,11 @@
@@jasmine_app
end
end
end
- def initialize(path="", js_dir="")
+ def initialize(path="")
@path = path
@app =
if setup_for_spec_files?
self.class.sprockets_app
else
@@ -47,10 +47,10 @@
def setup_for_spec_files?
@path == "__spec__"
end
def serving_spec_via_sprockets?
- setup_for_spec_files? && defined?(@@sprockets_app)
+ setup_for_spec_files? && defined?(::Sprockets::Environment)
end
end
# monkey patch Rack::Jasmine::Runner to allow for paths other than /
module Rack
\ No newline at end of file