Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Bundler for Bookshop Projects #56

Open
blueheadpublishing opened this issue Jun 4, 2012 · 0 comments
Open

Enable Bundler for Bookshop Projects #56

blueheadpublishing opened this issue Jun 4, 2012 · 0 comments

Comments

@blueheadpublishing
Copy link

User should be able to add gem requirements to their bookshop projects by adding them in a Gemfile. This would allow a substantial leveraging of other Ruby gems to build and do cool new functionality within bookshop.

Requires:

  • Add Gemfile to config/ folder in bookshop project root
  • Add Bundler setup during boot (possibly as part of the script/bookshop file, or nested under a file required by the script/bookshop file:
    # Set up gems listed in the Gemfile.
    ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)

    require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
  • include a Gemfile within templates folder to be built during 'bookshop new project'
source 'https://rubygems.org'

<%= bookshop_gemfile_entry -%>

<%= database_gemfile_entry -%>

<%= assets_gemfile_entry %>
<%= javascript_gemfile_entry %>

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use whatever
# gem 'whatever'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant