[Rails] Allow compass extensions to be stored in the vendor/plugins/compass/extensions directory.

This commit is contained in:
Chris Eppstein 2009-11-18 23:44:30 -08:00
parent 0da214a987
commit 51315469d8
3 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,20 @@
Feature: Extensions
In order to have an open source ecosystem for stylesheets
As a compass user
I can install extensions that others have created
And I can create and publish my own extensions
Scenario: Extensions directory for stand_alone projects
Given I am using the existing project in test/fixtures/stylesheets/compass
And the "extensions" directory exists
And and I have a fake extension at extensions/testing
When I run: compass --list-frameworks
Then the list of frameworks includes "testing"
Scenario: Extensions directory for rails projects
Given I'm in a newly created rails project: my_rails_project
And the "my_rails_project/vendor/plugins/compass/extensions" directory exists
And and I have a fake extension at my_rails_project/vendor/plugins/compass/extensions/testing
When I run: compass --list-frameworks
Then the list of frameworks includes "testing"

View File

@ -0,0 +1,13 @@
Given /^the "([^\"]*)" directory exists$/ do |directory|
FileUtils.mkdir_p directory
end
Given /^and I have a fake extension at (.*)$/ do |directory|
FileUtils.mkdir_p File.join(directory, 'stylesheets')
FileUtils.mkdir_p File.join(directory, 'templates/project')
end
Then /^the list of frameworks includes "([^\"]*)"$/ do |framework|
@last_result.split("\n").map{|f| f.strip}.should include(framework)
end

View File

@ -27,6 +27,10 @@ module Compass
"/stylesheets" "/stylesheets"
end end
def default_extensions_dir
"vendor/plugins/compass/extensions"
end
end end
end end
end end