Commit Graph

53 Commits

Author SHA1 Message Date
Chris Eppstein
4cc569586b Restructure the existing command line code to allow for the new sub-command based CLI. 2009-09-29 18:35:24 -07:00
Chris Eppstein
e744c1e0db Convert the compass core framework to css-style property syntax. 2009-09-28 21:52:49 -07:00
Chris Eppstein
b13fd43a2e Require relative to the load path instead of using the more convoluted approach of File.join(File.dirname(__FILE__), ...).
Also, don't ever muck with the load paths or rubygems without first
trying to require the library without doing so.
2009-09-02 21:45:08 -07:00
Chris Eppstein
cb45b6d438 Generalized application framework integration. There are three that ship with compass: Merb, Rails, and StandAlone.
All application specific behavior is now centralized within the app integration modules.
Plugins can now provide app integration using the --app command line option and by adding the appropriate classes to the compass module tree.
2009-09-01 20:20:23 -07:00
Chris Eppstein
d5147591e8 Fixed some broken tests after pulling in changesets. 2009-08-29 15:14:14 -07:00
Chris Eppstein
373ac11329 Removes some tests about YUI. 2009-08-29 14:52:30 -07:00
Chris Eppstein
f59ca512ce Refactor of the internal datastructures used to access project
configuration. Configuration is now a singly linked list of configuration objects
that inherit values and defaults from the next configuration instance.
All instances hold a reference to the top of the configuration chain.

There is now a consistent API for reading configuration property values:

                <attr>: Reads the fully-resolved attribute after taking
                        configuration inheritance and defaults into account.
            raw_<attr>: reads attribute from a configuration object without
                        inheritance or defaults.
   default_for(<attr>): reads the default value for an attribute
    default_for_<attr>: specifies the default value for an attribute.
<attr>_without_default: reads the inherited attribute without applying defaults.
    comment_for_<attr>: Specifies a comment that will be emitted above the
                        property when serializing the configuration to a file.

Additionally, method_missing and respond_to both work down the
configuration chain, so any method that is added to a configuration
instance, can be accessed from the top level.

The distinction between default and explicitly set values allows compass
to more correctly manage the serialization of attributes when creating
configuration files for projects.

The compass configuration can still be accessed via
Compass.configuration, however, the configuration object is no longer a
singleton. This means that you can build several configuration chains
to track several projects at once. This should ease the use of compass
in other frameworks and plugins that want to use compass internally.
2009-08-29 13:20:32 -07:00
Chris Eppstein
7d47649248 Fix build failure in the RunCodeRun environment. 2009-08-22 08:25:39 -07:00
Chris Eppstein
ff5c850014 [Compass Core] A new helper function stylesheet_url(path) can now be used to refer to assets that are relative to the css directory. 2009-07-06 07:18:25 -07:00
Chris Eppstein
6555ab3952 [Configuration] A more logical and consistent approach to http path locations. 2009-07-06 07:18:25 -07:00
Chris Eppstein
956c437fe9 [Configuration] [Command Line] Whether to generate relative links to assets is now controlled by a separate configuration flag and can be set via a command-line switch. 2009-07-06 07:18:25 -07:00
Chris Eppstein
5a015b3824 [Sass Extensions] The inline_image() function can now be used to generate a data url that embeds the image data in the generated css file.
This function works like image_url() in that it expects the image to be a path relative to the images directory.

There are clear advantages and disadvantages to this approach.
See http://en.wikipedia.org/wiki/Data_URI_scheme for more details.

