middleman 0.10.16 → 0.10.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/Rakefile +29 -27
  2. data/VERSION +1 -1
  3. data/lib/middleman.rb +1 -1
  4. data/lib/middleman/features/minify_css.rb +8 -4
  5. data/middleman.gemspec +32 -28
  6. data/spec/fixtures/sample/init.rb +5 -1
  7. data/spec/fixtures/sample/views/inline-css.html.haml +4 -0
  8. data/spec/minify_css_spec.rb +20 -0
  9. data/vendor/gems/cache/rack-test-0.5.2.gem +0 -0
  10. data/vendor/gems/environment.rb +32 -79
  11. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/.document +0 -0
  12. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/.gitignore +0 -0
  13. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/History.txt +7 -0
  14. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/MIT-LICENSE.txt +0 -0
  15. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/README.rdoc +0 -0
  16. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/Rakefile +0 -0
  17. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/Thorfile +0 -0
  18. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/lib/rack/mock_session.rb +2 -1
  19. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/lib/rack/test.rb +1 -1
  20. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/lib/rack/test/cookie_jar.rb +1 -0
  21. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/lib/rack/test/methods.rb +0 -0
  22. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/lib/rack/test/mock_digest_request.rb +0 -0
  23. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/lib/rack/test/uploaded_file.rb +0 -0
  24. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/lib/rack/test/utils.rb +0 -0
  25. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/rack-test.gemspec +2 -2
  26. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/spec/fixtures/config.ru +0 -0
  27. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/spec/fixtures/fake_app.rb +0 -0
  28. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/spec/fixtures/foo.txt +0 -0
  29. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/spec/rack/test/cookie_spec.rb +0 -0
  30. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/spec/rack/test/digest_auth_spec.rb +0 -0
  31. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/spec/rack/test/multipart_spec.rb +0 -0
  32. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/spec/rack/test/utils_spec.rb +0 -0
  33. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/spec/rack/test_spec.rb +37 -7
  34. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/spec/spec.opts +0 -0
  35. data/vendor/gems/gems/{rack-test-0.5.1 → rack-test-0.5.2}/spec/spec_helper.rb +0 -0
  36. data/vendor/gems/specifications/{rack-test-0.5.1.gemspec → rack-test-0.5.2.gemspec} +2 -2
  37. metadata +32 -28
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'rubygems'
2
- #require 'lib/middleman'
2
+ require 'lib/middleman'
3
3
  require 'rake'
4
4
  require 'cucumber/rake/task'
5
5
 
@@ -52,35 +52,37 @@ task :spec => :check_dependencies
52
52
 
53
53
  task :default => :spec
54
54
 
55
- require 'rake/rdoctask'
56
- require 'sdoc'
55
+ unless ENV["RUN_CODE_RUN"]
56
+ require 'rake/rdoctask'
57
+ require 'sdoc'
57
58
 
58
- Rake::RDocTask.new do |rdoc|
59
- if File.exist?('VERSION')
60
- version = File.read('VERSION')
61
- else
62
- version = ""
63
- end
59
+ Rake::RDocTask.new do |rdoc|
60
+ if File.exist?('VERSION')
61
+ version = File.read('VERSION')
62
+ else
63
+ version = ""
64
+ end
64
65
 
65
- # rdoc.template = 'direct'
66
-
67
- rdoc.rdoc_dir = 'rdoc'
68
- rdoc.title = "middleman #{version}"
69
- rdoc.rdoc_files.include('README*')
70
- rdoc.rdoc_files.include('lib/**/*.rb')
71
- rdoc.rdoc_files.exclude('lib/middleman/features/sprockets+ruby19.rb')
72
- rdoc.rdoc_files.exclude('lib/middleman/templater+dynamic_renderer.rb')
73
- end
66
+ # rdoc.template = 'direct'
74
67
 
75
- desc "Build and publish documentation using GitHub Pages."
76
- task :pages do
77
- if !`git status`.include?('nothing to commit')
78
- abort "dirty index - not publishing!"
68
+ rdoc.rdoc_dir = 'rdoc'
69
+ rdoc.title = "middleman #{version}"
70
+ rdoc.rdoc_files.include('README*')
71
+ rdoc.rdoc_files.include('lib/**/*.rb')
72
+ rdoc.rdoc_files.exclude('lib/middleman/features/sprockets+ruby19.rb')
73
+ rdoc.rdoc_files.exclude('lib/middleman/templater+dynamic_renderer.rb')
79
74
  end
75
+
76
+ desc "Build and publish documentation using GitHub Pages."
77
+ task :pages do
78
+ if !`git status`.include?('nothing to commit')
79
+ abort "dirty index - not publishing!"
80
+ end
80
81
 
