Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename gemfile back to bundler

  • Loading branch information...
commit 152a50a4aff32cc1c10bedd14d9ea822da4f3eef 1 parent 63e4af6
Carl Lerche authored
Showing with 59 additions and 87 deletions.
  1. +1 −1  README
  2. +6 −6 Rakefile
  3. +3 −0  bin/bundle
  4. +0 −3  bin/gemfile
  5. +0 −28 gemfile.gemspec
  6. +12 −12 lib/{gemfile.rb → bundler.rb}
  7. +6 −6 lib/{gemfile → bundler}/cli.rb
  8. +2 −2 lib/{gemfile → bundler}/definition.rb
  9. +1 −1  lib/{gemfile → bundler}/dependency.rb
  10. +1 −1  lib/{gemfile → bundler}/dsl.rb
  11. +1 −1  lib/{gemfile → bundler}/environment.rb
  12. +1 −1  lib/{gemfile → bundler}/index.rb
  13. +1 −1  lib/{gemfile → bundler}/installer.rb
  14. +1 −1  lib/{gemfile → bundler}/remote_specification.rb
  15. +1 −1  lib/{gemfile → bundler}/resolver.rb
  16. 0  lib/{gemfile → bundler}/rubygems.rb
  17. +3 −3 lib/{gemfile → bundler}/source.rb
  18. +1 −1  lib/{gemfile → bundler}/specification.rb
  19. 0  lib/{gemfile → bundler}/templates/Gemfile
  20. +1 −1  lib/{gemfile → bundler}/templates/environment.erb
  21. 0  lib/{gemfile → bundler}/vendor/thor.rb
  22. 0  lib/{gemfile → bundler}/vendor/thor/actions.rb
  23. 0  lib/{gemfile → bundler}/vendor/thor/actions/create_file.rb
  24. 0  lib/{gemfile → bundler}/vendor/thor/actions/directory.rb
  25. 0  lib/{gemfile → bundler}/vendor/thor/actions/empty_directory.rb
  26. 0  lib/{gemfile → bundler}/vendor/thor/actions/file_manipulation.rb
  27. 0  lib/{gemfile → bundler}/vendor/thor/actions/inject_into_file.rb
  28. 0  lib/{gemfile → bundler}/vendor/thor/base.rb
  29. 0  lib/{gemfile → bundler}/vendor/thor/core_ext/file_binary_read.rb
  30. 0  lib/{gemfile → bundler}/vendor/thor/core_ext/hash_with_indifferent_access.rb
  31. 0  lib/{gemfile → bundler}/vendor/thor/core_ext/ordered_hash.rb
  32. 0  lib/{gemfile → bundler}/vendor/thor/error.rb
  33. 0  lib/{gemfile → bundler}/vendor/thor/group.rb
  34. 0  lib/{gemfile → bundler}/vendor/thor/invocation.rb
  35. 0  lib/{gemfile → bundler}/vendor/thor/parser.rb
  36. 0  lib/{gemfile → bundler}/vendor/thor/parser/argument.rb
  37. 0  lib/{gemfile → bundler}/vendor/thor/parser/arguments.rb
  38. 0  lib/{gemfile → bundler}/vendor/thor/parser/option.rb
  39. 0  lib/{gemfile → bundler}/vendor/thor/parser/options.rb
  40. 0  lib/{gemfile → bundler}/vendor/thor/rake_compat.rb
  41. 0  lib/{gemfile → bundler}/vendor/thor/runner.rb
  42. 0  lib/{gemfile → bundler}/vendor/thor/shell.rb
  43. 0  lib/{gemfile → bundler}/vendor/thor/shell/basic.rb
  44. 0  lib/{gemfile → bundler}/vendor/thor/shell/color.rb
  45. 0  lib/{gemfile → bundler}/vendor/thor/task.rb
  46. 0  lib/{gemfile → bundler}/vendor/thor/util.rb
  47. 0  lib/{gemfile → bundler}/vendor/thor/version.rb
  48. +12 −12 spec/runtime/load_spec.rb
  49. +1 −1  spec/runtime/setup_spec.rb
  50. +1 −1  spec/spec_helper.rb
  51. +2 −2 spec/support/helpers.rb
  52. +1 −1  spec/support/matchers.rb
