Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update to heroku-buildpack-ruby v50 #1

Merged
merged 51 commits into from

7 participants

@DouweM

No description provided.

schneems and others added some commits
@schneems schneems fix typo in comments 01f1998
@schneems schneems Merge pull request #45 from schneems/schneems/typo
fix typo in comments
9563b5a
@catsby catsby Update README.md
Use https for github urls
6157037
@hone hone Merge pull request #46 from ctshryock/master
Use https in buildpack urls
28aca4c
@hone hone ruby 2.0.0 doesn't need a build ruby accd548
@hone hone update changelog 56345f9
@hone hone update to Bundler 1.2.2 4c97ef4
@hone hone update changelog d51b081
@hone hone upgrade to bundler 1.3.0.pre.2 77d76b2
@hone hone update changelog 9d9da01
@hone hone update the buildpack version :( 81835ba
@hone hone update changelog 8fecbd8
@hone hone bump version to v44 b075d5d
@hone hone enable invoke dynamic on JRuby by default
@headius told me that the only known issues are when jruby is being
called directly from java and in a container. Seeing we aren't doing
that, we can enable this.
753588a
@hone hone remove setting config vars in release 23b0646
@hone hone bump to v45 8e2d331
@hone hone update changelog 686be88
@hone hone override $GEM_PATH in .profile.d/ruby.sh
we need to be able to change $PATH and $GEM_PATH to be able to let users
change rubies seamlessly on the same app.
05a579b
@hone hone update changelog f659a40
@hone hone install bundler binstubs into a different dir
This fixes #52.
fd81270
@hone hone symlink bundler binstubs in bin/ for backwards compatability
will not override bins that already exist here since they be put there
by the user
7832dbc
@hone hone rbx2 doesn't need a build ruby f8b18c8
@hone hone ruby naming scheme doesn't start with ruby engine e9c0f1c
@hone hone bump to v46 1749a0f
@wuputah wuputah Rails3.use?: use String#include? instead of =~
closes #53
26dfef8
@hone hone fix building ruby-build rubies b2cd9df
@hone hone update to bundler 1.3.0.pre.5 5dbf4c0
@hone hone update changelog 9e82cda
@cjolly cjolly print warning when removing windows generated Gemfile.lock 29a896d
@hone hone bump to v47 dfffb48
@hone hone display the ruby version change to the user ba1f811
@hone hone update changelog 924df79
@hone hone Merge pull request #62 from cjolly/cjolly-log-windows-gemfile-lock-re…
…moval

print warning when removing Gemfile.lock generated on windows
0422bc8
@hone hone Merge pull request #54 from heroku/rails3-detect-file-encoding
Rails3.use?: use String#include? instead of =~
8137a21
@hone hone temporarily disable deploys due to rubygems.org compromise 066d4a1
@hone hone Merge branch 'disable_deploy'
Conflicts:
	CHANGELOG.md
4c8d376
@hone hone update error message to link to status 4531e5a
@hone hone update copy d9c61d4
@hone hone update changelog 5bbfb24
@hone hone v48 58ce8b8
@hone hone use bundle install local e69301b
@hone hone add error messaging when can't deploy due to gems not being in the cache dfd66de
@hone hone need ruby_version_cache to exist before reading it c46e0f9
@hone hone update the changelog 3bcd325
@hone hone v49 0616ff6
@hone hone Revert "use bundle install local"
This reverts commit e69301b.
56bf7ef
@hone hone Revert "add error messaging when can't deploy due to gems not being i…
…n the cache"

This reverts commit dfd66de.
cc81c84
@hone hone update changelog d837af2
@hone hone v50 5240491
@hone hone remove DisableDeploys from the detect list 32a84d8
@DouweM DouweM Merge branch 'master' of git://github.com/heroku/heroku-buildpack-rub…
…y into update
0a0798e
@ndbroadbent
Owner

Great, thanks!

@ndbroadbent ndbroadbent merged commit ed1db34 into ndbroadbent:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 29, 2012
  1. @schneems

    fix typo in comments

    schneems authored
  2. @schneems

    Merge pull request #45 from schneems/schneems/typo

    schneems authored
    fix typo in comments
Commits on Nov 1, 2012
  1. @catsby

    Update README.md

    catsby authored
    Use https for github urls
  2. @hone

    Merge pull request #46 from ctshryock/master

    hone authored
    Use https in buildpack urls
  3. @hone
  4. @hone

    update changelog

    hone authored
Commits on Nov 26, 2012
  1. @hone

    update to Bundler 1.2.2

    hone authored
  2. @hone

    update changelog

    hone authored
Commits on Dec 10, 2012
  1. @hone

    upgrade to bundler 1.3.0.pre.2

    hone authored
Commits on Dec 13, 2012
  1. @hone

    update changelog

    hone authored
Commits on Dec 14, 2012
  1. @hone

    update the buildpack version :(

    hone authored
  2. @hone

    update changelog

    hone authored
Commits on Dec 15, 2012
  1. @hone

    bump version to v44

    hone authored
  2. @hone

    enable invoke dynamic on JRuby by default

    hone authored
    @headius told me that the only known issues are when jruby is being
    called directly from java and in a container. Seeing we aren't doing
    that, we can enable this.
  3. @hone
  4. @hone

    bump to v45

    hone authored
  5. @hone

    update changelog

    hone authored
  6. @hone

    override $GEM_PATH in .profile.d/ruby.sh

    hone authored
    we need to be able to change $PATH and $GEM_PATH to be able to let users
    change rubies seamlessly on the same app.
  7. @hone

    update changelog

    hone authored
Commits on Dec 18, 2012
  1. @hone

    install bundler binstubs into a different dir

    hone authored
    This fixes #52.
  2. @hone

    symlink bundler binstubs in bin/ for backwards compatability

    hone authored
    will not override bins that already exist here since they be put there
    by the user
  3. @hone

    rbx2 doesn't need a build ruby

    hone authored
  4. @hone
  5. @hone

    bump to v46

    hone authored
  6. @wuputah
Commits on Dec 19, 2012
  1. @hone

    fix building ruby-build rubies

    hone authored
Commits on Jan 10, 2013
  1. @hone

    update to bundler 1.3.0.pre.5

    hone authored
  2. @hone

    update changelog

    hone authored
Commits on Jan 16, 2013
  1. @cjolly
Commits on Jan 18, 2013
  1. @hone

    bump to v47

    hone authored
  2. @hone
  3. @hone

    update changelog

    hone authored
Commits on Jan 22, 2013
  1. @hone

    Merge pull request #62 from cjolly/cjolly-log-windows-gemfile-lock-re…

    hone authored
    …moval
    
    print warning when removing Gemfile.lock generated on windows
  2. @hone

    Merge pull request #54 from heroku/rails3-detect-file-encoding

    hone authored
    Rails3.use?: use String#include? instead of =~
Commits on Jan 30, 2013
  1. @hone
  2. @hone

    Merge branch 'disable_deploy'

    hone authored
    Conflicts:
    	CHANGELOG.md
  3. @hone
  4. @hone

    update copy

    hone authored
  5. @hone

    update changelog

    hone authored
  6. @hone

    v48

    hone authored
  7. @hone

    use bundle install local

    hone authored
  8. @hone
  9. @hone
  10. @hone

    update the changelog

    hone authored
  11. @hone

    v49

    hone authored
Commits on Jan 31, 2013
  1. @hone

    Revert "use bundle install local"

    hone authored
    This reverts commit e69301b.
  2. @hone

    Revert "add error messaging when can't deploy due to gems not being i…

    hone authored
    …n the cache"
    
    This reverts commit dfd66de.
  3. @hone

    update changelog

    hone authored
  4. @hone

    v50

    hone authored
  5. @hone
Commits on Feb 5, 2013
  1. @DouweM
This page is out of date. Refresh to see the latest.
View
62 CHANGELOG.md
@@ -1,3 +1,65 @@
+## v50
+
+Features:
+
+* Restore ruby deploys back to normal
+
+## v49 (1/30/2013)
+
+Features:
+
+* Re-enable ruby deploys for apps just using the heroku cache
+* Display ruby version change when busting the cache
+
+## v48 (1/30/2013)
+
+Features:
+
+* Update deploy error message copy to link to status incident.
+
+## v47 (1/30/2013)
+
+Features:
+
+* Disable ruby deploys due to rubygems.org compromise
+
+## v46 (1/10/2013)
+
+Features:
+
+* Upgrade Bundler to 1.3.0.pre.5
+* bundler binstubs now go in vendor/bundle/bin
+
+## v45 (12/14/2012)
+
+Features:
+
+* Stop setting env vars in bin/release now that login-shell is released
+* Enable Invoke Dynamic on JRuby by default
+* GEM_PATH is now updated on each push
+
+## v44 (12/14/2012)
+
+Faulty Release
+
+## v43 (12/13/2012)
+
+Features:
+
+* Upgrade Bundler to 1.3.0.pre.2
+
+## v42 (11/26/2012)
+
+Features:
+
+* Upgrade Bundler to 1.2.2 to fix Ruby 2.0.0/YAML issues
+
+## v41 (11/1/2012)
+
+Features:
+
+* Enable ruby 2.0.0 support for testing
+
## v40 (10/14/2012)
Features:
View
6 README.md
@@ -13,7 +13,7 @@ Example Usage:
$ ls
Gemfile Gemfile.lock
- $ heroku create --stack cedar --buildpack http://github.com/heroku/heroku-buildpack-ruby.git
+ $ heroku create --stack cedar --buildpack https://github.com/heroku/heroku-buildpack-ruby.git
$ git push heroku master
...
@@ -47,7 +47,7 @@ Example Usage:
$ ls config/environment.rb
config/environment.rb
- $ heroku create --stack cedar --buildpack http://github.com/heroku/heroku-buildpack-ruby.git
+ $ heroku create --stack cedar --buildpack https://github.com/heroku/heroku-buildpack-ruby.git
$ git push heroku master
...
@@ -81,7 +81,7 @@ Example Usage:
$ ls config/application.rb
config/application.rb
- $ heroku create --stack cedar --buildpack http://github.com/heroku/heroku-buildpack-ruby.git
+ $ heroku create --stack cedar --buildpack https://github.com/heroku/heroku-buildpack-ruby.git
$ git push heroku master
-----> Heroku receiving push
View
5 Rakefile
@@ -54,6 +54,7 @@ def install_gem(gem, version)
end
def build_ruby_command(name, output, prefix, usr_dir, tmpdir, rubygems = nil)
+ vulcan_prefix = "/app/vendor/#{output}"
build_command = [
# need to move libyaml/libffi to dirs we can see
"mv #{usr_dir} /tmp",
@@ -65,7 +66,7 @@ def build_ruby_command(name, output, prefix, usr_dir, tmpdir, rubygems = nil)
build_command << "mv #{prefix} /app/vendor/#{output}" if prefix != "/app/vendor/#{output}"
build_command = build_command.join(" && ")
- sh "vulcan build -v -o #{output}.tgz --prefix #{prefix} --source #{name} --command=\"#{build_command}\""
+ sh "vulcan build -v -o #{output}.tgz --prefix #{vulcan_prefix} --source #{name} --command=\"#{build_command}\""
s3_upload(tmpdir, output)
end
@@ -178,7 +179,7 @@ task "ruby:install", :version do |t, args|
# build ruby
if major_ruby == "1.8"
output = "ruby-build-#{version}"
- prefix = "/app/vendor/ruby-build-#{version}"
+ prefix = "/tmp/ruby-#{version}"
build_ruby_command(full_name, output, prefix, usr_dir, tmpdir, rubygems)
end
end
View
2  lib/language_pack.rb
@@ -22,4 +22,4 @@ def self.detect(*args)
require "language_pack/rack"
require "language_pack/rails2"
require "language_pack/rails3"
-
+require "language_pack/disable_deploys"
View
3  lib/language_pack/base.rb
@@ -62,7 +62,6 @@ def release
{
"addons" => default_addons,
- "config_vars" => default_config_vars,
"default_process_types" => default_process_types
}.to_yaml
end
@@ -153,7 +152,7 @@ def run_stdout(command)
%x{ #{command} 2>/dev/null }
end
- # run a shell command and stream the ouput
+ # run a shell command and stream the output
# @param [String] command to be run
def pipe(command)
output = ""
View
17 lib/language_pack/disable_deploys.rb
@@ -0,0 +1,17 @@
+require "language_pack"
+require "language_pack/base"
+
+class LanguagePack::DisableDeploys < LanguagePack::Base
+ def self.use?
+ File.exist?("Gemfile")
+ end
+
+ def name
+ "Ruby/DisableDeploys"
+ end
+
+ def compile
+ error "Ruby deploys have been temporarily disabled due to a Rubygems.org security breach.\nPlease see https://status.heroku.com/incidents/489 for more info and a workaround if you need to deploy."
+ end
+end
+
View
2  lib/language_pack/rails3.rb
@@ -8,7 +8,7 @@ class LanguagePack::Rails3 < LanguagePack::Rails2
def self.use?
super &&
File.exists?("config/application.rb") &&
- File.read("config/application.rb") =~ /Rails::Application/
+ File.read("config/application.rb").include?("Rails::Application")
end
def name
View
29 lib/language_pack/ruby.rb
@@ -5,10 +5,10 @@
# base Ruby Language Pack. This is for any base ruby app.
class LanguagePack::Ruby < LanguagePack::Base
- BUILDPACK_VERSION = "v40"
+ BUILDPACK_VERSION = "v50"
LIBYAML_VERSION = "0.1.4"
LIBYAML_PATH = "libyaml-#{LIBYAML_VERSION}"
- BUNDLER_VERSION = "1.2.1"
+ BUNDLER_VERSION = "1.3.0.pre.5"
BUNDLER_GEM_PATH = "bundler-#{BUNDLER_VERSION}"
NODE_VERSION = "0.4.7"
NODE_JS_BINARY_PATH = "node-#{NODE_VERSION}"
@@ -141,7 +141,7 @@ def bootstrap_bundler(&block)
# determine if we're using rbx
# @return [Boolean] true if we are and false if we aren't
def ruby_version_rbx?
- ruby_version ? ruby_version.match(/^rbx-/) : false
+ ruby_version ? ruby_version.match(/rbx-/) : false
end
# determine if we're using jruby
@@ -159,7 +159,7 @@ def default_java_opts
# default JRUBY_OPTS
# return [String] string of JRUBY_OPTS
def default_jruby_opts
- "-Xcompile.invokedynamic=false"
+ "-Xcompile.invokedynamic=true"
end
# list the available valid ruby versions
@@ -191,7 +191,7 @@ def setup_language_pack_environment
# sets up the profile.d script for this buildpack
def setup_profiled
- set_env_default "GEM_PATH", "$HOME/#{slug_vendor_base}"
+ set_env_override "GEM_PATH", "$HOME/#{slug_vendor_base}:$GEM_PATH"
set_env_default "LANG", "en_US.UTF-8"
set_env_override "PATH", "$HOME/bin:$HOME/#{slug_vendor_base}/bin:$PATH"
@@ -204,7 +204,7 @@ def setup_profiled
# determines if a build ruby is required
# @return [Boolean] true if a build ruby is required
def build_ruby?
- @build_ruby ||= !ruby_version_jruby? && ruby_version != "ruby-1.9.3"
+ @build_ruby ||= !ruby_version_rbx? && !ruby_version_jruby? && !%w{ruby-1.9.3 ruby-2.0.0}.include?(ruby_version)
end
# install the vendored ruby
@@ -362,13 +362,17 @@ def remove_vendor_bundle
def build_bundler
log("bundle") do
bundle_without = ENV["BUNDLE_WITHOUT"] || "development:test"
- bundle_command = "bundle install --without #{bundle_without} --path vendor/bundle --binstubs bin/"
+ bundle_command = "bundle install --without #{bundle_without} --path vendor/bundle --binstubs vendor/bundle/bin"
unless File.exist?("Gemfile.lock")
error "Gemfile.lock is required. Please run \"bundle install\" locally\nand commit your Gemfile.lock."
end
if has_windows_gemfile_lock?
+ topic "WARNING: Removing `Gemfile.lock` because it was generated on Windows."
+ puts "Bundler will do a full resolve so native gems are handled properly."
+ puts "This may result in unexpected gem versions being used in your app."
+
log("bundle", "has_windows_gemfile_lock")
File.unlink("Gemfile.lock")
else
@@ -408,6 +412,13 @@ def build_bundler
# Keep gem cache out of the slug
FileUtils.rm_rf("#{slug_vendor_base}/cache")
+
+ # symlink binstubs
+ bin_dir = "bin"
+ FileUtils.mkdir_p bin_dir
+ Dir["#{slug_vendor_base}/bin/*"].each do |bin|
+ run("ln -s ../#{bin} #{bin_dir}") unless File.exist?("#{bin_dir}/#{bin}")
+ end
else
log "bundle", :status => "failure"
error_message = "Failed to install gems via Bundler."
@@ -597,8 +608,10 @@ def load_bundler_cache
elsif !File.exists?(buildpack_version_cache) && File.exists?(ruby_version_cache)
puts "Broken cache detected. Purging build cache."
purge_bundler_cache
- elsif cache_exists?(bundler_cache) && !(File.exists?(ruby_version_cache) && full_ruby_version == File.read(ruby_version_cache).chomp)
+ elsif cache_exists?(bundler_cache) && File.exists?(ruby_version_cache) && full_ruby_version != File.read(ruby_version_cache).chomp
puts "Ruby version change detected. Clearing bundler cache."
+ puts "Old: #{File.read(ruby_version_cache).chomp}"
+ puts "New: #{full_ruby_version}"
purge_bundler_cache
end
Something went wrong with that request. Please try again.