From 84f657027ac7c21fa357f1b0cd2e6876e8679276 Mon Sep 17 00:00:00 2001 From: Sean Schofield Date: Wed, 6 May 2009 20:14:31 -0400 Subject: [PATCH] Compass now depends on the haml-edge gem instead of haml. --- Rakefile | 2 +- compass.gemspec | 8 ++++---- lib/compass.rb | 3 +-- lib/compass/commands/project_base.rb | 2 -- lib/compass/commands/watch_project.rb | 2 -- lib/compass/dependencies.rb | 3 +++ lib/compass/exec.rb | 3 +-- lib/sass_extensions.rb | 1 - test/test_helper.rb | 3 --- 9 files changed, 10 insertions(+), 17 deletions(-) create mode 100644 lib/compass/dependencies.rb diff --git a/Rakefile b/Rakefile index 06f6f455..fce387ea 100644 --- a/Rakefile +++ b/Rakefile @@ -44,7 +44,7 @@ begin p.url = "http://github.com/chriseppstein/compass" p.author = ['Chris Eppstein'] p.email = "chris@eppsteins.net" - p.dependencies = ["haml"] + p.dependencies = ["haml-edge"] p.has_rdoc = false end diff --git a/compass.gemspec b/compass.gemspec index 02c1f88f..4f8b57b3 100644 --- a/compass.gemspec +++ b/compass.gemspec @@ -23,15 +23,15 @@ Gem::Specification.new do |s| current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION s.specification_version = 2 - if current_version >= 3 then - s.add_runtime_dependency(%q, [">= 0"]) + if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then + s.add_runtime_dependency(%q, [">= 0"]) s.add_development_dependency(%q, [">= 0"]) else - s.add_dependency(%q, [">= 0"]) + s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, [">= 0"]) end else - s.add_dependency(%q, [">= 0"]) + s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, [">= 0"]) end end diff --git a/lib/compass.rb b/lib/compass.rb index 439ada22..02503443 100644 --- a/lib/compass.rb +++ b/lib/compass.rb @@ -1,5 +1,4 @@ -require 'rubygems' -require 'sass' +require File.join(File.dirname(__FILE__), 'compass', 'dependencies') def assert_sass_version(obj) unless obj.respond_to?(:version) && obj.version[:major] == 2 && obj.version[:minor] >= 1 diff --git a/lib/compass/commands/project_base.rb b/lib/compass/commands/project_base.rb index 9c66bef1..1ae4c465 100644 --- a/lib/compass/commands/project_base.rb +++ b/lib/compass/commands/project_base.rb @@ -1,5 +1,3 @@ -require 'rubygems' -require 'sass' require 'fileutils' require 'pathname' require File.join(File.dirname(__FILE__), 'base') diff --git a/lib/compass/commands/watch_project.rb b/lib/compass/commands/watch_project.rb index 6682738b..698d9be9 100644 --- a/lib/compass/commands/watch_project.rb +++ b/lib/compass/commands/watch_project.rb @@ -1,5 +1,3 @@ -require 'rubygems' -require 'sass' require 'fileutils' require 'pathname' require File.join(File.dirname(__FILE__), 'base') diff --git a/lib/compass/dependencies.rb b/lib/compass/dependencies.rb new file mode 100644 index 00000000..c1087145 --- /dev/null +++ b/lib/compass/dependencies.rb @@ -0,0 +1,3 @@ +require 'rubygems' +gem 'haml-edge','>= 2.1' +require 'sass' \ No newline at end of file diff --git a/lib/compass/exec.rb b/lib/compass/exec.rb index 1ae31d62..f954e6e6 100644 --- a/lib/compass/exec.rb +++ b/lib/compass/exec.rb @@ -1,6 +1,5 @@ +require File.join(Compass.lib_directory, 'compass', 'dependencies') require 'optparse' -require 'rubygems' -require 'haml' require File.join(Compass.lib_directory, 'compass', 'logger') require File.join(Compass.lib_directory, 'compass', 'errors') require File.join(Compass.lib_directory, 'compass', 'actions') diff --git a/lib/sass_extensions.rb b/lib/sass_extensions.rb index 0d76425c..a7d3d450 100644 --- a/lib/sass_extensions.rb +++ b/lib/sass_extensions.rb @@ -1,4 +1,3 @@ -require 'sass' require 'sass/plugin' module Sass::Script::Functions diff --git a/test/test_helper.rb b/test/test_helper.rb index fd6aeb40..2c9570f6 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -25,9 +25,6 @@ require 'rubygems' if need_gems require 'action_controller' require 'action_view' -require 'haml' -require 'sass' -require 'sass/plugin' require 'test/unit'