middleman 2.0.13.2-x86-mingw32 → 2.0.14.pre2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. data/.travis.yml +2 -0
  2. data/CHANGELOG +8 -0
  3. data/features/sprockets.feature +35 -5
  4. data/features/sprockets_gems.feature +7 -4
  5. data/fixtures/sprockets-app/config.rb +2 -1
  6. data/fixtures/sprockets-app/source/library/css/plain.css +3 -0
  7. data/fixtures/sprockets-app/source/library/css/sprockets_base1.css.scss +1 -0
  8. data/fixtures/sprockets-app/source/library/css/sprockets_base2.css.scss +1 -0
  9. data/fixtures/sprockets-app/source/library/css/sprockets_sub.css.scss +1 -0
  10. data/fixtures/sprockets-app/source/{jquery_include.js → library/js/jquery_include.js} +0 -0
  11. data/fixtures/sprockets-app/source/library/js/plain.js +3 -0
  12. data/fixtures/sprockets-app/source/library/{javascripts → js}/sprockets_base.js +0 -0
  13. data/fixtures/sprockets-app/source/library/{javascripts → js}/sprockets_sub.js +0 -0
  14. data/fixtures/sprockets-app/source/library/stylesheets/bootstrap_include.css.scss +1 -0
  15. data/fixtures/test-app/source/stylesheets/sprockets_base1.css.scss +1 -0
  16. data/fixtures/test-app/source/stylesheets/sprockets_base2.css.scss +1 -0
  17. data/fixtures/test-app/source/stylesheets/sprockets_sub.css.scss +1 -0
  18. data/lib/middleman.rb +3 -2
  19. data/lib/middleman/cli.rb +1 -1
  20. data/lib/middleman/core_extensions/compass.rb +13 -2
  21. data/lib/middleman/core_extensions/front_matter.rb +3 -0
  22. data/lib/middleman/core_extensions/rendering.rb +1 -0
  23. data/lib/middleman/core_extensions/sprockets.rb +51 -24
  24. data/lib/middleman/features/minify_css.rb +2 -3
  25. data/lib/middleman/features/minify_css/cssmin.rb +55 -0
  26. data/lib/middleman/renderers/erb.rb +34 -0
  27. data/lib/middleman/renderers/sass.rb +33 -23
  28. data/lib/middleman/version.rb +1 -1
  29. data/middleman-x86-mingw32.gemspec +4 -1
  30. data/middleman.gemspec +4 -1
  31. metadata +175 -108
@@ -2,4 +2,6 @@ rvm:
2
2
  - 1.8.7
3
3
  - 1.9.2
4
4
  - 1.9.3
5
+ - rbx-2.0
6
+ - jruby
5
7
  script: "bundle exec rake test"
data/CHANGELOG CHANGED
@@ -1,3 +1,11 @@
1
+ 2.0.14
2
+ ====
3
+ Finally support Compass in Sprockets! Thanks to @xdite and @petebrowne
4
+
5
+ 2.0.13.2
6
+ ====
7
+ Update Windows eventmachine dep
8
+
1
9
  2.0.13.1
2
10
  ====
3
11
  build --clean shouldn't remove dotfiles
@@ -1,16 +1,21 @@
1
1
  Feature: Sprockets
2
2
 
3
- Scenario: Sprockets require
3
+ Scenario: Sprockets JS require
4
4
  Given the Server is running at "test-app"
5
5
  When I go to "/javascripts/sprockets_base.js"
6
6
  Then I should see "sprockets_sub_function"
7
7
 
8
- Scenario: Sprockets require with custom :js_dir
8
+ Scenario: Sprockets JS require with custom :js_dir
9
9
  Given the Server is running at "sprockets-app"
10
- When I go to "/library/javascripts/sprockets_base.js"
10
+ When I go to "/library/js/sprockets_base.js"
11
11
  Then I should see "sprockets_sub_function"
12
12
 
13
- Scenario: Sprockets should have access to yaml data
13
+ Scenario: Plain JS require with custom :js_dir
14
+ Given the Server is running at "sprockets-app"
15
+ When I go to "/library/css/plain.css"
16
+ Then I should see "helloWorld"
17
+
18
+ Scenario: Sprockets JS should have access to yaml data
14
19
  Given the Server is running at "test-app"
15
20
  When I go to "/javascripts/multiple_engines.js"
16
21
  Then I should see "Hello One"
@@ -18,4 +23,29 @@ Feature: Sprockets
18
23
  Scenario: Multiple engine files should build correctly
19
24
  Given a built app at "test-app"
20
25
  Then "javascripts/multiple_engines.js" should exist at "test-app" and include "Hello One"
21
- And cleanup built app at "test-app"
26
+ And cleanup built app at "test-app"
27
+
28
+ Scenario: Sprockets CSS require //require
29
+ Given the Server is running at "test-app"
30
+ When I go to "/stylesheets/sprockets_base1.css"
31
+ Then I should see "hello"
32
+
33
+ Scenario: Sprockets CSS require @import
34
+ Given the Server is running at "test-app"
35
+ When I go to "/stylesheets/sprockets_base2.css"
36
+ Then I should see "hello"
37
+
38
+ Scenario: Sprockets CSS require with custom :css_dir //require
39
+ Given the Server is running at "sprockets-app"
40
+ When I go to "/library/css/sprockets_base1.css"
41
+ Then I should see "hello"
42
+
43
+ Scenario: Plain CSS require with custom :css_dir
44
+ Given the Server is running at "sprockets-app"
45
+ When I go to "/library/css/plain.css"
46
+ Then I should see "helloWorld"
47
+
48
+ Scenario: Sprockets CSS require with custom :css_dir @import
49
+ Given the Server is running at "sprockets-app"
50
+ When I go to "/library/css/sprockets_base2.css"
51
+ Then I should see "hello"
@@ -1,7 +1,10 @@
1
- @wip
2
1
  Feature: Sprockets Gems
3
-
4
2
  Scenario: Sprockets can pull jQuery from gem
5
3
  Given the Server is running at "sprockets-app"
