compass-edge 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +34 -1
- data/VERSION.yml +3 -2
- data/features/command_line.feature +219 -0
- data/features/step_definitions/command_line_steps.rb +199 -0
- data/lib/compass/app_integration/rails/installer.rb +3 -1
- data/lib/compass/app_integration/stand_alone/installer.rb +26 -11
- data/lib/compass/commands.rb +1 -1
- data/lib/compass/commands/create_project.rb +8 -1
- data/lib/compass/commands/installer_command.rb +6 -2
- data/lib/compass/commands/project_stats.rb +160 -0
- data/lib/compass/commands/update_project.rb +49 -1
- data/lib/compass/commands/validate_project.rb +56 -2
- data/lib/compass/commands/watch_project.rb +3 -1
- data/lib/compass/commands/write_configuration.rb +60 -2
- data/lib/compass/compiler.rb +4 -3
- data/lib/compass/configuration/helpers.rb +9 -0
- data/lib/compass/errors.rb +4 -1
- data/lib/compass/exec.rb +1 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_reset.sass +2 -2
- data/lib/compass/installers.rb +1 -1
- data/lib/compass/installers/bare_installer.rb +62 -0
- data/lib/compass/installers/base.rb +7 -51
- data/lib/compass/installers/manifest_installer.rb +59 -0
- data/lib/compass/sass_extensions/monkey_patches.rb +2 -2
- data/lib/compass/sass_extensions/monkey_patches/traversal.rb +23 -0
- data/lib/compass/stats.rb +92 -0
- data/lib/compass/validator.rb +2 -3
- data/test/command_line_helper.rb +6 -2
- data/test/fixtures/stylesheets/compass/css/reset.css +1 -1
- data/test/io_helper.rb +18 -1
- data/test/rails_helper.rb +40 -0
- data/test/rails_integration_test.rb +2 -40
- data/test/test_helper.rb +1 -0
- metadata +12 -3
    
        data/test/io_helper.rb
    CHANGED
    
    | @@ -15,5 +15,22 @@ module Compass | |
| 15 15 | 
             
                ensure
         | 
| 16 16 | 
             
                  $stderr = real_stderr
         | 
| 17 17 | 
             
                end
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                def capture_pipe(io, options = {})
         | 
| 20 | 
            +
                  options[:wait] = 0.25
         | 
| 21 | 
            +
                  options[:timeout] = 1.0
         | 
| 22 | 
            +
                  output = ""
         | 
| 23 | 
            +
                  eof_at = nil
         | 
| 24 | 
            +
                  while !eof_at || (Time.now - eof_at < options[:wait])
         | 
| 25 | 
            +
                    if io.eof?
         | 
| 26 | 
            +
                      eof_at ||= Time.now
         | 
| 27 | 
            +
                      sleep 0.1
         | 
| 28 | 
            +
                    else
         | 
| 29 | 
            +
                      eof_at = nil
         | 
| 30 | 
            +
                      timeout(options[:timeout]) { output << io.readpartial(1024) }
         | 
| 31 | 
            +
                    end
         | 
| 32 | 
            +
                  end
         | 
| 33 | 
            +
                  output
         | 
| 34 | 
            +
                end
         | 
| 18 35 | 
             
              end
         | 
| 19 | 
            -
            end
         | 
| 36 | 
            +
            end
         | 
| @@ -0,0 +1,40 @@ | |
| 1 | 
            +
            module Compass
         | 
| 2 | 
            +
              module RailsHelper
         | 
| 3 | 
            +
                def generate_rails_app_directories(name)
         | 
| 4 | 
            +
                  Dir.mkdir name
         | 
| 5 | 
            +
                  Dir.mkdir File.join(name, "config")
         | 
| 6 | 
            +
                  Dir.mkdir File.join(name, "config", "initializers")
         | 
| 7 | 
            +
                end
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                # Generate a rails application without polluting our current set of requires
         | 
| 10 | 
            +
                # with the rails libraries. This will allow testing against multiple versions of rails
         | 
| 11 | 
            +
                # by manipulating the load path.
         | 
| 12 | 
            +
                def generate_rails_app(name)
         | 
| 13 | 
            +
                  if pid = fork
         | 
| 14 | 
            +
                    Process.wait(pid)
         | 
| 15 | 
            +
                    if $?.exitstatus == 2
         | 
| 16 | 
            +
                      raise LoadError, "Couldn't load rails"
         | 
| 17 | 
            +
                    elsif $?.exitstatus != 0
         | 
| 18 | 
            +
                      raise "Failed to generate rails application."
         | 
| 19 | 
            +
                    end
         | 
| 20 | 
            +
                  else
         | 
| 21 | 
            +
                    begin
         | 
| 22 | 
            +
                      require 'rails/version'
         | 
