Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes public root bug with Jammit 0.6.5

The way Jammit defines the public root was changed in
documentcloud/jammit@b6ff4f0
  • Loading branch information...
commit ec633102f999d05e4e2e4832540025d9c7430e8a 1 parent 81eb06c
@vesan vesan authored
View
8 lib/kumade/packagers/jammit_packager.rb
@@ -6,7 +6,7 @@
module Kumade
class JammitPackager
def self.assets_path
- File.join(Jammit::PUBLIC_ROOT, Jammit.package_path)
+ File.join(public_root, Jammit.package_path)
end
def self.installed?
@@ -16,5 +16,11 @@ def self.installed?
def self.package
Jammit.package!
end
+
+ private
+
+ def self.public_root
+ defined?(Jammit.public_root) ? Jammit.public_root : Jammit::PUBLIC_ROOT
+ end
end
end
View
3  spec/kumade/packagers/jammit_packager_spec.rb
@@ -7,7 +7,8 @@
it_should_behave_like "packager"
- its(:assets_path) { should == File.join(Jammit::PUBLIC_ROOT, Jammit.package_path) }
+ let(:jammit_public_root) { defined?(Jammit.public_root) ? Jammit.public_root : Jammit::PUBLIC_ROOT }
+ its(:assets_path) { should == File.join(jammit_public_root, Jammit.package_path) }
it "knows how to package itself" do
::Jammit.stubs(:package!)
Please sign in to comment.
Something went wrong with that request. Please try again.