Browse files

Remove compass dependency, and add auto-registration

  • Loading branch information...
1 parent d7c7537 commit 3644f2729b45ebf2d64bd6ce5cbec81ad3cd1741 Eric Meyer committed Nov 5, 2013
Showing with 42 additions and 43 deletions.
  1. +2 −0 CHANGELOG-NEXT.md
  2. +2 −0 README.md
  3. +1 −0 lib/compass-susy.rb
  4. +12 −4 lib/susy.rb
  5. +4 −5 susy.gemspec
  6. +4 −5 test/Gemfile
  7. +16 −28 test/Gemfile.lock
  8. +1 −1 test/config.rb
View
2 CHANGELOG-NEXT.md
@@ -9,6 +9,8 @@ Susy Next Changelog
* Maps and natural language can even be mixed:
- `$large: (columns: 12, gutters: .5);`
- `span(3 of $large no-gutters)`
+* Only register as a compass extension if compass is present.
+ - Compass is no longer an explicit dependency.
Backwards Incompatible:
View
2 README.md
@@ -1,3 +1,5 @@
+[![Build Status](https://travis-ci.org/ericam/susy.png?branch=susy-next)](https://travis-ci.org/ericam/susy)
+
# Susy [a Compass plugin]
Susy is a semantic CSS grid system with a responsive twist.
View
1 lib/compass-susy.rb
@@ -0,0 +1 @@
+require 'susy'
View
16 lib/susy.rb
@@ -1,4 +1,12 @@
-require 'compass'
-Compass::Frameworks.register('susy',
- :stylesheets_directory => File.join(File.dirname(__FILE__), '..', 'sass'),
- :templates_directory => File.join(File.dirname(__FILE__), '..', 'templates'))
+susy_stylesheets_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'sass'))
+begin
+ require 'compass'
+ Compass::Frameworks.register('susy', :stylesheets_directory => susy_stylesheets_path)
+rescue LoadError
+ # compass not found, register on the Sass path via the environment.
+ if ENV.has_key?("SASSPATH")
+ ENV["SASSPATH"] = ENV["SASSPATH"] + File::PATH_SEPARATOR + susy_stylesheets_path
+ else
+ ENV["SASSPATH"] = susy_stylesheets_path
+ end
+end
View
9 susy.gemspec
@@ -3,7 +3,7 @@
Gem::Specification.new do |s|
# General Project Information
s.name = "susy"
- s.version = "2.0.0.alpha.4"
+ s.version = File.read(File.join(File.dirname(__FILE__), "VERSION"))
s.date = "2013-09-04"
# RubyForge Information
@@ -17,23 +17,22 @@ Gem::Specification.new do |s|
s.homepage = "http://susy.oddbird.net/"
# Project Description
- s.summary = "Responsive grids for Sass & Compass."
- s.description = "Susy is a tool for building layouts of any type with a simple shared syntax."
+ s.summary = "Responsive layout toolkit for Sass."
+ s.description = "Susy is a toolkit for building layouts of all types with a simple, natural syntax."
# Files to Include
s.require_paths = ["lib"]
s.files = Dir.glob("lib/*.*")
s.files += Dir.glob("sass/**/*.*")
s.files += Dir.glob("templates/**/*.*")
- s.files += ["CHANGELOG.mkdn", "LICENSE.txt", "README.md"]
+ s.files += ["CHANGELOG.mkdn", "LICENSE.txt", "README.md", "VERSION"]
# Docs Information
s.extra_rdoc_files = ["CHANGELOG.mkdn", "LICENSE.txt", "README.md", "lib/susy.rb"]
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Susy", "--main", "README.md"]
dependencies = {
- "compass" => "~> 0.13.alpha.7",
"sass" => "~> 3.3.0.rc.1"
}
# Project Dependencies
View
9 test/Gemfile
@@ -1,7 +1,6 @@
source "http://rubygems.org"
-gem "sass", :git => "git://github.com/nex3/sass", :branch => "master"
-gem "compass", :git => "git://github.com/chriseppstein/compass", :branch => "master"
-gem "true", :git => "git://github.com/ericam/true", :branch => "master"
-
-gem 'rb-fsevent', '~> 0.9'
+gem "sass", '~> 3.3.0.rc.1'
+gem "compass", "~> 0.13.alpha"
+gem "true", "~> 0.2.0.rc.3"
+gem "susy", :path => ".."
View
44 test/Gemfile.lock
@@ -1,34 +1,18 @@
-GIT
- remote: git://github.com/chriseppstein/compass
- revision: 0a74e91931e53fb798323cd8684198c38a2b76b8
- branch: master
+PATH
+ remote: ..
specs:
- compass (0.13.alpha.10.0a74e91)
- chunky_png (~> 1.2)
- json
- listen (~> 1.1.0)
+ susy (2.0.0.alpha.4)
sass (~> 3.3.0.rc.1)
-GIT
- remote: git://github.com/ericam/true
- revision: 052beae8319138ba3b919dd512f40970414ee908
- branch: master
- specs:
- true (0.2.0.rc.2)
- sass (~> 3.3.0.rc.1)
-
-GIT
- remote: git://github.com/nex3/sass
- revision: 4d748c295ef79a3463327ea32c24423cd1f4149d
- branch: master
- specs:
- sass (3.3.0.rc.1)
- listen (~> 1.1.0)
-
GEM
remote: http://rubygems.org/
specs:
chunky_png (1.2.9)
+ compass (0.13.alpha.10)
+ chunky_png (~> 1.2)
+ json
+ listen (~> 1.1.0)
+ sass (~> 3.3.0.rc.1)
ffi (1.9.3)
json (1.8.1)
listen (1.1.6)
@@ -40,12 +24,16 @@ GEM
ffi (>= 0.5.0)
rb-kqueue (0.2.0)
ffi (>= 0.5.0)
+ sass (3.3.0.rc.1)
+ listen (~> 1.1.0)
+ true (0.2.0.rc.3)
+ sass (~> 3.3.0.rc.1)
PLATFORMS
ruby
DEPENDENCIES
- compass!
- rb-fsevent (~> 0.9)
- sass!
- true!
+ compass (~> 0.13.alpha)
+ sass (~> 3.3.0.rc.1)
+ susy!
+ true (~> 0.2.0.rc.3)
View
2 test/config.rb
@@ -1,6 +1,6 @@
# Compass CSS framework config file
+require 'susy'
require 'true'
-add_import_path '../sass'
project_type = :stand_alone
http_path = "/"

0 comments on commit 3644f27

Please sign in to comment.