middleman 2.0.14.pre2 → 2.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. data/.travis.yml +0 -2
  2. data/CHANGELOG +1 -9
  3. data/features/sprockets.feature +5 -35
  4. data/features/sprockets_gems.feature +4 -7
  5. data/fixtures/sprockets-app/config.rb +1 -2
  6. data/fixtures/sprockets-app/source/{library/js/jquery_include.js → jquery_include.js} +0 -0
  7. data/fixtures/sprockets-app/source/library/{js → javascripts}/sprockets_base.js +0 -0
  8. data/fixtures/sprockets-app/source/library/{js → javascripts}/sprockets_sub.js +0 -0
  9. data/lib/middleman.rb +2 -3
  10. data/lib/middleman/cli.rb +1 -1
  11. data/lib/middleman/core_extensions/compass.rb +2 -13
  12. data/lib/middleman/core_extensions/front_matter.rb +0 -3
  13. data/lib/middleman/core_extensions/rendering.rb +0 -1
  14. data/lib/middleman/core_extensions/routing.rb +1 -0
  15. data/lib/middleman/core_extensions/sprockets.rb +24 -51
  16. data/lib/middleman/features/minify_css.rb +3 -2
  17. data/lib/middleman/renderers/sass.rb +23 -33
  18. data/lib/middleman/version.rb +1 -1
  19. data/middleman-x86-mingw32.gemspec +2 -5
  20. data/middleman.gemspec +1 -4
  21. metadata +35 -103
  22. data/fixtures/sprockets-app/source/library/css/plain.css +0 -3
  23. data/fixtures/sprockets-app/source/library/css/sprockets_base1.css.scss +0 -1
  24. data/fixtures/sprockets-app/source/library/css/sprockets_base2.css.scss +0 -1
  25. data/fixtures/sprockets-app/source/library/css/sprockets_sub.css.scss +0 -1
  26. data/fixtures/sprockets-app/source/library/js/plain.js +0 -3
  27. data/fixtures/sprockets-app/source/library/stylesheets/bootstrap_include.css.scss +0 -1
  28. data/fixtures/test-app/source/stylesheets/sprockets_base1.css.scss +0 -1
  29. data/fixtures/test-app/source/stylesheets/sprockets_base2.css.scss +0 -1
  30. data/fixtures/test-app/source/stylesheets/sprockets_sub.css.scss +0 -1
  31. data/lib/middleman/features/minify_css/cssmin.rb +0 -55
  32. data/lib/middleman/renderers/erb.rb +0 -34
@@ -2,6 +2,4 @@ rvm:
2
2
  - 1.8.7
3
3
  - 1.9.2
4
4
  - 1.9.3
5
- - rbx-2.0
6
- - jruby
7
5
  script: "bundle exec rake test"
data/CHANGELOG CHANGED
@@ -1,14 +1,6 @@
1
1
  2.0.14
2
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
-
9
- 2.0.13.1
10
- ====
11
- build --clean shouldn't remove dotfiles
3
+ Minor fix for i18n
12
4
 
13
5
  2.0.13
14
6
  ====
@@ -1,21 +1,16 @@
1
1
  Feature: Sprockets
2
2
 
3
- Scenario: Sprockets JS require
3
+ Scenario: Sprockets 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 JS require with custom :js_dir
8
+ Scenario: Sprockets require with custom :js_dir
9
9
  Given the Server is running at "sprockets-app"
10
- When I go to "/library/js/sprockets_base.js"
10
+ When I go to "/library/javascripts/sprockets_base.js"
11
11
  Then I should see "sprockets_sub_function"
12
12
 
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
13
+ Scenario: Sprockets should have access to yaml data
19
14
  Given the Server is running at "test-app"
20
15
  When I go to "/javascripts/multiple_engines.js"
21
16
  Then I should see "Hello One"
@@ -23,29 +18,4 @@ Feature: Sprockets
23
18
  Scenario: Multiple engine files should build correctly