81
- Rake::Task[:rerdoc].invoke
82
- `git checkout gh-pages`
83
- `ls -1 | grep -v rdoc | xargs rm -rf; mv rdoc/* .; rm -rf rdoc`
84
- `git commit -a -m "update docs"; git push origin gh-pages`
85
- `git checkout master`
82
+ Rake::Task[:rerdoc].invoke
83
+ `git checkout gh-pages`
84
+ `ls -1 | grep -v rdoc | xargs rm -rf; mv rdoc/* .; rm -rf rdoc`
85
+ `git commit -a -m "update docs"; git push origin gh-pages`
86
+ `git checkout master`
87
+ end
86
88
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.16
1
+ 0.10.17
@@ -2,5 +2,5 @@ libdir = File.dirname(__FILE__)
2
2
  $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
3
3
 
4
4
  # Bundler
5
- #require File.join(File.dirname(libdir), "vendor", "gems", "environment") if ENV["RUN_CODE_RUN"]
5
+ require File.join(File.dirname(libdir), "vendor", "gems", "environment") if ENV["RUN_CODE_RUN"]
6
6
  require 'middleman/base'
@@ -1,5 +1,9 @@
1
- # Otherwise use YUI
2
- # Fine a way to minify inline/css
3
- ::Compass.configuration do |config|
4
- config.output_style = :compressed
1
+ class Middleman::Base
2
+ after_feature_init do
3
+ ::Compass.configuration do |config|
4
+ config.output_style = :compressed
5
+ end
6
+
7
+ ::Compass.configure_sass_plugin!
8
+ end
5
9
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{middleman}
8
- s.version = "0.10.16"
8
+ s.version = "0.10.17"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Thomas Reynolds"]
12
- s.date = %q{2009-11-16}
12
+ s.date = %q{2009-11-17}
13
13
  s.email = %q{tdreyno@gmail.com}
14
14
  s.executables = ["mm-init", "mm-build", "mm-server"]
