Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

allow installing edge versions of next to all dependencies

  • Loading branch information...
commit 77629891d0858a3d470a6b395c7c4136bf7d1f24 1 parent f604013
@rkh rkh authored
Showing with 54 additions and 47 deletions.
  1. +54 −47 Gemfile
View
101 Gemfile
@@ -9,60 +9,67 @@
RUBY_ENGINE = 'ruby' unless defined? RUBY_ENGINE
source :rubygems unless ENV['QUICK']
-gem 'rake'
-gem 'rack-test', '>= 0.5.6'
-gem 'ci_reporter', :group => :ci
+GH = "git://github.com/%s/%s.git"
-# Allows stuff like `tilt=1.2.2 bundle install` or `tilt=master ...`.
-# Used by the CI.
-github = "git://github.com/%s.git"
-repos = { 'tilt' => github % "rtomayko/tilt", 'rack' => github % "rack/rack" }
-%w[tilt rack].each do |lib|
- dep = (ENV[lib] || 'stable').sub "#{lib}-", ''
- dep = nil if dep == 'stable'
- dep = {:git => repos[lib], :branch => dep} if dep and dep !~ /(\d+\.)+\d+/
- gem lib, dep
+def self.ruby?(list)
+ Array(list).map(&:to_s).any? do |v|
+ v.to_s == RUBY_ENGINE or v.to_s == RUBY_VERSION
+ end
end
-gem 'haml', '>= 3.0'
-gem 'sass'
-gem 'builder'
-gem 'erubis'
-gem 'less', '~> 1.0'
-gem 'liquid' unless RUBY_ENGINE == 'maglev'
-gem 'slim'
-gem 'RedCloth' if RUBY_VERSION < "1.9.3" and not RUBY_ENGINE.start_with? 'ma'
-gem 'coffee-script', '>= 2.0' unless RUBY_ENGINE == 'maglev'
-gem 'rdoc'
-gem 'kramdown'
-gem 'maruku'
-gem 'creole'
+def self.gh(name, github_user = name, options = {})
+ github_user, options = name, github_user if Hash === github_user
-gem 'nokogiri' if RUBY_ENGINE != 'maglev'
+ return if options[:exept] and ruby? options[:exept]
+ return if options[:on] and not ruby? options[:on]
-unless RUBY_ENGINE == 'jruby' && JRUBY_VERSION < "1.6.1"
- # C extensions
- gem 'rdiscount'
- gem 'redcarpet'
+ lib = options[:lib] || name.to_s
+ dep = (ENV[lib] || ENV['dependencies'] || 'stable').sub "#{lib}-", ''
+ dep = nil if dep == 'stable'
- ## bluecloth is broken
- #gem 'bluecloth'
-end
+ if dep and dep !~ /(\d+\.)+\d+/
+ return unless github_user
+ dep = { :git => GH % [github_user, name], :branch => dep }
+ end
-if RUBY_ENGINE == 'maglev'
- gem 'json'
- gem 'markaby'
- gem 'radius'
+ group = options[:group] || name
+ if Hash === dep
+ dep[:group] = group
+ gem lib, dep
+ elsif dep
+ gem lib, dep, :group => group
+ else
+ gem lib, :group => group
+ end
end
-platforms :ruby_18, :jruby do
- gem 'json'
- gem 'markaby'
- gem 'radius'
-end
+gh :tilt, :rtomayko
+gh :rack
-platforms :mri_18 do
- # bundler platforms are broken
- next if RUBY_ENGINE != 'ruby' or RUBY_VERSION > "1.8"
- gem 'rcov'
-end
+gh :builder, :jimweirich
+gh :creole, :larsch
+gh :erubis, false
+gh :haml, :nex3
+gh :json, :flori, :on => %w[1.8.7 1.8.8 jruby maglev]
+gh :kramdown, false #:gettalong
+gh :liquid, :Shopify, :except => :maglev
+gh :markaby, :on => %w[1.8.7 1.8.8 jruby maglev]
+gh :maruku, false #:nex3
+gh :nokogiri, false #:tenderlove, :except => :maglev
+gh :radius, :jlong
+gh :rdiscount, :rtomayko
+gh :rdoc, false #:rdoc
+gh :redcarpet, :tanoku
+gh :redcloth, :jgarber, :lib => 'RedCloth', :except => %w[1.9.3 maglev macruby]
+gh :'ruby-coffee-script', :josh, :lib => 'coffee-script', :except => :maglev
+gh :sass, :nex3
+gh :slim, :stonean
+
+gem 'less', '~> 1.0', :group => :less
+
+gem 'rake'
+gem 'rack-test', '>= 0.5.6'
+gem 'ci_reporter', :group => :ci
+
+## bluecloth is broken
+#gem 'bluecloth'
Please sign in to comment.
Something went wrong with that request. Please try again.