24
19
  Given a built app at "test-app"
25
20
  Then "javascripts/multiple_engines.js" should exist at "test-app" and include "Hello One"
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"
21
+ And cleanup built app at "test-app"
@@ -1,10 +1,7 @@
1
+ @wip
1
2
  Feature: Sprockets Gems
3
+
2
4
  Scenario: Sprockets can pull jQuery from gem
3
5
  Given the Server is running at "sprockets-app"
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"
6
+ When I go to "/javascripts/jquery_include.js"
7
+ Then I should see "var jQuery ="
@@ -1,2 +1 @@
1
- set :js_dir, "library/js"
2
- set :css_dir, "library/css"
1
+ set :js_dir, "library/javascripts"
@@ -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]: https://convore.com/middleman/
51
+ # [Email the users group]: http://groups.google.com/group/middleman-users
52
52
  # [Submit bug reports]: https://github.com/tdreyno/middleman/issues
53
53
 
54
54
  # Setup our load paths
@@ -73,7 +73,6 @@ 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"
77
76
  autoload :CoffeeScript, "middleman/renderers/coffee_script"
78
77
  autoload :Liquid, "middleman/renderers/liquid"
79
78
  end
@@ -200,4 +199,4 @@ module Middleman
200
199
  end
201
200
 
202
201
  require "middleman/version"
203
- Middleman.load_extensions_in_path
202
+ 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 [options]", "Create new Middleman project directory NAME"
15
+ desc "init NAME", "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,9 +84,8 @@ module Middleman::CoreExtensions::Compass
84
84
  end
85
85
 
86
86
  app.execute_after_compass_init!
87
- app.execute_after_compass_config!
88
87
 
89
- # app.set :sass, ::Compass.configuration.to_sass_engine_options
88
+ app.set :sass, ::Compass.configuration.to_sass_engine_options
90
89
  end
91
90
  end
92
91
  alias :included :registered
@@ -103,15 +102,5 @@ module Middleman::CoreExtensions::Compass
103
102
  @run_after_compass ||= []
104
103
  @run_after_compass.each { |block| block.call(::Compass.configuration) }
105
104
  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
116
105
  end
117
106
  end
@@ -101,9 +101,6 @@ 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
107
104
 
108
105
  class LiquidTemplate < ::Tilt::LiquidTemplate
109
106
  include Middleman::CoreExtensions::FrontMatter::YamlAware
@@ -11,7 +11,6 @@ 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
15
14
  app.register Middleman::Renderers::CoffeeScript
16
15
  app.register Middleman::Renderers::Liquid
17
16
  end
@@ -39,6 +39,7 @@ module Middleman::CoreExtensions::Routing
39
39
  def paths_for_url(url)
