Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: mattmanning/heroku-buildpack-ruby-jekyll
base: master
...
head fork: indirect/heroku-buildpack-middleman
compare: master
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Commits on Apr 22, 2012
@indirect indirect build using `middleman build` dbe919d
@indirect indirect update changelog, readme, license 1e4d0b9
@indirect indirect oh and rename that method. doh. 302488c
Commits on Dec 31, 2012
@indirect indirect Update base Ruby buildpack to v45
Merge remote-tracking branch 'heroku/master'

Conflicts:
	CHANGELOG.md
	README.md
ca3530f
Commits on Mar 27, 2013
@indirect indirect deprecation in readme f26b55a
Showing with 17 additions and 166 deletions.
  1. +4 −0 CHANGELOG.md
  2. +2 −1  LICENSE
  3. +2 −165 README.md
  4. +9 −0 lib/language_pack/ruby.rb
View
4 CHANGELOG.md
@@ -1,3 +1,7 @@
+## middleman v1 (2012-04-21)
+
+ * builds middleman sites for static hosting on Heroku
+
## v45 (12/14/2012)
Features:
View
3  LICENSE
@@ -1,6 +1,7 @@
MIT License:
-Copyright (C) 2012 Heroku, Inc.
+Copyright 2012 André Arko
+Portions copyright (C) 2012 Heroku, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
View
167 README.md
@@ -1,166 +1,3 @@
-Heroku buildpack: Ruby
-======================
-
-This is a [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks) for Ruby, Rack, and Rails apps. It uses [Bundler](http://gembundler.com) for dependency management.
-
-Usage
------
-
-### Ruby
-
-Example Usage:
-
- $ ls
- Gemfile Gemfile.lock
-
- $ heroku create --stack cedar --buildpack https://github.com/heroku/heroku-buildpack-ruby.git
-
- $ git push heroku master
- ...
- -----> Heroku receiving push
- -----> Fetching custom buildpack
- -----> Ruby app detected
- -----> Installing dependencies using Bundler version 1.1.rc
- Running: bundle install --without development:test --path vendor/bundle --deployment
- Fetching gem metadata from http://rubygems.org/..
- Installing rack (1.3.5)
- Using bundler (1.1.rc)
- Your bundle is complete! It was installed into ./vendor/bundle
- Cleaning up the bundler cache.
- -----> Discovering process types
- Procfile declares types -> (none)
- Default types for Ruby -> console, rake
-
-The buildpack will detect your app as Ruby if it has a `Gemfile` and `Gemfile.lock` files in the root directory. It will then proceed to run `bundle install` after setting up the appropriate environment for [ruby](http://ruby-lang.org) and [Bundler](http://gembundler.com).
-
-#### Bundler
-
-For non-windows `Gemfile.lock` files, the `--deployment` flag will be used. In the case of windows, the Gemfile.lock will be deleted and Bundler will do a full resolve so native gems are handled properly. The `vendor/bundle` directory is cached between builds to allow for faster `bundle install` times. `bundle clean` is used to ensure no stale gems are stored between builds.
-
-### Rails 2
-
-Example Usage:
-
- $ ls
- app config db doc Gemfile Gemfile.lock lib log public Rakefile README script test tmp vendor
-
- $ ls config/environment.rb
- config/environment.rb
-
- $ heroku create --stack cedar --buildpack https://github.com/heroku/heroku-buildpack-ruby.git
-
- $ git push heroku master
- ...
- -----> Heroku receiving push
- -----> Ruby/Rails app detected
- -----> Installing dependencies using Bundler version 1.1.rc
- ...
- -----> Writing config/database.yml to read from DATABASE_URL
- -----> Rails plugin injection
- Injecting rails_log_stdout
- -----> Discovering process types
- Procfile declares types -> (none)
- Default types for Ruby/Rails -> console, rake, web, worker
-
-The buildpack will detect your app as a Rails 2 app if it has a `environment.rb` file in the `config` directory.
-
-#### Rails Log STDOUT
- A [rails_log_stdout](http://github.com/ddollar/rails_log_stdout) is installed by default so Rails' logger will log to STDOUT and picked up by Heroku's [logplex](http://github.com/heroku/logplex).
-
-#### Auto Injecting Plugins
-
-Any vendored plugin can be stopped from being installed by creating the directory it's installed to in the slug. For instance, to prevent rails_log_stdout plugin from being injected, add `vendor/plugins/rails_log_stdout/.gitkeep` to your git repo.
-
-### Rails 3
-
-Example Usage:
-
- $ ls
- app config config.ru db doc Gemfile Gemfile.lock lib log Procfile public Rakefile README script tmp vendor
-
- $ ls config/application.rb
- config/application.rb
-
- $ heroku create --stack cedar --buildpack https://github.com/heroku/heroku-buildpack-ruby.git
-
- $ git push heroku master
- -----> Heroku receiving push
- -----> Ruby/Rails app detected
- -----> Installing dependencies using Bundler version 1.1.rc
- Running: bundle install --without development:test --path vendor/bundle --deployment
- ...
- -----> Writing config/database.yml to read from DATABASE_URL
- -----> Preparing app for Rails asset pipeline
- Running: rake assets:precompile
- -----> Rails plugin injection
- Injecting rails_log_stdout
- Injecting rails3_serve_static_assets
- -----> Discovering process types
- Procfile declares types -> web
- Default types for Ruby/Rails -> console, rake, worker
-
-The buildpack will detect your apps as a Rails 3 app if it has an `application.rb` file in the `config` directory.
-
-#### Assets
-
-To enable static assets being served on the dyno, [rails3_serve_static_assets](http://github.com/pedro/rails3_serve_static_assets) is installed by default. If the [execjs gem](http://github.com/sstephenson/execjs) is detected then [node.js](http://github.com/joyent/node) will be vendored. The `assets:precompile` rake task will get run if no `public/manifest.yml` is detected. See [this article](http://devcenter.heroku.com/articles/rails31_heroku_cedar) on how rails 3.1 works on cedar.
-
-Hacking
--------
-
-To use this buildpack, fork it on Github. Push up changes to your fork, then create a test app with `--buildpack <your-github-url>` and push to it.
-
-To change the vendored binaries for Bundler, [Node.js](http://github.com/joyent/node), and rails plugins, use the rake tasks provided by the `Rakefile`. You'll need an S3-enabled AWS account and a bucket to store your binaries in as well as the [vulcan](http://github.com/ddollar/vulcan) gem to build the binaries on heroku.
-
-For example, you can change the vendored version of Bundler to 1.1.rc.
-
-First you'll need to build a Heroku-compatible version of Node.js:
-
- $ export AWS_ID=xxx AWS_SECRET=yyy S3_BUCKET=zzz
- $ s3 create $S3_BUCKET
- $ rake gem:install[bundler,1.1.rc]
-
-Open `lib/language_pack/ruby.rb` in your editor, and change the following line:
-
- BUNDLER_VERSION = "1.1.rc"
-
-Open `lib/language_pack/base.rb` in your editor, and change the following line:
-
- VENDOR_URL = "https://s3.amazonaws.com/zzz"
-
-Commit and push the changes to your buildpack to your Github fork, then push your sample app to Heroku to test. You should see:
-
- -----> Installing dependencies using Bundler version 1.1.rc
-
-NOTE: You'll need to vendor the plugins, node, Bundler, and libyaml by running the rake tasks for the buildpack to work properly.
-
-Flow
-----
-
-Here's the basic flow of how the buildpack works:
-
-Ruby (Gemfile and Gemfile.lock is detected)
-
-* runs Bundler
-* installs binaries
- * installs node if the gem execjs is detected
-* runs `rake assets:precompile` if the rake task is detected
-
-Rack (config.ru is detected)
-
-* everything from Ruby
-* sets RACK_ENV=production
-
-Rails 2 (config/environment.rb is detected)
-
-* everything from Rack
-* sets RAILS_ENV=production
-* install rails 2 plugins
- * [rails_log_stdout](http://github.com/ddollar/rails_log_stdout)
-
-Rails 3 (config/application.rb is detected)
-
-* everything from Rails 2
-* install rails 3 plugins
- * [rails3_server_static_assets](https://github.com/pedro/rails3_serve_static_assets)
+# Deprecated
+Please don't use this buildpack. It's not necessary. See [middleman-heroku-static-app](https://github.com/indirect/middleman-heroku-static-app) for an example application that's ready to deploy to Heroku using the default Ruby buildpack.
View
9 lib/language_pack/ruby.rb
@@ -59,6 +59,7 @@ def compile
create_database_yml
install_binaries
run_assets_precompile_rake_task
+ generate_middleman_site
end
end
@@ -625,4 +626,12 @@ def purge_bundler_cache
# need to reinstall language pack gems
install_language_pack_gems
end
+
+ def generate_middleman_site
+ puts "Building middleman site"
+ run("env PATH=$PATH bundle exec middleman build")
+ unless $? == 0
+ error "Failed to generate site with middleman."
+ end
+ end
end

No commit comments for this range

Something went wrong with that request. Please try again.