NOTE: Neither IE6 nor IE7 support data urls.
Using this approach with large images is discouraged.
2009-06-28 12:29:19 -07:00
Chris Eppstein
802bca6174 [Configuration] Allow additional sass options to be specified in the compass configuration using the sass_options property. 2009-06-27 13:05:30 -07:00
Chris Eppstein
047be06a0a [Configuration] Allow additional import paths to be declared within the compass configuration. 2009-06-27 12:15:28 -07:00
Chris Eppstein
ec6c12092e Test that serialization of configuration fails when using blocks. 2009-06-27 11:28:16 -07:00
Chris Eppstein
ef47f3dd9d [Sass Extensions] Allow the asset host and cache busting strategies to be defined as part of the compass configuration. Closes #20. 2009-06-26 12:23:43 -07:00
Chris Eppstein
27b821617a [Compass Core] +reset-display mixin and Sass Extensions for appending selectors and enumerating the elements for a given display type. 2009-06-20 18:06:47 -07:00
Noel Gomez
2126240a1a [Compass Core] [Blueprint] The compass reset is now based on Eric Meyer's reset. The old compass/reset.sass was moved to blueprint/reset.sass -- the original source for it. 2009-06-20 17:16:13 -07:00
Chris Eppstein
998168160b [Rails] image_url() now integrates with the rails asset handling code when stylesheets are generated within the rails container.
This causes your rails configuration for cache busting and asset hosts
to be picked up when generating your stylesheets. Unfortunately, all
that code runs within the context of a controller, so the stylesheets
have to be generated during first request to use this functionality.
2009-06-20 12:29:31 -07:00
Chris Eppstein
ccc2823f00 [Unit Tests] More complex rails generator helper method, and a more simple one. 2009-06-20 12:29:30 -07:00
Chris Eppstein
1beab7853a [Unit Tests] Allow the wait time to be configured as an option, default to less time. 2009-06-20 12:29:30 -07:00
Chris Eppstein
8a7c92a40d [Unit Tests] Extracted rails tests to their own test suite. 2009-06-20 12:29:30 -07:00
Chris Eppstein
2b3b781c33 [Examples] Refactor the module and file loading for Sass Extensions and application integration. Fixed broken unit tests. 2009-06-20 12:29:14 -07:00
Chris Eppstein
a2462db334 Need to reset the configuration before each configuration test case. 2009-05-08 08:11:42 -07:00
Chris Eppstein
d4aa36f0f0 Fix some failing tests and refactor the tests to make better use of new compass facilities that didn't exist when the tests were first written. 2009-05-08 08:09:43 -07:00
Chris Eppstein
9a9b0b3d43 Update unit tests to work with the new timestamp checking support for the compass compiler. 2009-05-07 12:29:06 -07:00
Chris Eppstein
b7f38e40f7 Fixed some broken unit tests due to internal Sass API change. 2009-05-07 12:04:47 -07:00
Chris Eppstein
70086c880b Fall back to normal loading if the haml-edge gem isn't found. 2009-05-07 10:24:32 -07:00
Sean Schofield
84f657027a Compass now depends on the haml-edge gem instead of haml. 2009-05-06 20:14:31 -04:00
Chris Eppstein
559b981015 All commands must implement execute now. 2009-04-07 00:22:22 -07:00
Chris Eppstein
1170d324a7 Fix failing test cases. 2009-04-07 00:22:21 -07:00
Chris Eppstein
c040c1d2d9 Fix some test failures. 2009-04-02 22:53:42 -07:00
Chris Eppstein
a711197b2a Fix broken test fixtures with new, better css output from sass. 2009-04-01 17:22:51 -07:00
Chris Eppstein
af6f16d4b8 Eric Meyer's reset uses a line-height value of 1. Blueprint uses 1.5 and
YUI doesn't even consider it part of the reset. With so much
disagreement, I decided to make the compass reset agnostic and let
individual frameworks decide what the body line-height ought to be.
2009-02-21 00:15:24 -08:00
Chris Eppstein
95fd94428a Refactored the Configuration Singleton and the UpdateProject command so that it now relies more heavily on the configuration object. 2009-02-21 00:15:19 -08:00
Chris Eppstein
39a4b48b5e Fixed a bug in the configuration parser.
Added Compass#sass_engine_options method to emit sass options suitable
for passing to Sass::Engine#new.

Added require tracking in the configuration parser and serializer.
2009-02-12 23:19:32 -08:00
Chris Eppstein
10e6808648 Detect identical files when writing files during install, compile, etc. Also centralize the actions to use the write_file action as much as possible. 2009-02-08 03:46:47 -08:00
Chris Eppstein
98a2f0538b Use the Compass.configuration singleton for updates. 2009-02-08 03:46:46 -08:00
Chris Eppstein
a7406659b6 New Ruby on Rails project installer. 2009-02-08 03:46:46 -08:00
Chris Eppstein
1e5502159b Refactor the Compass commands to centralize and cleanup the project commands. 2009-01-25 14:27:08 -08:00
Chris Eppstein
8fc0c48dd5 Unit test for the compass rails installer. 2009-01-19 11:04:25 -08:00
Chris Eppstein
a9aa79d9a7 Support for testing the compass command line when it expects stdin responses. 2009-01-19 11:02:51 -08:00
Chris Eppstein
d5b711170c First pass at testing the command line tool. 2009-01-19 07:53:51 -08:00
Chris Eppstein
6be55d55e5 Remove obsolete code in the test helper. 2009-01-13 08:08:27 -08:00
Chris Eppstein
606aba9df2 Unit tests for compass stylesheets. 2008-12-17 10:07:54 -08:00
Chris Eppstein
91aa83cbfd Silence implicit string deprecation warnings. 2008-12-17 09:02:48 -08:00
Chris Eppstein
3100476ff5 Coding spree to clean up the blueprint stylesheets and make them more similar to blueprint-css, more configurable, and more consistent.
Breakdown of changes:

===

Remove the body scope that is unnecessarily added to many blueprint classes due to the way the mixins were constructed and used. Blueprint mixins that operate on the body tag now follow a pattern where they take the body selector as an argument and must always be mixed into the top level of a stylesheet. The classes will be scoped whenever the selector is not a simple "body" selector which is the default. Mixins affected: +blueprint-ie, +blueprint-print, +blueprint-typography, and +blueprint-scaffolding. All of these mixins use corresponding +[mixin]-body and +[mixin]-defaults mixins in their implementations that you can use directly if you feel constrained by the requirement to mix into the top-level.

===

Made all configurable constants possible to override in a base stylesheet using conditional assignment. Moved many colors that were still hard coded to the colors.sass module so they can be overridden.

===

Restored some blueprint defaults even though I didn't like them. With the exception of the blueprint link urls which are now available as a mixin called +blueprint-show-link-urls (they used to just be commented out.)

===

Grid constants have been renamed in both the grid and liquid grid modules. These constants are now conditionally assigned to make the grid easily configured.

===

The liquid grid now uses the compass clearfix.

===

moved the primary mixin for a module (where one exists) to the top of the file for clarity of readers.

===

blueprint grid classes are now appropriately scoped under the .container class.
2008-12-06 13:46:03 -08:00
Chris Eppstein
c07a89ef3d test blueprint typography output. 2008-12-06 13:46:02 -08:00
Chris Eppstein
dd6fb6473a Added unit tests for YUI and did some cleanup/restructuring of the test fixtures as well as a way to validate generated css. 2008-12-04 12:35:00 -08:00
Chris Eppstein
b5034a917e Added the YUI grids module. It compiles and generates roughly the expected output, but is not well tested yet. 2008-11-29 01:15:12 -08:00