From 6ad50ea2d8762c610f26920e268b732ad1010ae2 Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Fri, 14 May 2010 17:28:24 -0700 Subject: [PATCH 01/11] Get rid of some dead code that was breaking Rails 3. Closes GH-137. --- .../monkey_patches/stylesheet_updating.rb | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb diff --git a/lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb b/lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb deleted file mode 100644 index 92e9093e..00000000 --- a/lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'sass/plugin' - -# XXX: We can remove this monkeypatch once Sass 2.2 is released. -module Sass::Plugin - - # splits the stylesheet_needs_update? method into two pieces so I can use the exact_stylesheet_needs_update? piece - module StylesheetNeedsUpdate - def stylesheet_needs_update?(name, template_path, css_path) - css_file = css_filename(name, css_path) - template_file = template_filename(name, template_path) - exact_stylesheet_needs_update?(css_file, template_file) - end - def exact_stylesheet_needs_update?(css_file, template_file) - if !File.exists?(css_file) - return true - else - css_mtime = File.mtime(css_file) - File.mtime(template_file) > css_mtime || - dependencies(template_file).any?(&dependency_updated?(css_mtime)) - end - end - end - - # At some point Sass::Plugin changed from using the metaclass to extend self. - metaclass = class << self; self; end - if metaclass.included_modules.include?(Sass::Plugin) - if method(:stylesheet_needs_update?).arity == 2 - alias exact_stylesheet_needs_update? stylesheet_needs_update? - elsif !method_defined?(:exact_stylesheet_needs_update?) - include StylesheetNeedsUpdate - end - else - class << self - unless method_defined?(:exact_stylesheet_needs_update?) - include StylesheetNeedsUpdate - end - end - end - -end From 4f2dd8da9e13d73552442f2272fd850c4ebcaa2f Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 14 May 2010 18:06:02 -0700 Subject: [PATCH 02/11] Add a note to the changelog about uninstalling chriseppstein-compass --- doc-src/content/CHANGELOG.markdown | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc-src/content/CHANGELOG.markdown b/doc-src/content/CHANGELOG.markdown index ac616cbb..1c5efc19 100644 --- a/doc-src/content/CHANGELOG.markdown +++ b/doc-src/content/CHANGELOG.markdown @@ -16,7 +16,14 @@ COMPASS CHANGELOG 0.10.0 (May 10, 2010) --------------------- -This changelog entry is condensed from a very long beta release. You can read [the 0.10.0 beta release notes here](/docs/CHANGELOG-v0-10-0-beta/). +This changelog entry is condensed from a very long beta release. You can read [the 0.10.0 beta release notes here](/docs/CHANGELOG-v0-10-0-beta/). + +### Gem Location + +The compass gem is now (and has been for some time) hosted on [rubygems.org](http://rubygems.org). If you have an old version +installed from github, please remove it: + + sudo gem uninstall chriseppstein-compass ### Sass 3: From e796511658c4b38a0b55f39014cd49aea2bfd43d Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 14 May 2010 23:01:02 -0700 Subject: [PATCH 03/11] [Rails] Fixed a reference to the old configuration file. --- lib/compass/app_integration/rails/installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compass/app_integration/rails/installer.rb b/lib/compass/app_integration/rails/installer.rb index 41072844..37a50681 100644 --- a/lib/compass/app_integration/rails/installer.rb +++ b/lib/compass/app_integration/rails/installer.rb @@ -26,7 +26,7 @@ module Compass end def config_files_exist? - File.exists?(targetize('config/compass.config')) && + File.exists?(targetize('config/compass.rb')) && File.exists?(targetize('config/initializers/compass.rb')) end From 732fc8f04227c857bffb04ebdf02704b4dbd1a79 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 14 May 2010 23:01:46 -0700 Subject: [PATCH 04/11] [Rails] Improved the next steps to perform after installing compass so that it mentions registering the compass gem. --- .../app_integration/rails/installer.rb | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lib/compass/app_integration/rails/installer.rb b/lib/compass/app_integration/rails/installer.rb index 37a50681..bb66436d 100644 --- a/lib/compass/app_integration/rails/installer.rb +++ b/lib/compass/app_integration/rails/installer.rb @@ -38,11 +38,22 @@ module Compass if options[:create] puts <<-NEXTSTEPS - Congratulations! Your rails project has been configured to use Compass. - Sass will automatically compile your stylesheets during the next - page request and keep them up to date when they change. - Make sure you restart your server! - NEXTSTEPS +Congratulations! Your rails project has been configured to use Compass. +Just one more thing left to do: Register the compass gem. + +In Rails 2.2 & 2.3, add the following to your evironment.rb: + + config.gem "compass", :version => ">= #{Compass::VERSION}" + +In Rails 3, add the following to your Gemfile: + + gem "compass", ">= #{Compass::VERSION}" + +Then, make sure you restart your server. + +Sass will automatically compile your stylesheets during the next +page request and keep them up to date when they change. +NEXTSTEPS end if manifest.has_stylesheet? puts "\nNext add these lines to the head of your layouts:\n\n" From 9a49c457da3352fd9cef403d62ad08e2517efe63 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 14 May 2010 23:02:19 -0700 Subject: [PATCH 05/11] [Command Line] Improved descriptions of the watch and init commands. --- lib/compass/commands/create_project.rb | 2 +- lib/compass/commands/watch_project.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/compass/commands/create_project.rb b/lib/compass/commands/create_project.rb index 621da66a..c714b023 100644 --- a/lib/compass/commands/create_project.rb +++ b/lib/compass/commands/create_project.rb @@ -68,7 +68,7 @@ module Compass if command.to_sym == :create "Create a new compass project" else - "Initialize an existing project" + "Add compass to an existing project" end end diff --git a/lib/compass/commands/watch_project.rb b/lib/compass/commands/watch_project.rb index 533f676b..62bd3316 100644 --- a/lib/compass/commands/watch_project.rb +++ b/lib/compass/commands/watch_project.rb @@ -97,6 +97,10 @@ module Compass end class << self + def description(command) + "Compile Sass stylesheets to CSS when they change" + end + def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) From 869e0bfac784e061ae2e10e3275d726fcea13269 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 14 May 2010 23:25:27 -0700 Subject: [PATCH 06/11] [Rails] When configuring the Sass::Plugin, don't overwrite existing template locations. Closes GH-136. --- lib/compass/configuration/helpers.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/compass/configuration/helpers.rb b/lib/compass/configuration/helpers.rb index b9884fd0..ea761389 100644 --- a/lib/compass/configuration/helpers.rb +++ b/lib/compass/configuration/helpers.rb @@ -55,7 +55,12 @@ module Compass def configure_sass_plugin! @sass_plugin_configured = true - Sass::Plugin.options.merge!(sass_plugin_configuration) + config = sass_plugin_configuration + locations = config.delete(:template_location) + Sass::Plugin.options.merge!(config) + locations.each do |sass_dir, css_dir| + Sass::Plugin.add_template_location sass_dir, css_dir + end end def sass_plugin_configured? From 9e595a1e891565567e352a5faa701be795f7dc3d Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 14 May 2010 23:28:11 -0700 Subject: [PATCH 07/11] Fix a failing test case. --- features/command_line.feature | 2 ++ 1 file changed, 2 insertions(+) diff --git a/features/command_line.feature b/features/command_line.feature index 93bf2e6b..48f9bc6d 100644 --- a/features/command_line.feature +++ b/features/command_line.feature @@ -158,8 +158,10 @@ Feature: Command Line | watch | And I should see the following "other" commands: | config | + | frameworks | | grid-img | | help | + | imports | | install | | interactive | | stats | From 5a1bab47966c65d2c2bfd543527528159cc323ef Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 15 May 2010 00:18:03 -0700 Subject: [PATCH 08/11] [Blueprint] Regression fix: automatically apply the reset if blueprint/reset is imported. Closes GH-132. --- doc-src/content/CHANGELOG.markdown | 5 ++ .../content/reference/blueprint/reset.haml | 3 +- .../reference/blueprint/reset/utilities.scss | 13 ++++ .../stylesheets/blueprint/modules/_reset.sass | 4 +- .../stylesheets/blueprint/_reset.scss | 59 +------------------ .../blueprint/reset/_utilities.scss | 58 ++++++++++++++++++ 6 files changed, 82 insertions(+), 60 deletions(-) create mode 100644 doc-src/content/reference/blueprint/reset/utilities.scss create mode 100644 frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss diff --git a/doc-src/content/CHANGELOG.markdown b/doc-src/content/CHANGELOG.markdown index 1c5efc19..b6b8c8e2 100644 --- a/doc-src/content/CHANGELOG.markdown +++ b/doc-src/content/CHANGELOG.markdown @@ -10,6 +10,11 @@ COMPASS CHANGELOG 0.10.1 (May 13, 2010) --------------------- +* Fixed a regression in the Blueprint module, the blueprint reset + was no longer automatically applying the reset styles. This behavior + is restored in this release. If you `@import blueprint/reset` and + then apply the reset mixin yourself, you should remove the mixin + call or change your import to `blueprint/reset/utilities`. * Added a subcommand for emitting sass imports for the sass CLI. * Added a subcommand for listing the available frameworks. diff --git a/doc-src/content/reference/blueprint/reset.haml b/doc-src/content/reference/blueprint/reset.haml index a7613fe0..ab605898 100644 --- a/doc-src/content/reference/blueprint/reset.haml +++ b/doc-src/content/reference/blueprint/reset.haml @@ -10,4 +10,5 @@ classnames: --- - render 'reference' do %p - A reset and base styling. + A reset and base styling automatically applied to your webpage + by importing this module. diff --git a/doc-src/content/reference/blueprint/reset/utilities.scss b/doc-src/content/reference/blueprint/reset/utilities.scss new file mode 100644 index 00000000..6a3a71fc --- /dev/null +++ b/doc-src/content/reference/blueprint/reset/utilities.scss @@ -0,0 +1,13 @@ +--- +title: Blueprint Reset +crumb: Reset +framework: blueprint +stylesheet: blueprint/reset/_utilities.scss +layout: blueprint +classnames: + - reference + - blueprint +--- +- render 'reference' do + %p + Utility mixins for applying a reset and base styling. diff --git a/frameworks/_blueprint_deprecated_imports/stylesheets/blueprint/modules/_reset.sass b/frameworks/_blueprint_deprecated_imports/stylesheets/blueprint/modules/_reset.sass index ec7fd44e..c1139254 100644 --- a/frameworks/_blueprint_deprecated_imports/stylesheets/blueprint/modules/_reset.sass +++ b/frameworks/_blueprint_deprecated_imports/stylesheets/blueprint/modules/_reset.sass @@ -1,2 +1,2 @@ -@warn "DEPRECATED: Please change your @import of blueprint/modules/reset.sass to: @import \"blueprint/reset\"" -@import blueprint/reset.scss \ No newline at end of file +@warn "DEPRECATED: Please change your @import of blueprint/modules/reset.sass to: @import \"blueprint/reset/utilities\"" +@import blueprint/reset/utilities.scss \ No newline at end of file diff --git a/frameworks/blueprint/stylesheets/blueprint/_reset.scss b/frameworks/blueprint/stylesheets/blueprint/_reset.scss index 620d68be..934a63ea 100644 --- a/frameworks/blueprint/stylesheets/blueprint/_reset.scss +++ b/frameworks/blueprint/stylesheets/blueprint/_reset.scss @@ -1,58 +1,3 @@ -// Global reset rules. -// For more specific resets, use the reset mixins provided below -@mixin blueprint-global-reset { - html, body { - @include blueprint-reset; } - html { - font-size: 100.01%; } - @include blueprint-nested-reset; } +@import "reset/utilities"; -// Reset all elements within some selector scope.To reset the selector itself, -// mixin the appropriate reset mixin for that element type as well. This could be -// useful if you want to style a part of your page in a dramatically different way. -@mixin blueprint-nested-reset { - div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, - pre, a, abbr, acronym, address, code, del, dfn, em, img, - dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr { - @include blueprint-reset; } - blockquote, q { - @include blueprint-reset-quotation; } - th, td, caption { - @include blueprint-reset-table-cell; } - table { - @include blueprint-reset-table; } - a img { - border: none; } } - -@mixin blueprint-reset-box-model { - margin: 0; - padding: 0; - border: 0; } - -@mixin blueprint-reset { - @include blueprint-reset-box-model; - font: { - weight: inherit; - style: inherit; - size: 100%; - family: inherit; }; - vertical-align: baseline; } - -@mixin blueprint-reset-quotation { - @include blueprint-reset; - quotes: "" ""; - &:before, - &:after { - content: ""; } } - -@mixin blueprint-reset-table-cell { - @include blueprint-reset; - text-align: left; - font-weight: normal; - vertical-align: middle; } - -@mixin blueprint-reset-table { - @include blueprint-reset; - border-collapse: separate; - border-spacing: 0; - vertical-align: middle; } +@include blueprint-global-reset; \ No newline at end of file diff --git a/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss b/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss new file mode 100644 index 00000000..620d68be --- /dev/null +++ b/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss @@ -0,0 +1,58 @@ +// Global reset rules. +// For more specific resets, use the reset mixins provided below +@mixin blueprint-global-reset { + html, body { + @include blueprint-reset; } + html { + font-size: 100.01%; } + @include blueprint-nested-reset; } + +// Reset all elements within some selector scope.To reset the selector itself, +// mixin the appropriate reset mixin for that element type as well. This could be +// useful if you want to style a part of your page in a dramatically different way. +@mixin blueprint-nested-reset { + div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, + pre, a, abbr, acronym, address, code, del, dfn, em, img, + dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr { + @include blueprint-reset; } + blockquote, q { + @include blueprint-reset-quotation; } + th, td, caption { + @include blueprint-reset-table-cell; } + table { + @include blueprint-reset-table; } + a img { + border: none; } } + +@mixin blueprint-reset-box-model { + margin: 0; + padding: 0; + border: 0; } + +@mixin blueprint-reset { + @include blueprint-reset-box-model; + font: { + weight: inherit; + style: inherit; + size: 100%; + family: inherit; }; + vertical-align: baseline; } + +@mixin blueprint-reset-quotation { + @include blueprint-reset; + quotes: "" ""; + &:before, + &:after { + content: ""; } } + +@mixin blueprint-reset-table-cell { + @include blueprint-reset; + text-align: left; + font-weight: normal; + vertical-align: middle; } + +@mixin blueprint-reset-table { + @include blueprint-reset; + border-collapse: separate; + border-spacing: 0; + vertical-align: middle; } From 2103547207a2a9d4bdd9b47d99afb04e673b0733 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 14 May 2010 23:36:03 -0700 Subject: [PATCH 09/11] Fix a broken reference to the extensions tutorial. Closes GH-135. --- frameworks/compass/templates/extension/manifest.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/compass/templates/extension/manifest.rb b/frameworks/compass/templates/extension/manifest.rb index 0f92706a..89efbe21 100644 --- a/frameworks/compass/templates/extension/manifest.rb +++ b/frameworks/compass/templates/extension/manifest.rb @@ -12,7 +12,7 @@ help %Q{ welcome_message %Q{ For a full tutorial on how to build your own extension see: -http://github.com/chriseppstein/compass/blob/edge/docs/EXTENSIONS.markdown +http://compass-style.org/docs/tutorials/extensions/ }, :replace => true From 54b9b6b5969e57598a2b309ee537baca786df9e9 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 14 May 2010 23:38:41 -0700 Subject: [PATCH 10/11] Update the CHANGELOG for the v0.10.1 release. --- doc-src/content/CHANGELOG.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc-src/content/CHANGELOG.markdown b/doc-src/content/CHANGELOG.markdown index b6b8c8e2..fb4d4a96 100644 --- a/doc-src/content/CHANGELOG.markdown +++ b/doc-src/content/CHANGELOG.markdown @@ -7,7 +7,7 @@ layout: article COMPASS CHANGELOG ================= -0.10.1 (May 13, 2010) +0.10.1 (May 15, 2010) --------------------- * Fixed a regression in the Blueprint module, the blueprint reset @@ -17,6 +17,8 @@ COMPASS CHANGELOG call or change your import to `blueprint/reset/utilities`. * Added a subcommand for emitting sass imports for the sass CLI. * Added a subcommand for listing the available frameworks. +* Fixed a number of bugs related to Sass & Rails integration +* Fixed some documentation issues in the command line and on the website. 0.10.0 (May 10, 2010) --------------------- From 786e03551b72e80fa6dadd839d4b61b7d276fcdc Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 14 May 2010 23:39:50 -0700 Subject: [PATCH 11/11] Bump versions for v0.10.1 release. --- VERSION.yml | 2 +- compass.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION.yml b/VERSION.yml index 7d472c35..eface56c 100644 --- a/VERSION.yml +++ b/VERSION.yml @@ -1,4 +1,4 @@ --- -:patch: 0 :major: 0 :minor: 10 +:patch: 1 diff --git a/compass.gemspec b/compass.gemspec index c7b20da9..20350f28 100644 --- a/compass.gemspec +++ b/compass.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |gemspec| gemspec.require_paths = %w(lib) gemspec.rubygems_version = "1.3.6" gemspec.summary = %q{A Real Stylesheet Framework} - gemspec.add_dependency('haml', '>= 3.0.0') + gemspec.add_dependency('haml', '>= 3.0.4') gemspec.files = %w(README.markdown LICENSE.markdown VERSION.yml Rakefile) gemspec.files += Dir.glob("bin/*") gemspec.files += Dir.glob("examples/**/*.*")