middleman-core-x86-mingw32 3.0.5 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/features/proxy_pages.feature +94 -0
- data/features/tilde_directories.feature +14 -0
- data/fixtures/proxy-pages-app/config.rb +21 -0
- data/fixtures/proxy-pages-app/source/real/index-ivars.html.erb +6 -0
- data/fixtures/proxy-pages-app/source/real/index.html.erb +5 -0
- data/fixtures/proxy-pages-app/source/real.html +1 -0
- data/fixtures/proxy-pages-app/source/should_be_ignored3.html +1 -0
- data/fixtures/proxy-pages-app/source/should_be_ignored6.html +1 -0
- data/fixtures/proxy-pages-app/source/should_be_ignored7.html +1 -0
- data/fixtures/proxy-pages-app/source/should_be_ignored8.html +1 -0
- data/lib/middleman-core/application.rb +1 -1
- data/lib/middleman-core/cli.rb +1 -1
- data/lib/middleman-core/core_extensions/front_matter.rb +1 -2
- data/lib/middleman-core/core_extensions/routing.rb +7 -17
- data/lib/middleman-core/core_extensions/ruby_encoding.rb +1 -0
- data/lib/middleman-core/preview_server.rb +18 -10
- data/lib/middleman-core/sitemap/extensions/ignores.rb +0 -2
- data/lib/middleman-core/sitemap/extensions/proxies.rb +56 -9
- data/lib/middleman-core/sitemap/store.rb +44 -41
- data/lib/middleman-core/templates/default/source/stylesheets/normalize.css +97 -153
- data/lib/middleman-core/version.rb +1 -1
- metadata +25 -5
@@ -0,0 +1,94 @@
|
|
1
|
+
Feature: Proxy Pages (using proxy rather than page)
|
2
|
+
In order to use a single view to generate multiple output files
|
3
|
+
|
4
|
+
Scenario: Checking built folder for content
|
5
|
+
Given a successfully built app at "proxy-pages-app"
|
6
|
+
When I cd to "build"
|
7
|
+
Then the following files should exist:
|
8
|
+
| fake.html |
|
9
|
+
| fake2.html |
|
10
|
+
| fake3.html |
|
11
|
+
| fake4.html |
|
12
|
+
| fake/one.html |
|
13
|
+
| fake/two.html |
|
14
|
+
| fake2/one.html |
|
15
|
+
| fake2/two.html |
|
16
|
+
| fake3/one.html |
|
17
|
+
| fake3/two.html |
|
18
|
+
| fake4/one.html |
|
19
|
+
| fake4/two.html |
|
20
|
+
| target_ignore.html |
|
21
|
+
| target_ignore2.html |
|
22
|
+
| target_ignore3.html |
|
23
|
+
| target_ignore4.html |
|
24
|
+
| 明日がある.html |
|
25
|
+
Then the following files should not exist:
|
26
|
+
| should_be_ignored6.html |
|
27
|
+
| should_be_ignored7.html |
|
28
|
+
| should_be_ignored8.html |
|
29
|
+
|
30
|
+
Scenario: Preview basic proxy
|
31
|
+
Given the Server is running at "proxy-pages-app"
|
32
|
+
When I go to "/fake.html"
|
33
|
+
Then I should see "I am real"
|
34
|
+
When I go to "/fake2.html"
|
35
|
+
Then I should see "I am real"
|
36
|
+
When I go to "/fake3.html"
|
37
|
+
Then I should see "I am real"
|
38
|
+
When I go to "/fake4.html"
|
39
|
+
Then I should see "I am real"
|
40
|
+
|
41
|
+
Scenario: Preview proxy with variable one
|
42
|
+
Given the Server is running at "proxy-pages-app"
|
43
|
+
When I go to "/fake/one.html"
|
44
|
+
Then I should see "I am real: one"
|
45
|
+
|
46
|
+
When I go to "/fake2/one.html"
|
47
|
+
Then I should see "I am real: one"
|
48
|
+
|
49
|
+
When I go to "/fake3/one.html"
|
50
|
+
Then I should see "I am real: one"
|
51
|
+
|
52
|
+
When I go to "/fake4/one.html"
|
53
|
+
Then I should see "I am real: one"
|
54
|
+
|
55
|
+
Scenario: Preview proxy with variable two
|
56
|
+
Given the Server is running at "proxy-pages-app"
|
57
|
+
When I go to "/fake/two.html"
|
58
|
+
Then I should see "I am real: two"
|
59
|
+
|
60
|
+
When I go to "/fake2/two.html"
|
61
|
+
Then I should see "I am real: two"
|
62
|
+
|
63
|
+
When I go to "/fake3/two.html"
|
64
|
+
Then I should see "I am real: two"
|
65
|
+
|
66
|
+
When I go to "/fake4/two.html"
|
67
|
+
Then I should see "I am real: two"
|
68
|
+
|
69
|
+
Scenario: Build proxy with variable one
|
70
|
+
Given a successfully built app at "proxy-pages-app"
|
71
|
+
When I cd to "build"
|
72
|
+
Then the file "fake/one.html" should contain "I am real: one"
|
73
|
+
Then the file "fake2/one.html" should contain "I am real: one"
|
74
|
+
Then the file "fake3/one.html" should contain "I am real: one"
|
75
|
+
|
76
|
+
Scenario: Target ignore
|
77
|
+
Given the Server is running at "proxy-pages-app"
|
78
|
+
When I go to "/target_ignore.html"
|
79
|
+
Then I should see "Ignore me! 3"
|
80
|
+
When I go to "/target_ignore2.html"
|
81
|
+
Then I should see "Ignore me! 6"
|
82
|
+
When I go to "/target_ignore3.html"
|
83
|
+
Then I should see "Ignore me! 7"
|
84
|
+
When I go to "/target_ignore4.html"
|
85
|
+
Then I should see "Ignore me! 8"
|
86
|
+
|
87
|
+
Scenario: Preview ignored paths
|
88
|
+
Given the Server is running at "proxy-pages-app"
|
89
|
+
When I go to "/should_be_ignored6.html"
|
90
|
+
Then I should see "File Not Found"
|
91
|
+
When I go to "/should_be_ignored7.html"
|
92
|
+
Then I should see "File Not Found"
|
93
|
+
When I go to "/should_be_ignored8.html"
|
94
|
+
Then I should see "File Not Found"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@encoding
|
2
|
+
|
3
|
+
Feature: Tilde directories
|
4
|
+
In order to support ~ characters in directories
|
5
|
+
|
6
|
+
Scenario: Build directories with containing ~ characters in their name
|
7
|
+
Given a fixture app "empty-app"
|
8
|
+
And a file named "source/~notexistinguser/index.html" with:
|
9
|
+
"""
|
10
|
+
It works!
|
11
|
+
"""
|
12
|
+
And the Server is running
|
13
|
+
When I go to "/~notexistinguser/index.html"
|
14
|
+
Then I should see "It works!"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
proxy "/fake.html", "/real.html", :layout => false
|
3
|
+
proxy "fake2.html", "/real.html", :layout => false
|
4
|
+
proxy "fake3.html", "real.html", :layout => false
|
5
|
+
proxy "/fake4.html", "real.html", :layout => false
|
6
|
+
|
7
|
+
proxy "/target_ignore.html", "/should_be_ignored3.html", :ignore => true
|
8
|
+
proxy "target_ignore2.html", "/should_be_ignored6.html", :ignore => true
|
9
|
+
proxy "target_ignore3.html", "should_be_ignored7.html", :ignore => true
|
10
|
+
proxy "/target_ignore4.html", "should_be_ignored8.html", :ignore => true
|
11
|
+
|
12
|
+
%w(one two).each do |num|
|
13
|
+
proxy "/fake/#{num}.html", "/real/index.html", :ignore => true, :locals => { :num => num }
|
14
|
+
proxy "fake2/#{num}.html", "/real/index.html", :ignore => true, :locals => { :num => num }
|
15
|
+
proxy "fake3/#{num}.html", "real/index.html", :ignore => true, :locals => { :num => num }
|
16
|
+
proxy "/fake4/#{num}.html", "real/index-ivars.html", :ignore => true do
|
17
|
+
@num = num
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
proxy "明日がある.html", "/real.html", :layout => false
|
@@ -0,0 +1 @@
|
|
1
|
+
I am real
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>Ignore me! 3</h1>
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>Ignore me! 6</h1>
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>Ignore me! 7</h1>
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>Ignore me! 8</h1>
|
@@ -142,7 +142,7 @@ module Middleman
|
|
142
142
|
include Middleman::CoreExtensions::RubyEncoding
|
143
143
|
|
144
144
|
# Basic Rack Request Handling
|
145
|
-
|
145
|
+
register Middleman::CoreExtensions::Request
|
146
146
|
|
147
147
|
# Handle exceptions
|
148
148
|
register Middleman::CoreExtensions::ShowExceptions
|
data/lib/middleman-core/cli.rb
CHANGED
@@ -127,8 +127,7 @@ module Middleman::CoreExtensions
|
|
127
127
|
# @param [String] path
|
128
128
|
# @return [Array<Thor::CoreExt::HashWithIndifferentAccess, String>]
|
129
129
|
def frontmatter_and_content(path)
|
130
|
-
full_path = File.expand_path(
|
131
|
-
|
130
|
+
full_path = File.expand_path(File.join(@app.source_dir, path))
|
132
131
|
content = File.read(full_path)
|
133
132
|
data = {}
|
134
133
|
|
@@ -45,9 +45,7 @@ module Middleman
|
|
45
45
|
# @param [Hash] opts
|
46
46
|
# @return [void]
|
47
47
|
def page(url, opts={}, &block)
|
48
|
-
|
49
|
-
blocks = []
|
50
|
-
blocks << block if block_given?
|
48
|
+
blocks = Array(block)
|
51
49
|
|
52
50
|
# Default layout
|
53
51
|
opts[:layout] = layout if opts[:layout].nil?
|
@@ -70,20 +68,12 @@ module Middleman
|
|
70
68
|
end
|
71
69
|
|
72
70
|
# Setup proxy
|
73
|
-
if opts.
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
end
|
80
|
-
|
81
|
-
opts.delete(:proxy)
|
82
|
-
else
|
83
|
-
if opts.has_key?(:ignore) && opts[:ignore]
|
84
|
-
ignore(url)
|
85
|
-
opts.delete(:ignore)
|
86
|
-
end
|
71
|
+
if target = opts.delete(:proxy)
|
72
|
+
# TODO: deprecate proxy through page?
|
73
|
+
proxy(url, target, opts, &block) and return
|
74
|
+
elsif opts.delete(:ignore)
|
75
|
+
# TODO: deprecate ignore through page?
|
76
|
+
ignore(url)
|
87
77
|
end
|
88
78
|
|
89
79
|
# Setup a metadata matcher for rendering those options
|
@@ -1,9 +1,6 @@
|
|
1
1
|
require "webrick"
|
2
2
|
|
3
3
|
module Middleman
|
4
|
-
|
5
|
-
WINDOWS = !!(RUBY_PLATFORM =~ /(mingw|bccwin|wince|mswin32)/i) unless const_defined?(:WINDOWS)
|
6
|
-
|
7
4
|
module PreviewServer
|
8
5
|
|
9
6
|
DEFAULT_PORT = 4567
|
@@ -25,7 +22,7 @@ module Middleman
|
|
25
22
|
unless @initialized
|
26
23
|
@initialized = true
|
27
24
|
|
28
|
-
register_signal_handlers
|
25
|
+
register_signal_handlers
|
29
26
|
|
30
27
|
# Save the last-used @options so it may be re-used when
|
31
28
|
# reloading later on.
|
@@ -38,7 +35,12 @@ module Middleman
|
|
38
35
|
# Detach the current Middleman::Application instance
|
39
36
|
# @return [void]
|
40
37
|
def stop
|
41
|
-
|
38
|
+
begin
|
39
|
+
logger.info "== The Middleman is shutting down"
|
40
|
+
rescue
|
41
|
+
# if the user closed their terminal STDOUT/STDERR won't exist
|
42
|
+
end
|
43
|
+
|
42
44
|
if @listener
|
43
45
|
@listener.stop
|
44
46
|
@listener = nil
|
@@ -108,12 +110,17 @@ module Middleman
|
|
108
110
|
@listener.start(false) if first_run
|
109
111
|
end
|
110
112
|
|
111
|
-
# Trap
|
113
|
+
# Trap some interupt signals and shut down smoothly
|
112
114
|
# @return [void]
|
113
115
|
def register_signal_handlers
|
114
|
-
|
115
|
-
|
116
|
-
|
116
|
+
%w(INT HUP TERM QUIT).each do |sig|
|
117
|
+
if Signal.list[sig]
|
118
|
+
Signal.trap(sig) do
|
119
|
+
shutdown
|
120
|
+
exit
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
117
124
|
end
|
118
125
|
|
119
126
|
# Initialize webrick
|
@@ -145,12 +152,13 @@ module Middleman
|
|
145
152
|
# @param [Middleman::Application] app
|
146
153
|
# @return [void]
|
147
154
|
def mount_instance
|
155
|
+
@app = new_app
|
156
|
+
|
148
157
|
@webrick ||= setup_webrick(
|
149
158
|
@options[:host] || "0.0.0.0",
|
150
159
|
@options[:debug] || false
|
151
160
|
)
|
152
161
|
|
153
|
-
@app = new_app
|
154
162
|
start_file_watcher
|
155
163
|
|
156
164
|
@webrick.mount "/", ::Rack::Handler::WEBrick, app.class.to_rack_app
|
@@ -60,8 +60,6 @@ module Middleman
|
|
60
60
|
# @param [String, Regexp] path Path glob expression, or path regex
|
61
61
|
# @return [void]
|
62
62
|
def ignore(path=nil, &block)
|
63
|
-
original_callback_size = @ignored_callbacks.size
|
64
|
-
|
65
63
|
if path.is_a? Regexp
|
66
64
|
@ignored_callbacks << Proc.new {|p| p =~ path }
|
67
65
|
elsif path.is_a? String
|
@@ -74,40 +74,87 @@ module Middleman
|
|
74
74
|
@_proxy_manager ||= ProxyManager.new(self)
|
75
75
|
end
|
76
76
|
|
77
|
-
def proxy(*args)
|
78
|
-
proxy_manager.proxy(*args)
|
77
|
+
def proxy(*args, &block)
|
78
|
+
proxy_manager.proxy(*args, &block)
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
|
+
# Manages the list of proxy configurations and manipulates the sitemap
|
83
|
+
# to include new resources based on those configurations
|
82
84
|
class ProxyManager
|
83
85
|
def initialize(app)
|
84
86
|
@app = app
|
85
|
-
|
86
|
-
@proxy_paths = {}
|
87
|
+
@proxy_configs = Set.new
|
87
88
|
end
|
88
89
|
|
89
90
|
# Setup a proxy from a path to a target
|
90
91
|
# @param [String] path
|
91
92
|
# @param [String] target
|
93
|
+
# @param [Hash] opts options to apply to the proxy, including things like
|
94
|
+
# :locals, :ignore to hide the proxy target, :layout, and :directory_indexes.
|
92
95
|
# @return [void]
|
93
|
-
def proxy(path, target)
|
94
|
-
|
96
|
+
def proxy(path, target, opts={}, &block)
|
97
|
+
metadata = { :options => {}, :locals => {}, :blocks => [] }
|
98
|
+
metadata[:blocks] << block if block_given?
|
99
|
+
metadata[:locals] = opts.delete(:locals) || {}
|
100
|
+
|
101
|
+
@app.ignore(target) if opts.delete(:ignore)
|
102
|
+
metadata[:options] = opts
|
103
|
+
|
104
|
+
@proxy_configs << ProxyConfiguration.new(:path => path, :target => target, :metadata => metadata)
|
105
|
+
|
95
106
|
@app.sitemap.rebuild_resource_list!(:added_proxy)
|
96
107
|
end
|
97
108
|
|
98
109
|
# Update the main sitemap resource list
|
99
110
|
# @return [void]
|
100
111
|
def manipulate_resource_list(resources)
|
101
|
-
resources + @
|
112
|
+
resources + @proxy_configs.map do |config|
|
102
113
|
p = ::Middleman::Sitemap::Resource.new(
|
103
114
|
@app.sitemap,
|
104
|
-
|
115
|
+
config.path
|
105
116
|
)
|
106
|
-
p.proxy_to(
|
117
|
+
p.proxy_to(config.target)
|
118
|
+
p.add_metadata(config.metadata)
|
107
119
|
p
|
108
120
|
end
|
109
121
|
end
|
110
122
|
end
|
123
|
+
|
124
|
+
# Configuration for a proxy instance
|
125
|
+
class ProxyConfiguration
|
126
|
+
# The path that this proxy will appear at in the sitemap
|
127
|
+
attr_reader :path
|
128
|
+
def path=(p)
|
129
|
+
@path = ::Middleman::Util.normalize_path(p)
|
130
|
+
end
|
131
|
+
|
132
|
+
# The existing sitemap path that this will proxy to
|
133
|
+
attr_reader :target
|
134
|
+
def target=(t)
|
135
|
+
@target = ::Middleman::Util.normalize_path(t)
|
136
|
+
end
|
137
|
+
|
138
|
+
# Additional metadata like blocks and locals to apply to the proxy
|
139
|
+
attr_accessor :metadata
|
140
|
+
|
141
|
+
# Create a new proxy configuration from hash options
|
142
|
+
def initialize(options={})
|
143
|
+
options.each do |key, value|
|
144
|
+
send "#{key}=", value
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# Two configurations are equal if they reference the same path
|
149
|
+
def eql?(other)
|
150
|
+
other.path == path
|
151
|
+
end
|
152
|
+
|
153
|
+
# Two configurations are equal if they reference the same path
|
154
|
+
def hash
|
155
|
+
path.hash
|
156
|
+
end
|
157
|
+
end
|
111
158
|
end
|
112
159
|
end
|
113
160
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# Used for merging results of metadata callbacks
|
2
2
|
require "active_support/core_ext/hash/deep_merge"
|
3
|
+
require 'monitor'
|
3
4
|
|
4
5
|
module Middleman
|
5
6
|
|
@@ -25,6 +26,8 @@ module Middleman
|
|
25
26
|
@_cached_metadata = {}
|
26
27
|
@resource_list_manipulators = []
|
27
28
|
@needs_sitemap_rebuild = true
|
29
|
+
@lock = Monitor.new
|
30
|
+
|
28
31
|
reset_lookup_cache!
|
29
32
|
|
30
33
|
# Register classes which can manipulate the main site map list
|
@@ -48,36 +51,44 @@ module Middleman
|
|
48
51
|
# Rebuild the list of resources from scratch, using registed manipulators
|
49
52
|
# @return [void]
|
50
53
|
def rebuild_resource_list!(reason=nil)
|
51
|
-
@
|
54
|
+
@lock.synchronize do
|
55
|
+
@needs_sitemap_rebuild = true
|
56
|
+
end
|
52
57
|
end
|
53
58
|
|
54
59
|
# Find a resource given its original path
|
55
60
|
# @param [String] request_path The original path of a resource.
|
56
61
|
# @return [Middleman::Sitemap::Resource]
|
57
62
|
def find_resource_by_path(request_path)
|
58
|
-
|
59
|
-
|
60
|
-
|
63
|
+
@lock.synchronize do
|
64
|
+
request_path = ::Middleman::Util.normalize_path(request_path)
|
65
|
+
ensure_resource_list_updated!
|
66
|
+
@_lookup_by_path[request_path]
|
67
|
+
end
|
61
68
|
end
|
62
69
|
|
63
70
|
# Find a resource given its destination path
|
64
71
|
# @param [String] request_path The destination (output) path of a resource.
|
65
72
|
# @return [Middleman::Sitemap::Resource]
|
66
73
|
def find_resource_by_destination_path(request_path)
|
67
|
-
|
68
|
-
|
69
|
-
|
74
|
+
@lock.synchronize do
|
75
|
+
request_path = ::Middleman::Util.normalize_path(request_path)
|
76
|
+
ensure_resource_list_updated!
|
77
|
+
@_lookup_by_destination_path[request_path]
|
78
|
+
end
|
70
79
|
end
|
71
80
|
|
72
81
|
# Get the array of all resources
|
73
82
|
# @param [Boolean] include_ignored Whether to include ignored resources
|
74
83
|
# @return [Array<Middleman::Sitemap::Resource>]
|
75
84
|
def resources(include_ignored=false)
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
85
|
+
@lock.synchronize do
|
86
|
+
ensure_resource_list_updated!
|
87
|
+
if include_ignored
|
88
|
+
@resources
|
89
|
+
else
|
90
|
+
@resources.reject(&:ignored?)
|
91
|
+
end
|
81
92
|
end
|
82
93
|
end
|
83
94
|
|
@@ -115,19 +126,10 @@ module Middleman
|
|
115
126
|
# @param [Symbol] origin an indicator of where this metadata came from - only one
|
116
127
|
# block per [matcher, origin] pair may exist.
|
117
128
|
# @return [Array<Array<Proc, Regexp>>]
|
118
|
-
def provides_metadata_for_path(matcher=nil,
|
129
|
+
def provides_metadata_for_path(matcher=nil, &block)
|
119
130
|
@_provides_metadata_for_path ||= []
|
120
131
|
if block_given?
|
121
|
-
|
122
|
-
existing_provider = @_provides_metadata_for_path.find {|b,m,o| o == origin && m == matcher}
|
123
|
-
end
|
124
|
-
|
125
|
-
if existing_provider
|
126
|
-
existing_provider[0] = block
|
127
|
-
else
|
128
|
-
@_provides_metadata_for_path << [block, matcher, origin]
|
129
|
-
end
|
130
|
-
|
132
|
+
@_provides_metadata_for_path << [block, matcher]
|
131
133
|
@_cached_metadata = {}
|
132
134
|
end
|
133
135
|
@_provides_metadata_for_path
|
@@ -151,10 +153,7 @@ module Middleman
|
|
151
153
|
|
152
154
|
metadata = callback.call(request_path)
|
153
155
|
|
154
|
-
|
155
|
-
result[:blocks] << metadata[:blocks]
|
156
|
-
metadata.delete(:blocks)
|
157
|
-
end
|
156
|
+
result[:blocks] += Array(metadata.delete(:blocks))
|
158
157
|
|
159
158
|
result.deep_merge(metadata)
|
160
159
|
end
|
@@ -213,30 +212,34 @@ module Middleman
|
|
213
212
|
# rebuild_resource_list! since the last time it was run. This is
|
214
213
|
# very expensive!
|
215
214
|
def ensure_resource_list_updated!
|
216
|
-
|
217
|
-
|
215
|
+
@lock.synchronize do
|
216
|
+
return unless @needs_sitemap_rebuild
|
217
|
+
@needs_sitemap_rebuild = false
|
218
218
|
|
219
|
-
|
219
|
+
@app.logger.debug "== Rebuilding resource list"
|
220
220
|
|
221
|
-
|
222
|
-
|
221
|
+
@resources = @resource_list_manipulators.inject([]) do |result, (_, inst)|
|
222
|
+
newres = inst.manipulate_resource_list(result)
|
223
223
|
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
224
|
+
# Reset lookup cache
|
225
|
+
reset_lookup_cache!
|
226
|
+
newres.each do |resource|
|
227
|
+
@_lookup_by_path[resource.path] = resource
|
228
|
+
@_lookup_by_destination_path[resource.destination_path] = resource
|
229
|
+
end
|
230
230
|
|
231
|
-
|
231
|
+
newres
|
232
|
+
end
|
232
233
|
end
|
233
234
|
end
|
234
235
|
|
235
236
|
private
|
236
237
|
|
237
238
|
def reset_lookup_cache!
|
238
|
-
@
|
239
|
-
|
239
|
+
@lock.synchronize {
|
240
|
+
@_lookup_by_path = {}
|
241
|
+
@_lookup_by_destination_path = {}
|
242
|
+
}
|
240
243
|
end
|
241
244
|
end
|
242
245
|
end
|
@@ -1,11 +1,11 @@
|
|
1
|
-
/*! normalize.css
|
1
|
+
/*! normalize.css v2.0.1 | MIT License | git.io/normalize */
|
2
2
|
|
3
|
-
/*
|
3
|
+
/* ==========================================================================
|
4
4
|
HTML5 display definitions
|
5
5
|
========================================================================== */
|
6
6
|
|
7
7
|
/*
|
8
|
-
* Corrects block display not defined in
|
8
|
+
* Corrects `block` display not defined in IE 8/9.
|
9
9
|
*/
|
10
10
|
|
11
11
|
article,
|
@@ -17,86 +17,69 @@ footer,
|
|
17
17
|
header,
|
18
18
|
hgroup,
|
19
19
|
nav,
|
20
|
-
section
|
20
|
+
section,
|
21
|
+
summary {
|
21
22
|
display: block;
|
22
23
|
}
|
23
24
|
|
24
25
|
/*
|
25
|
-
* Corrects inline-block display not defined in
|
26
|
+
* Corrects `inline-block` display not defined in IE 8/9.
|
26
27
|
*/
|
27
28
|
|
28
29
|
audio,
|
29
30
|
canvas,
|
30
31
|
video {
|
31
32
|
display: inline-block;
|
32
|
-
*display: inline;
|
33
|
-
*zoom: 1;
|
34
33
|
}
|
35
34
|
|
36
35
|
/*
|
37
|
-
* Prevents modern browsers from displaying
|
36
|
+
* Prevents modern browsers from displaying `audio` without controls.
|
37
|
+
* Remove excess height in iOS 5 devices.
|
38
38
|
*/
|
39
39
|
|
40
40
|
audio:not([controls]) {
|
41
41
|
display: none;
|
42
|
+
height: 0;
|
42
43
|
}
|
43
44
|
|
44
45
|
/*
|
45
|
-
* Addresses styling for
|
46
|
-
* Known issue: no IE6 support
|
46
|
+
* Addresses styling for `hidden` attribute not present in IE 8/9.
|
47
47
|
*/
|
48
48
|
|
49
49
|
[hidden] {
|
50
50
|
display: none;
|
51
51
|
}
|
52
52
|
|
53
|
-
|
54
|
-
/* =============================================================================
|
53
|
+
/* ==========================================================================
|
55
54
|
Base
|
56
55
|
========================================================================== */
|
57
56
|
|
58
57
|
/*
|
59
|
-
* 1.
|
60
|
-
*
|
61
|
-
*
|
62
|
-
* 3. Prevents iOS text size adjust after orientation change, without disabling user zoom
|
63
|
-
* www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
|
58
|
+
* 1. Sets default font family to sans-serif.
|
59
|
+
* 2. Prevents iOS text size adjust after orientation change, without disabling
|
60
|
+
* user zoom.
|
64
61
|
*/
|
65
62
|
|
66
63
|
html {
|
67
|
-
font-
|
68
|
-
|
69
|
-
-
|
70
|
-
-ms-text-size-adjust: 100%; /* 3 */
|
64
|
+
font-family: sans-serif; /* 1 */
|
65
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
66
|
+
-ms-text-size-adjust: 100%; /* 2 */
|
71
67
|
}
|
72
68
|
|
73
69
|
/*
|
74
|
-
*
|
70
|
+
* Removes default margin.
|
75
71
|
*/
|
76
72
|
|
77
73
|
body {
|
78
74
|
margin: 0;
|
79
75
|
}
|
80
76
|
|
81
|
-
/*
|
82
|
-
* Addresses font-family inconsistency between 'textarea' and other form elements.
|
83
|
-
*/
|
84
|
-
|
85
|
-
body,
|
86
|
-
button,
|
87
|
-
input,
|
88
|
-
select,
|
89
|
-
textarea {
|
90
|
-
font-family: sans-serif;
|
91
|
-
}
|
92
|
-
|
93
|
-
|
94
|
-
/* =============================================================================
|
77
|
+
/* ==========================================================================
|
95
78
|
Links
|
96
79
|
========================================================================== */
|
97
80
|
|
98
81
|
/*
|
99
|
-
* Addresses outline
|
82
|
+
* Addresses `outline` inconsistency between Chrome and other browsers.
|
100
83
|
*/
|
101
84
|
|
102
85
|
a:focus {
|
@@ -104,22 +87,21 @@ a:focus {
|
|
104
87
|
}
|
105
88
|
|
106
89
|
/*
|
107
|
-
* Improves readability when focused and also mouse hovered in all browsers
|
108
|
-
* people.opera.com/patrickl/experiments/keyboard/test
|
90
|
+
* Improves readability when focused and also mouse hovered in all browsers.
|
109
91
|
*/
|
110
92
|
|
111
|
-
a:
|
112
|
-
a:
|
93
|
+
a:active,
|
94
|
+
a:hover {
|
113
95
|
outline: 0;
|
114
96
|
}
|
115
97
|
|
116
|
-
|
117
|
-
/* =============================================================================
|
98
|
+
/* ==========================================================================
|
118
99
|
Typography
|
119
100
|
========================================================================== */
|
120
101
|
|
121
102
|
/*
|
122
|
-
*
|
103
|
+
* Addresses `h1` font sizes within `section` and `article` in Firefox 4+,
|
104
|
+
* Safari 5, and Chrome.
|
123
105
|
*/
|
124
106
|
|
125
107
|
h1 {
|
@@ -127,7 +109,7 @@ h1 {
|
|
127
109
|
}
|
128
110
|
|
129
111
|
/*
|
130
|
-
* Addresses styling not present in
|
112
|
+
* Addresses styling not present in IE 8/9, Safari 5, and Chrome.
|
131
113
|
*/
|
132
114
|
|
133
115
|
abbr[title] {
|
@@ -135,20 +117,16 @@ abbr[title] {
|
|
135
117
|
}
|
136
118
|
|
137
119
|
/*
|
138
|
-
* Addresses style set to
|
139
|
-
*/
|
140
|
-
|
141
|
-
b,
|
142
|
-
strong {
|
143
|
-
font-weight: bold;
|
144
|
-
}
|
120
|
+
* Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
|
121
|
+
*/
|
145
122
|
|
146
|
-
|
147
|
-
|
123
|
+
b,
|
124
|
+
strong {
|
125
|
+
font-weight: bold;
|
148
126
|
}
|
149
127
|
|
150
128
|
/*
|
151
|
-
* Addresses styling not present in
|
129
|
+
* Addresses styling not present in Safari 5 and Chrome.
|
152
130
|
*/
|
153
131
|
|
154
132
|
dfn {
|
@@ -156,7 +134,7 @@ dfn {
|
|
156
134
|
}
|
157
135
|
|
158
136
|
/*
|
159
|
-
* Addresses styling not present in
|
137
|
+
* Addresses styling not present in IE 8/9.
|
160
138
|
*/
|
161
139
|
|
162
140
|
mark {
|
@@ -164,22 +142,21 @@ mark {
|
|
164
142
|
color: #000;
|
165
143
|
}
|
166
144
|
|
145
|
+
|
167
146
|
/*
|
168
|
-
* Corrects font family set oddly in
|
169
|
-
* en.wikipedia.org/wiki/User:Davidgothberg/Test59
|
147
|
+
* Corrects font family set oddly in Safari 5 and Chrome.
|
170
148
|
*/
|
171
149
|
|
172
|
-
pre,
|
173
150
|
code,
|
174
151
|
kbd,
|
152
|
+
pre,
|
175
153
|
samp {
|
176
154
|
font-family: monospace, serif;
|
177
|
-
_font-family: 'courier new', monospace;
|
178
155
|
font-size: 1em;
|
179
156
|
}
|
180
157
|
|
181
158
|
/*
|
182
|
-
* Improves readability of pre-formatted text in all browsers
|
159
|
+
* Improves readability of pre-formatted text in all browsers.
|
183
160
|
*/
|
184
161
|
|
185
162
|
pre {
|
@@ -189,31 +166,23 @@ pre {
|
|
189
166
|
}
|
190
167
|
|
191
168
|
/*
|
192
|
-
*
|
193
|
-
* 2. Addresses quote property not supported in S4
|
169
|
+
* Sets consistent quote types.
|
194
170
|
*/
|
195
171
|
|
196
|
-
/* 1 */
|
197
|
-
|
198
172
|
q {
|
199
|
-
quotes:
|
173
|
+
quotes: "\201C" "\201D" "\2018" "\2019";
|
200
174
|
}
|
201
175
|
|
202
|
-
/*
|
203
|
-
|
204
|
-
|
205
|
-
q:after {
|
206
|
-
content: '';
|
207
|
-
content: none;
|
208
|
-
}
|
176
|
+
/*
|
177
|
+
* Addresses inconsistent and variable font size in all browsers.
|
178
|
+
*/
|
209
179
|
|
210
180
|
small {
|
211
|
-
font-size:
|
181
|
+
font-size: 80%;
|
212
182
|
}
|
213
183
|
|
214
184
|
/*
|
215
|
-
* Prevents sub and sup affecting line-height in all browsers
|
216
|
-
* gist.github.com/413930
|
185
|
+
* Prevents `sub` and `sup` affecting `line-height` in all browsers.
|
217
186
|
*/
|
218
187
|
|
219
188
|
sub,
|
@@ -232,79 +201,44 @@ sub {
|
|
232
201
|
bottom: -0.25em;
|
233
202
|
}
|
234
203
|
|
235
|
-
|
236
|
-
/* =============================================================================
|
237
|
-
Lists
|
238
|
-
========================================================================== */
|
239
|
-
|
240
|
-
ul,
|
241
|
-
ol {
|
242
|
-
margin-left: 0;
|
243
|
-
padding: 0 0 0 40px;
|
244
|
-
}
|
245
|
-
|
246
|
-
dd {
|
247
|
-
margin: 0 0 0 40px;
|
248
|
-
}
|
249
|
-
|
250
|
-
nav ul,
|
251
|
-
nav ol {
|
252
|
-
list-style: none;
|
253
|
-
list-style-image: none;
|
254
|
-
}
|
255
|
-
|
256
|
-
|
257
|
-
/* =============================================================================
|
204
|
+
/* ==========================================================================
|
258
205
|
Embedded content
|
259
206
|
========================================================================== */
|
260
207
|
|
261
208
|
/*
|
262
|
-
*
|
263
|
-
* 2. Improves image quality when scaled in IE7
|
264
|
-
* code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
|
209
|
+
* Removes border when inside `a` element in IE 8/9.
|
265
210
|
*/
|
266
211
|
|
267
212
|
img {
|
268
|
-
border: 0;
|
269
|
-
-ms-interpolation-mode: bicubic; /* 2 */
|
213
|
+
border: 0;
|
270
214
|
}
|
271
215
|
|
272
216
|
/*
|
273
|
-
* Corrects overflow displayed oddly in
|
217
|
+
* Corrects overflow displayed oddly in IE 9.
|
274
218
|
*/
|
275
219
|
|
276
220
|
svg:not(:root) {
|
277
221
|
overflow: hidden;
|
278
222
|
}
|
279
223
|
|
280
|
-
|
281
|
-
/* =============================================================================
|
224
|
+
/* ==========================================================================
|
282
225
|
Figures
|
283
226
|
========================================================================== */
|
284
227
|
|
285
228
|
/*
|
286
|
-
* Addresses margin not present in
|
229
|
+
* Addresses margin not present in IE 8/9 and Safari 5.
|
287
230
|
*/
|
288
231
|
|
289
232
|
figure {
|
290
233
|
margin: 0;
|
291
234
|
}
|
292
235
|
|
293
|
-
|
294
|
-
/* =============================================================================
|
236
|
+
/* ==========================================================================
|
295
237
|
Forms
|
296
238
|
========================================================================== */
|
297
239
|
|
298
240
|
/*
|
299
|
-
*
|
300
|
-
*/
|
301
|
-
|
302
|
-
form {
|
303
|
-
margin: 0;
|
304
|
-
}
|
305
|
-
|
306
|
-
/*
|
307
|
-
* Define consistent border, margin, and padding
|
241
|
+
* Define consistent border, margin, and padding.
|
308
242
|
*/
|
309
243
|
|
310
244
|
fieldset {
|
@@ -314,59 +248,68 @@ fieldset {
|
|
314
248
|
}
|
315
249
|
|
316
250
|
/*
|
317
|
-
* 1. Corrects color not being inherited in
|
318
|
-
* 2.
|
251
|
+
* 1. Corrects color not being inherited in IE 8/9.
|
252
|
+
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
319
253
|
*/
|
320
254
|
|
321
255
|
legend {
|
322
256
|
border: 0; /* 1 */
|
323
|
-
|
257
|
+
padding: 0; /* 2 */
|
324
258
|
}
|
325
259
|
|
326
260
|
/*
|
327
|
-
* 1. Corrects font
|
328
|
-
* 2.
|
329
|
-
* 3.
|
261
|
+
* 1. Corrects font family not being inherited in all browsers.
|
262
|
+
* 2. Corrects font size not being inherited in all browsers.
|
263
|
+
* 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome
|
330
264
|
*/
|
331
265
|
|
332
266
|
button,
|
333
267
|
input,
|
334
268
|
select,
|
335
269
|
textarea {
|
336
|
-
font-
|
337
|
-
|
338
|
-
|
339
|
-
*vertical-align: middle; /* 3 */
|
270
|
+
font-family: inherit; /* 1 */
|
271
|
+
font-size: 100%; /* 2 */
|
272
|
+
margin: 0; /* 3 */
|
340
273
|
}
|
341
274
|
|
342
275
|
/*
|
343
|
-
* Addresses
|
276
|
+
* Addresses Firefox 4+ setting `line-height` on `input` using `!important` in
|
277
|
+
* the UA stylesheet.
|
344
278
|
*/
|
345
279
|
|
346
280
|
button,
|
347
281
|
input {
|
348
|
-
line-height: normal;
|
282
|
+
line-height: normal;
|
349
283
|
}
|
350
284
|
|
351
285
|
/*
|
352
|
-
* 1.
|
353
|
-
*
|
354
|
-
*
|
355
|
-
*
|
286
|
+
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
287
|
+
* and `video` controls.
|
288
|
+
* 2. Corrects inability to style clickable `input` types in iOS.
|
289
|
+
* 3. Improves usability and consistency of cursor style between image-type
|
290
|
+
* `input` and others.
|
356
291
|
*/
|
357
292
|
|
358
293
|
button,
|
359
|
-
input[type="button"],
|
360
|
-
input[type="reset"],
|
294
|
+
html input[type="button"], /* 1 */
|
295
|
+
input[type="reset"],
|
361
296
|
input[type="submit"] {
|
362
|
-
cursor: pointer; /* 1 */
|
363
297
|
-webkit-appearance: button; /* 2 */
|
364
|
-
|
298
|
+
cursor: pointer; /* 3 */
|
365
299
|
}
|
366
300
|
|
367
301
|
/*
|
368
|
-
*
|
369
|
-
|
302
|
+
* Re-set default cursor for disabled elements.
|
303
|
+
*/
|
304
|
+
|
305
|
+
button[disabled],
|
306
|
+
input[disabled] {
|
307
|
+
cursor: default;
|
308
|
+
}
|
309
|
+
|
310
|
+
/*
|
311
|
+
* 1. Addresses box sizing set to `content-box` in IE 8/9.
|
312
|
+
* 2. Removes excess padding in IE 8/9.
|
370
313
|
*/
|
371
314
|
|
372
315
|
input[type="checkbox"],
|
@@ -376,8 +319,9 @@ input[type="radio"] {
|
|
376
319
|
}
|
377
320
|
|
378
321
|
/*
|
379
|
-
* 1. Addresses appearance set to searchfield in
|
380
|
-
* 2. Addresses box-sizing set to border-box in
|
322
|
+
* 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
|
323
|
+
* 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
|
324
|
+
* (include `-moz` to future-proof).
|
381
325
|
*/
|
382
326
|
|
383
327
|
input[type="search"] {
|
@@ -388,16 +332,17 @@ input[type="search"] {
|
|
388
332
|
}
|
389
333
|
|
390
334
|
/*
|
391
|
-
* Removes inner padding
|
335
|
+
* Removes inner padding and search cancel button in Safari 5 and Chrome
|
336
|
+
* on OS X.
|
392
337
|
*/
|
393
338
|
|
339
|
+
input[type="search"]::-webkit-search-cancel-button,
|
394
340
|
input[type="search"]::-webkit-search-decoration {
|
395
341
|
-webkit-appearance: none;
|
396
342
|
}
|
397
343
|
|
398
344
|
/*
|
399
|
-
* Removes inner padding and border in
|
400
|
-
* www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
|
345
|
+
* Removes inner padding and border in Firefox 4+.
|
401
346
|
*/
|
402
347
|
|
403
348
|
button::-moz-focus-inner,
|
@@ -407,8 +352,8 @@ input::-moz-focus-inner {
|
|
407
352
|
}
|
408
353
|
|
409
354
|
/*
|
410
|
-
* 1. Removes default vertical scrollbar in
|
411
|
-
* 2. Improves readability and alignment in all browsers
|
355
|
+
* 1. Removes default vertical scrollbar in IE 8/9.
|
356
|
+
* 2. Improves readability and alignment in all browsers.
|
412
357
|
*/
|
413
358
|
|
414
359
|
textarea {
|
@@ -416,16 +361,15 @@ textarea {
|
|
416
361
|
vertical-align: top; /* 2 */
|
417
362
|
}
|
418
363
|
|
419
|
-
|
420
|
-
/* =============================================================================
|
364
|
+
/* ==========================================================================
|
421
365
|
Tables
|
422
366
|
========================================================================== */
|
423
367
|
|
424
|
-
/*
|
425
|
-
* Remove most spacing between table cells
|
368
|
+
/*
|
369
|
+
* Remove most spacing between table cells.
|
426
370
|
*/
|
427
371
|
|
428
372
|
table {
|
429
373
|
border-collapse: collapse;
|
430
374
|
border-spacing: 0;
|
431
|
-
}
|
375
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-core-x86-mingw32
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-10-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -179,12 +179,14 @@ files:
|
|
179
179
|
- features/instance_vars.feature
|
180
180
|
- features/mount_rack.feature
|
181
181
|
- features/preview_changes.feature
|
182
|
+
- features/proxy_pages.feature
|
182
183
|
- features/request_params.feature
|
183
184
|
- features/sitemap_traversal.feature
|
184
185
|
- features/static_server.feature
|
185
186
|
- features/step_definitions/page_layout_steps.rb
|
186
187
|
- features/strip_url.feature
|
187
188
|
- features/support/env.rb
|
189
|
+
- features/tilde_directories.feature
|
188
190
|
- features/unicode_filenames.feature
|
189
191
|
- features/wildcard_page_helper.feature
|
190
192
|
- fixtures/automatic-directory-matcher-app/config.rb
|
@@ -350,6 +352,14 @@ files:
|
|
350
352
|
- fixtures/preview-app/config.rb
|
351
353
|
- fixtures/preview-app/source/content.html.erb
|
352
354
|
- fixtures/preview-app/source/layout.erb
|
355
|
+
- fixtures/proxy-pages-app/config.rb
|
356
|
+
- fixtures/proxy-pages-app/source/real.html
|
357
|
+
- fixtures/proxy-pages-app/source/real/index-ivars.html.erb
|
358
|
+
- fixtures/proxy-pages-app/source/real/index.html.erb
|
359
|
+
- fixtures/proxy-pages-app/source/should_be_ignored3.html
|
360
|
+
- fixtures/proxy-pages-app/source/should_be_ignored6.html
|
361
|
+
- fixtures/proxy-pages-app/source/should_be_ignored7.html
|
362
|
+
- fixtures/proxy-pages-app/source/should_be_ignored8.html
|
353
363
|
- fixtures/request-app/config.rb
|
354
364
|
- fixtures/request-app/source/index.html.erb
|
355
365
|
- fixtures/sinatra-app/config.rb
|
@@ -569,7 +579,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
569
579
|
version: '0'
|
570
580
|
segments:
|
571
581
|
- 0
|
572
|
-
hash:
|
582
|
+
hash: -777482429428909548
|
573
583
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
574
584
|
none: false
|
575
585
|
requirements:
|
@@ -578,10 +588,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
578
588
|
version: '0'
|
579
589
|
segments:
|
580
590
|
- 0
|
581
|
-
hash:
|
591
|
+
hash: -777482429428909548
|
582
592
|
requirements: []
|
583
593
|
rubyforge_project:
|
584
|
-
rubygems_version: 1.8.
|
594
|
+
rubygems_version: 1.8.23
|
585
595
|
signing_key:
|
586
596
|
specification_version: 3
|
587
597
|
summary: Hand-crafted frontend development
|
@@ -609,12 +619,14 @@ test_files:
|
|
609
619
|
- features/instance_vars.feature
|
610
620
|
- features/mount_rack.feature
|
611
621
|
- features/preview_changes.feature
|
622
|
+
- features/proxy_pages.feature
|
612
623
|
- features/request_params.feature
|
613
624
|
- features/sitemap_traversal.feature
|
614
625
|
- features/static_server.feature
|
615
626
|
- features/step_definitions/page_layout_steps.rb
|
616
627
|
- features/strip_url.feature
|
617
628
|
- features/support/env.rb
|
629
|
+
- features/tilde_directories.feature
|
618
630
|
- features/unicode_filenames.feature
|
619
631
|
- features/wildcard_page_helper.feature
|
620
632
|
- fixtures/automatic-directory-matcher-app/config.rb
|
@@ -780,6 +792,14 @@ test_files:
|
|
780
792
|
- fixtures/preview-app/config.rb
|
781
793
|
- fixtures/preview-app/source/content.html.erb
|
782
794
|
- fixtures/preview-app/source/layout.erb
|
795
|
+
- fixtures/proxy-pages-app/config.rb
|
796
|
+
- fixtures/proxy-pages-app/source/real.html
|
797
|
+
- fixtures/proxy-pages-app/source/real/index-ivars.html.erb
|
798
|
+
- fixtures/proxy-pages-app/source/real/index.html.erb
|
799
|
+
- fixtures/proxy-pages-app/source/should_be_ignored3.html
|
800
|
+
- fixtures/proxy-pages-app/source/should_be_ignored6.html
|
801
|
+
- fixtures/proxy-pages-app/source/should_be_ignored7.html
|
802
|
+
- fixtures/proxy-pages-app/source/should_be_ignored8.html
|
783
803
|
- fixtures/request-app/config.rb
|
784
804
|
- fixtures/request-app/source/index.html.erb
|
785
805
|
- fixtures/sinatra-app/config.rb
|