Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Change bourbon generate to bourbon install
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil LaPier committed Jan 22, 2012
1 parent bdec0a3 commit ad1499b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
12 changes: 6 additions & 6 deletions features/generate.feature → features/install.feature
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
@disable-bundler
Feature: Generate bourbon files
Feature: Install bourbon files

Scenario: Bourbon generates a new bourbon installation
When I generate bourbon files
When I install bourbon files
Then the sass directories should have been generated
And the following directories should exist:
| bourbon |
| bourbon/lib |
And the master bourbon partial should have been generated
And the lib files should have been generated
And the output should contain "Bourbon files generated to bourbon/"
And the output should contain "Bourbon files installed to bourbon/"

Scenario: Generating does not overwrite an existing bourbon directory
Given bourbon is already generated
When I generate bourbon files
Then the output should contain "Bourbon files already generated, doing nothing."
Given bourbon is already installed
When I install bourbon files
Then the output should contain "Bourbon files already installed, doing nothing."
8 changes: 4 additions & 4 deletions features/step_definitions/bourbon_steps.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Given /^bourbon is already generated$/ do
Given /^bourbon is already installed$/ do
set_up_bourbon_directory
generate_bourbon
install_bourbon
end

When /^I generate bourbon files$/ do
When /^I install bourbon files$/ do
set_up_bourbon_directory
generate_bourbon
install_bourbon
end

When /^I update bourbon files$/ do
Expand Down
4 changes: 2 additions & 2 deletions features/support/bourbon_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ def set_up_bourbon_directory
run_simple("bundle install")
end

def generate_bourbon
run_simple("bundle exec bourbon generate")
def install_bourbon
run_simple("bundle exec bourbon install")
end

def update_bourbon
Expand Down
2 changes: 1 addition & 1 deletion features/update.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Feature: Update bourbon files

Scenario: Updating updates an existing bourbon install
When I generate bourbon files
When I install bourbon files
And I write to "bourbon/_bourbon.scss" with:
"""
foobar
Expand Down
16 changes: 8 additions & 8 deletions lib/bourbon/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ def initialize(arguments)
end

def run
if @subcommand == "generate"
generate
if @subcommand == "install"
install
elsif @subcommand == "update"
update
end
Expand All @@ -17,19 +17,19 @@ def run
def update
if bourbon_files_already_exist?
remove_bourbon_directory
generate_files
install_files
puts "Bourbon files updated."
else
puts "No existing bourbon installation. Doing nothing."
end
end

def generate
def install
if bourbon_files_already_exist?
puts "Bourbon files already generated, doing nothing."
puts "Bourbon files already installed, doing nothing."
else
generate_files
puts "Bourbon files generated to bourbon/"
install_files
puts "Bourbon files installed to bourbon/"
end
end

Expand All @@ -39,7 +39,7 @@ def bourbon_files_already_exist?
Dir.exist?("bourbon")
end

def generate_files
def install_files
make_lib_directory
copy_in_sass_extensions
copy_in_scss_files
Expand Down

0 comments on commit ad1499b

Please sign in to comment.