15
15
  s.extra_rdoc_files = [
@@ -72,6 +72,7 @@ Gem::Specification.new do |s|
72
72
  "spec/fixtures/sample/views/custom-layout.html.haml",
73
73
  "spec/fixtures/sample/views/custom.haml",
74
74
  "spec/fixtures/sample/views/index.html.haml",
75
+ "spec/fixtures/sample/views/inline-css.html.haml",
75
76
  "spec/fixtures/sample/views/inline-js.html.haml",
76
77
  "spec/fixtures/sample/views/javascripts/empty-with-include.js",
77
78
  "spec/fixtures/sample/views/layout.haml",
@@ -82,6 +83,7 @@ Gem::Specification.new do |s|
82
83
  "spec/fixtures/sample/views/stylesheets/site.css.sass",
83
84
  "spec/generator_spec.rb",
84
85
  "spec/helpers_spec.rb",
86
+ "spec/minify_css_spec.rb",
85
87
  "spec/minify_javascript_spec.rb",
86
88
  "spec/page_alias_and_layouts_spec.rb",
87
89
  "spec/relative_assets_spec.rb",
@@ -101,6 +103,7 @@ Gem::Specification.new do |s|
101
103
  "vendor/gems/cache/polyglot-0.2.9.gem",
102
104
  "vendor/gems/cache/rack-1.0.1.gem",
103
105
  "vendor/gems/cache/rack-test-0.5.1.gem",
106
+ "vendor/gems/cache/rack-test-0.5.2.gem",
104
107
  "vendor/gems/cache/rake-0.8.7.gem",
105
108
  "vendor/gems/cache/rdoc-2.4.3.gem",
106
109
  "vendor/gems/cache/rspec-1.2.9.gem",
@@ -1711,31 +1714,31 @@ Gem::Specification.new do |s|
1711
1714
  "vendor/gems/gems/rack-1.0.1/test/testrequest.rb",
1712
1715
  "vendor/gems/gems/rack-1.0.1/test/unregistered_handler/rack/handler/unregistered.rb",
1713
1716
  "vendor/gems/gems/rack-1.0.1/test/unregistered_handler/rack/handler/unregistered_long_one.rb",
1714
- "vendor/gems/gems/rack-test-0.5.1/.document",
1715
- "vendor/gems/gems/rack-test-0.5.1/.gitignore",
1716
- "vendor/gems/gems/rack-test-0.5.1/History.txt",
1717
- "vendor/gems/gems/rack-test-0.5.1/MIT-LICENSE.txt",
1718
- "vendor/gems/gems/rack-test-0.5.1/README.rdoc",
1719
- "vendor/gems/gems/rack-test-0.5.1/Rakefile",
1720
- "vendor/gems/gems/rack-test-0.5.1/Thorfile",
1721
- "vendor/gems/gems/rack-test-0.5.1/lib/rack/mock_session.rb",
1722
- "vendor/gems/gems/rack-test-0.5.1/lib/rack/test.rb",
1723
- "vendor/gems/gems/rack-test-0.5.1/lib/rack/test/cookie_jar.rb",
1724
- "vendor/gems/gems/rack-test-0.5.1/lib/rack/test/methods.rb",
1725
- "vendor/gems/gems/rack-test-0.5.1/lib/rack/test/mock_digest_request.rb",
1726
- "vendor/gems/gems/rack-test-0.5.1/lib/rack/test/uploaded_file.rb",
1727
- "vendor/gems/gems/rack-test-0.5.1/lib/rack/test/utils.rb",
1728
- "vendor/gems/gems/rack-test-0.5.1/rack-test.gemspec",
1729
- "vendor/gems/gems/rack-test-0.5.1/spec/fixtures/config.ru",
1730
- "vendor/gems/gems/rack-test-0.5.1/spec/fixtures/fake_app.rb",
1731
- "vendor/gems/gems/rack-test-0.5.1/spec/fixtures/foo.txt",
1732
- "vendor/gems/gems/rack-test-0.5.1/spec/rack/test/cookie_spec.rb",
1733
- "vendor/gems/gems/rack-test-0.5.1/spec/rack/test/digest_auth_spec.rb",
1734
- "vendor/gems/gems/rack-test-0.5.1/spec/rack/test/multipart_spec.rb",
1735
- "vendor/gems/gems/rack-test-0.5.1/spec/rack/test/utils_spec.rb",
1736
- "vendor/gems/gems/rack-test-0.5.1/spec/rack/test_spec.rb",
1737
- "vendor/gems/gems/rack-test-0.5.1/spec/spec.opts",
1738
- "vendor/gems/gems/rack-test-0.5.1/spec/spec_helper.rb",
1717
+ "vendor/gems/gems/rack-test-0.5.2/.document",
1718
+ "vendor/gems/gems/rack-test-0.5.2/.gitignore",
1719
+ "vendor/gems/gems/rack-test-0.5.2/History.txt",
1720
+ "vendor/gems/gems/rack-test-0.5.2/MIT-LICENSE.txt",
1721
+ "vendor/gems/gems/rack-test-0.5.2/README.rdoc",
1722
+ "vendor/gems/gems/rack-test-0.5.2/Rakefile",
1723
+ "vendor/gems/gems/rack-test-0.5.2/Thorfile",
1724
+ "vendor/gems/gems/rack-test-0.5.2/lib/rack/mock_session.rb",
1725
+ "vendor/gems/gems/rack-test-0.5.2/lib/rack/test.rb",
1726
+ "vendor/gems/gems/rack-test-0.5.2/lib/rack/test/cookie_jar.rb",
1727
+ "vendor/gems/gems/rack-test-0.5.2/lib/rack/test/methods.rb",
1728
+ "vendor/gems/gems/rack-test-0.5.2/lib/rack/test/mock_digest_request.rb",
1729
+ "vendor/gems/gems/rack-test-0.5.2/lib/rack/test/uploaded_file.rb",
1730
+ "vendor/gems/gems/rack-test-0.5.2/lib/rack/test/utils.rb",
1731
+ "vendor/gems/gems/rack-test-0.5.2/rack-test.gemspec",
1732
+ "vendor/gems/gems/rack-test-0.5.2/spec/fixtures/config.ru",
1733
+ "vendor/gems/gems/rack-test-0.5.2/spec/fixtures/fake_app.rb",
1734
+ "vendor/gems/gems/rack-test-0.5.2/spec/fixtures/foo.txt",
1735
+ "vendor/gems/gems/rack-test-0.5.2/spec/rack/test/cookie_spec.rb",
1736
+ "vendor/gems/gems/rack-test-0.5.2/spec/rack/test/digest_auth_spec.rb",
1737
+ "vendor/gems/gems/rack-test-0.5.2/spec/rack/test/multipart_spec.rb",
1738
+ "vendor/gems/gems/rack-test-0.5.2/spec/rack/test/utils_spec.rb",
1739
+ "vendor/gems/gems/rack-test-0.5.2/spec/rack/test_spec.rb",
1740
+ "vendor/gems/gems/rack-test-0.5.2/spec/spec.opts",
1741
+ "vendor/gems/gems/rack-test-0.5.2/spec/spec_helper.rb",
1739
1742
  "vendor/gems/gems/rake-0.8.7/CHANGES",
1740
1743
  "vendor/gems/gems/rake-0.8.7/MIT-LICENSE",
1741
1744
  "vendor/gems/gems/rake-0.8.7/README",
@@ -2749,7 +2752,7 @@ Gem::Specification.new do |s|
2749
2752
  "vendor/gems/specifications/launchy-0.3.3.gemspec",
2750
2753
  "vendor/gems/specifications/polyglot-0.2.9.gemspec",
2751
2754
  "vendor/gems/specifications/rack-1.0.1.gemspec",
2752
- "vendor/gems/specifications/rack-test-0.5.1.gemspec",
2755
+ "vendor/gems/specifications/rack-test-0.5.2.gemspec",
2753
2756
  "vendor/gems/specifications/rake-0.8.7.gemspec",
2754
2757
  "vendor/gems/specifications/rdoc-2.4.3.gemspec",
2755
2758
  "vendor/gems/specifications/rspec-1.2.9.gemspec",
@@ -2777,6 +2780,7 @@ Gem::Specification.new do |s|
2777
2780
  "spec/fixtures/sample/init.rb",
2778
2781
  "spec/generator_spec.rb",
2779
2782
  "spec/helpers_spec.rb",
2783
+ "spec/minify_css_spec.rb",
2780
2784
  "spec/minify_javascript_spec.rb",
2781
2785
  "spec/page_alias_and_layouts_spec.rb",
2782
2786
  "spec/relative_assets_spec.rb",
@@ -1,9 +1,13 @@
1
1
  # enable :maruku
2
+
3
+ get "/inline-css.html" do
4
+ haml :"inline-css.html", :layout => false
5
+ end
6
+
2
7
  get "/inline-js.html" do
3
8
  haml :"inline-js.html", :layout => false
4
9
  end
5
10
 
6
-
7
11
  get "/page-class.html" do
8
12
  haml :"page-classes.html", :layout => false
9
13
  end
@@ -0,0 +1,4 @@
1
+ :sass
2
+ body
3
+ test: style
4
+ good: deal
@@ -0,0 +1,20 @@
1
+ require File.join(File.dirname(__FILE__), "spec_helper")
2
+
3
+ base = ::Middleman::Base
4
+ base.set :root, File.join(File.dirname(__FILE__), "fixtures", "sample")
5
+
6
+ describe "Minify Javascript Feature" do
7
+ it "should not minify inline css if off" do
8
+ base.disable :minify_css
9
+ browser = Rack::Test::Session.new(Rack::MockSession.new(base.new))
10
+ browser.get("/inline-css.html")
11
+ browser.last_response.body.chomp.split($/).length.should == 3
12
+ end
13
+
14
+ it "should minify inline css if on" do
15
+ base.enable :minify_css
16
+ browser = Rack::Test::Session.new(Rack::MockSession.new(base.new))
17
+ browser.get("/inline-css.html")
18
+ browser.last_response.body.chomp.split($/).length.should == 1
19
+ end
20
+ end
@@ -26,8 +26,8 @@ module Bundler
26
26
  $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-1.0.1/lib")
27
27
  $LOAD_PATH.unshift File.expand_path("#{dir}/gems/shotgun-0.4/bin")
28
28
  $LOAD_PATH.unshift File.expand_path("#{dir}/gems/shotgun-0.4/lib")
29
- $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-test-0.5.1/bin")
30
- $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-test-0.5.1/lib")
29
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-test-0.5.2/bin")
30
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-test-0.5.2/lib")
31
31
  $LOAD_PATH.unshift File.expand_path("#{dir}/gems/sinatra-0.9.4/bin")
32
32
  $LOAD_PATH.unshift File.expand_path("#{dir}/gems/sinatra-0.9.4/lib")
33
33
  $LOAD_PATH.unshift File.expand_path("#{dir}/gems/thin-1.2.5/bin")
@@ -67,78 +67,6 @@ module Bundler
67
67
 
68
68
  @gemfile = "#{dir}/../../Gemfile"
69
69
 
70
- require "rubygems"
71
-
72
- @bundled_specs = {}
73
- @bundled_specs["rdoc"] = eval(File.read("#{dir}/specifications/rdoc-2.4.3.gemspec"))
74
- @bundled_specs["rdoc"].loaded_from = "#{dir}/specifications/rdoc-2.4.3.gemspec"
75
- @bundled_specs["configuration"] = eval(File.read("#{dir}/specifications/configuration-1.1.0.gemspec"))
76
- @bundled_specs["configuration"].loaded_from = "#{dir}/specifications/configuration-1.1.0.gemspec"
77
- @bundled_specs["builder"] = eval(File.read("#{dir}/specifications/builder-2.1.2.gemspec"))
78
- @bundled_specs["builder"].loaded_from = "#{dir}/specifications/builder-2.1.2.gemspec"
79
- @bundled_specs["daemons"] = eval(File.read("#{dir}/specifications/daemons-1.0.10.gemspec"))
80
- @bundled_specs["daemons"].loaded_from = "#{dir}/specifications/daemons-1.0.10.gemspec"
81
- @bundled_specs["extlib"] = eval(File.read("#{dir}/specifications/extlib-0.9.13.gemspec"))
82
- @bundled_specs["extlib"].loaded_from = "#{dir}/specifications/extlib-0.9.13.gemspec"
83
- @bundled_specs["json"] = eval(File.read("#{dir}/specifications/json-1.2.0.gemspec"))
84
- @bundled_specs["json"].loaded_from = "#{dir}/specifications/json-1.2.0.gemspec"
85
- @bundled_specs["eventmachine"] = eval(File.read("#{dir}/specifications/eventmachine-0.12.10.gemspec"))
86
- @bundled_specs["eventmachine"].loaded_from = "#{dir}/specifications/eventmachine-0.12.10.gemspec"
87
- @bundled_specs["rack"] = eval(File.read("#{dir}/specifications/rack-1.0.1.gemspec"))
88
- @bundled_specs["rack"].loaded_from = "#{dir}/specifications/rack-1.0.1.gemspec"
89
- @bundled_specs["shotgun"] = eval(File.read("#{dir}/specifications/shotgun-0.4.gemspec"))
90
- @bundled_specs["shotgun"].loaded_from = "#{dir}/specifications/shotgun-0.4.gemspec"
91
- @bundled_specs["rack-test"] = eval(File.read("#{dir}/specifications/rack-test-0.5.1.gemspec"))
92
- @bundled_specs["rack-test"].loaded_from = "#{dir}/specifications/rack-test-0.5.1.gemspec"
93
- @bundled_specs["sinatra"] = eval(File.read("#{dir}/specifications/sinatra-0.9.4.gemspec"))
94
- @bundled_specs["sinatra"].loaded_from = "#{dir}/specifications/sinatra-0.9.4.gemspec"
95
- @bundled_specs["thin"] = eval(File.read("#{dir}/specifications/thin-1.2.5.gemspec"))
96
- @bundled_specs["thin"].loaded_from = "#{dir}/specifications/thin-1.2.5.gemspec"
97
- @bundled_specs["sdoc"] = eval(File.read("#{dir}/specifications/sdoc-0.2.14.1.gemspec"))
98
- @bundled_specs["sdoc"].loaded_from = "#{dir}/specifications/sdoc-0.2.14.1.gemspec"
99
- @bundled_specs["yui-compressor"] = eval(File.read("#{dir}/specifications/yui-compressor-0.9.1.gemspec"))
100
- @bundled_specs["yui-compressor"].loaded_from = "#{dir}/specifications/yui-compressor-0.9.1.gemspec"
101
- @bundled_specs["polyglot"] = eval(File.read("#{dir}/specifications/polyglot-0.2.9.gemspec"))
102
- @bundled_specs["polyglot"].loaded_from = "#{dir}/specifications/polyglot-0.2.9.gemspec"
103
- @bundled_specs["treetop"] = eval(File.read("#{dir}/specifications/treetop-1.4.2.gemspec"))
104
- @bundled_specs["treetop"].loaded_from = "#{dir}/specifications/treetop-1.4.2.gemspec"
105
- @bundled_specs["rake"] = eval(File.read("#{dir}/specifications/rake-0.8.7.gemspec"))
106
- @bundled_specs["rake"].loaded_from = "#{dir}/specifications/rake-0.8.7.gemspec"
107
- @bundled_specs["launchy"] = eval(File.read("#{dir}/specifications/launchy-0.3.3.gemspec"))
108
- @bundled_specs["launchy"].loaded_from = "#{dir}/specifications/launchy-0.3.3.gemspec"
109
- @bundled_specs["sprockets"] = eval(File.read("#{dir}/specifications/sprockets-1.0.2.gemspec"))
110
- @bundled_specs["sprockets"].loaded_from = "#{dir}/specifications/sprockets-1.0.2.gemspec"
111
- @bundled_specs["haml"] = eval(File.read("#{dir}/specifications/haml-2.2.13.gemspec"))
112
- @bundled_specs["haml"].loaded_from = "#{dir}/specifications/haml-2.2.13.gemspec"
113
- @bundled_specs["diff-lcs"] = eval(File.read("#{dir}/specifications/diff-lcs-1.1.2.gemspec"))
114
- @bundled_specs["diff-lcs"].loaded_from = "#{dir}/specifications/diff-lcs-1.1.2.gemspec"
115
- @bundled_specs["rspec"] = eval(File.read("#{dir}/specifications/rspec-1.2.9.gemspec"))
116
- @bundled_specs["rspec"].loaded_from = "#{dir}/specifications/rspec-1.2.9.gemspec"
117
- @bundled_specs["highline"] = eval(File.read("#{dir}/specifications/highline-1.5.1.gemspec"))
118
- @bundled_specs["highline"].loaded_from = "#{dir}/specifications/highline-1.5.1.gemspec"
119
- @bundled_specs["templater"] = eval(File.read("#{dir}/specifications/templater-1.0.0.gemspec"))
120
- @bundled_specs["templater"].loaded_from = "#{dir}/specifications/templater-1.0.0.gemspec"
121
- @bundled_specs["term-ansicolor"] = eval(File.read("#{dir}/specifications/term-ansicolor-1.0.4.gemspec"))
122
- @bundled_specs["term-ansicolor"].loaded_from = "#{dir}/specifications/term-ansicolor-1.0.4.gemspec"
123
- @bundled_specs["cucumber"] = eval(File.read("#{dir}/specifications/cucumber-0.4.4.gemspec"))
124
- @bundled_specs["cucumber"].loaded_from = "#{dir}/specifications/cucumber-0.4.4.gemspec"
125
- @bundled_specs["sinatra-content-for"] = eval(File.read("#{dir}/specifications/sinatra-content-for-0.2.gemspec"))
126
- @bundled_specs["sinatra-content-for"].loaded_from = "#{dir}/specifications/sinatra-content-for-0.2.gemspec"
127
- @bundled_specs["compass"] = eval(File.read("#{dir}/specifications/compass-0.8.17.gemspec"))
128
- @bundled_specs["compass"].loaded_from = "#{dir}/specifications/compass-0.8.17.gemspec"
129
-
130
- def self.add_specs_to_loaded_specs
131
- Gem.loaded_specs.merge! @bundled_specs
132
- end
133
-
134
- def self.add_specs_to_index
135
- @bundled_specs.each do |name, spec|
136
- Gem.source_index.add_spec spec
137
- end
138
- end
139
-
140
- add_specs_to_loaded_specs
141
- add_specs_to_index
142
70
 
143
71
  def self.require_env(env = nil)
144
72
  context = Class.new do
@@ -195,11 +123,36 @@ module Bundler
195
123
  end
196
124
  end
197
125
 
198
- module Gem
199
- @loaded_stacks = Hash.new { |h,k| h[k] = [] }
126
+ $" << "rubygems.rb"
200
127
 
201
- def source_index.refresh!
202
- super
203
- Bundler.add_specs_to_index
128
+ module Kernel
129
+ def gem(*)
130
+ # Silently ignore calls to gem, since, in theory, everything
131
+ # is activated correctly already.
204
132
  end
205
133
  end
134
+
135
+ # Define all the Gem errors for gems that reference them.
136
+ module Gem
137
+ def self.ruby ; "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby" ; end
138
+ class LoadError < ::LoadError; end
139
+ class Exception < RuntimeError; end
140
+ class CommandLineError < Exception; end
141
+ class DependencyError < Exception; end
142
+ class DependencyRemovalException < Exception; end
143
+ class GemNotInHomeException < Exception ; end
144
+ class DocumentError < Exception; end
145
+ class EndOfYAMLException < Exception; end
146
+ class FilePermissionError < Exception; end
147
+ class FormatException < Exception; end
148
+ class GemNotFoundException < Exception; end
149
+ class InstallError < Exception; end
150
+ class InvalidSpecificationException < Exception; end
151
+ class OperationNotSupportedError < Exception; end
152
+ class RemoteError < Exception; end
153
+ class RemoteInstallationCancelled < Exception; end
154
+ class RemoteInstallationSkipped < Exception; end
155
+ class RemoteSourceException < Exception; end
156
+ class VerificationError < Exception; end
157
+ class SystemExitException < SystemExit; end
158
+ end
@@ -1,3 +1,10 @@
1
+ == 0.5.2 / 2009-11-13
2
+
3
+ * Bug fixes
4
+
5
+ * Call close on response body after iteration, not before (Simon Rozet)
6
+ * Add missing require for time in cookie_jar.rb (Jerry West)
7
+
1
8
  == 0.5.1 / 2009-10-27
2
9
 
3
10
  * Bug fixes
@@ -28,9 +28,10 @@ module Rack
28
28
  env["HTTP_COOKIE"] ||= cookie_jar.for(uri)
29
29
  @last_request = Rack::Request.new(env)
30
30
  status, headers, body = @app.call(@last_request.env)
31
- body.close if body.respond_to?(:close)
32
31
 
33
32
  @last_response = MockResponse.new(status, headers, body, env["rack.errors"].flush)
33
+ body.close if body.respond_to?(:close)
34
+
34
35
  cookie_jar.merge(last_response.headers["Set-Cookie"], uri)
35
36
 
36
37
  @after_request.each { |hook| hook.call }
@@ -9,7 +9,7 @@ require "rack/test/uploaded_file"
9
9
 
10
10
  module Rack
11
11
  module Test
12
- VERSION = "0.5.1"
12
+ VERSION = "0.5.2"
13
13
 
14
14
  DEFAULT_HOST = "example.org"
15
15
  MULTIPART_BOUNDARY = "----------XnJLe9ZIbbGUYtzPQJ16u1"
@@ -1,4 +1,5 @@
1
1
  require "uri"
2
+ require "time"
2
3
 
3
4
  module Rack
4
5
  module Test
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rack-test}
5
- s.version = "0.5.1"
5
+ s.version = "0.5.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Bryan Helmkamp"]
9
- s.date = %q{2009-10-27}
9
+ s.date = %q{2009-11-13}
10
10
  s.description = %q{Rack::Test is a small, simple testing API for Rack apps. It can be used on its
11
11
  own or as a reusable starting point for Web frameworks and testing libraries
12
12
  to build on. Most of its initial functionality is an extraction of Merb 1.0's
@@ -106,13 +106,43 @@ describe Rack::Test::Session do
106
106
  last_request.env["rack.input"].read.should == "foo[bar]=1"
107
107
  end
108
108
 
109
- it "closes response's body" do
110
- body = "Hello, World!"
111
- body.should_receive(:close)
112
- app = lambda {|env|
113
- [200, {"Content-Type" => "text/html", "Content-Length" => "13"}, body]
114
- }
115
- Rack::Test::Session.new(Rack::MockSession.new(app)).request("/")
109
+ context "when the response body responds_to?(:close)" do
110
+ class CloseableBody
111
+ def initialize
112
+ @closed = false
113
+ end
114
+
115
+ def each
116
+ return if @closed
117
+ yield "Hello, World!"
118
+ end
119
+
120
+ def close
121
+ @closed = true
122
+ end
123
+ end
124
+
125
+ it "closes response's body" do
126
+ body = CloseableBody.new
127
+ body.should_receive(:close)
128
+
129
+ app = lambda do |env|
130
+ [200, {"Content-Type" => "text/html", "Content-Length" => "13"}, body]
131
+ end
132
+
133
+ session = Rack::Test::Session.new(Rack::MockSession.new(app))
134
+ session.request("/")
135
+ end
136
+
137
+ it "closes response's body after iteration" do
138
+ app = lambda do |env|
139
+ [200, {"Content-Type" => "text/html", "Content-Length" => "13"}, CloseableBody.new]
140
+ end
141
+
142
+ session = Rack::Test::Session.new(Rack::MockSession.new(app))
143
+ session.request("/")
144
+ session.last_response.body.should == "Hello, World!"
145
+ end
116
146
  end
117
147
 
118
148
  context "when input is given" do
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rack-test}
5
- s.version = "0.5.1"
5
+ s.version = "0.5.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Bryan Helmkamp"]
9
- s.date = %q{2009-10-26}
9
+ s.date = %q{2009-11-12}
10
10
  s.description = %q{Rack::Test is a small, simple testing API for Rack apps. It can be used on its
11
11
  own or as a reusable starting point for Web frameworks and testing libraries
12
12
  to build on. Most of its initial functionality is an extraction of Merb 1.0's
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.16
4
+ version: 0.10.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-16 00:00:00 -08:00
12
+ date: 2009-11-17 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -209,6 +209,7 @@ files:
209
209
  - spec/fixtures/sample/views/custom-layout.html.haml
210
210
  - spec/fixtures/sample/views/custom.haml
211
211
  - spec/fixtures/sample/views/index.html.haml
212
+ - spec/fixtures/sample/views/inline-css.html.haml
212
213
  - spec/fixtures/sample/views/inline-js.html.haml
213
214
  - spec/fixtures/sample/views/javascripts/empty-with-include.js
214
215
  - spec/fixtures/sample/views/layout.haml
@@ -219,6 +220,7 @@ files:
219
220
  - spec/fixtures/sample/views/stylesheets/site.css.sass
220
221
  - spec/generator_spec.rb
221
222
  - spec/helpers_spec.rb
223
+ - spec/minify_css_spec.rb
222
224
  - spec/minify_javascript_spec.rb
223
225
  - spec/page_alias_and_layouts_spec.rb
224
226
  - spec/relative_assets_spec.rb
@@ -238,6 +240,7 @@ files:
238
240
  - vendor/gems/cache/polyglot-0.2.9.gem
239
241
  - vendor/gems/cache/rack-1.0.1.gem
240
242
  - vendor/gems/cache/rack-test-0.5.1.gem
243
+ - vendor/gems/cache/rack-test-0.5.2.gem
241
244
  - vendor/gems/cache/rake-0.8.7.gem
242
245
  - vendor/gems/cache/rdoc-2.4.3.gem
243
246
  - vendor/gems/cache/rspec-1.2.9.gem
@@ -1848,31 +1851,31 @@ files:
1848
1851
  - vendor/gems/gems/rack-1.0.1/test/testrequest.rb
1849
1852
  - vendor/gems/gems/rack-1.0.1/test/unregistered_handler/rack/handler/unregistered.rb
1850
1853
  - vendor/gems/gems/rack-1.0.1/test/unregistered_handler/rack/handler/unregistered_long_one.rb
1851
- - vendor/gems/gems/rack-test-0.5.1/.document
1852
- - vendor/gems/gems/rack-test-0.5.1/.gitignore
1853
- - vendor/gems/gems/rack-test-0.5.1/History.txt
1854
- - vendor/gems/gems/rack-test-0.5.1/MIT-LICENSE.txt
1855
- - vendor/gems/gems/rack-test-0.5.1/README.rdoc
1856
- - vendor/gems/gems/rack-test-0.5.1/Rakefile
1857
- - vendor/gems/gems/rack-test-0.5.1/Thorfile
1858
- - vendor/gems/gems/rack-test-0.5.1/lib/rack/mock_session.rb
1859
- - vendor/gems/gems/rack-test-0.5.1/lib/rack/test.rb
1860
- - vendor/gems/gems/rack-test-0.5.1/lib/rack/test/cookie_jar.rb
1861
- - vendor/gems/gems/rack-test-0.5.1/lib/rack/test/methods.rb
1862
- - vendor/gems/gems/rack-test-0.5.1/lib/rack/test/mock_digest_request.rb
1863
- - vendor/gems/gems/rack-test-0.5.1/lib/rack/test/uploaded_file.rb
1864
- - vendor/gems/gems/rack-test-0.5.1/lib/rack/test/utils.rb
1865
- - vendor/gems/gems/rack-test-0.5.1/rack-test.gemspec
1866
- - vendor/gems/gems/rack-test-0.5.1/spec/fixtures/config.ru
1867
- - vendor/gems/gems/rack-test-0.5.1/spec/fixtures/fake_app.rb
1868
- - vendor/gems/gems/rack-test-0.5.1/spec/fixtures/foo.txt
1869
- - vendor/gems/gems/rack-test-0.5.1/spec/rack/test/cookie_spec.rb
1870
- - vendor/gems/gems/rack-test-0.5.1/spec/rack/test/digest_auth_spec.rb
1871
- - vendor/gems/gems/rack-test-0.5.1/spec/rack/test/multipart_spec.rb
1872
- - vendor/gems/gems/rack-test-0.5.1/spec/rack/test/utils_spec.rb
1873
- - vendor/gems/gems/rack-test-0.5.1/spec/rack/test_spec.rb
1874
- - vendor/gems/gems/rack-test-0.5.1/spec/spec.opts
1875
- - vendor/gems/gems/rack-test-0.5.1/spec/spec_helper.rb
1854
+ - vendor/gems/gems/rack-test-0.5.2/.document
1855
+ - vendor/gems/gems/rack-test-0.5.2/.gitignore
1856
+ - vendor/gems/gems/rack-test-0.5.2/History.txt
1857
+ - vendor/gems/gems/rack-test-0.5.2/MIT-LICENSE.txt
1858
+ - vendor/gems/gems/rack-test-0.5.2/README.rdoc
1859
+ - vendor/gems/gems/rack-test-0.5.2/Rakefile
1860
+ - vendor/gems/gems/rack-test-0.5.2/Thorfile
1861
+ - vendor/gems/gems/rack-test-0.5.2/lib/rack/mock_session.rb
1862
+ - vendor/gems/gems/rack-test-0.5.2/lib/rack/test.rb
1863
+ - vendor/gems/gems/rack-test-0.5.2/lib/rack/test/cookie_jar.rb
1864
+ - vendor/gems/gems/rack-test-0.5.2/lib/rack/test/methods.rb
1865
+ - vendor/gems/gems/rack-test-0.5.2/lib/rack/test/mock_digest_request.rb
1866
+ - vendor/gems/gems/rack-test-0.5.2/lib/rack/test/uploaded_file.rb
1867
+ - vendor/gems/gems/rack-test-0.5.2/lib/rack/test/utils.rb
1868
+ - vendor/gems/gems/rack-test-0.5.2/rack-test.gemspec
1869
+ - vendor/gems/gems/rack-test-0.5.2/spec/fixtures/config.ru
1870
+ - vendor/gems/gems/rack-test-0.5.2/spec/fixtures/fake_app.rb
1871
+ - vendor/gems/gems/rack-test-0.5.2/spec/fixtures/foo.txt
1872
+ - vendor/gems/gems/rack-test-0.5.2/spec/rack/test/cookie_spec.rb
1873
+ - vendor/gems/gems/rack-test-0.5.2/spec/rack/test/digest_auth_spec.rb
1874
+ - vendor/gems/gems/rack-test-0.5.2/spec/rack/test/multipart_spec.rb
1875
+ - vendor/gems/gems/rack-test-0.5.2/spec/rack/test/utils_spec.rb
1876
+ - vendor/gems/gems/rack-test-0.5.2/spec/rack/test_spec.rb
1877
+ - vendor/gems/gems/rack-test-0.5.2/spec/spec.opts
1878
+ - vendor/gems/gems/rack-test-0.5.2/spec/spec_helper.rb
1876
1879
  - vendor/gems/gems/rake-0.8.7/CHANGES
1877
1880
  - vendor/gems/gems/rake-0.8.7/MIT-LICENSE
1878
1881
  - vendor/gems/gems/rake-0.8.7/README
@@ -2886,7 +2889,7 @@ files:
2886
2889
  - vendor/gems/specifications/launchy-0.3.3.gemspec
2887
2890
  - vendor/gems/specifications/polyglot-0.2.9.gemspec
2888
2891
  - vendor/gems/specifications/rack-1.0.1.gemspec
2889
- - vendor/gems/specifications/rack-test-0.5.1.gemspec
2892
+ - vendor/gems/specifications/rack-test-0.5.2.gemspec
2890
2893
  - vendor/gems/specifications/rake-0.8.7.gemspec
2891
2894
  - vendor/gems/specifications/rdoc-2.4.3.gemspec
2892
2895
  - vendor/gems/specifications/rspec-1.2.9.gemspec
@@ -2935,6 +2938,7 @@ test_files:
2935
2938
  - spec/fixtures/sample/init.rb
2936
2939
  - spec/generator_spec.rb
2937
2940
  - spec/helpers_spec.rb
2941
+ - spec/minify_css_spec.rb
2938
2942
  - spec/minify_javascript_spec.rb
2939
2943
  - spec/page_alias_and_layouts_spec.rb
2940
2944
  - spec/relative_assets_spec.rb