From 1da7eb3586fa147c25fdf58459eaeaf8bf921930 Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Thu, 1 Apr 2010 12:03:25 -0700 Subject: Don't generate bundler.gemspec anymore --- .gitignore | 3 ++- Rakefile | 34 ++++++++++------------------------ bin/bundle | 2 ++ bundler.gemspec | 44 +++++++++++++++++++------------------------- lib/bundler.rb | 3 +-- lib/bundler/version.rb | 3 +++ 6 files changed, 37 insertions(+), 52 deletions(-) create mode 100644 lib/bundler/version.rb diff --git a/.gitignore b/.gitignore index 62521fedc6..e0e5cb7c57 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .DS_Store tmp -pkg \ No newline at end of file +pkg +*.gem \ No newline at end of file diff --git a/Rakefile b/Rakefile index a7126e626a..08f758be5b 100644 --- a/Rakefile +++ b/Rakefile @@ -5,23 +5,11 @@ require 'rubygems' require 'rubygems/specification' require 'bundler' -spec = Gem::Specification.new do |s| - s.name = "bundler" - s.version = Bundler::VERSION - s.authors = ["Carl Lerche", "Yehuda Katz", "André Arko"] - s.email = ["carlhuda@engineyard.com"] - s.homepage = "http://github.com/carlhuda/bundler" - s.summary = "Bundles are fun" - - s.platform = Gem::Platform::RUBY - - s.required_rubygems_version = ">= 1.3.6" - - s.add_development_dependency "rspec" - - s.files = Dir.glob("{bin,lib}/**/*") + %w(LICENSE README.md ROADMAP.md CHANGELOG.md) - s.executables = ['bundle'] - s.require_path = 'lib' +def gemspec + @gemspec ||= begin + file = File.expand_path('../bundler.gemspec', __FILE__) + eval(File.read(file), binding, file) + end end begin @@ -95,8 +83,8 @@ begin rescue LoadError task(:gem) { $stderr.puts '`gem install rake` to package gems' } else - Rake::GemPackageTask.new(spec) do |pkg| - pkg.gem_spec = spec + Rake::GemPackageTask.new(gemspec) do |pkg| + pkg.gem_spec = gemspec end task :gem => :gemspec end @@ -106,12 +94,10 @@ task :install => :package do sh %{gem install pkg/#{spec.name}-#{spec.version}} end -desc "create a gemspec file" +desc "validate the gemspec" task :gemspec do - File.open("#{spec.name}.gemspec", "w") do |file| - file.puts spec.to_ruby - end + gemspec.validate end task :package => :gemspec -task :default => [:spec, :gemspec] \ No newline at end of file +task :default => :spec \ No newline at end of file diff --git a/bin/bundle b/bin/bundle index 052ca6a1e1..1877540982 100644 --- a/bin/bundle +++ b/bin/bundle @@ -1,3 +1,5 @@ +#!/usr/bin/env ruby + # Check if an older version of bundler is installed require 'bundler' $:.each do |path| diff --git a/bundler.gemspec b/bundler.gemspec index c17c8b291d..cb295ee630 100644 --- a/bundler.gemspec +++ b/bundler.gemspec @@ -1,31 +1,25 @@ # -*- encoding: utf-8 -*- +lib = File.expand_path('../lib/', __FILE__) +$:.unshift lib unless $:.include?(lib) + +require 'bundler/version' Gem::Specification.new do |s| - s.name = %q{bundler} - s.version = "0.9.14" + s.name = "bundler" + s.version = Bundler::VERSION + s.platform = Gem::Platform::RUBY + s.authors = ["Carl Lerche", "Yehuda Katz", "André Arko"] + s.email = ["carlhuda@engineyard.com"] + s.homepage = "http://github.com/carlhuda/bundler" + s.summary = "The best way to manage your application's dependencies" + s.description = "Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably" - s.required_rubygems_version = Gem::Requirement.new(">= 1.3.6") if s.respond_to? :required_rubygems_version= - s.authors = ["Carl Lerche", "Yehuda Katz", "Andr\303\251 Arko"] - s.date = %q{2010-03-30} - s.default_executable = %q{bundle} - s.email = ["carlhuda@engineyard.com"] - s.executables = ["bundle"] - s.files = ["bin/bundle", "lib/bundler/cli.rb", "lib/bundler/definition.rb", "lib/bundler/dependency.rb", "lib/bundler/dsl.rb", "lib/bundler/environment.rb", "lib/bundler/index.rb", "lib/bundler/installer.rb", "lib/bundler/remote_specification.rb", "lib/bundler/resolver.rb", "lib/bundler/rubygems_ext.rb", "lib/bundler/runtime.rb", "lib/bundler/settings.rb", "lib/bundler/setup.rb", "lib/bundler/shared_helpers.rb", "lib/bundler/source.rb", "lib/bundler/spec_set.rb", "lib/bundler/specification.rb", "lib/bundler/templates/environment.erb", "lib/bundler/templates/Gemfile", "lib/bundler/ui.rb", "lib/bundler/vendor/thor/base.rb", "lib/bundler/vendor/thor/core_ext/file_binary_read.rb", "lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rb", "lib/bundler/vendor/thor/core_ext/ordered_hash.rb", "lib/bundler/vendor/thor/error.rb", "lib/bundler/vendor/thor/invocation.rb", "lib/bundler/vendor/thor/parser/argument.rb", "lib/bundler/vendor/thor/parser/arguments.rb", "lib/bundler/vendor/thor/parser/option.rb", "lib/bundler/vendor/thor/parser/options.rb", "lib/bundler/vendor/thor/parser.rb", "lib/bundler/vendor/thor/shell/basic.rb", "lib/bundler/vendor/thor/shell/color.rb", "lib/bundler/vendor/thor/shell.rb", "lib/bundler/vendor/thor/task.rb", "lib/bundler/vendor/thor/util.rb", "lib/bundler/vendor/thor/version.rb", "lib/bundler/vendor/thor.rb", "lib/bundler.rb", "LICENSE", "README.md", "ROADMAP.md", "CHANGELOG.md"] - s.homepage = %q{http://github.com/carlhuda/bundler} - s.require_paths = ["lib"] - s.rubygems_version = %q{1.3.6} - s.summary = %q{Bundles are fun} + s.required_rubygems_version = ">= 1.3.6" + s.rubyforge_project = "bundler" - if s.respond_to? :specification_version then - current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION - s.specification_version = 3 + s.add_development_dependency "rspec" - if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then - s.add_development_dependency(%q, [">= 0"]) - else - s.add_dependency(%q, [">= 0"]) - end - else - s.add_dependency(%q, [">= 0"]) - end -end + s.files = Dir.glob("{bin,lib}/**/*") + %w(LICENSE README.md ROADMAP.md CHANGELOG.md) + s.executables = ['bundle'] + s.require_path = 'lib' +end \ No newline at end of file diff --git a/lib/bundler.rb b/lib/bundler.rb index 8082d9cdf3..d3db7fb4a6 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -2,10 +2,9 @@ require 'fileutils' require 'pathname' require 'yaml' require 'bundler/rubygems_ext' - +require 'bundler/version' module Bundler - VERSION = "0.9.15.pre" ORIGINAL_ENV = ENV.to_hash autoload :Definition, 'bundler/definition' diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb new file mode 100644 index 0000000000..22ff181803 --- /dev/null +++ b/lib/bundler/version.rb @@ -0,0 +1,3 @@ +module Bundler + VERSION = "0.9.15.pre" +end \ No newline at end of file -- cgit v1.2.1