| 23 | 
            +
                      require 'rails_generator'
         | 
| 24 | 
            +
                      require 'rails_generator/scripts/generate'
         | 
| 25 | 
            +
                      Rails::Generator::Base.use_application_sources!
         | 
| 26 | 
            +
                      capture_output do
         | 
| 27 | 
            +
                        Rails::Generator::Base.logger = Rails::Generator::SimpleLogger.new $stdout
         | 
| 28 | 
            +
                        Rails::Generator::Scripts::Generate.new.run([name], :generator => 'app')
         | 
| 29 | 
            +
                      end
         | 
| 30 | 
            +
                    rescue LoadError
         | 
| 31 | 
            +
                      Kernel.exit!(2)
         | 
| 32 | 
            +
                    rescue => e
         | 
| 33 | 
            +
                      $stderr.puts e
         | 
| 34 | 
            +
                      Kernel.exit!(1)
         | 
| 35 | 
            +
                    end
         | 
| 36 | 
            +
                    Kernel.exit!(0)
         | 
| 37 | 
            +
                  end
         | 
| 38 | 
            +
                end
         | 
| 39 | 
            +
              end
         | 
| 40 | 
            +
            end
         | 
| @@ -8,6 +8,7 @@ class RailsIntegrationTest < Test::Unit::TestCase | |
| 8 8 | 
             
              include Compass::TestCaseHelper
         | 
| 9 9 | 
             
              include Compass::CommandLineHelper
         | 
| 10 10 | 
             
              include Compass::IoHelper
         | 
| 11 | 
            +
              include Compass::RailsHelper
         | 
| 11 12 |  | 
| 12 13 | 
             
              def setup
         | 
| 13 14 | 
             
                Compass.reset_configuration!
         | 
| @@ -42,43 +43,4 @@ class RailsIntegrationTest < Test::Unit::TestCase | |
| 42 43 | 
             
              rescue LoadError
         | 
| 43 44 | 
             
                puts "Skipping rails test. Couldn't Load rails"
         | 
| 44 45 | 
             
              end
         | 
| 45 | 
            -
             | 
| 46 | 
            -
             | 
| 47 | 
            -
              def generate_rails_app_directories(name)
         | 
| 48 | 
            -
                Dir.mkdir name
         | 
| 49 | 
            -
                Dir.mkdir File.join(name, "config")
         | 
| 50 | 
            -
                Dir.mkdir File.join(name, "config", "initializers")
         | 
| 51 | 
            -
              end
         | 
| 52 | 
            -
             | 
| 53 | 
            -
              # Generate a rails application without polluting our current set of requires
         | 
| 54 | 
            -
              # with the rails libraries. This will allow testing against multiple versions of rails
         | 
| 55 | 
            -
              # by manipulating the load path.
         | 
| 56 | 
            -
              def generate_rails_app(name)
         | 
| 57 | 
            -
                if pid = fork
         | 
| 58 | 
            -
                  Process.wait(pid)
         | 
| 59 | 
            -
                  if $?.exitstatus == 2
         | 
| 60 | 
            -
                    raise LoadError, "Couldn't load rails"
         | 
| 61 | 
            -
                  elsif $?.exitstatus != 0
         | 
| 62 | 
            -
                    raise "Failed to generate rails application."
         | 
| 63 | 
            -
                  end
         | 
| 64 | 
            -
                else
         | 
| 65 | 
            -
                  begin
         | 
| 66 | 
            -
                    require 'rails/version'
         | 
| 67 | 
            -
                    require 'rails_generator'
         | 
| 68 | 
            -
                    require 'rails_generator/scripts/generate'
         | 
| 69 | 
            -
                    Rails::Generator::Base.use_application_sources!
         | 
| 70 | 
            -
                    capture_output do
         | 
| 71 | 
            -
                      Rails::Generator::Base.logger = Rails::Generator::SimpleLogger.new $stdout
         | 
| 72 | 
            -
                      Rails::Generator::Scripts::Generate.new.run([name], :generator => 'app')
         | 
| 73 | 
            -
                    end
         | 
| 74 | 
            -
                  rescue LoadError
         | 
| 75 | 
            -
                    Kernel.exit(2)
         | 
| 76 | 
            -
                  rescue => e
         | 
| 77 | 
            -
                    $stderr.puts e
         | 
| 78 | 
            -
                    Kernel.exit!(1)
         | 
| 79 | 
            -
                  end
         | 
| 80 | 
            -
                  Kernel.exit!(0)
         | 
| 81 | 
            -
                end
         | 
| 82 | 
            -
              end
         | 
| 83 | 
            -
             | 
| 84 | 
            -
            end
         | 
| 46 | 
            +
            end
         | 
    
        data/test/test_helper.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: compass-edge
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              version: 0.9. | 
| 4 | 
            +
              version: 0.9.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors: 
         | 
