From 43aa620c813d18a7f44e72a6d013e5a051e8638c Mon Sep 17 00:00:00 2001 From: Kyle Fiedler Date: Mon, 9 Jun 2014 11:57:57 -0400 Subject: [PATCH] Add bitters during setup --- Gemfile.lock | 13 +++++++++++-- README.md | 1 + lib/suspenders/app_builder.rb | 4 ++++ lib/suspenders/generators/app_generator.rb | 6 ++++++ suspenders.gemspec | 1 + templates/application.css.scss | 6 ++---- 6 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 560d856ce..d63f8b5a1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,6 +2,7 @@ PATH remote: . specs: suspenders (1.13.0) + bitters bundler (~> 1.3) rails (~> 4.1.0) @@ -39,6 +40,13 @@ GEM childprocess (>= 0.3.6) cucumber (>= 1.1.1) rspec-expectations (>= 2.7.0) + bitters (0.10.0) + bourbon (>= 3.2) + sass (>= 3.2) + thor + bourbon (4.0.2) + sass (~> 3.3) + thor builder (3.1.4) capybara (2.2.0) mime-types (>= 1.16) @@ -77,7 +85,7 @@ GEM mini_portile (~> 0.5.0) nokogiri (1.6.1-x86-mingw32) mini_portile (~> 0.5.0) - polyglot (0.3.4) + polyglot (0.3.5) rack (1.5.2) rack-test (0.6.2) rack (>= 1.0) @@ -105,6 +113,7 @@ GEM rspec-expectations (2.14.0) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.14.4) + sass (3.3.8) sprockets (2.12.1) hike (~> 1.2) multi_json (~> 1.0) @@ -120,7 +129,7 @@ GEM treetop (1.4.15) polyglot polyglot (>= 0.3.1) - tzinfo (1.2.0) + tzinfo (1.2.1) thread_safe (~> 0.1) xpath (2.0.0) nokogiri (~> 1.3) diff --git a/README.md b/README.md index 23e492e1a..efefbf93b 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ It includes application gems like: * [Airbrake](https://github.com/airbrake/airbrake) for exception notification * [Bourbon](https://github.com/thoughtbot/bourbon) for Sass mixins +* [Bitters](https://github.com/thoughtbot/bitters) for scaffold application styles * [Delayed Job](https://github.com/collectiveidea/delayed_job) for background processing * [Email Validator](https://github.com/balexand/email_validator) for email diff --git a/lib/suspenders/app_builder.rb b/lib/suspenders/app_builder.rb index b95c9f995..d2f869e1a 100644 --- a/lib/suspenders/app_builder.rb +++ b/lib/suspenders/app_builder.rb @@ -247,6 +247,10 @@ def setup_stylesheets 'app/assets/stylesheets/application.css.scss' end + def install_bitters + run "bitters install --path app/assets/stylesheets" + end + def gitignore_files remove_file '.gitignore' copy_file 'suspenders_gitignore', '.gitignore' diff --git a/lib/suspenders/generators/app_generator.rb b/lib/suspenders/generators/app_generator.rb index cf82b9602..85a655011 100644 --- a/lib/suspenders/generators/app_generator.rb +++ b/lib/suspenders/generators/app_generator.rb @@ -31,6 +31,7 @@ def suspenders_customization invoke :setup_coffeescript invoke :configure_app invoke :setup_stylesheets + invoke :install_bitters invoke :copy_miscellaneous_files invoke :customize_error_pages invoke :remove_routes_comment_lines @@ -134,6 +135,11 @@ def setup_stylesheets build :setup_stylesheets end + def install_bitters + say 'Install Bitters' + build :install_bitters + end + def setup_git if !options[:skip_git] say 'Initializing git' diff --git a/suspenders.gemspec b/suspenders.gemspec index f52eb9ba5..ae70b6d90 100644 --- a/suspenders.gemspec +++ b/suspenders.gemspec @@ -7,6 +7,7 @@ Gem::Specification.new do |s| s.required_ruby_version = Suspenders::RUBY_VERSION s.add_dependency 'bundler', '~> 1.3' s.add_dependency 'rails', '~> 4.1.0' + s.add_dependency 'bitters' s.add_development_dependency 'aruba', '~> 0.5.2' s.add_development_dependency 'cucumber', '~> 1.2' s.authors = ['thoughtbot'] diff --git a/templates/application.css.scss b/templates/application.css.scss index a7c04e006..2e068588e 100644 --- a/templates/application.css.scss +++ b/templates/application.css.scss @@ -1,8 +1,6 @@ @charset 'utf-8'; -/////////////////////////////////////////////////////////////////////////////// - @import 'bourbon'; +@import 'base/grid-settings'; @import 'neat'; - -/////////////////////////////////////////////////////////////////////////////// +@import 'base/base';