diff --git a/README.md b/README.md index 630e0a6..5f75f2f 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ rebase against master a couple times before your pull request can be merged. ## What does Kumade do? Before deploying, Kumade ensures the git repo is clean. After that, it packages assets using -[Jammit](http://documentcloud.github.com/jammit/) and/or -[More](https://github.com/cloudhead/more), commits them, and pushes to origin. +[Jammit](http://documentcloud.github.com/jammit/) (if it's installed), commits +them, and pushes to origin. Then it force pushes to the correct Heroku remote, runs `rake db:migrate` on the Heroku app, and then restarts the app. diff --git a/features/kumade_executable.feature b/features/kumade_executable.feature index 824db55..8d4f0d8 100644 --- a/features/kumade_executable.feature +++ b/features/kumade_executable.feature @@ -31,7 +31,6 @@ Feature: Kumade executable ==> Restarted pretend-staging ==> Deployed to: pretend-staging """ - But the output should not contain "==> Packaged with Kumade::MorePackager" Scenario: Default environment is staging When I run kumade with "-p" diff --git a/lib/kumade.rb b/lib/kumade.rb index 13c3b18..5062a8b 100644 --- a/lib/kumade.rb +++ b/lib/kumade.rb @@ -8,7 +8,6 @@ module Kumade autoload :Configuration, "kumade/configuration" autoload :Heroku, "kumade/heroku" autoload :Packager, "kumade/packager" - autoload :MorePackager, "kumade/packagers/more_packager" autoload :JammitPackager, "kumade/packagers/jammit_packager" autoload :NoopPackager, "kumade/packagers/noop_packager" autoload :PackagerList, "kumade/packager_list" diff --git a/lib/kumade/packager_list.rb b/lib/kumade/packager_list.rb index cb1bdad..365d94e 100644 --- a/lib/kumade/packager_list.rb +++ b/lib/kumade/packager_list.rb @@ -2,7 +2,7 @@ module Kumade class PackagerList include Enumerable - PACKAGERS = [MorePackager, JammitPackager] + PACKAGERS = [JammitPackager] def initialize @packagers = build_packagers_list diff --git a/lib/kumade/packagers/more_packager.rb b/lib/kumade/packagers/more_packager.rb deleted file mode 100644 index 7bf7740..0000000 --- a/lib/kumade/packagers/more_packager.rb +++ /dev/null @@ -1,20 +0,0 @@ -begin - require "less/more" -rescue LoadError -end - -module Kumade - class MorePackager - def self.assets_path - File.join("public", ::Less::More.destination_path) - end - - def self.installed? - !!defined?(Less::More) - end - - def self.package - ::Less::More.generate_all - end - end -end diff --git a/spec/kumade/packager_list_spec.rb b/spec/kumade/packager_list_spec.rb index 273741f..715a504 100644 --- a/spec/kumade/packager_list_spec.rb +++ b/spec/kumade/packager_list_spec.rb @@ -3,28 +3,12 @@ describe Kumade::PackagerList, "detecting packages", :with_mock_outputter do it "returns an array containing the Jammit packager if Jammit is installed" do Kumade::JammitPackager.stubs(:installed? => true) - Kumade::MorePackager.stubs(:installed? => false) Kumade::PackagerList.new.to_a.should == [Kumade::JammitPackager] end - it "returns an array containing the More packager if More is installed" do - Kumade::JammitPackager.stubs(:installed? => false) - Kumade::MorePackager.stubs(:installed? => true) - - Kumade::PackagerList.new.to_a.should == [Kumade::MorePackager] - end - - it "returns multiple packagers if they are installed" do - Kumade::JammitPackager.stubs(:installed? => true) - Kumade::MorePackager.stubs(:installed? => true) - - Kumade::PackagerList.new.to_a.should =~ [Kumade::JammitPackager, Kumade::MorePackager] - end - it "returns an array containing the no-op packager if no other packagers are found" do Kumade::JammitPackager.stubs(:installed? => false) - Kumade::MorePackager.stubs(:installed? => false) Kumade::PackagerList.new.to_a.should == [Kumade::NoopPackager] end diff --git a/spec/kumade/packagers/more_packager_spec.rb b/spec/kumade/packagers/more_packager_spec.rb deleted file mode 100644 index ac624d5..0000000 --- a/spec/kumade/packagers/more_packager_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -require "spec_helper" - -require "less" - -describe Kumade::MorePackager, :with_mock_outputter do - subject { Kumade::MorePackager } - - before do - define_constant "Less::More" do - def self.destination_path - "awesome_destination" - end - end - end - - it_should_behave_like "packager" - - its(:assets_path) { should == File.join('public', ::Less::More.destination_path) } - - it "knows how to package itself" do - Less::More.stubs(:generate_all) - - subject.package - - Less::More.should have_received(:generate_all).once - end - - context "when More is defined" do - before { Less::More } - it { should be_installed } - end - - context "when Less::More is not defined" do - before { Less.send(:remove_const, :More) } - it { should_not be_installed } - end -end