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

Version Path
dm-aggregates-1.0.0.rc2 tasks/local_gemfile.rake
dm-adjust-1.0.0.rc2 tasks/local_gemfile.rake
dm-accepts_nested_attributes-1.0.0.rc1 tasks/local_gemfile.rake
dm-is-self_referential-1.0.0.rc1 tasks/local_gemfile.rake
dm-validations-1.0.0.rc1 tasks/local_gemfile.rake
dm-types-1.0.0.rc1 tasks/local_gemfile.rake
dm-transactions-1.0.0.rc1 tasks/local_gemfile.rake
dm-timestamps-1.0.0.rc1 tasks/local_gemfile.rake
dm-tags-1.0.0.rc1 tasks/local_gemfile.rake
dm-sweatshop-1.0.0.rc1 tasks/local_gemfile.rake
dm-sqlserver-adapter-1.0.0.rc1 tasks/local_gemfile.rake
dm-sqlite-adapter-1.0.0.rc1 tasks/local_gemfile.rake
dm-serializer-1.0.0.rc1 tasks/local_gemfile.rake
dm-rails-1.0.0.rc1 tasks/local_gemfile.rake
dm-postgres-adapter-1.0.0.rc1 tasks/local_gemfile.rake
dm-oracle-adapter-1.0.0.rc1 tasks/local_gemfile.rake
dm-observer-1.0.0.rc1 tasks/local_gemfile.rake
dm-mysql-adapter-1.0.0.rc1 tasks/local_gemfile.rake
dm-migrations-1.0.0.rc1 tasks/local_gemfile.rake
dm-is-versioned-1.0.0.rc1 tasks/local_gemfile.rake