Gemfile in wyrm-0.2.0 vs Gemfile in wyrm-0.2.1
- old
+ new
@@ -1,8 +1,27 @@
-source 'https://rubygems.org'
-# source 'file:///var/cache/rubygems'
+def from_gemrc
+ # auto-load from ~/.gemrc
+ home_gemrc = Pathname('~/.gemrc').expand_path
-gem 'sequel', ~> '4.0.0'
+ if home_gemrc.exist?
+ require 'yaml'
+ # use all the sources specified in .gemrc
+ YAML.load_file(home_gemrc)[:sources]
+ end
+end
+
+# Use the gemrc source if defined, unless CANON is set,
+# otherwise just use the default.
+def preferred_sources
+ rv = from_gemrc unless eval(ENV['CANON']||'')
+ rv ||= []
+ rv << 'http://rubygems.org' if rv.empty?
+ rv
+end
+
+preferred_sources.each{|src| source src}
+
+gem 'sequel'
gem 'fastandand'
# Specify your gem's dependencies in wyrm.gemspec
gemspec