Browse Source

Update "top 10 ruby gems" list and conditionalize "rack" and "activesupport" now that they're 2.2.2+ only

Tianon Gravi 9 years ago
parent
commit
0de5092b5f
1 changed files with 24 additions and 7 deletions
  1. 24 7
      test/tests/ruby-gems/container.sh

+ 24 - 7
test/tests/ruby-gems/container.sh

@@ -1,18 +1,35 @@
 #!/bin/sh
 set -e
 
+# ruby 2.2.2+: rack activesupport
+# ruby 2.0+: mime-types
+# (jruby 1.7 is ruby 1.9)
+extras="$(ruby -e '
+	rubyVersion = Gem::Version.new(RUBY_VERSION)
+	puts (
+		(
+			rubyVersion >= Gem::Version.new("2.2.2") ? [
+				"rack",
+				"activesupport",
+			] : []
+		) + (
+			rubyVersion >= Gem::Version.new("2.0") ? [
+				"mime-types",
+			] : []
+		)
+	).join(" ")
+')"
+
 # list taken from https://rubygems.org/stats
 for gem in \
+	$extras \
 	rake \
-	rack \
+	multi_json \
+	bundler \
 	json \
-	activesupport \
 	thor \
-	rails \
-	activerecord \
-	actionpack \
-	actionmailer \
-	activeresource \
+	i18n \
+	builder \
 ; do
 	gem install "$gem"
 done