Sha256: e84fe757b1215c56347791b7d9eb7a50903912f5473497a92d2e248851b35f81
Contents?: true
Size: 612 Bytes
Versions: 131
Compression:
Stored size: 612 Bytes
Contents
desc "Support bundling from local source code (allows BUNDLE_GEMFILE=Gemfile.local bundle foo)" task :local_gemfile do |t| root = Pathname(__FILE__).dirname.parent datamapper = root.parent source_regex = /DATAMAPPER = 'git:\/\/github.com\/datamapper'/ gem_source_regex = /:git => \"#\{DATAMAPPER\}\/(.+?)(?:\.git)?\"/ root.join('Gemfile.local').open('w') do |f| root.join('Gemfile').open.each do |line| line.sub!(source_regex, "DATAMAPPER = '#{datamapper}'") line.sub!(gem_source_regex, ':path => "#{DATAMAPPER}/\1"') f.puts line end end end
Version data entries
131 entries across 130 versions & 37 rubygems