40
40
  url = url.gsub(%r{\/#{settings.index_file}$}, "")
41
41
  url = url.gsub(%r{(\/)$}, "") if url.length > 1
42
+ url = "/" if url.length == 0
42
43
 
43
44
  paths = [url]
44
45
  paths << "#{url}/" if url.length > 1 && url.split("/").last.split('.').length <= 1
@@ -6,7 +6,6 @@ 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
10
9
 
11
10
  # Cut off every extension after .js (which sprockets eats up)
12
11
  app.build_reroute do |destination, request_path|
@@ -23,46 +22,21 @@ module Middleman::CoreExtensions::Sprockets
23
22
  app.after_configuration do
24
23
  js_env = Middleman::CoreExtensions::Sprockets::JavascriptEnvironment.new(app)
25
24
 
26
- vendor_dir = File.join("vendor", "assets", "javascripts")
25
+ js_dir = File.join("vendor", "assets", "javascripts")
27
26
  gems_with_js = ::Middleman.rubygems_latest_specs.select do |spec|
28
- ::Middleman.spec_has_file?(spec, vendor_dir)
27
+ ::Middleman.spec_has_file?(spec, js_dir)
29
28
  end.each do |spec|
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)
29
+ js_env.append_path File.join(spec.full_gem_path, js_dir)
38
30
  end
39
31
 
40
32
  # add paths to js_env (vendor/assets/javascripts)
41
33
  app.map "/#{app.js_dir}" do
42
34
  run js_env
43
35
  end
44
- end
45
-
46
- app.after_compass_config do
47
- css_env = Middleman::CoreExtensions::Sprockets::StylesheetEnvironment.new(app)
48
36
 
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
37
+ # app.map "/#{app.css_dir}" do
38
+ # run Middleman::CoreExtensions::Sprockets::StylesheetEnvironment.new(app)
39
+ # end
66
40
  end
67
41
  end
68
42
  alias :included :registered
@@ -94,7 +68,7 @@ module Middleman::CoreExtensions::Sprockets
94
68
  super
95
69
 
96
70
  # Disable css
97
- # unregister_processor "text/css", ::Sprockets::DirectiveProcessor
71
+ unregister_processor "text/css", ::Sprockets::DirectiveProcessor
98
72
 
99
73
  self.js_compressor = app.settings.js_compressor
100
74
 
@@ -108,22 +82,21 @@ module Middleman::CoreExtensions::Sprockets
108
82
  end
109
83
  end
110
84
 
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
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
129
102
  end
@@ -1,8 +1,9 @@
1
1
  module Middleman::Features::MinifyCss
2
2
  class << self
3
3
  def registered(app)
4
- require "middleman/features/minify_css/cssmin"
5
- app.set :css_compressor, ::CSSMin
4
+ app.compass_config do |config|
5
+ config.output_style = :compressed
6
+ end
6
7
  end
7
8
  alias :included :registered
8
9
  end
@@ -1,6 +1,5 @@
1
- require "sprockets"
2
- require "sprockets-sass"
3
1
  require "sass"
2
+ require "sass/plugin"
4
3
 
5
4
  module Middleman::Renderers::Sass
6
5
  class << self
@@ -10,50 +9,41 @@ module Middleman::Renderers::Sass
10
9
  end
11
10
  alias :included :registered
12
11
  end
13
-
14
- class SassPlusCSSFilenameTemplate < ::Sprockets::Sass::SassTemplate
15
- self.default_mime_type = "text/css"
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
16
22
 
17
- # Add exception messaging
18
- def evaluate(context, locals, &block)
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
+
29
+ def evaluate(scope, locals, &block)
30
+ @engine = ::Sass::Engine.new(data, sass_options_with_scope(scope.class))
31
+
19
32
  begin
20
33
  super
21
34
  rescue Sass::SyntaxError => e
22
35
  Sass::SyntaxError.exception_to_css(e, :full_exception => true)
23
36
  end
24
37
  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
42
38
  end
43
- ::Sprockets.register_engine ".sass", SassPlusCSSFilenameTemplate
44
39
  ::Tilt.register 'sass', SassPlusCSSFilenameTemplate
45
40
  ::Tilt.prefer(SassPlusCSSFilenameTemplate)
46
-
41
+
47
42
  class ScssPlusCSSFilenameTemplate < SassPlusCSSFilenameTemplate
48
- self.default_mime_type = "text/css"
49
-
50
- # Define the expected syntax for the template
51
- def syntax
52
- :scss
43
+ def sass_options_with_scope(scope)
44
+ super.merge(:syntax => :scss)
53
45
  end
54
46
  end
55
-
56
- ::Sprockets.register_engine ".scss", ScssPlusCSSFilenameTemplate
57
47
  ::Tilt.register 'scss', ScssPlusCSSFilenameTemplate
58
48
  ::Tilt.prefer(ScssPlusCSSFilenameTemplate)
59
49
  end
@@ -1,3 +1,3 @@
1
1
  module Middleman
2
- VERSION = "2.0.14.pre2"
2
+ VERSION = "2.0.14"
3
3
  end
@@ -51,15 +51,14 @@ 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"])
55
54
  s.add_dependency("padrino-core", ["~> 0.10.5"])
56
55
  s.add_dependency("padrino-helpers", ["~> 0.10.5"])
57
56
 
58
- s.add_dependency("eventmachine", ["1.0.0.beta.4.1"])
57
+ s.add_dependency("eventmachine", ["1.0.0.beta.3"])
59
58
  s.add_dependency("win32-process", ["~> 0.6.5"])
60
59
  s.add_dependency("rb-fchange")
61
60
 
62
- s.add_dependency("guard", ["~> 0.8.8"])
61
+ s.add_dependency("guard", ["~> 0.6.2"])
63
62
  s.add_dependency("middleman-livereload", ["~> 0.2.0"])
64
63
 
65
64
  # Development and test
@@ -69,7 +68,5 @@ eos
69
68
  s.add_development_dependency("cucumber", ["~> 1.0.2"])
70
69
  s.add_development_dependency("rake", ["~> 0.9.2"])
71
70
  s.add_development_dependency("rspec", ["~> 2.6.0"])
72
- s.add_development_dependency("jquery-rails")
73
- s.add_development_dependency("bootstrap-rails")
74
71
  end
75
72
 
@@ -53,11 +53,10 @@ 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"])
57
56
  s.add_dependency("padrino-core", ["~> 0.10.5"])
58
57
  s.add_dependency("padrino-helpers", ["~> 0.10.5"])
59
58
 
60
- s.add_dependency("guard", ["~> 0.8.8"])
59
+ s.add_dependency("guard", ["~> 0.6.2"])
61
60
  s.add_dependency("middleman-livereload", ["~> 0.2.0"])
62
61
 
63
62
  # Development and test
@@ -66,7 +65,5 @@ eos
66
65
  s.add_development_dependency("cucumber", ["~> 1.0.2"])
67
66
  s.add_development_dependency("rake", ["~> 0.9.2"])
68
67
  s.add_development_dependency("rspec", ["~> 2.6.0"])
69
- s.add_development_dependency("jquery-rails")
70
- s.add_development_dependency("bootstrap-rails")
71
68
  end
72
69
 
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1923831965
5
- prerelease: 7
4
+ hash: 19
5
+ prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
9
  - 14
10
- - pre
11
- - 2
12
- version: 2.0.14.pre2
10
+ version: 2.0.14
13
11
  platform: ruby
14
12
  authors:
15
13
  - Thomas Reynolds
@@ -17,7 +15,7 @@ autorequire:
17
15
  bindir: bin
18
16
  cert_chain: []
19
17
 
20
- date: 2011-11-03 00:00:00 -07:00
18
+ date: 2011-11-05 00:00:00 -07:00
21
19
  default_executable:
22
20
  dependencies:
23
21
  - !ruby/object:Gem::Dependency
@@ -262,22 +260,6 @@ dependencies:
262
260
  type: :runtime
263
261
  - !ruby/object:Gem::Dependency
264
262
  requirement: &id016 !ruby/object:Gem::Requirement
265
- none: false
266
- requirements:
267
- - - ~>
268
- - !ruby/object:Gem::Version
269
- hash: 19
270
- segments:
271
- - 0
272
- - 3
273
- - 0
274
- version: 0.3.0
275
- version_requirements: *id016
276
- name: sprockets-sass
277
- prerelease: false
278
- type: :runtime
279
- - !ruby/object:Gem::Dependency
280
- requirement: &id017 !ruby/object:Gem::Requirement
281
263
  none: false
282
264
  requirements:
283
265
  - - ~>
@@ -288,12 +270,12 @@ dependencies:
288
270
  - 10
289
271
  - 5
290
272
  version: 0.10.5
291
- version_requirements: *id017
273
+ version_requirements: *id016
292
274
  name: padrino-core
293
275
  prerelease: false
294
276
  type: :runtime
295
277
  - !ruby/object:Gem::Dependency
296
- requirement: &id018 !ruby/object:Gem::Requirement
278
+ requirement: &id017 !ruby/object:Gem::Requirement
297
279
  none: false
298
280
  requirements:
299
281
  - - ~>
@@ -304,28 +286,28 @@ dependencies:
304
286
  - 10
305
287
  - 5
306
288
  version: 0.10.5
307
- version_requirements: *id018
289
+ version_requirements: *id017
308
290
  name: padrino-helpers
309
291
  prerelease: false
310
292
  type: :runtime
311
293
  - !ruby/object:Gem::Dependency
312
- requirement: &id019 !ruby/object:Gem::Requirement
294
+ requirement: &id018 !ruby/object:Gem::Requirement
313
295
  none: false
314
296
  requirements:
315
297
  - - ~>
316
298
  - !ruby/object:Gem::Version
317
- hash: 47
299
+ hash: 3
318
300
  segments:
319
301
  - 0
320
- - 8
321
- - 8
322
- version: 0.8.8
323
- version_requirements: *id019
302
+ - 6
303
+ - 2
304
+ version: 0.6.2
305
+ version_requirements: *id018
324
306
  name: guard
325
307
  prerelease: false
326
308
  type: :runtime
327
309
  - !ruby/object:Gem::Dependency
328
- requirement: &id020 !ruby/object:Gem::Requirement
310
+ requirement: &id019 !ruby/object:Gem::Requirement
329
311
  none: false
330
312
  requirements:
331
313
  - - ~>
@@ -336,12 +318,12 @@ dependencies:
336
318
  - 2
337
319
  - 0
338
320
  version: 0.2.0
339
- version_requirements: *id020
321
+ version_requirements: *id019
340
322
  name: middleman-livereload
341
323
  prerelease: false
342
324
  type: :runtime
343
325
  - !ruby/object:Gem::Dependency
344
- requirement: &id021 !ruby/object:Gem::Requirement
326
+ requirement: &id020 !ruby/object:Gem::Requirement
345
327
  none: false
346
328
  requirements:
347
329
  - - ~>
@@ -352,12 +334,12 @@ dependencies:
352
334
  - 1
353
335
  - 1
354
336
  version: 0.1.1
355
- version_requirements: *id021
337
+ version_requirements: *id020
356
338
  name: coffee-filter
357
339
  prerelease: false
358
340
  type: :development
359
341
  - !ruby/object:Gem::Dependency
360
- requirement: &id022 !ruby/object:Gem::Requirement
342
+ requirement: &id021 !ruby/object:Gem::Requirement
361
343
  none: false
362
344
  requirements:
363
345
  - - ~>
@@ -368,12 +350,12 @@ dependencies:
368
350
  - 2
369
351
  - 0
370
352
  version: 2.2.0
371
- version_requirements: *id022
353
+ version_requirements: *id021
372
354
  name: liquid
373
355
  prerelease: false
374
356
  type: :development
375
357
  - !ruby/object:Gem::Dependency
376
- requirement: &id023 !ruby/object:Gem::Requirement
358
+ requirement: &id022 !ruby/object:Gem::Requirement
377
359
  none: false
378
360
  requirements:
379
361
  - - ~>
@@ -384,12 +366,12 @@ dependencies:
384
366
  - 0
385
367
  - 2
386
368
  version: 1.0.2
387
- version_requirements: *id023
369
+ version_requirements: *id022
388
370
  name: cucumber
389
371
  prerelease: false
390
372
  type: :development
391
373
  - !ruby/object:Gem::Dependency
392
- requirement: &id024 !ruby/object:Gem::Requirement
374
+ requirement: &id023 !ruby/object:Gem::Requirement
393
375
  none: false
394
376
  requirements:
395
377
  - - ~>
@@ -400,12 +382,12 @@ dependencies:
400
382
  - 9
401
383
  - 2
402
384
  version: 0.9.2
403
- version_requirements: *id024
385
+ version_requirements: *id023
404
386
  name: rake
405
387
  prerelease: false
406
388
  type: :development
407
389
  - !ruby/object:Gem::Dependency
408
- requirement: &id025 !ruby/object:Gem::Requirement
390
+ requirement: &id024 !ruby/object:Gem::Requirement
409
391
  none: false
410
392
  requirements:
411
393
  - - ~>
@@ -416,38 +398,10 @@ dependencies:
416
398
  - 6
417
399
  - 0
418
400
  version: 2.6.0
419
- version_requirements: *id025
401
+ version_requirements: *id024
420
402
  name: rspec
421
403
  prerelease: false
422
404
  type: :development
423
- - !ruby/object:Gem::Dependency
424
- requirement: &id026 !ruby/object:Gem::Requirement
425
- none: false
426
- requirements:
427
- - - ">="
428
- - !ruby/object:Gem::Version
429
- hash: 3
430
- segments:
431
- - 0
432
- version: "0"
433
- version_requirements: *id026
434
- name: jquery-rails
435
- prerelease: false
436
- type: :development
437
- - !ruby/object:Gem::Dependency
438
- requirement: &id027 !ruby/object:Gem::Requirement
439
- none: false
440
- requirements:
441
- - - ">="
442
- - !ruby/object:Gem::Version
443
- hash: 3
444
- segments:
445
- - 0
446
- version: "0"
447
- version_requirements: *id027
448
- name: bootstrap-rails
449
- prerelease: false
450
- type: :development
451
405
  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.
452
406
  email:
453
407
  - me@tdreyno.com
@@ -541,15 +495,9 @@ files:
541
495
  - fixtures/relative-app/source/images/blank.gif
542
496
  - fixtures/relative-app/source/stylesheets/relative_assets.css.sass
543
497
  - fixtures/sprockets-app/config.rb
544
- - fixtures/sprockets-app/source/library/css/plain.css
545
- - fixtures/sprockets-app/source/library/css/sprockets_base1.css.scss
546
- - fixtures/sprockets-app/source/library/css/sprockets_base2.css.scss
547
- - fixtures/sprockets-app/source/library/css/sprockets_sub.css.scss
548
- - fixtures/sprockets-app/source/library/js/jquery_include.js
549
- - fixtures/sprockets-app/source/library/js/plain.js
550
- - fixtures/sprockets-app/source/library/js/sprockets_base.js
551
- - fixtures/sprockets-app/source/library/js/sprockets_sub.js
552
- - fixtures/sprockets-app/source/library/stylesheets/bootstrap_include.css.scss
498
+ - fixtures/sprockets-app/source/jquery_include.js
499
+ - fixtures/sprockets-app/source/library/javascripts/sprockets_base.js
500
+ - fixtures/sprockets-app/source/library/javascripts/sprockets_sub.js
553
501
  - fixtures/test-app/config.rb
554
502
  - fixtures/test-app/data/test.yml
555
503
  - fixtures/test-app/data/test2.json
@@ -618,9 +566,6 @@ files:
618
566
  - fixtures/test-app/source/stylesheets/relative_assets.css.sass
619
567
  - fixtures/test-app/source/stylesheets/site.css.sass
620
568
  - fixtures/test-app/source/stylesheets/site_scss.css.scss
621
- - fixtures/test-app/source/stylesheets/sprockets_base1.css.scss
622
- - fixtures/test-app/source/stylesheets/sprockets_base2.css.scss
623
- - fixtures/test-app/source/stylesheets/sprockets_sub.css.scss
624
569
  - fixtures/test-app/source/stylesheets/static.css
625
570
  - fixtures/test-app/source/sub1/page-classes.html.haml
626
571
  - fixtures/test-app/source/sub1/sub2/page-classes.html.haml
@@ -647,12 +592,10 @@ files:
647
592
  - lib/middleman/features/directory_indexes.rb
648
593
  - lib/middleman/features/lorem.rb
649
594
  - lib/middleman/features/minify_css.rb
650
- - lib/middleman/features/minify_css/cssmin.rb
651
595
  - lib/middleman/features/minify_javascript.rb
652
596
  - lib/middleman/features/relative_assets.rb
653
597
  - lib/middleman/guard.rb
654
598
  - lib/middleman/renderers/coffee_script.rb
655
- - lib/middleman/renderers/erb.rb
656
599
  - lib/middleman/renderers/haml.rb
657
600
  - lib/middleman/renderers/liquid.rb
658
601
  - lib/middleman/renderers/markdown.rb
@@ -801,14 +744,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
801
744
  required_rubygems_version: !ruby/object:Gem::Requirement
802
745
  none: false
803
746
  requirements:
804
- - - ">"
747
+ - - ">="
805
748
  - !ruby/object:Gem::Version
806
- hash: 25
749
+ hash: 3
807
750
  segments:
808
- - 1
809
- - 3
810
- - 1
811
- version: 1.3.1
751
+ - 0
752
+ version: "0"
812
753
  requirements: []
813
754
 
814
755
  rubyforge_project:
@@ -885,15 +826,9 @@ test_files:
885
826
  - fixtures/relative-app/source/images/blank.gif
886
827
  - fixtures/relative-app/source/stylesheets/relative_assets.css.sass
887
828
  - fixtures/sprockets-app/config.rb
888
- - fixtures/sprockets-app/source/library/css/plain.css
889
- - fixtures/sprockets-app/source/library/css/sprockets_base1.css.scss
890
- - fixtures/sprockets-app/source/library/css/sprockets_base2.css.scss
891
- - fixtures/sprockets-app/source/library/css/sprockets_sub.css.scss
892
- - fixtures/sprockets-app/source/library/js/jquery_include.js
893
- - fixtures/sprockets-app/source/library/js/plain.js
894
- - fixtures/sprockets-app/source/library/js/sprockets_base.js
895
- - fixtures/sprockets-app/source/library/js/sprockets_sub.js
896
- - fixtures/sprockets-app/source/library/stylesheets/bootstrap_include.css.scss
829
+ - fixtures/sprockets-app/source/jquery_include.js
830
+ - fixtures/sprockets-app/source/library/javascripts/sprockets_base.js
831
+ - fixtures/sprockets-app/source/library/javascripts/sprockets_sub.js
897
832
  - fixtures/test-app/config.rb
898
833
  - fixtures/test-app/data/test.yml
899
834
  - fixtures/test-app/data/test2.json
@@ -962,9 +897,6 @@ test_files:
962
897
  - fixtures/test-app/source/stylesheets/relative_assets.css.sass
963
898
  - fixtures/test-app/source/stylesheets/site.css.sass
964
899
  - fixtures/test-app/source/stylesheets/site_scss.css.scss
965
- - fixtures/test-app/source/stylesheets/sprockets_base1.css.scss
966
- - fixtures/test-app/source/stylesheets/sprockets_base2.css.scss
967
- - fixtures/test-app/source/stylesheets/sprockets_sub.css.scss
968
900
  - fixtures/test-app/source/stylesheets/static.css
969
901
  - fixtures/test-app/source/sub1/page-classes.html.haml
970
902
  - fixtures/test-app/source/sub1/sub2/page-classes.html.haml
@@ -1,3 +0,0 @@
1
- #helloWorld {
2
- color: red;
3
- }
@@ -1 +0,0 @@
1
- //= require "sprockets_sub"
@@ -1 +0,0 @@
1
- @import "sprockets_sub";
@@ -1 +0,0 @@
1
- hello { world: "hi"; }
@@ -1,3 +0,0 @@
1
- function hellowWorld() {
2
-
3
- }
@@ -1 +0,0 @@
1
- //= require "sprockets_sub"
@@ -1 +0,0 @@
1
- @import "sprockets_sub";
@@ -1 +0,0 @@
1
- hello { world: "hi"; }
@@ -1,55 +0,0 @@
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
@@ -1,34 +0,0 @@
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