| 7 7 | 
             
            - Chris Eppstein
         | 
| @@ -9,7 +9,7 @@ autorequire: | |
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 11 |  | 
| 12 | 
            -
            date: 2009-10- | 
| 12 | 
            +
            date: 2009-10-30 00:00:00 -07:00
         | 
| 13 13 | 
             
            default_executable: compass
         | 
| 14 14 | 
             
            dependencies: 
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -22,7 +22,7 @@ dependencies: | |
| 22 22 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 23 23 | 
             
                    version: 2.2.0
         | 
| 24 24 | 
             
                version: 
         | 
| 25 | 
            -
            description:  | 
| 25 | 
            +
            description: Compass is a Sass-based Stylesheet Framework that streamlines the creation and maintainance of CSS.
         | 
| 26 26 | 
             
            email: chris@eppsteins.net
         | 
| 27 27 | 
             
            executables: 
         | 
| 28 28 | 
             
            - compass
         | 
| @@ -170,6 +170,7 @@ files: | |
| 170 170 | 
             
            - lib/compass/commands/list_frameworks.rb
         | 
| 171 171 | 
             
            - lib/compass/commands/print_version.rb
         | 
| 172 172 | 
             
            - lib/compass/commands/project_base.rb
         | 
| 173 | 
            +
            - lib/compass/commands/project_stats.rb
         | 
| 173 174 | 
             
            - lib/compass/commands/registry.rb
         | 
| 174 175 | 
             
            - lib/compass/commands/stamp_pattern.rb
         | 
| 175 176 | 
             
            - lib/compass/commands/update_project.rb
         | 
| @@ -289,8 +290,10 @@ files: | |
| 289 290 | 
             
            - lib/compass/frameworks/compass/templates/project/screen.sass
         | 
| 290 291 | 
             
            - lib/compass/grid_builder.rb
         | 
| 291 292 | 
             
            - lib/compass/installers.rb
         | 
| 293 | 
            +
            - lib/compass/installers/bare_installer.rb
         | 
| 292 294 | 
             
            - lib/compass/installers/base.rb
         | 
| 293 295 | 
             
            - lib/compass/installers/manifest.rb
         | 
| 296 | 
            +
            - lib/compass/installers/manifest_installer.rb
         | 
| 294 297 | 
             
            - lib/compass/installers/template_context.rb
         | 
| 295 298 | 
             
            - lib/compass/logger.rb
         | 
| 296 299 | 
             
            - lib/compass/sass_extensions.rb
         | 
| @@ -302,6 +305,8 @@ files: | |
| 302 305 | 
             
            - lib/compass/sass_extensions/functions/urls.rb
         | 
| 303 306 | 
             
            - lib/compass/sass_extensions/monkey_patches.rb
         | 
| 304 307 | 
             
            - lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb
         | 
| 308 | 
            +
            - lib/compass/sass_extensions/monkey_patches/traversal.rb
         | 
| 309 | 
            +
            - lib/compass/stats.rb
         | 
| 305 310 | 
             
            - lib/compass/test_case.rb
         | 
| 306 311 | 
             
            - lib/compass/validator.rb
         | 
| 307 312 | 
             
            - lib/compass/version.rb
         | 
| @@ -338,6 +343,7 @@ files: | |
| 338 343 | 
             
            - test/fixtures/stylesheets/image_urls/images/grid.png
         | 
| 339 344 | 
             
            - test/fixtures/stylesheets/image_urls/sass/screen.sass
         | 
| 340 345 | 
             
            - test/io_helper.rb
         | 
| 346 | 
            +
            - test/rails_helper.rb
         | 
| 341 347 | 
             
            - test/rails_integration_test.rb
         | 
| 342 348 | 
             
            - test/sass_extensions_test.rb
         | 
| 343 349 | 
             
            - test/test_case_helper.rb
         | 
| @@ -397,8 +403,11 @@ test_files: | |
| 397 403 | 
             
            - test/fixtures/stylesheets/image_urls/images/grid.png
         | 
| 398 404 | 
             
            - test/fixtures/stylesheets/image_urls/sass/screen.sass
         | 
| 399 405 | 
             
            - test/io_helper.rb
         | 
| 406 | 
            +
            - test/rails_helper.rb
         | 
| 400 407 | 
             
            - test/rails_integration_test.rb
         | 
| 401 408 | 
             
            - test/sass_extensions_test.rb
         | 
| 402 409 | 
             
            - test/test_case_helper.rb
         | 
| 403 410 | 
             
            - test/test_helper.rb
         | 
| 404 411 | 
             
            - test/test_rails_helper.rb
         | 
| 412 | 
            +
            - features/command_line.feature
         | 
| 413 | 
            +
            - features/step_definitions/command_line_steps.rb
         |