6
- When I go to "/javascripts/jquery_include.js"
7
- Then I should see "var jQuery ="
4
+ When I go to "/library/js/jquery_include.js"
5
+ Then I should see "var jQuery ="
6
+
7
+ # Scenario: Sprockets can pull CSS from gem
8
+ # Given the Server is running at "sprockets-app"
9
+ # When I go to "/library/css/bootstrap_include.css"
10
+ # Then I should see "Bootstrap"
@@ -1 +1,2 @@
1
- set :js_dir, "library/javascripts"
1
+ set :js_dir, "library/js"
2
+ set :css_dir, "library/css"
@@ -0,0 +1,3 @@
1
+ #helloWorld {
2
+ color: red;
3
+ }
@@ -0,0 +1 @@
1
+ //= require "sprockets_sub"
@@ -0,0 +1,3 @@
1
+ function hellowWorld() {
2
+
3
+ }
@@ -0,0 +1 @@
1
+ //= require "sprockets_sub"
@@ -0,0 +1 @@
1
+ @import "sprockets_sub";
@@ -0,0 +1 @@
1
+ hello { world: "hi"; }
@@ -48,7 +48,7 @@
48
48
  #
49
49
  # [Visit the website]: http://middlemanapp.com
50
50
  # [Read the wiki]: https://github.com/tdreyno/middleman/wiki
51
- # [Email the users group]: http://groups.google.com/group/middleman-users
51
+ # [Email the users group]: https://convore.com/middleman/
52
52
  # [Submit bug reports]: https://github.com/tdreyno/middleman/issues
53
53
 
54
54
  # Setup our load paths
@@ -73,6 +73,7 @@ module Middleman
73
73
  autoload :Sass, "middleman/renderers/sass"
74
74
  autoload :Slim, "middleman/renderers/slim"
75
75
  autoload :Markdown, "middleman/renderers/markdown"
76
+ autoload :ERb, "middleman/renderers/erb"
76
77
  autoload :CoffeeScript, "middleman/renderers/coffee_script"
77
78
  autoload :Liquid, "middleman/renderers/liquid"
78
79
  end
@@ -199,4 +200,4 @@ module Middleman
199
200
  end
200
201
 
201
202
  require "middleman/version"
202
- Middleman.load_extensions_in_path
203
+ Middleman.load_extensions_in_path
@@ -12,7 +12,7 @@ module Middleman
12
12
  help_check if options[:help]
13
13
  end
14
14
 
15
- desc "init NAME", "Create new Middleman project directory NAME"
15
+ desc "init NAME [options]", "Create new Middleman project directory NAME"
16
16
  available_templates = Middleman::Templates.registered_names.join(", ")
17
17
  method_option "template", :aliases => "-T", :default => "default", :desc => "Optionally use a pre-defined project template: #{available_templates}"
18
18
  method_option "css_dir", :default => "stylesheets", :desc => 'The path to the css files'
@@ -68,7 +68,7 @@ module Middleman::CoreExtensions::Compass
68
68
  config.asset_cache_buster :none
69
69
  config.output_style = :nested
70
70
 
71
- config.add_import_path(config.sass_dir)
71
+ # config.add_import_path(config.sass_dir)
72
72
  end
73
73
 
74
74
  # Required for relative paths
@@ -84,8 +84,9 @@ module Middleman::CoreExtensions::Compass
84
84
  end
85
85
 
86
86
  app.execute_after_compass_init!
87
+ app.execute_after_compass_config!
87
88
 
88
- app.set :sass, ::Compass.configuration.to_sass_engine_options
89
+ # app.set :sass, ::Compass.configuration.to_sass_engine_options
89
90
  end
90
91
  end
91
92
  alias :included :registered
@@ -102,5 +103,15 @@ module Middleman::CoreExtensions::Compass
102
103
  @run_after_compass ||= []
103
104
  @run_after_compass.each { |block| block.call(::Compass.configuration) }
104
105
  end
106
+
107
+ def after_compass_config(&block)
108
+ @run_after_compass_config ||= []
109
+ @run_after_compass_config << block
110
+ end
111
+
112
+ def execute_after_compass_config!
113
+ @run_after_compass_config ||= []
114
+ @run_after_compass_config.each { |block| block.call() }
115
+ end
105
116
  end
106
117
  end
@@ -101,6 +101,9 @@ module Middleman::CoreExtensions::FrontMatter
101
101
  class ERBTemplate < ::Tilt::ERBTemplate
102
102
  include Middleman::CoreExtensions::FrontMatter::YamlAware
103
103
  end
104
+ class ErubisTemplate < ::Tilt::ErubisTemplate
105
+ include Middleman::CoreExtensions::FrontMatter::YamlAware
106
+ end
104
107
 
105
108
  class LiquidTemplate < ::Tilt::LiquidTemplate
106
109
  include Middleman::CoreExtensions::FrontMatter::YamlAware
@@ -11,6 +11,7 @@ module Middleman::CoreExtensions::Rendering
11
11
  app.register Middleman::Renderers::Haml
12
12
  app.register Middleman::Renderers::Sass
13
13
  app.register Middleman::Renderers::Markdown
14
+ app.register Middleman::Renderers::ERb
14
15
  app.register Middleman::Renderers::CoffeeScript
15
16
  app.register Middleman::Renderers::Liquid
16
17
  end
@@ -6,6 +6,7 @@ module Middleman::CoreExtensions::Sprockets
6
6
  class << self
7
7
  def registered(app)
8
8
  app.set :js_compressor, false
9
+ app.set :css_compressor, false
9
10
 
10
11
  # Cut off every extension after .js (which sprockets eats up)
11
12
  app.build_reroute do |destination, request_path|
@@ -22,21 +23,46 @@ module Middleman::CoreExtensions::Sprockets
22
23
  app.after_configuration do
23
24
  js_env = Middleman::CoreExtensions::Sprockets::JavascriptEnvironment.new(app)
24
25
 
25
- js_dir = File.join("vendor", "assets", "javascripts")
26
+ vendor_dir = File.join("vendor", "assets", "javascripts")
26
27
  gems_with_js = ::Middleman.rubygems_latest_specs.select do |spec|
27
- ::Middleman.spec_has_file?(spec, js_dir)
28
+ ::Middleman.spec_has_file?(spec, vendor_dir)
28
29
  end.each do |spec|
29
- js_env.append_path File.join(spec.full_gem_path, js_dir)
30
+ js_env.append_path File.join(spec.full_gem_path, vendor_dir)
31
+ end
32
+
33
+ app_dir = File.join("app", "assets", "javascripts")
34
+ gems_with_js = ::Middleman.rubygems_latest_specs.select do |spec|
35
+ ::Middleman.spec_has_file?(spec, app_dir)
36
+ end.each do |spec|
37
+ js_env.append_path File.join(spec.full_gem_path, app_dir)
30
38
  end
31
39
 
32
40
  # add paths to js_env (vendor/assets/javascripts)
33
41
  app.map "/#{app.js_dir}" do
34
42
  run js_env
35
43
  end
44
+ end
45
+
46
+ app.after_compass_config do
47
+ css_env = Middleman::CoreExtensions::Sprockets::StylesheetEnvironment.new(app)
36
48
 
37
- # app.map "/#{app.css_dir}" do
38
- # run Middleman::CoreExtensions::Sprockets::StylesheetEnvironment.new(app)
39
- # end
49
+ vendor_dir = File.join("vendor", "assets", "stylesheets")
50
+ gems_with_css = ::Middleman.rubygems_latest_specs.select do |spec|
51
+ ::Middleman.spec_has_file?(spec, vendor_dir)
52
+ end.each do |spec|
53
+ css_env.append_path File.join(spec.full_gem_path, vendor_dir)
54
+ end
55
+
56
+ app_dir = File.join("app", "assets", "stylesheets")
57
+ gems_with_css = ::Middleman.rubygems_latest_specs.select do |spec|
58
+ ::Middleman.spec_has_file?(spec, app_dir)
59
+ end.each do |spec|
60
+ css_env.append_path File.join(spec.full_gem_path, app_dir)
61
+ end
62
+
63
+ app.map "/#{app.css_dir}" do
64
+ run css_env
65
+ end
40
66
  end
41
67
  end
42
68
  alias :included :registered
@@ -68,7 +94,7 @@ module Middleman::CoreExtensions::Sprockets
68
94
  super
69
95
 
70
96
  # Disable css
71
- unregister_processor "text/css", ::Sprockets::DirectiveProcessor
97
+ # unregister_processor "text/css", ::Sprockets::DirectiveProcessor
72
98
 
73
99
  self.js_compressor = app.settings.js_compressor
74
100
 
@@ -82,21 +108,22 @@ module Middleman::CoreExtensions::Sprockets
82
108
  end
83
109
  end
84
110
 
85
- # class StylesheetEnvironment < MiddlemanEnvironment
86
- # def initialize(app)
87
- # super
88
- #
89
- # # Disable js
90
- # unregister_processor "application/javascript", ::Sprockets::DirectiveProcessor
91
- #
92
- # # configure search paths
93
- # stylesheets_path = File.join(File.expand_path(app.views), app.css_dir)
94
- # append_path stylesheets_path
95
- # end
96
- #
97
- # def css_exception_response(exception)
98
- # expire_index!
99
- # super(exception)
100
- # end
101
- # end
111
+ class StylesheetEnvironment < MiddlemanEnvironment
112
+ def initialize(app)
113
+ super
114
+
115
+ # Disable js
116
+ # unregister_processor "application/javascript", ::Sprockets::DirectiveProcessor
117
+
118
+ self.css_compressor = app.settings.css_compressor
119
+
120
+ # configure search paths
121
+ append_path app.css_dir
122
+ end
123
+
124
+ def css_exception_response(exception)
125
+ expire_index!
126
+ super(exception)
127
+ end
128
+ end
102
129
  end
@@ -1,9 +1,8 @@
1
1
  module Middleman::Features::MinifyCss
2
2
  class << self
3
3
  def registered(app)
4
- app.compass_config do |config|
5
- config.output_style = :compressed
6
- end
4
+ require "middleman/features/minify_css/cssmin"
5
+ app.set :css_compressor, ::CSSMin
7
6
  end
8
7
  alias :included :registered
9
8
  end
@@ -0,0 +1,55 @@
1
+ #--
2
+ # Copyright (c) 2008 Ryan Grove <ryan@wonko.com>
3
+ # All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without
6
+ # modification, are permitted provided that the following conditions are met:
7
+ #
8
+ # * Redistributions of source code must retain the above copyright notice,
9
+ # this list of conditions and the following disclaimer.
10
+ # * Redistributions in binary form must reproduce the above copyright notice,
11
+ # this list of conditions and the following disclaimer in the documentation
12
+ # and/or other materials provided with the distribution.
13
+ # * Neither the name of this project nor the names of its contributors may be
14
+ # used to endorse or promote products derived from this software without
15
+ # specific prior written permission.
16
+ #
17
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
+ # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
21
+ # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
+ # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
+ # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
+ # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
+ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+ #++
28
+
29
+ module CSSMin
30
+ def self.compress(input)
31
+ css = input.is_a?(IO) ? input.read : input.dup.to_s
32
+ css.gsub!(/\/\*[\s\S]*?\*\//, '')
33
+ css.gsub!(/\s+/, ' ')
34
+ css.gsub!(/"\\"\}\\""/, '___BMH___')
35
+ css.gsub!(/(?:^|\})[^\{:]+\s+:+[^\{]*\{/) do |match|
36
+ match.gsub(':', '___PSEUDOCLASSCOLON___')
37
+ end
38
+ css.gsub!(/\s+([!\{\};:>+\(\)\],])/, '\1')
39
+ css.gsub!('___PSEUDOCLASSCOLON___', ':')
40
+ css.gsub!(/([!\{\}:;>+\(\[,])\s+/, '\1')
41
+ css.gsub!(/([^;\}])\}/, '\1;}')
42
+ css.gsub!(/([\s:])([+-]?0)(?:%|em|ex|px|in|cm|mm|pt|pc)/i, '\1\2')
43
+ css.gsub!(/:(?:0 )+0;/, ':0;')
44
+ css.gsub!('background-position:0;', 'background-position:0 0;')
45
+ css.gsub!(/(:|\s)0+\.(\d+)/, '\1.\2')
46
+ css.gsub!(/rgb\s*\(\s*([0-9,\s]+)\s*\)/) do |match|
47
+ '#' << $1.scan(/\d+/).map{|n| n.to_i.to_s(16).rjust(2, '0') }.join
48
+ end
49
+ css.gsub!(/([^"'=\s])\s*#([0-9a-f])\2([0-9a-f])\3([0-9a-f])\4/i, '\1 #\2\3\4')
50
+ css.gsub!(/[^\}]+\{;\}\n/, '')
51
+ css.gsub!('___BMH___', '"\"}\""')
52
+ css.gsub!(/;;+/, ';')
53
+ css.strip
54
+ end
55
+ end
@@ -0,0 +1,34 @@
1
+ require "tilt"
2
+
3
+ module Middleman::Renderers::ERb
4
+ class << self
5
+ def registered(app)
6
+ app.extend ClassMethods
7
+
8
+ app.set :erb_engine, :erb
9
+
10
+ if !app.respond_to? :erb_engine_prefix
11
+ app.set :erb_engine_prefix, ::Tilt
12
+ end
13
+
14
+ app.after_configuration do
15
+ engine = app.settings.erb_engine
16
+
17
+ if engine.is_a? Symbol
18
+ engine = app.tilt_template_from_symbol(engine)
19
+ end
20
+
21
+ ::Tilt.prefer(engine)
22
+ end
23
+ end
24
+ alias :included :registered
25
+ end
26
+
27
+ module ClassMethods
28
+ def tilt_template_from_symbol(engine)
29
+ engine = engine.to_s
30
+ engine = engine == "erb" ? "ERB" : engine.camelize
31
+ settings.erb_engine_prefix.const_get("#{engine}Template")
32
+ end
33
+ end
34
+ end
@@ -1,5 +1,6 @@
1
+ require "sprockets"
2
+ require "sprockets-sass"
1
3
  require "sass"
2
- require "sass/plugin"
3
4
 
4
5
  module Middleman::Renderers::Sass
5
6
  class << self
@@ -9,41 +10,50 @@ module Middleman::Renderers::Sass
9
10
  end
10
11
  alias :included :registered
11
12
  end
12
-
13
- class SassPlusCSSFilenameTemplate < ::Tilt::SassTemplate
14
- def sass_options_with_scope(scope)
15
- return sass_options if basename.nil?
16
-
17
- location_of_sass_file = if scope.build?
18
- File.join(scope.root, scope.build_dir)
19
- else
20
- scope.views
21
- end
22
-
23
- parts = basename.split('.')
24
- parts.pop
25
- css_filename = File.join(location_of_sass_file, scope.css_dir, parts.join("."))
26
- sass_options.merge(scope.settings.sass).merge(:css_filename => css_filename)
27
- end
28
13
 
29
- def evaluate(scope, locals, &block)
30
- @engine = ::Sass::Engine.new(data, sass_options_with_scope(scope.class))
31
-
14
+ class SassPlusCSSFilenameTemplate < ::Sprockets::Sass::SassTemplate
15
+ self.default_mime_type = "text/css"
16
+
17
+ # Add exception messaging
18
+ def evaluate(context, locals, &block)
32
19
  begin
33
20
  super
34
21
  rescue Sass::SyntaxError => e
35
22
  Sass::SyntaxError.exception_to_css(e, :full_exception => true)
36
23
  end
37
24
  end
25
+
26
+ protected
27
+ def sass_options
28
+ location_of_sass_file = if @context.build?
29
+ File.expand_path(@context.build_dir, @context.root)
30
+ else
31
+ File.expand_path(@context.views, @context.root)
32
+ end
33
+
34
+ parts = basename.split('.')
35
+ parts.pop
36
+ css_filename = File.join(location_of_sass_file, @context.css_dir, parts.join("."))
37
+
38
+ super.merge(
39
+ :css_filename => css_filename
40
+ )
41
+ end
38
42
  end
43
+ ::Sprockets.register_engine ".sass", SassPlusCSSFilenameTemplate
39
44
  ::Tilt.register 'sass', SassPlusCSSFilenameTemplate
40
45
  ::Tilt.prefer(SassPlusCSSFilenameTemplate)
41
-
46
+
42
47
  class ScssPlusCSSFilenameTemplate < SassPlusCSSFilenameTemplate
43
- def sass_options_with_scope(scope)
44
- super.merge(:syntax => :scss)
48
+ self.default_mime_type = "text/css"
49
+
50
+ # Define the expected syntax for the template
51
+ def syntax
52
+ :scss
45
53
  end
46
54
  end
55
+
56
+ ::Sprockets.register_engine ".scss", ScssPlusCSSFilenameTemplate
47
57
  ::Tilt.register 'scss', ScssPlusCSSFilenameTemplate
48
58
  ::Tilt.prefer(ScssPlusCSSFilenameTemplate)
49
59
  end
@@ -1,3 +1,3 @@
1
1
  module Middleman
2
- VERSION = "2.0.13.2"
2
+ VERSION = "2.0.14.pre2"
3
3
  end
@@ -51,6 +51,7 @@ eos
51
51
  s.add_dependency("compass", ["~> 0.11.3"])
52
52
  s.add_dependency("coffee-script", ["~> 2.2.0"])
53
53
  s.add_dependency("sprockets", ["~> 2.0.3"])
54
+ s.add_dependency("sprockets-sass", ["~> 0.3.0"])
54
55
  s.add_dependency("padrino-core", ["~> 0.10.5"])
55
56
  s.add_dependency("padrino-helpers", ["~> 0.10.5"])
56
57
 
@@ -58,7 +59,7 @@ eos
58
59
  s.add_dependency("win32-process", ["~> 0.6.5"])
59
60
  s.add_dependency("rb-fchange")
60
61
 
61
- s.add_dependency("guard", ["~> 0.6.2"])
62
+ s.add_dependency("guard", ["~> 0.8.8"])
62
63
  s.add_dependency("middleman-livereload", ["~> 0.2.0"])
63
64
 
64
65
  # Development and test
@@ -68,5 +69,7 @@ eos
68
69
  s.add_development_dependency("cucumber", ["~> 1.0.2"])
69
70
  s.add_development_dependency("rake", ["~> 0.9.2"])
70
71
  s.add_development_dependency("rspec", ["~> 2.6.0"])
72
+ s.add_development_dependency("jquery-rails")
73
+ s.add_development_dependency("bootstrap-rails")
71
74
  end
72
75
 
@@ -53,10 +53,11 @@ eos
53
53
  s.add_dependency("coffee-script", ["~> 2.2.0"])
54
54
  s.add_dependency("execjs", ["~> 1.2.7"])
55
55
  s.add_dependency("sprockets", ["~> 2.0.3"])
56
+ s.add_dependency("sprockets-sass", ["~> 0.3.0"])
56
57
  s.add_dependency("padrino-core", ["~> 0.10.5"])
57
58
  s.add_dependency("padrino-helpers", ["~> 0.10.5"])
58
59
 
59
- s.add_dependency("guard", ["~> 0.6.2"])
60
+ s.add_dependency("guard", ["~> 0.8.8"])
60
61
  s.add_dependency("middleman-livereload", ["~> 0.2.0"])
61
62
 
62
63
  # Development and test
@@ -65,5 +66,7 @@ eos
65
66
  s.add_development_dependency("cucumber", ["~> 1.0.2"])
66
67
  s.add_development_dependency("rake", ["~> 0.9.2"])
67
68
  s.add_development_dependency("rspec", ["~> 2.6.0"])
69
+ s.add_development_dependency("jquery-rails")
70
+ s.add_development_dependency("bootstrap-rails")
68
71
  end
69
72
 
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman
3
3
  version: !ruby/object:Gem::Version
4
- hash: 95
5
- prerelease:
4
+ hash: 1923831965
5
+ prerelease: 7
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 13
9
+ - 14
10
+ - pre
10
11
  - 2
11
- version: 2.0.13.2
12
+ version: 2.0.14.pre2
12
13
  platform: x86-mingw32
13
14
  authors:
14
15
  - Thomas Reynolds
@@ -16,11 +17,10 @@ autorequire:
16
17
  bindir: bin
17
18
  cert_chain: []
18
19
 
19
- date: 2011-10-26 00:00:00 -07:00
20
+ date: 2011-11-03 00:00:00 -07:00
20
21
  default_executable:
21
22
  dependencies:
22
23
  - !ruby/object:Gem::Dependency
23
- prerelease: false
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
@@ -32,11 +32,11 @@ dependencies:
32
32
  - 3
33
33
  - 5
34
34
  version: 1.3.5
35
- type: :runtime
36
- name: rack
37
35
  version_requirements: *id001
38
- - !ruby/object:Gem::Dependency
36
+ name: rack
39
37
  prerelease: false
38
+ type: :runtime
39
+ - !ruby/object:Gem::Dependency
40
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
@@ -48,11 +48,11 @@ dependencies:
48
48
  - 2
49
49
  - 11
50
50
  version: 1.2.11
51
- type: :runtime
52
- name: thin
53
51
  version_requirements: *id002
54
- - !ruby/object:Gem::Dependency
52
+ name: thin
55
53
  prerelease: false
54
+ type: :runtime
55
+ - !ruby/object:Gem::Dependency
56
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
@@ -64,11 +64,11 @@ dependencies:
64
64
  - 14
65
65
  - 0
66
66
  version: 0.14.0
67
- type: :runtime
68
- name: thor
69
67
  version_requirements: *id003
70
- - !ruby/object:Gem::Dependency
68
+ name: thor
71
69
  prerelease: false
70
+ type: :runtime
71
+ - !ruby/object:Gem::Dependency
72
72
  requirement: &id004 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
@@ -80,11 +80,11 @@ dependencies:
80
80
  - 3
81
81
  - 1
82
82
  version: 1.3.1
83
- type: :runtime
84
- name: tilt
85
83
  version_requirements: *id004
86
- - !ruby/object:Gem::Dependency
84
+ name: tilt
87
85
  prerelease: false
86
+ type: :runtime
87
+ - !ruby/object:Gem::Dependency
88
88
  requirement: &id005 !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
@@ -96,11 +96,11 @@ dependencies:
96
96
  - 6
97
97
  - 0
98
98
  version: 0.6.0
99
- type: :runtime
100
- name: maruku
101
99
  version_requirements: *id005
102
- - !ruby/object:Gem::Dependency
100
+ name: maruku
103
101
  prerelease: false
102
+ type: :runtime
103
+ - !ruby/object:Gem::Dependency
104
104
  requirement: &id006 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
@@ -112,11 +112,11 @@ dependencies:
112
112
  - 3
113
113
  - 1
114
114
  version: 1.3.1
115
- type: :runtime
116
- name: sinatra
117
115
  version_requirements: *id006
118
- - !ruby/object:Gem::Dependency
116
+ name: sinatra
119
117
  prerelease: false
118
+ type: :runtime
119
+ - !ruby/object:Gem::Dependency
120
120
  requirement: &id007 !ruby/object:Gem::Requirement
121
121
  none: false
122
122
  requirements:
@@ -128,11 +128,11 @@ dependencies:
128
128
  - 6
129
129
  - 1
130
130
  version: 0.6.1
131
- type: :runtime
132
- name: rack-test
133
131
  version_requirements: *id007
134
- - !ruby/object:Gem::Dependency
132
+ name: rack-test
135
133
  prerelease: false
134
+ type: :runtime
135
+ - !ruby/object:Gem::Dependency
136
136
  requirement: &id008 !ruby/object:Gem::Requirement
137
137
  none: false
138
138
  requirements:
@@ -144,11 +144,11 @@ dependencies:
144
144
  - 0
145
145
  - 0
146
146
  version: 1.0.0
147
- type: :runtime
148
- name: uglifier
149
147
  version_requirements: *id008
150
- - !ruby/object:Gem::Dependency
148
+ name: uglifier
151
149
  prerelease: false
150
+ type: :runtime
151
+ - !ruby/object:Gem::Dependency
152
152
  requirement: &id009 !ruby/object:Gem::Requirement
153
153
  none: false
154
154
  requirements:
@@ -160,11 +160,11 @@ dependencies:
160
160
  - 0
161
161
  - 2
162
162
  version: 1.0.2
163
- type: :runtime
164
- name: slim
165
163
  version_requirements: *id009
166
- - !ruby/object:Gem::Dependency
164
+ name: slim
167
165
  prerelease: false
166
+ type: :runtime
167
+ - !ruby/object:Gem::Dependency
168
168
  requirement: &id010 !ruby/object:Gem::Requirement
169
169
  none: false
170
170
  requirements:
@@ -176,11 +176,11 @@ dependencies:
176
176
  - 1
177
177
  - 0
178
178
  version: 3.1.0
179
- type: :runtime
180
- name: haml
181
179
  version_requirements: *id010
182
- - !ruby/object:Gem::Dependency
180
+ name: haml
183
181
  prerelease: false
182
+ type: :runtime
183
+ - !ruby/object:Gem::Dependency
184
184
  requirement: &id011 !ruby/object:Gem::Requirement
185
185
  none: false
186
186
  requirements:
@@ -192,11 +192,11 @@ dependencies:
192
192
  - 1
193
193
  - 7
194
194
  version: 3.1.7
195
- type: :runtime
196
- name: sass
197
195
  version_requirements: *id011
198
- - !ruby/object:Gem::Dependency
196
+ name: sass
199
197
  prerelease: false
198
+ type: :runtime
199
+ - !ruby/object:Gem::Dependency
200
200
  requirement: &id012 !ruby/object:Gem::Requirement
201
201
  none: false
202
202
  requirements:
@@ -208,11 +208,11 @@ dependencies:
208
208
  - 11
209
209
  - 3
210
210
  version: 0.11.3
211
- type: :runtime
212
- name: compass
213
211
  version_requirements: *id012
214
- - !ruby/object:Gem::Dependency
212
+ name: compass
215
213
  prerelease: false
214
+ type: :runtime
215
+ - !ruby/object:Gem::Dependency
216
216
  requirement: &id013 !ruby/object:Gem::Requirement
217
217
  none: false
218
218
  requirements:
@@ -224,11 +224,11 @@ dependencies:
224
224
  - 2
225
225
  - 0
226
226
  version: 2.2.0
227
- type: :runtime
228
- name: coffee-script
229
227
  version_requirements: *id013
230
- - !ruby/object:Gem::Dependency
228
+ name: coffee-script
231
229
  prerelease: false
230
+ type: :runtime
231
+ - !ruby/object:Gem::Dependency
232
232
  requirement: &id014 !ruby/object:Gem::Requirement
233
233
  none: false
234
234
  requirements:
@@ -240,12 +240,28 @@ dependencies:
240
240
  - 0
241
241
  - 3
242
242
  version: 2.0.3
243
- type: :runtime
244
- name: sprockets
245
243
  version_requirements: *id014
246
- - !ruby/object:Gem::Dependency
244
+ name: sprockets
247
245
  prerelease: false
246
+ type: :runtime
247
+ - !ruby/object:Gem::Dependency
248
248
  requirement: &id015 !ruby/object:Gem::Requirement
249
+ none: false
250
+ requirements:
251
+ - - ~>
252
+ - !ruby/object:Gem::Version
253
+ hash: 19
254
+ segments:
255
+ - 0
256
+ - 3
257
+ - 0
258
+ version: 0.3.0
259
+ version_requirements: *id015
260
+ name: sprockets-sass
261
+ prerelease: false
262
+ type: :runtime
263
+ - !ruby/object:Gem::Dependency
264
+ requirement: &id016 !ruby/object:Gem::Requirement
249
265
  none: false
250
266
  requirements:
251
267
  - - ~>
@@ -256,12 +272,12 @@ dependencies:
256
272
  - 10
257
273
  - 5
258
274
  version: 0.10.5
259
- type: :runtime
275
+ version_requirements: *id016
260
276
  name: padrino-core
261
- version_requirements: *id015
262
- - !ruby/object:Gem::Dependency
263
277
  prerelease: false
264
- requirement: &id016 !ruby/object:Gem::Requirement
278
+ type: :runtime
279
+ - !ruby/object:Gem::Dependency
280
+ requirement: &id017 !ruby/object:Gem::Requirement
265
281
  none: false
266
282
  requirements:
267
283
  - - ~>
@@ -272,12 +288,12 @@ dependencies:
272
288
  - 10
273
289
  - 5
274
290
  version: 0.10.5
275
- type: :runtime
291
+ version_requirements: *id017
276
292
  name: padrino-helpers
277
- version_requirements: *id016
278
- - !ruby/object:Gem::Dependency
279
293
  prerelease: false
280
- requirement: &id017 !ruby/object:Gem::Requirement
294
+ type: :runtime
295
+ - !ruby/object:Gem::Dependency
296
+ requirement: &id018 !ruby/object:Gem::Requirement
281
297
  none: false
282
298
  requirements:
283
299
  - - "="
@@ -291,12 +307,12 @@ dependencies:
291
307
  - 4
292
308
  - 1
293
309
  version: 1.0.0.beta.4.1
294
- type: :runtime
310
+ version_requirements: *id018
295
311
  name: eventmachine
296
- version_requirements: *id017
297
- - !ruby/object:Gem::Dependency
298
312
  prerelease: false
299
- requirement: &id018 !ruby/object:Gem::Requirement
313
+ type: :runtime
314
+ - !ruby/object:Gem::Dependency
315
+ requirement: &id019 !ruby/object:Gem::Requirement
300
316
  none: false
301
317
  requirements:
302
318
  - - ~>
@@ -307,12 +323,12 @@ dependencies:
307
323
  - 6
308
324
  - 5
309
325
  version: 0.6.5
310
- type: :runtime
326
+ version_requirements: *id019
311
327
  name: win32-process
312
- version_requirements: *id018
313
- - !ruby/object:Gem::Dependency
314
328
  prerelease: false
315
- requirement: &id019 !ruby/object:Gem::Requirement
329
+ type: :runtime
330
+ - !ruby/object:Gem::Dependency
331
+ requirement: &id020 !ruby/object:Gem::Requirement
316
332
  none: false
317
333
  requirements:
318
334
  - - ">="
@@ -321,28 +337,28 @@ dependencies:
321
337
  segments:
322
338
  - 0
323
339
  version: "0"
324
- type: :runtime
340
+ version_requirements: *id020
325
341
  name: rb-fchange
326
- version_requirements: *id019
327
- - !ruby/object:Gem::Dependency
328
342
  prerelease: false
329
- requirement: &id020 !ruby/object:Gem::Requirement
343
+ type: :runtime
344
+ - !ruby/object:Gem::Dependency
345
+ requirement: &id021 !ruby/object:Gem::Requirement
330
346
  none: false
331
347
  requirements:
332
348
  - - ~>
333
349
  - !ruby/object:Gem::Version
334
- hash: 3
350
+ hash: 47
335
351
  segments:
336
352
  - 0
337
- - 6
338
- - 2
339
- version: 0.6.2
340
- type: :runtime
353
+ - 8
354
+ - 8
355
+ version: 0.8.8
356
+ version_requirements: *id021
341
357
  name: guard
342
- version_requirements: *id020
343
- - !ruby/object:Gem::Dependency
344
358
  prerelease: false
345
- requirement: &id021 !ruby/object:Gem::Requirement
359
+ type: :runtime
360
+ - !ruby/object:Gem::Dependency
361
+ requirement: &id022 !ruby/object:Gem::Requirement
346
362
  none: false
347
363
  requirements:
348
364
  - - ~>
@@ -353,12 +369,12 @@ dependencies:
353
369
  - 2
354
370
  - 0
355
371
  version: 0.2.0
356
- type: :runtime
372
+ version_requirements: *id022
357
373
  name: middleman-livereload
358
- version_requirements: *id021
359
- - !ruby/object:Gem::Dependency
360
374
  prerelease: false
361
- requirement: &id022 !ruby/object:Gem::Requirement
375
+ type: :runtime
376
+ - !ruby/object:Gem::Dependency
377
+ requirement: &id023 !ruby/object:Gem::Requirement
362
378
  none: false
363
379
  requirements:
364
380
  - - ~>
@@ -369,12 +385,12 @@ dependencies:
369
385
  - 1
370
386
  - 1
371
387
  version: 0.1.1
372
- type: :development
388
+ version_requirements: *id023
373
389
  name: coffee-filter
374
- version_requirements: *id022
375
- - !ruby/object:Gem::Dependency
376
390
  prerelease: false
377
- requirement: &id023 !ruby/object:Gem::Requirement
391
+ type: :development
392
+ - !ruby/object:Gem::Dependency
393
+ requirement: &id024 !ruby/object:Gem::Requirement
378
394
  none: false
379
395
  requirements:
380
396
  - - ~>
@@ -385,12 +401,12 @@ dependencies:
385
401
  - 2
386
402
  - 0
387
403
  version: 2.2.0
388
- type: :development
404
+ version_requirements: *id024
389
405
  name: liquid
390
- version_requirements: *id023
391
- - !ruby/object:Gem::Dependency
392
406
  prerelease: false
393
- requirement: &id024 !ruby/object:Gem::Requirement
407
+ type: :development
408
+ - !ruby/object:Gem::Dependency
409
+ requirement: &id025 !ruby/object:Gem::Requirement
394
410
  none: false
395
411
  requirements:
396
412
  - - ~>
@@ -401,12 +417,12 @@ dependencies:
401
417
  - 0
402
418
  - 2
403
419
  version: 1.0.2
404
- type: :development
420
+ version_requirements: *id025
405
421
  name: cucumber
406
- version_requirements: *id024
407
- - !ruby/object:Gem::Dependency
408
422
  prerelease: false
409
- requirement: &id025 !ruby/object:Gem::Requirement
423
+ type: :development
424
+ - !ruby/object:Gem::Dependency
425
+ requirement: &id026 !ruby/object:Gem::Requirement
410
426
  none: false
411
427
  requirements:
412
428
  - - ~>
@@ -417,12 +433,12 @@ dependencies:
417
433
  - 9
418
434
  - 2
419
435
  version: 0.9.2
420
- type: :development
436
+ version_requirements: *id026
421
437
  name: rake
422
- version_requirements: *id025
423
- - !ruby/object:Gem::Dependency
424
438
  prerelease: false
425
- requirement: &id026 !ruby/object:Gem::Requirement
439
+ type: :development
440
+ - !ruby/object:Gem::Dependency
441
+ requirement: &id027 !ruby/object:Gem::Requirement
426
442
  none: false
427
443
  requirements:
428
444
  - - ~>
@@ -433,9 +449,38 @@ dependencies:
433
449
  - 6
434
450
  - 0
435
451
  version: 2.6.0
436
- type: :development
452
+ version_requirements: *id027
437
453
  name: rspec
438
- version_requirements: *id026
454
+ prerelease: false
455
+ type: :development
456
+ - !ruby/object:Gem::Dependency
457
+ requirement: &id028 !ruby/object:Gem::Requirement
458
+ none: false
459
+ requirements:
460
+ - - ">="
461
+ - !ruby/object:Gem::Version
462
+ hash: 3
463
+ segments:
464
+ - 0
465
+ version: "0"
466
+ version_requirements: *id028
467
+ name: jquery-rails
468
+ prerelease: false
469
+ type: :development
470
+ - !ruby/object:Gem::Dependency
471
+ requirement: &id029 !ruby/object:Gem::Requirement
472
+ none: false
473
+ requirements:
474
+ - - ">="
475
+ - !ruby/object:Gem::Version
476
+ hash: 3
477
+ segments:
478
+ - 0
479
+ version: "0"
480
+ version_requirements: *id029
481
+ name: bootstrap-rails
482
+ prerelease: false
483
+ type: :development
439
484
  description: A static site generator based on Sinatra. Providing dozens of templating languages (Haml, Sass, Compass, Slim, CoffeeScript, and more). Makes minification, compression, cache busting, Yaml data (and more) an easy part of your development cycle.
440
485
  email:
441
486
  - me@tdreyno.com
@@ -529,9 +574,15 @@ files:
529
574
  - fixtures/relative-app/source/images/blank.gif
530
575
  - fixtures/relative-app/source/stylesheets/relative_assets.css.sass
531
576
  - fixtures/sprockets-app/config.rb
532
- - fixtures/sprockets-app/source/jquery_include.js
533
- - fixtures/sprockets-app/source/library/javascripts/sprockets_base.js
534
- - fixtures/sprockets-app/source/library/javascripts/sprockets_sub.js
577
+ - fixtures/sprockets-app/source/library/css/plain.css
578
+ - fixtures/sprockets-app/source/library/css/sprockets_base1.css.scss
579
+ - fixtures/sprockets-app/source/library/css/sprockets_base2.css.scss
580
+ - fixtures/sprockets-app/source/library/css/sprockets_sub.css.scss
581
+ - fixtures/sprockets-app/source/library/js/jquery_include.js
582
+ - fixtures/sprockets-app/source/library/js/plain.js
583
+ - fixtures/sprockets-app/source/library/js/sprockets_base.js
584
+ - fixtures/sprockets-app/source/library/js/sprockets_sub.js
585
+ - fixtures/sprockets-app/source/library/stylesheets/bootstrap_include.css.scss
535
586
  - fixtures/test-app/config.rb
536
587
  - fixtures/test-app/data/test.yml
537
588
  - fixtures/test-app/data/test2.json
@@ -600,6 +651,9 @@ files:
600
651
  - fixtures/test-app/source/stylesheets/relative_assets.css.sass
601
652
  - fixtures/test-app/source/stylesheets/site.css.sass
602
653
  - fixtures/test-app/source/stylesheets/site_scss.css.scss
654
+ - fixtures/test-app/source/stylesheets/sprockets_base1.css.scss
655
+ - fixtures/test-app/source/stylesheets/sprockets_base2.css.scss
656
+ - fixtures/test-app/source/stylesheets/sprockets_sub.css.scss
603
657
  - fixtures/test-app/source/stylesheets/static.css
604
658
  - fixtures/test-app/source/sub1/page-classes.html.haml
605
659
  - fixtures/test-app/source/sub1/sub2/page-classes.html.haml
@@ -626,10 +680,12 @@ files:
626
680
  - lib/middleman/features/directory_indexes.rb
627
681
  - lib/middleman/features/lorem.rb
628
682
  - lib/middleman/features/minify_css.rb
683
+ - lib/middleman/features/minify_css/cssmin.rb
629
684
  - lib/middleman/features/minify_javascript.rb
630
685
  - lib/middleman/features/relative_assets.rb
631
686
  - lib/middleman/guard.rb
632
687
  - lib/middleman/renderers/coffee_script.rb
688
+ - lib/middleman/renderers/erb.rb
633
689
  - lib/middleman/renderers/haml.rb
634
690
  - lib/middleman/renderers/liquid.rb
635
691
  - lib/middleman/renderers/markdown.rb
@@ -778,12 +834,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
778
834
  required_rubygems_version: !ruby/object:Gem::Requirement
779
835
  none: false
780
836
  requirements:
781
- - - ">="
837
+ - - ">"
782
838
  - !ruby/object:Gem::Version
783
- hash: 3
839
+ hash: 25
784
840
  segments:
785
- - 0
786
- version: "0"
841
+ - 1
842
+ - 3
843
+ - 1
844
+ version: 1.3.1
787
845
  requirements: []
788
846
 
789
847
  rubyforge_project:
@@ -860,9 +918,15 @@ test_files:
860
918
  - fixtures/relative-app/source/images/blank.gif
861
919
  - fixtures/relative-app/source/stylesheets/relative_assets.css.sass
862
920
  - fixtures/sprockets-app/config.rb
863
- - fixtures/sprockets-app/source/jquery_include.js
864
- - fixtures/sprockets-app/source/library/javascripts/sprockets_base.js
865
- - fixtures/sprockets-app/source/library/javascripts/sprockets_sub.js
921
+ - fixtures/sprockets-app/source/library/css/plain.css
922
+ - fixtures/sprockets-app/source/library/css/sprockets_base1.css.scss
923
+ - fixtures/sprockets-app/source/library/css/sprockets_base2.css.scss
924
+ - fixtures/sprockets-app/source/library/css/sprockets_sub.css.scss
925
+ - fixtures/sprockets-app/source/library/js/jquery_include.js
926
+ - fixtures/sprockets-app/source/library/js/plain.js
927
+ - fixtures/sprockets-app/source/library/js/sprockets_base.js
928
+ - fixtures/sprockets-app/source/library/js/sprockets_sub.js
929
+ - fixtures/sprockets-app/source/library/stylesheets/bootstrap_include.css.scss
866
930
  - fixtures/test-app/config.rb
867
931
  - fixtures/test-app/data/test.yml
868
932
  - fixtures/test-app/data/test2.json
@@ -931,6 +995,9 @@ test_files:
931
995
  - fixtures/test-app/source/stylesheets/relative_assets.css.sass
932
996
  - fixtures/test-app/source/stylesheets/site.css.sass
933
997
  - fixtures/test-app/source/stylesheets/site_scss.css.scss
998
+ - fixtures/test-app/source/stylesheets/sprockets_base1.css.scss
999
+ - fixtures/test-app/source/stylesheets/sprockets_base2.css.scss
1000
+ - fixtures/test-app/source/stylesheets/sprockets_sub.css.scss
934
1001
  - fixtures/test-app/source/stylesheets/static.css
935
1002
  - fixtures/test-app/source/sub1/page-classes.html.haml
936
1003
  - fixtures/test-app/source/sub1/sub2/page-classes.html.haml