Skip to content

Commit

Permalink
#34 add bootstrap-sass gem
Browse files Browse the repository at this point in the history
  • Loading branch information
Onur Özgür ÖZKAN committed May 17, 2013
1 parent 97c83ba commit cff434e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

NOTE: Don't use this gem until v1.0.0

This is yet an other Rails Template which inspired from [suspenders](https://github.com/thoughtbot/suspenders).

**Cybele** pron.: /ˈsɪbɨliː/ was an originally Anatolian mother goddess. Little is known of her oldest Anatolian cults,
other than her association with mountains, hawks and lions. She may have been Phrygia's State deity; her Phrygian cult
was adopted and adapted by Greek colonists of Asia Minor, and spread from there to mainland Greece and its more distant
Expand Down Expand Up @@ -52,9 +50,7 @@ Once you've made your great commits:
## Credits

Cybele is maintained and funded by [lab2023 - internet technologies](http://lab2023.com/)

Thank you to all the [contributors!](https://github.com/lab2023/cybele/graphs/contributors)

The names and logos for lab2023 are trademarks of lab2023, inc.

## License
Expand Down
25 changes: 25 additions & 0 deletions lib/cybele/app_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,31 @@ def setup_gitignore_folders
end
end

# Internal: Setup asset precompile
# Look for information https://github.com/thomas-mcdonald/bootstrap-sass#rails-4
def setup_asset_precompile

config = <<-RUBY
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif)
RUBY

inject_into_file 'config/application.rb', config, :after => '# config.i18n.default_locale = :de'
end

def setup_application_js
config = <<-RUBY
//= require bootstrap
RUBY

inject_into_file 'app/assets/javascripts/application.js', config, :after => '//= require turbolinks'

end

# Internal: Leftovers
def leftovers
end
Expand Down
7 changes: 7 additions & 0 deletions lib/cybele/generators/app_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def customization
invoke :replace_files
invoke :install_gems
invoke :gitignore_files_and_folders
invoke :setup_bootstrap
end

# Internal: Customize gemfile
Expand Down Expand Up @@ -77,6 +78,12 @@ def gitignore_files_and_folders
build :setup_gitignore_folders
end

# Internal: Setup up bootstrap
def setup_bootstrap
build :setup_asset_precompile
build :setup_application_js
end


# Internal: Let's not: We'll bundle manually at the right spot.
def run_bundle
Expand Down
1 change: 1 addition & 0 deletions templates/cybele_Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ gem 'jquery-rails'
gem 'turbolinks'
gem 'haml', '~> 4.0.2'
gem 'haml-rails', '~> 0.4'
gem 'bootstrap-sass', '~> 2.3.1.0'
gem 'responders'

group :doc do
Expand Down

0 comments on commit cff434e

Please sign in to comment.