middleman-compass 4.0.0.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 02c45487486d801c42e45e6d8eb5f79893cfee26
4
+ data.tar.gz: 425c9a85f37244b4487f272e04fdd08387cc0356
5
+ SHA512:
6
+ metadata.gz: 58fe77e960fd4b49c8c7c27504ef24b1c9b48031a34a71ed9dad7e073dffb32df7da3b8035548accb070aa10b58b3edc471a83e41012d4bce66cee8beaf447af
7
+ data.tar.gz: 209986960a822e0914510235bafaadf920a422e037dc588dcfe7e4a1be5a96e52cebe14964bc1fd88ecdc60f7531ab0c217fb34e018e4b4c68180bb2cb99fc2f
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ .DS_Store
2
+ Gemfile.lock
3
+ Gemfile-v4.lock
4
+ tmp
5
+ .rbenv-*
6
+ .sass-cache
7
+ pkg
8
+ build
9
+ .ruby-version
10
+ .cache
data/.travis.yml ADDED
@@ -0,0 +1,15 @@
1
+ rvm:
2
+ - 1.9.3
3
+ - 2.0.0
4
+ - 2.1.1
5
+ - jruby-19mode
6
+
7
+ gemfile:
8
+ - Gemfile
9
+
10
+ script: "bundle exec rake test"
11
+
12
+ env: TEST=true
13
+
14
+ matrix:
15
+ fast_finish: true
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,43 @@
1
+ # Contributing
2
+ In the spirit of [free software][free-sw], **everyone** is encouraged to help
3
+ improve this project.
4
+
5
+ [free-sw]: http://www.fsf.org/licensing/essays/free-sw.html
6
+
7
+ Here are some ways *you* can contribute:
8
+
9
+ * by using alpha, beta, and prerelease versions
10
+ * by reporting bugs
11
+ * by suggesting new features
12
+ * by writing or editing documentation
13
+ * by writing specifications
14
+ * by writing code ( **no patch is too small** : fix typos, add comments, clean up inconsistent whitespace )
15
+ * by refactoring code
16
+ * by closing [issues][]
17
+ * by reviewing patches
18
+
19
+ [issues]: https://github.com/middleman/middleman-compass/issues
20
+
21
+ ## Submitting an Issue
22
+ We use the [GitHub issue tracker][issues] to track bugs and features. Before
23
+ submitting a bug report or feature request, check to make sure it hasn't
24
+ already been submitted. When submitting a bug report, please include a [Gist][]
25
+ that includes a stack trace and any details that may be necessary to reproduce
26
+ the bug, including your gem version, Ruby version, and operating system.
27
+ Ideally, a bug report should include a pull request with failing specs.
28
+
29
+ [gist]: https://gist.github.com/
30
+
31
+ ## Submitting a Pull Request
32
+ 1. [Fork the repository.][fork]
33
+ 2. [Create a topic branch.][branch]
34
+ 3. Add specs for your unimplemented feature or bug fix.
35
+ 4. Run `bundle exec rake test`. If your specs pass, return to step 3.
36
+ 5. Implement your feature or bug fix.
37
+ 6. Run `bundle exec rake test`. If your specs fail, return to step 5.
38
+ 7. Add, commit, and push your changes.
39
+ 8. [Submit a pull request.][pr]
40
+
41
+ [fork]: http://help.github.com/fork-a-repo/
42
+ [branch]: http://learn.github.com/p/branching.html
43
+ [pr]: http://help.github.com/send-pull-requests/
data/Gemfile ADDED
@@ -0,0 +1,21 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "middleman-cli", :github => "middleman/middleman", :branch => "master"
4
+ # gem "middleman-core", :github => "middleman/middleman", :branch => "master"
5
+ gem "middleman-core", :path => "~/Sites/middleman"
6
+
7
+ # Specify your gem's dependencies in middleman-sprockets.gemspec
8
+ gemspec
9
+
10
+ gem "rake", "~> 10.0.3", :require => false
11
+ gem "yard", "~> 0.8.0", :require => false
12
+
13
+ # Test tools
14
+ gem "cucumber"
15
+ gem "fivemat", "~> 1.2.1"
16
+ gem "aruba"
17
+ gem "rspec", "~> 2.14"
18
+ gem "builder", "~> 3.0"
19
+
20
+ # Optional middleman dependencies, included for tests
21
+ gem 'slim', require: false
data/LICENSE.md ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012-2013 Thomas Reynolds
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # Middleman-compass
2
+
3
+ `middleman-compass` is an extension for the [Middleman] static site generator that allows support for [Compass](http://compass-style.org) in your assets.
4
+
5
+ ## Installation
6
+
7
+ If you're just getting started, install the `middleman` gem and generate a new project:
8
+
9
+ ```
10
+ gem install middleman
11
+ middleman init MY_PROJECT
12
+ ```
13
+
14
+ If you already have a Middleman project: Add `gem "middleman-compass"` to your `Gemfile` and run `bundle install`
15
+
16
+ ## Configuration
17
+
18
+ ```
19
+ activate :compass
20
+ ```
21
+
22
+ ## Build & Dependency Status
23
+
24
+ [![Gem Version](https://badge.fury.io/rb/middleman-compass.png)][gem]
25
+ [![Build Status](https://travis-ci.org/middleman/middleman-compass.png)][travis]
26
+ [![Dependency Status](https://gemnasium.com/middleman/middleman-compass.png?travis)][gemnasium]
27
+ [![Code Quality](https://codeclimate.com/github/middleman/middleman-compass.png)][codeclimate]
28
+
29
+ ## Community
30
+
31
+ The official community forum is available at: http://forum.middlemanapp.com
32
+
33
+ ## Bug Reports
34
+
35
+ Github Issues are used for managing bug reports and feature requests. If you run into issues, please search the issues and submit new problems: https://github.com/middleman/middleman-compass/issues
36
+
37
+ The best way to get quick responses to your issues and swift fixes to your bugs is to submit detailed bug reports, include test cases and respond to developer questions in a timely manner. Even better, if you know Ruby, you can submit [Pull Requests](https://help.github.com/articles/using-pull-requests) containing Cucumber Features which describe how your feature should work or exploit the bug you are submitting.
38
+
39
+ ## How to Run Cucumber Tests
40
+
41
+ 1. Checkout Repository: `git clone https://github.com/middleman/middleman-compass.git`
42
+ 2. Install Bundler: `gem install bundler`
43
+ 3. Run `bundle install` inside the project root to install the gem dependencies.
44
+ 4. Run test cases: `bundle exec rake test`
45
+
46
+ ## Donate
47
+
48
+ [Click here to lend your support to Middleman](https://spacebox.io/s/4dXbHBorC3)
49
+
50
+ ## License
51
+
52
+ Copyright (c) 2012-2013 Thomas Reynolds. MIT Licensed, see [LICENSE] for details.
53
+
54
+ [middleman]: http://middlemanapp.com
55
+ [gem]: https://rubygems.org/gems/middleman-compass
56
+ [travis]: http://travis-ci.org/middleman/middleman-compass
57
+ [gemnasium]: https://gemnasium.com/middleman/middleman-compass
58
+ [codeclimate]: https://codeclimate.com/github/middleman/middleman-compass
59
+ [LICENSE]: https://github.com/middleman/middleman-compass/blob/master/LICENSE.md
data/Rakefile ADDED
@@ -0,0 +1,20 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ require 'cucumber/rake/task'
5
+
6
+ require 'middleman-core/version'
7
+
8
+ Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
9
+ exempt_tags = ["--tags ~@wip"]
10
+ t.cucumber_opts = "--color #{exempt_tags.join(" ")} --strict --format #{ENV['CUCUMBER_FORMAT'] || 'Fivemat'}"
11
+ end
12
+
13
+ require 'rake/clean'
14
+
15
+ task :test => [:cucumber]
16
+
17
+ desc "Build HTML documentation"
18
+ task :doc do
19
+ sh 'bundle exec yard'
20
+ end
@@ -0,0 +1,6 @@
1
+ Feature: Compass sprites should be generated on build and copied
2
+ Scenario: Building a clean site with sprites
3
+ Given a successfully built app at "compass-sprites-app"
4
+ When I cd to "build"
5
+ Then the following files should exist:
6
+ | images/icon-s0de2218f58.png |
@@ -0,0 +1,15 @@
1
+ Feature: Web Fonts
2
+
3
+ Scenario: Checking built folder for content
4
+ Given a successfully built app at "fonts-app"
5
+ When I cd to "build"
6
+ Then the following files should exist:
7
+ | stylesheets/fonts.css |
8
+ And the file "stylesheets/fonts.css" should contain "/fonts/StMarie-Thin.otf"
9
+ And the file "stylesheets/fonts.css" should contain "/fonts/blank/blank.otf"
10
+
11
+ Scenario: Rendering scss
12
+ Given the Server is running at "fonts-app"
13
+ When I go to "/stylesheets/fonts.css"
14
+ Then I should see "/fonts/StMarie-Thin.otf"
15
+ And I should see "/fonts/blank/blank.otf"
@@ -0,0 +1,11 @@
1
+ Feature: Support slim templating language
2
+ In order to offer an alternative to Haml
3
+
4
+ Scenario: Rendering Scss in a Slim filter
5
+ Given the Server is running at "slim-app"
6
+ When I go to "/scss.html"
7
+ Then I should see "html, body, div"
8
+ When I go to "/sass.html"
9
+ Then I should see "html, body, div"
10
+ When I go to "/error.html"
11
+ Then I should see "Syntax error"
@@ -0,0 +1,5 @@
1
+ PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__)))
2
+ ENV['TEST'] = 'true'
3
+ require "middleman-core"
4
+ require "middleman-core/step_definitions"
5
+ require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-compass')
File without changes
@@ -0,0 +1,3 @@
1
+ @import "compass";
2
+ @import "icon/*.png";
3
+ @include all-icon-sprites;
File without changes
File without changes
@@ -0,0 +1,5 @@
1
+ @import "compass/css3/font-face"
2
+
3
+ +font-face("St Marie", font-files("StMarie-Thin.otf", opentype))
4
+ +font-face("St Marie", font-files("blank/blank.otf", opentype))
5
+
File without changes
@@ -0,0 +1,8 @@
1
+ doctype 5
2
+ html lang='en'
3
+ head
4
+ meta charset="utf-8"
5
+ scss:
6
+ +global-reset
7
+ body
8
+ h1 Welcome to Slim
@@ -0,0 +1,9 @@
1
+ doctype 5
2
+ html lang='en'
3
+ head
4
+ meta charset="utf-8"
5
+ sass:
6
+ @import "compass"
7
+ +global-reset
8
+ body
9
+ h1 Welcome to Slim
@@ -0,0 +1,9 @@
1
+ doctype 5
2
+ html lang='en'
3
+ head
4
+ meta charset="utf-8"
5
+ scss:
6
+ @import "compass";
7
+ @include global-reset;
8
+ body
9
+ h1 Welcome to Slim
@@ -0,0 +1,64 @@
1
+ module Middleman
2
+ class CompassExtension < Extension
3
+ def initialize(app, options_hash={}, &block)
4
+ require 'middleman-core/renderers/sass'
5
+ require 'compass'
6
+
7
+ super
8
+
9
+ # Hooks to manually update the compass config after we're
10
+ # done with it
11
+ app.define_hook :compass_config
12
+ end
13
+
14
+ def after_configuration
15
+ ::Compass.configuration do |compass|
16
+ compass.project_path = app.config[:source]
17
+ compass.environment = :development
18
+ compass.cache = false
19
+ compass.sass_dir = app.config[:css_dir]
20
+ compass.css_dir = app.config[:css_dir]
21
+ compass.javascripts_dir = app.config[:js_dir]
22
+ compass.fonts_dir = app.config[:fonts_dir]
23
+ compass.images_dir = app.config[:images_dir]
24
+ compass.http_path = app.config[:http_prefix]
25
+
26
+ # Disable this initially, the cache_buster extension will
27
+ # re-enable it if requested.
28
+ compass.asset_cache_buster { |_| nil }
29
+
30
+ # Disable this initially, the relative_assets extension will
31
+
32
+ compass.relative_assets = false
33
+
34
+ # Default output style
35
+ compass.output_style = :nested
36
+ end
37
+
38
+ # Call hook
39
+ app.run_hook_for :compass_config, app, ::Compass.configuration
40
+
41
+ # Tell Tilt to use it as well (for inline sass blocks)
42
+ ::Tilt.register 'sass', CompassSassTemplate
43
+ ::Tilt.prefer(CompassSassTemplate)
44
+
45
+ # Tell Tilt to use it as well (for inline scss blocks)
46
+ ::Tilt.register 'scss', CompassScssTemplate
47
+ ::Tilt.prefer(CompassScssTemplate)
48
+ end
49
+
50
+ # A Compass Sass template for Tilt, adding our options in
51
+ class CompassSassTemplate < ::Middleman::Renderers::Sass::SassPlusCSSFilenameTemplate
52
+ def sass_options
53
+ super.merge(::Compass.configuration.to_sass_engine_options)
54
+ end
55
+ end
56
+
57
+ # A Compass Scss template for Tilt, adding our options in
58
+ class CompassScssTemplate < ::Middleman::Renderers::Sass::ScssPlusCSSFilenameTemplate
59
+ def sass_options
60
+ super.merge(::Compass.configuration.to_sass_engine_options)
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,5 @@
1
+ module Middleman
2
+ module Compass
3
+ VERSION = "4.0.0.alpha.1"
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ require "middleman-core"
2
+
3
+ Middleman::Extensions.register :compass, auto_activate: :before_configuration do
4
+ require "middleman-compass/extension"
5
+ Middleman::CompassExtension
6
+ end
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "middleman-compass/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "middleman-compass"
7
+ s.version = Middleman::Compass::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ['Thomas Reynolds', 'Ben Hollis', 'Karl Freeman']
10
+ s.email = ['me@tdreyno.com', 'ben@benhollis.net', 'karlfreeman@gmail.com']
11
+ s.homepage = "https://github.com/middleman/middleman-compass"
12
+ s.summary = %q{Compass support for Middleman}
13
+ s.description = %q{Compass support for Middleman}
14
+ s.license = "MIT"
15
+ s.files = `git ls-files -z`.split("\0")
16
+ s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
17
+ s.require_paths = ["lib"]
18
+ s.add_dependency("middleman-core", [">= 4.0.0.alpha.1"])
19
+ s.add_dependency('compass', ['>= 1.0.0.rc.1'])
20
+ end
metadata ADDED
@@ -0,0 +1,126 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: middleman-compass
3
+ version: !ruby/object:Gem::Version
4
+ version: 4.0.0.alpha.1
5
+ platform: ruby
6
+ authors:
7
+ - Thomas Reynolds
8
+ - Ben Hollis
9
+ - Karl Freeman
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2014-08-15 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: middleman-core
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: 4.0.0.alpha.1
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: 4.0.0.alpha.1
29
+ - !ruby/object:Gem::Dependency
30
+ name: compass
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: 1.0.0.rc.1
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 1.0.0.rc.1
43
+ description: Compass support for Middleman
44
+ email:
45
+ - me@tdreyno.com
46
+ - ben@benhollis.net
47
+ - karlfreeman@gmail.com
48
+ executables: []
49
+ extensions: []
50
+ extra_rdoc_files: []
51
+ files:
52
+ - ".gitignore"
53
+ - ".travis.yml"
54
+ - CONTRIBUTING.md
55
+ - Gemfile
56
+ - LICENSE.md
57
+ - README.md
58
+ - Rakefile
59
+ - features/compass-sprites.feature
60
+ - features/fonts.feature
61
+ - features/slim.feature
62
+ - features/support/env.rb
63
+ - fixtures/compass-sprites-app/config.rb
64
+ - fixtures/compass-sprites-app/source/images/icon-s0de2218f58.png
65
+ - fixtures/compass-sprites-app/source/images/icon/arrow_down.png
66
+ - fixtures/compass-sprites-app/source/images/icon/arrow_left.png
67
+ - fixtures/compass-sprites-app/source/images/icon/arrow_right.png
68
+ - fixtures/compass-sprites-app/source/images/icon/arrow_up.png
69
+ - fixtures/compass-sprites-app/source/stylesheets/site.css.scss
70
+ - fixtures/fonts-app/config.rb
71
+ - fixtures/fonts-app/source/fonts/StMarie-Thin.otf
72
+ - fixtures/fonts-app/source/fonts/blank/blank.otf
73
+ - fixtures/fonts-app/source/stylesheets/fonts.css.sass
74
+ - fixtures/slim-app/config.rb
75
+ - fixtures/slim-app/source/error.html.slim
76
+ - fixtures/slim-app/source/sass.html.slim
77
+ - fixtures/slim-app/source/scss.html.slim
78
+ - lib/middleman-compass.rb
79
+ - lib/middleman-compass/extension.rb
80
+ - lib/middleman-compass/version.rb
81
+ - middleman-compass.gemspec
82
+ homepage: https://github.com/middleman/middleman-compass
83
+ licenses:
84
+ - MIT
85
+ metadata: {}
86
+ post_install_message:
87
+ rdoc_options: []
88
+ require_paths:
89
+ - lib
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">"
98
+ - !ruby/object:Gem::Version
99
+ version: 1.3.1
100
+ requirements: []
101
+ rubyforge_project:
102
+ rubygems_version: 2.2.2
103
+ signing_key:
104
+ specification_version: 4
105
+ summary: Compass support for Middleman
106
+ test_files:
107
+ - features/compass-sprites.feature
108
+ - features/fonts.feature
109
+ - features/slim.feature
110
+ - features/support/env.rb
111
+ - fixtures/compass-sprites-app/config.rb
112
+ - fixtures/compass-sprites-app/source/images/icon-s0de2218f58.png
113
+ - fixtures/compass-sprites-app/source/images/icon/arrow_down.png
114
+ - fixtures/compass-sprites-app/source/images/icon/arrow_left.png
115
+ - fixtures/compass-sprites-app/source/images/icon/arrow_right.png
116
+ - fixtures/compass-sprites-app/source/images/icon/arrow_up.png
117
+ - fixtures/compass-sprites-app/source/stylesheets/site.css.scss
118
+ - fixtures/fonts-app/config.rb
119
+ - fixtures/fonts-app/source/fonts/StMarie-Thin.otf
120
+ - fixtures/fonts-app/source/fonts/blank/blank.otf
121
+ - fixtures/fonts-app/source/stylesheets/fonts.css.sass
122
+ - fixtures/slim-app/config.rb
123
+ - fixtures/slim-app/source/error.html.slim
124
+ - fixtures/slim-app/source/sass.html.slim
125
+ - fixtures/slim-app/source/scss.html.slim
126
+ has_rdoc: