Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 62eacd6bf5ca
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f470f460a68a
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Dec 24, 2015

  1. Copy the full SHA
    df33879 View commit details
  2. Updated gems_list.txt.

    brixen committed Dec 24, 2015
    Copy the full SHA
    f470f46 View commit details
Showing with 38 additions and 22 deletions.
  1. +2 −1 gems_list.txt
  2. +0 −21 rakelib/gems.rake
  3. +36 −0 scripts/gems.sh
3 changes: 2 additions & 1 deletion gems_list.txt
Original file line number Diff line number Diff line change
@@ -7,9 +7,10 @@ psych-2.0.10.gem
racc-1.4.14.gem
rake-10.4.2.gem
rb-readline-0.5.3.gem
rdoc-4.2.0.gem
rdoc-4.2.1.gem
redcard-1.1.0.gem
rubinius-ast-2.3.2.gem
rubinius-bridge-1.1.0.gem
rubinius-build_tools-2.0.0.gem
rubinius-compiler-2.3.1.gem
rubinius-coverage-2.0.3.gem
21 changes: 0 additions & 21 deletions rakelib/gems.rake
Original file line number Diff line number Diff line change
@@ -9,27 +9,6 @@ ensure
end

namespace :gems do
desc 'Update list of gems to install. Requires Rubinius'
task :update_list do
RedCard.verify "2.1", :rubinius

begin
ENV["BUNDLE_GEMFILE"] = "Gemfile.installed"
sh "bundle update && bundle package --no-prune"

File.open BUILD_CONFIG[:gems_list], "w" do |f|
`bundle list`.each_line do |line|
m = line.match(/\s+\*\s([^ ]+)\s\((\d+\.\d+\.\d+([^ ]*))\)/)
next unless m

f.puts "#{m[1]}-#{m[2]}.gem"
end
end
ensure
ENV.delete "BUNDLE_GEMFILE"
end
end

desc 'Install the pre-installed gems'
task :install do
clean_environment
36 changes: 36 additions & 0 deletions scripts/gems.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

function rbx_update_gems_list {
local gems_list build_list gemfile

gems_list=gems_list.txt
build_list=build_gems_list.txt

rm "$build_list"

for gemfile in Gemfile Gemfile.installed; do
export BUNDLE_GEMFILE=$gemfile

bundle update && bundle package --no-prune && bundle list >> "$build_list"
done

unset BUNDLE_GEMFILE

sort < "$build_list" | uniq | \
sed 's/^.*\*[[:space:]]*\(.*\)[[:space:]](\(.*\))$/\1-\2.gem/' | \
egrep '\.gem$' > "$gems_list"

rm "$build_list"
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
case "$1" in
"update_list")
rbx_update_gems_list
;;
*)
echo "Usage: ${0##*/} [update_list]"
exit 1
;;
esac
fi