Skip to content

Commit

Permalink
Bourbon can now be force installed using --force
Browse files Browse the repository at this point in the history
  • Loading branch information
sikachu authored and Phil LaPier committed Nov 2, 2012
1 parent fe9443b commit 3c8c7e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions features/install.feature
Expand Up @@ -25,3 +25,9 @@ Feature: Install bourbon files
And the master bourbon partial should have been generated within "custom_path" directory
And the lib files should have been generated within "custom_path" directory
And the output should contain "Bourbon files installed to custom_path/bourbon/"

Scenario: Forcing install of bourbon
Given bourbon is already installed
When I run `bundle exec bourbon install --force`
Then the output from "bundle exec bourbon install --force" should contain "Bourbon files installed to bourbon/"
And the output should not contain "Bourbon files already installed, doing nothing."
4 changes: 2 additions & 2 deletions lib/bourbon/generator.rb
Expand Up @@ -4,9 +4,9 @@
module Bourbon
class Generator < Thor
desc 'install', 'Install Bourbon into your project'
method_options :path => :string
method_options :path => :string, :force => :boolean
def install
if bourbon_files_already_exist?
if bourbon_files_already_exist? && !options[:force]
puts "Bourbon files already installed, doing nothing."
else
install_files
Expand Down

0 comments on commit 3c8c7e4

Please sign in to comment.