View
2  README
@@ -1,4 +1,4 @@
-gemfile is a replacement for bundler.
+This is a rewrite of bundler to offer more bundling power
It currently lacks output and good exception handling for common cases. This is coming very soon. We wanted to open this so people could take a look at it.
View
12 Rakefile
@@ -2,22 +2,22 @@ $:.unshift File.expand_path("../lib", __FILE__)
require 'rubygems'
require 'rubygems/specification'
-require 'gemfile'
+require 'bundler'
spec = Gem::Specification.new do |s|
- s.name = "gemfile"
- s.version = Gemfile::VERSION
+ s.name = "bundler"
+ s.version = Bundler::VERSION
s.authors = ["Carl Lerche", "Yehuda Katz"]
s.email = ["carlhuda@engineyard.com"]
- s.homepage = "http://github.com/carlhuda/gemfile"
- s.summary = "Gemfiles are fun"
+ s.homepage = "http://github.com/carlhuda/bundler"
+ s.summary = "Bundles are fun"
s.platform = Gem::Platform::RUBY
s.required_rubygems_version = ">= 1.3.5"
s.files = Dir.glob("{bin,lib}/**/*") + %w(LICENSE README)
- s.executables = ['gemfile']
+ s.executables = ['bundle']
s.require_path = 'lib'
end
View
3  bin/bundle
@@ -0,0 +1,3 @@
+require 'bundler/cli'
+
+Bundler::CLI.start
View
3  bin/gemfile
@@ -1,3 +0,0 @@
-require 'gemfile/cli'
-
-Gemfile::CLI.start
View
28 gemfile.gemspec
@@ -1,28 +0,0 @@
-# -*- encoding: utf-8 -*-
-
-Gem::Specification.new do |s|
- s.name = %q{gemfile}
- s.version = "0.9.0.pre"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5") if s.respond_to? :required_rubygems_version=
- s.authors = ["Carl Lerche", "Yehuda Katz"]
- s.date = %q{2010-01-25}
- s.default_executable = %q{gemfile}
- s.email = ["carlhuda@engineyard.com"]
- s.executables = ["gemfile"]
- s.files = ["bin/gemfile", "lib/gemfile", "lib/gemfile/cli.rb", "lib/gemfile/definition.rb", "lib/gemfile/dependency.rb", "lib/gemfile/dsl.rb", "lib/gemfile/environment.rb", "lib/gemfile/index.rb", "lib/gemfile/installer.rb", "lib/gemfile/remote_specification.rb", "lib/gemfile/resolver.rb", "lib/gemfile/rubygems.rb", "lib/gemfile/source.rb", "lib/gemfile/specification.rb", "lib/gemfile/templates", "lib/gemfile/templates/environment.erb", "lib/gemfile/templates/Gemfile", "lib/gemfile/vendor", "lib/gemfile/vendor/thor", "lib/gemfile/vendor/thor/actions", "lib/gemfile/vendor/thor/actions/create_file.rb", "lib/gemfile/vendor/thor/actions/directory.rb", "lib/gemfile/vendor/thor/actions/empty_directory.rb", "lib/gemfile/vendor/thor/actions/file_manipulation.rb", "lib/gemfile/vendor/thor/actions/inject_into_file.rb", "lib/gemfile/vendor/thor/actions.rb", "lib/gemfile/vendor/thor/base.rb", "lib/gemfile/vendor/thor/core_ext", "lib/gemfile/vendor/thor/core_ext/file_binary_read.rb", "lib/gemfile/vendor/thor/core_ext/hash_with_indifferent_access.rb", "lib/gemfile/vendor/thor/core_ext/ordered_hash.rb", "lib/gemfile/vendor/thor/error.rb", "lib/gemfile/vendor/thor/group.rb", "lib/gemfile/vendor/thor/invocation.rb", "lib/gemfile/vendor/thor/parser", "lib/gemfile/vendor/thor/parser/argument.rb", "lib/gemfile/vendor/thor/parser/arguments.rb", "lib/gemfile/vendor/thor/parser/option.rb", "lib/gemfile/vendor/thor/parser/options.rb", "lib/gemfile/vendor/thor/parser.rb", "lib/gemfile/vendor/thor/rake_compat.rb", "lib/gemfile/vendor/thor/runner.rb", "lib/gemfile/vendor/thor/shell", "lib/gemfile/vendor/thor/shell/basic.rb", "lib/gemfile/vendor/thor/shell/color.rb", "lib/gemfile/vendor/thor/shell.rb", "lib/gemfile/vendor/thor/task.rb", "lib/gemfile/vendor/thor/util.rb", "lib/gemfile/vendor/thor/version.rb", "lib/gemfile/vendor/thor.rb", "lib/gemfile.rb", "LICENSE", "README"]
- s.homepage = %q{http://github.com/carlhuda/gemfile}
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.5}
- s.summary = %q{Gemfiles are fun}
-
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
-
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
- else
- end
- else
- end
-end
View
24 lib/gemfile.rb → lib/bundler.rb
@@ -1,21 +1,21 @@
require 'fileutils'
require 'pathname'
require 'yaml'
-require 'gemfile/rubygems'
+require 'bundler/rubygems'
-module Gemfile
+module Bundler
VERSION = "0.9.0.pre"
- autoload :Definition, 'gemfile/definition'
- autoload :Dependency, 'gemfile/dependency'
- autoload :Dsl, 'gemfile/dsl'
- autoload :Environment, 'gemfile/environment'
- autoload :Index, 'gemfile/index'
- autoload :Installer, 'gemfile/installer'
- autoload :RemoteSpecification, 'gemfile/remote_specification'
- autoload :Resolver, 'gemfile/resolver'
- autoload :Source, 'gemfile/source'
- autoload :Specification, 'gemfile/specification'
+ autoload :Definition, 'bundler/definition'
+ autoload :Dependency, 'bundler/dependency'
+ autoload :Dsl, 'bundler/dsl'
+ autoload :Environment, 'bundler/environment'
+ autoload :Index, 'bundler/index'
+ autoload :Installer, 'bundler/installer'
+ autoload :RemoteSpecification, 'bundler/remote_specification'
+ autoload :Resolver, 'bundler/resolver'
+ autoload :Source, 'bundler/source'
+ autoload :Specification, 'bundler/specification'
class GemfileNotFound < StandardError; end
class GemNotFound < StandardError; end
View
12 lib/gemfile/cli.rb → lib/bundler/cli.rb
@@ -1,12 +1,12 @@
$:.unshift File.expand_path('../vendor', __FILE__)
require 'thor'
-require 'gemfile'
+require 'bundler'
require 'rubygems/config_file'
# Work around a RubyGems bug
Gem.configuration
-module Gemfile
+module Bundler
class CLI < Thor
def self.banner(task)
task.formatted_usage(self, false)
@@ -25,7 +25,7 @@ def init
desc "check", "Checks if the dependencies listed in Gemfile are satisfied by currently installed gems"
def check
with_rescue do
- env = Gemfile.load
+ env = Bundler.load
# Check top level dependencies
missing = env.dependencies.select { |d| env.index.search(d).empty? }
if missing.any?
@@ -44,18 +44,18 @@ def check
desc "install", "Install the current environment to the system"
def install
- Installer.install(Gemfile.root, Gemfile.definition)
+ Installer.install(Bundler.root, Bundler.definition)
end
desc "lock", "Locks a resolve"
def lock
- environment = Gemfile.load
+ environment = Bundler.load
environment.lock
end
desc "pack", "Packs all the gems to vendor/cache"
def pack
- environment = Gemfile.load
+ environment = Bundler.load
environment.pack
end
View
4 lib/gemfile/definition.rb → lib/bundler/definition.rb
@@ -1,4 +1,4 @@
-module Gemfile
+module Bundler
class Definition
def self.from_gemfile(gemfile)
gemfile = Pathname.new(gemfile).expand_path
@@ -56,7 +56,7 @@ def initialize(details)
def sources
@sources ||= @details["sources"].map do |args|
name, options = args.to_a.flatten
- Gemfile::Source.const_get(name).new(options)
+ Bundler::Source.const_get(name).new(options)
end
end
View
2  lib/gemfile/dependency.rb → lib/bundler/dependency.rb
@@ -1,6 +1,6 @@
require 'rubygems/dependency'
-module Gemfile
+module Bundler
class Dependency < Gem::Dependency
attr_accessor :source
View
2  lib/gemfile/dsl.rb → lib/bundler/dsl.rb
@@ -1,4 +1,4 @@
-module Gemfile
+module Bundler
class DslError < StandardError; end
class Dsl
View
2  lib/gemfile/environment.rb → lib/bundler/environment.rb
@@ -1,4 +1,4 @@
-module Gemfile
+module Bundler
class Environment
attr_reader :root
View
2  lib/gemfile/index.rb → lib/bundler/index.rb
@@ -1,4 +1,4 @@
-module Gemfile
+module Bundler
class Index
def self.from_installed_gems
# TODO: Why can't we memoize this? It is being mutated somewhere
View
2  lib/gemfile/installer.rb → lib/bundler/installer.rb
@@ -1,6 +1,6 @@
require 'rubygems/dependency_installer'
-module Gemfile
+module Bundler
class Installer
def self.install(root, definition)
new(root, definition).run
View
2  lib/gemfile/remote_specification.rb → lib/bundler/remote_specification.rb
@@ -1,4 +1,4 @@
-module Gemfile
+module Bundler
# Represents a lazily loaded gem specification, where the full specification
# is on the source server in rubygems' "quick" index. The proxy object is to
# be seeded with what we're given from the source's abbreviated index - the
View
2  lib/gemfile/resolver.rb → lib/bundler/resolver.rb
@@ -19,7 +19,7 @@ def required_by
end
end
-module Gemfile
+module Bundler
class Resolver
attr_reader :errors
View
0  lib/gemfile/rubygems.rb → lib/bundler/rubygems.rb
File renamed without changes
View
6 lib/gemfile/source.rb → lib/bundler/source.rb
@@ -2,7 +2,7 @@
require "rubygems/format"
require "digest/sha1"
-module Gemfile
+module Bundler
module Source
class Rubygems
attr_reader :uri, :options
@@ -131,7 +131,7 @@ def options
end
def path
- Gemfile.install_path.join("#{base_name}-#{uri_hash}-#{ref}")
+ Bundler.install_path.join("#{base_name}-#{uri_hash}-#{ref}")
end
def specs
@@ -188,7 +188,7 @@ def uri_hash
end
def cache_path
- @cache_path ||= Gemfile.cache.join("git", "#{base_name}-#{uri_hash}")
+ @cache_path ||= Bundler.cache.join("git", "#{base_name}-#{uri_hash}")
end
def cache
View
2  lib/gemfile/specification.rb → lib/bundler/specification.rb
@@ -1,4 +1,4 @@
-module Gemfile
+module Bundler
class Specification < Gem::Specification
attr_accessor :relative_loaded_from
View
0  lib/gemfile/templates/Gemfile → lib/bundler/templates/Gemfile
File renamed without changes
View
2  lib/gemfile/templates/environment.erb → lib/bundler/templates/environment.erb
@@ -1,5 +1,5 @@
# DO NOT MODIFY THIS FILE
-module Gemfile
+module Bundler
<% load_paths.each do |path| -%>
$LOAD_PATH.unshift "<%= path %>"
<% end -%>
View
0  lib/gemfile/vendor/thor.rb → lib/bundler/vendor/thor.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/actions.rb → lib/bundler/vendor/thor/actions.rb
File renamed without changes
View
0  ...emfile/vendor/thor/actions/create_file.rb → ...undler/vendor/thor/actions/create_file.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/actions/directory.rb → lib/bundler/vendor/thor/actions/directory.rb
File renamed without changes
View
0  ...le/vendor/thor/actions/empty_directory.rb → ...er/vendor/thor/actions/empty_directory.rb
File renamed without changes
View
0  .../vendor/thor/actions/file_manipulation.rb → .../vendor/thor/actions/file_manipulation.rb
File renamed without changes
View
0  ...e/vendor/thor/actions/inject_into_file.rb → ...r/vendor/thor/actions/inject_into_file.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/base.rb → lib/bundler/vendor/thor/base.rb
File renamed without changes
View
0  .../vendor/thor/core_ext/file_binary_read.rb → .../vendor/thor/core_ext/file_binary_read.rb
File renamed without changes
View
0  .../core_ext/hash_with_indifferent_access.rb → .../core_ext/hash_with_indifferent_access.rb
File renamed without changes
View
0  ...file/vendor/thor/core_ext/ordered_hash.rb → ...dler/vendor/thor/core_ext/ordered_hash.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/error.rb → lib/bundler/vendor/thor/error.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/group.rb → lib/bundler/vendor/thor/group.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/invocation.rb → lib/bundler/vendor/thor/invocation.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/parser.rb → lib/bundler/vendor/thor/parser.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/parser/argument.rb → lib/bundler/vendor/thor/parser/argument.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/parser/arguments.rb → lib/bundler/vendor/thor/parser/arguments.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/parser/option.rb → lib/bundler/vendor/thor/parser/option.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/parser/options.rb → lib/bundler/vendor/thor/parser/options.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/rake_compat.rb → lib/bundler/vendor/thor/rake_compat.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/runner.rb → lib/bundler/vendor/thor/runner.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/shell.rb → lib/bundler/vendor/thor/shell.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/shell/basic.rb → lib/bundler/vendor/thor/shell/basic.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/shell/color.rb → lib/bundler/vendor/thor/shell/color.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/task.rb → lib/bundler/vendor/thor/task.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/util.rb → lib/bundler/vendor/thor/util.rb
File renamed without changes
View
0  lib/gemfile/vendor/thor/version.rb → lib/bundler/vendor/thor/version.rb
File renamed without changes
View
24 spec/runtime/load_spec.rb
@@ -1,6 +1,6 @@
require File.expand_path('../../spec_helper', __FILE__)
-describe "Gemfile.load" do
+describe "Bundler.load" do
before :each do
in_app_root
@@ -13,7 +13,7 @@
gem "rack"
G
- env = Gemfile.load
+ env = Bundler.load
env.dependencies.should have_dep("rack", ">= 0")
end
@@ -24,20 +24,20 @@
gem "rack"
G
- env = Gemfile.load
+ env = Bundler.load
env.gems.should have_gem("rack-1.0.0")
end
it "raises an exception if the default gemfile is not found" do
lambda {
- Gemfile.load
- }.should raise_error(Gemfile::GemfileNotFound, /default/)
+ Bundler.load
+ }.should raise_error(Bundler::GemfileNotFound, /default/)
end
it "raises an exception if a specified gemfile is not found" do
lambda {
- Gemfile.load("omg.rb")
- }.should raise_error(Gemfile::GemfileNotFound, /omg\.rb/)
+ Bundler.load("omg.rb")
+ }.should raise_error(Bundler::GemfileNotFound, /omg\.rb/)
end
describe "when locked" do
@@ -60,7 +60,7 @@
gem "activerecord"
G
- lambda { Gemfile.load }.should raise_error(Gemfile::GemfileError)
+ lambda { Bundler.load }.should raise_error(Bundler::GemfileError)
end
it "raises an exception if the Gemfile removes a dependency" do
@@ -77,7 +77,7 @@
gem "rack"
G
- lambda { Gemfile.load }.should raise_error(Gemfile::GemfileError)
+ lambda { Bundler.load }.should raise_error(Bundler::GemfileError)
end
it "raises an exception if the Gemfile changes a dependency in an incompatible way" do
@@ -95,7 +95,7 @@
gem "activerecord", "2.3.1"
G
- lambda { Gemfile.load }.should raise_error(Gemfile::GemfileError)
+ lambda { Bundler.load }.should raise_error(Bundler::GemfileError)
end
it "raises an exception if the Gemfile replaces a root with a child dep of the root" do
@@ -113,7 +113,7 @@
gem "activesupport"
G
- lambda { Gemfile.load }.should raise_error(Gemfile::GemfileError)
+ lambda { Bundler.load }.should raise_error(Bundler::GemfileError)
end
it "works if the Gemfile changes in a compatible way" do
@@ -131,7 +131,7 @@
gem "activerecord", ">= 2.0.0"
G
- lambda { Gemfile.load }.should_not raise_error(Gemfile::GemfileError)
+ lambda { Bundler.load }.should_not raise_error(Bundler::GemfileError)
end
end
end
View
2  spec/runtime/setup_spec.rb
@@ -1,6 +1,6 @@
require File.expand_path('../../spec_helper', __FILE__)
-describe "Gemfile.setup" do
+describe "Bundler.setup" do
before :each do
in_app_root
View
2  spec/spec_helper.rb
@@ -3,7 +3,7 @@
require 'fileutils'
require 'rubygems'
-require 'gemfile'
+require 'bundler'
Dir["#{File.expand_path('../support', __FILE__)}/*.rb"].each do |file|
require file
View
4 spec/support/helpers.rb
@@ -28,7 +28,7 @@ def run_in_context(cmd)
end
def run(cmd)
- setup = "require 'rubygems' ; require 'gemfile' ; Gemfile.setup\n"
+ setup = "require 'rubygems' ; require 'bundler' ; Bundler.setup\n"
@out = ruby(setup + cmd)
end
@@ -37,7 +37,7 @@ def lib
end
def bbl(cmd)
- gemfile = File.expand_path('../../../bin/gemfile', __FILE__)
+ gemfile = File.expand_path('../../../bin/bundle', __FILE__)
@out = %x{#{Gem.ruby} -I#{lib} #{gemfile} #{cmd}}.strip
end
View
2  spec/support/matchers.rb
@@ -2,7 +2,7 @@ module Spec
module Matchers
def have_dep(*args)
simple_matcher "have dependency" do |given, matcher|
- dep = Gemfile::Dependency.new(*args)
+ dep = Bundler::Dependency.new(*args)
# given.length == args.length / 2
given.length == 1 && given.all? { |d| d == dep }
Please sign in to comment.
Something went wrong with that request. Please try again.