Skip to content

Commit

Permalink
Remove compass dependency, and add auto-registration
Browse files Browse the repository at this point in the history
  • Loading branch information
mirisuzanne committed Nov 6, 2013
1 parent d7c7537 commit 3644f27
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 43 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG-NEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
1 change: 1 addition & 0 deletions lib/compass-susy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require 'susy'
16 changes: 12 additions & 4 deletions lib/susy.rb
Original file line number Diff line number Diff line change
@@ -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
9 changes: 4 additions & 5 deletions susy.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
9 changes: 4 additions & 5 deletions test/Gemfile
Original file line number Diff line number Diff line change
@@ -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 => ".."
44 changes: 16 additions & 28 deletions test/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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)
2 changes: 1 addition & 1 deletion test/config.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Compass CSS framework config file
require 'susy'
require 'true'
add_import_path '../sass'

project_type = :stand_alone
http_path = "/"
Expand Down

0 comments on commit 3644f27

Please sign in to comment.