middleman-core 3.3.12 → 3.4.0

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.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +1 -0
  3. data/cucumber.yml +2 -0
  4. data/features/asset_hash.feature +9 -0
  5. data/features/chained_templates.feature +4 -1
  6. data/features/cli/preview_server.feature +532 -0
  7. data/features/i18n_link_to.feature +209 -0
  8. data/features/javascript-testing.feature +18 -0
  9. data/features/redirects.feature +1 -0
  10. data/features/relative_assets.feature +11 -0
  11. data/features/support/env.rb +3 -0
  12. data/fixtures/asset-hash-app/source/fonts/fontawesome-webfont.woff +0 -0
  13. data/fixtures/asset-hash-app/source/fonts/fontawesome-webfont.woff2 +0 -0
  14. data/fixtures/asset-hash-app/source/stylesheets/uses_fonts.css +4 -0
  15. data/fixtures/chained-app/source/test.erb.combobreaker.str.erb +8 -0
  16. data/fixtures/javascript-app/config.rb +0 -0
  17. data/fixtures/javascript-app/source/index.html +17 -0
  18. data/fixtures/preview-server-app/bin/dns_server.rb +33 -0
  19. data/fixtures/preview-server-app/config-complications.rb +11 -0
  20. data/fixtures/preview-server-app/config-empty.rb +0 -0
  21. data/fixtures/preview-server-app/config.rb +11 -0
  22. data/fixtures/preview-server-app/source/index.html.erb +1 -0
  23. data/fixtures/preview-server-app/source/layout.erb +9 -0
  24. data/fixtures/preview-server-app/source/layouts/custom.erb +8 -0
  25. data/fixtures/preview-server-app/source/real.html +1 -0
  26. data/fixtures/preview-server-app/source/real/index.html.erb +5 -0
  27. data/fixtures/preview-server-app/source/should_be_ignored.html +1 -0
  28. data/fixtures/preview-server-app/source/should_be_ignored2.html +1 -0
  29. data/fixtures/preview-server-app/source/should_be_ignored3.html +1 -0
  30. data/fixtures/preview-server-app/source/static.html +1 -0
  31. data/fixtures/relative-assets-app/source/absolute_image_relative_css.html.erb +9 -0
  32. data/fixtures/relative-assets-app/source/javascripts/app.js +3 -0
  33. data/fixtures/relative-assets-app/source/relative_image.html.erb +1 -0
  34. data/fixtures/relative-assets-app/source/relative_image_absolute_css.html.erb +9 -0
  35. data/lib/middleman-core/application.rb +11 -5
  36. data/lib/middleman-core/cli/build.rb +3 -1
  37. data/lib/middleman-core/cli/bundler.rb +1 -1
  38. data/lib/middleman-core/cli/extension.rb +2 -2
  39. data/lib/middleman-core/cli/init.rb +3 -3
  40. data/lib/middleman-core/cli/server.rb +9 -1
  41. data/lib/middleman-core/configuration.rb +0 -2
  42. data/lib/middleman-core/core_extensions/data.rb +2 -2
  43. data/lib/middleman-core/core_extensions/external_helpers.rb +2 -1
  44. data/lib/middleman-core/core_extensions/file_watcher.rb +7 -0
  45. data/lib/middleman-core/core_extensions/front_matter.rb +13 -4
  46. data/lib/middleman-core/core_extensions/rendering.rb +20 -6
  47. data/lib/middleman-core/core_extensions/request.rb +2 -2
  48. data/lib/middleman-core/dns_resolver.rb +73 -0
  49. data/lib/middleman-core/dns_resolver/basic_network_resolver.rb +52 -0
  50. data/lib/middleman-core/dns_resolver/hosts_resolver.rb +63 -0
  51. data/lib/middleman-core/dns_resolver/local_link_resolver.rb +44 -0
  52. data/lib/middleman-core/dns_resolver/network_resolver.rb +42 -0
  53. data/lib/middleman-core/extension.rb +0 -1
  54. data/lib/middleman-core/meta_pages.rb +1 -1
  55. data/lib/middleman-core/preview_server.rb +94 -37
  56. data/lib/middleman-core/preview_server/checks.rb +81 -0
  57. data/lib/middleman-core/preview_server/information.rb +273 -0
  58. data/lib/middleman-core/preview_server/network_interface_inventory.rb +65 -0
  59. data/lib/middleman-core/preview_server/server_hostname.rb +39 -0
  60. data/lib/middleman-core/preview_server/server_information.rb +144 -0
  61. data/lib/middleman-core/preview_server/server_information_validator.rb +18 -0
  62. data/lib/middleman-core/preview_server/server_ip_address.rb +55 -0
  63. data/lib/middleman-core/preview_server/server_url.rb +50 -0
  64. data/lib/middleman-core/preview_server/tcp_port_prober.rb +29 -0
  65. data/lib/middleman-core/sitemap.rb +4 -4
  66. data/lib/middleman-core/sitemap/extensions/ignores.rb +5 -1
  67. data/lib/middleman-core/sitemap/extensions/proxies.rb +0 -1
  68. data/lib/middleman-core/sitemap/extensions/redirects.rb +2 -1
  69. data/lib/middleman-core/sitemap/queryable.rb +2 -1
  70. data/lib/middleman-core/sitemap/store.rb +3 -3
  71. data/lib/middleman-core/step_definitions.rb +1 -0
  72. data/lib/middleman-core/step_definitions/builder_steps.rb +7 -7
  73. data/lib/middleman-core/step_definitions/commandline_steps.rb +88 -0
  74. data/lib/middleman-core/step_definitions/server_steps.rb +25 -28
  75. data/lib/middleman-core/templates/extension/Gemfile +0 -1
  76. data/lib/middleman-core/templates/extension/Rakefile +1 -1
  77. data/lib/middleman-core/util.rb +24 -0
  78. data/lib/middleman-core/version.rb +1 -1
  79. data/lib/middleman-more/core_extensions/default_helpers.rb +49 -8
  80. data/lib/middleman-more/core_extensions/i18n.rb +101 -27
  81. data/lib/middleman-more/extensions/asset_hash.rb +1 -1
  82. data/lib/middleman-more/extensions/asset_host.rb +1 -1
  83. data/lib/middleman-more/extensions/automatic_image_sizes.rb +7 -0
  84. data/lib/middleman-more/extensions/cache_buster.rb +1 -1
  85. data/lib/middleman-more/extensions/lorem.rb +2 -2
  86. data/lib/middleman-more/extensions/minify_javascript.rb +6 -4
  87. data/lib/middleman-more/extensions/relative_assets.rb +4 -8
  88. data/middleman-core.gemspec +3 -3
  89. data/spec/middleman-core/dns_resolver_spec.rb +118 -0
  90. data/spec/middleman-core/preview_server/server_hostname_spec.rb +39 -0
  91. data/spec/middleman-core/preview_server/server_ip_address_spec.rb +43 -0
  92. data/spec/spec_helper.rb +26 -0
  93. metadata +81 -17
@@ -13,16 +13,12 @@ class Middleman::Extensions::RelativeAssets < ::Middleman::Extension
13
13
  # asset_url override for relative assets
14
14
  # @param [String] path
15
15
  # @param [String] prefix
16
+ # @param [Hash] options Additional options.
16
17
  # @return [String]
17
- def asset_url(path, prefix='')
18
- path = super(path, prefix)
18
+ def asset_url(path, prefix='', options={})
19
+ options[:relative] = true unless options.key?(:relative)
19
20
 
20
- if path.include?('//') || path.start_with?('data:') || !current_resource
21
- path
22
- else
23
- current_dir = Pathname('/' + current_resource.destination_path)
24
- Pathname(path).relative_path_from(current_dir.dirname).to_s
25
- end
21
+ super(path, prefix, options)
26
22
  end
27
23
  end
28
24
  end
@@ -26,17 +26,17 @@ Gem::Specification.new do |s|
26
26
  s.add_dependency("hooks", ["~> 0.3"])
27
27
 
28
28
  # Builder
29
- s.add_dependency("rack-test", ["~> 0.6.2"])
29
+ s.add_dependency("capybara", ["~> 2.4.4"])
30
30
 
31
31
  # CLI
32
32
  s.add_dependency("thor", [">= 0.15.2", "< 2.0"])
33
33
 
34
34
  # Helpers
35
- s.add_dependency("activesupport", ["~> 4.1.0"])
35
+ s.add_dependency("activesupport", ["~> 4.1"])
36
36
  s.add_dependency("padrino-helpers", ["~> 0.12.3"])
37
37
 
38
38
  # Watcher
39
- s.add_dependency("listen", [">= 2.7.9", "< 3.0"])
39
+ s.add_dependency("listen", ["~> 3.0.3"])
40
40
 
41
41
  # i18n
42
42
  s.add_dependency("i18n", ["~> 0.7.0"])
@@ -0,0 +1,118 @@
1
+ require 'spec_helper'
2
+ require 'middleman-core/dns_resolver'
3
+
4
+ RSpec.describe Middleman::DnsResolver do
5
+ subject(:resolver) do
6
+ described_class.new(
7
+ hosts_resolver: hosts_resolver,
8
+ local_link_resolver: local_link_resolver,
9
+ network_resolver: network_resolver
10
+ )
11
+ end
12
+
13
+ let(:hosts_resolver) { instance_double('Middleman::DnsResolver::HostsResolver') }
14
+ let(:local_link_resolver) { instance_double('Middleman::DnsResolver::LocalLinkResolver') }
15
+ let(:network_resolver) { instance_double('Middleman::DnsResolver::NetworkResolver') }
16
+
17
+ before :each do
18
+ allow(network_resolver).to receive(:timeouts=)
19
+ end
20
+
21
+ describe '#names_for' do
22
+ context 'when hosts resolver can resolve name' do
23
+ before :each do
24
+ expect(hosts_resolver).to receive(:getnames).with(unresolved_ip).and_return(resolved_names)
25
+ if RUBY_VERSION >= '2.1'
26
+ expect(local_link_resolver).not_to receive(:getnames)
27
+ end
28
+ expect(network_resolver).not_to receive(:getnames)
29
+ end
30
+
31
+ let(:unresolved_ip) { '127.0.0.1' }
32
+ let(:resolved_names) { %w(localhost) }
33
+
34
+ it { expect(resolver.names_for(unresolved_ip)).to eq resolved_names }
35
+ end
36
+
37
+ context 'when local link resolver can resolve name' do
38
+ before :each do
39
+ expect(hosts_resolver).to receive(:getnames).with(unresolved_ip).and_return([])
40
+ if RUBY_VERSION >= '2.1'
41
+ expect(local_link_resolver).to receive(:getnames).with(unresolved_ip).and_return(resolved_names)
42
+ expect(network_resolver).not_to receive(:getnames)
43
+ else
44
+ expect(network_resolver).to receive(:getnames).with(unresolved_ip).and_return(resolved_names)
45
+ end
46
+ end
47
+
48
+ let(:unresolved_ip) { '127.0.0.1' }
49
+ let(:resolved_names) { %w(localhost) }
50
+
51
+ it { expect(resolver.names_for(unresolved_ip)).to eq resolved_names }
52
+ end
53
+
54
+ context 'when network resolver can resolve name' do
55
+ before :each do
56
+ expect(hosts_resolver).to receive(:getnames).with(unresolved_ip).and_return([])
57
+ if RUBY_VERSION >= '2.1'
58
+ expect(local_link_resolver).to receive(:getnames).with(unresolved_ip).and_return([])
59
+ end
60
+ expect(network_resolver).to receive(:getnames).with(unresolved_ip).and_return(resolved_names)
61
+ end
62
+
63
+ let(:unresolved_ip) { '127.0.0.1' }
64
+ let(:resolved_names) { %w(localhost) }
65
+
66
+ it { expect(resolver.names_for(unresolved_ip)).to eq resolved_names }
67
+ end
68
+ end
69
+
70
+ describe '#ips_for' do
71
+ context 'when hosts resolver can resolve name' do
72
+ before :each do
73
+ expect(hosts_resolver).to receive(:getaddresses).with(unresolved_ips).and_return(resolved_name)
74
+ if RUBY_VERSION >= '2.1'
75
+ expect(local_link_resolver).not_to receive(:getaddresses)
76
+ end
77
+ expect(network_resolver).not_to receive(:getaddresses)
78
+ end
79
+
80
+ let(:unresolved_ips) { '127.0.0.1' }
81
+ let(:resolved_name) { %w(localhost) }
82
+
83
+ it { expect(resolver.ips_for(unresolved_ips)).to eq resolved_name }
84
+ end
85
+
86
+ context 'when local link resolver can resolve name' do
87
+ before :each do
88
+ expect(hosts_resolver).to receive(:getaddresses).with(unresolved_ips).and_return([])
89
+ if RUBY_VERSION >= '2.1'
90
+ expect(local_link_resolver).to receive(:getaddresses).with(unresolved_ips).and_return(resolved_name)
91
+ expect(network_resolver).not_to receive(:getaddresses)
92
+ else
93
+ expect(network_resolver).to receive(:getaddresses).with(unresolved_ips).and_return(resolved_name)
94
+ end
95
+ end
96
+
97
+ let(:unresolved_ips) { '127.0.0.1' }
98
+ let(:resolved_name) { %w(localhost) }
99
+
100
+ it { expect(resolver.ips_for(unresolved_ips)).to eq resolved_name }
101
+ end
102
+
103
+ context 'when network resolver can resolve name' do
104
+ before :each do
105
+ expect(hosts_resolver).to receive(:getaddresses).with(unresolved_ips).and_return([])
106
+ if RUBY_VERSION >= '2.1'
107
+ expect(local_link_resolver).to receive(:getaddresses).with(unresolved_ips).and_return([])
108
+ end
109
+ expect(network_resolver).to receive(:getaddresses).with(unresolved_ips).and_return(resolved_name)
110
+ end
111
+
112
+ let(:unresolved_ips) { '127.0.0.1' }
113
+ let(:resolved_name) { %w(localhost) }
114
+
115
+ it { expect(resolver.ips_for(unresolved_ips)).to eq resolved_name }
116
+ end
117
+ end
118
+ end
@@ -0,0 +1,39 @@
1
+ require 'spec_helper'
2
+ require 'middleman-core/preview_server/server_hostname'
3
+
4
+ RSpec.describe Middleman::PreviewServer::ServerHostname do
5
+ subject(:hostname) { described_class.new(string) }
6
+ let(:string) { 'www.example.com' }
7
+
8
+ describe '#to_s' do
9
+ context 'when hostname' do
10
+ it { expect(hostname.to_s).to eq string }
11
+ end
12
+
13
+ context 'when ipv4' do
14
+ let(:string) { '127.0.0.1' }
15
+ it { expect(hostname.to_s).to eq string }
16
+ end
17
+
18
+ context 'when ipv6' do
19
+ let(:string) { '2607:f700:8000:12e:b3d9:1cba:b52:aa1b' }
20
+ it { expect(hostname.to_s).to eq string }
21
+ end
22
+ end
23
+
24
+ describe '#to_browser' do
25
+ context 'when hostname' do
26
+ it { expect(hostname.to_browser).to eq string }
27
+ end
28
+
29
+ context 'when ipv4' do
30
+ let(:string) { '127.0.0.1' }
31
+ it { expect(hostname.to_browser).to eq string }
32
+ end
33
+
34
+ context 'when ipv6' do
35
+ let(:string) { '::1' }
36
+ it { expect(hostname.to_browser).to eq string }
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,43 @@
1
+ require 'spec_helper'
2
+ require 'middleman-core/preview_server/server_ip_address'
3
+
4
+ RSpec.describe Middleman::PreviewServer::ServerIpAddress do
5
+ subject(:ip_address) { described_class.new(string) }
6
+ let(:string) { '127.0.0.1' }
7
+
8
+ describe '#to_s' do
9
+ context 'when ipv4' do
10
+ let(:string) { '127.0.0.1' }
11
+ it { expect(ip_address.to_s).to eq string }
12
+ end
13
+
14
+ context 'when ipv6' do
15
+ context 'without suffix' do
16
+ let(:string) { '2607:f700:8000:12e:b3d9:1cba:b52:aa1b' }
17
+ it { expect(ip_address.to_s).to eq string }
18
+ end
19
+
20
+ context 'with suffix' do
21
+ let(:string) { '2607:f700:8000:12e:b3d9:1cba:b52:aa1b%wlp1s0' }
22
+ let(:result) { '2607:f700:8000:12e:b3d9:1cba:b52:aa1b' }
23
+ it { expect(ip_address.to_s).to eq result }
24
+ end
25
+ end
26
+ end
27
+
28
+ describe '#to_browser' do
29
+ context 'when ip_address' do
30
+ it { expect(ip_address.to_browser).to eq string }
31
+ end
32
+
33
+ context 'when ipv4' do
34
+ let(:string) { '127.0.0.1' }
35
+ it { expect(ip_address.to_browser).to eq string }
36
+ end
37
+
38
+ context 'when ipv6' do
39
+ let(:string) { '2607:f700:8000:12e:b3d9:1cba:b52:aa1b' }
40
+ it { expect(ip_address.to_browser).to eq "[#{string}]" }
41
+ end
42
+ end
43
+ end
data/spec/spec_helper.rb CHANGED
@@ -3,3 +3,29 @@ SimpleCov.root(File.expand_path(File.dirname(__FILE__) + '/..'))
3
3
 
4
4
  require 'coveralls'
5
5
  Coveralls.wear!
6
+
7
+ require 'aruba/api'
8
+ RSpec.configure do |config|
9
+ config.include Aruba::Api
10
+ end
11
+
12
+ # encoding: utf-8
13
+ RSpec.configure do |config|
14
+ config.filter_run :focus
15
+ config.run_all_when_everything_filtered = true
16
+
17
+ config.default_formatter = 'doc' if config.files_to_run.one?
18
+
19
+ # config.profile_examples = 10
20
+ config.order = :random
21
+ Kernel.srand config.seed
22
+
23
+ config.expect_with :rspec do |expectations|
24
+ expectations.syntax = :expect
25
+ end
26
+
27
+ config.mock_with :rspec do |mocks|
28
+ mocks.syntax = :expect
29
+ mocks.verify_partial_doubles = true
30
+ end
31
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.12
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-05-04 00:00:00.000000000 Z
13
+ date: 2015-08-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -95,19 +95,19 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.3'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rack-test
98
+ name: capybara
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.6.2
103
+ version: 2.4.4
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.6.2
110
+ version: 2.4.4
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: thor
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -134,14 +134,14 @@ dependencies:
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: 4.1.0
137
+ version: '4.1'
138
138
  type: :runtime
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: 4.1.0
144
+ version: '4.1'
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: padrino-helpers
147
147
  requirement: !ruby/object:Gem::Requirement
@@ -160,22 +160,16 @@ dependencies:
160
160
  name: listen
161
161
  requirement: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - ">="
164
- - !ruby/object:Gem::Version
165
- version: 2.7.9
166
- - - "<"
163
+ - - "~>"
167
164
  - !ruby/object:Gem::Version
168
- version: '3.0'
165
+ version: 3.0.3
169
166
  type: :runtime
170
167
  prerelease: false
171
168
  version_requirements: !ruby/object:Gem::Requirement
172
169
  requirements:
173
- - - ">="
174
- - !ruby/object:Gem::Version
175
- version: 2.7.9
176
- - - "<"
170
+ - - "~>"
177
171
  - !ruby/object:Gem::Version
178
- version: '3.0'
172
+ version: 3.0.3
179
173
  - !ruby/object:Gem::Dependency
180
174
  name: i18n
181
175
  requirement: !ruby/object:Gem::Requirement
@@ -203,10 +197,12 @@ extensions: []
203
197
  extra_rdoc_files: []
204
198
  files:
205
199
  - ".gemtest"
200
+ - ".rspec"
206
201
  - ".simplecov"
207
202
  - ".yardopts"
208
203
  - Rakefile
209
204
  - bin/middleman
205
+ - cucumber.yml
210
206
  - features/3rd_party_cli.feature
211
207
  - features/asciidoc.feature
212
208
  - features/asset_hash.feature
@@ -220,6 +216,7 @@ files:
220
216
  - features/capture_html.feature
221
217
  - features/chained_templates.feature
222
218
  - features/clean_build.feature
219
+ - features/cli/preview_server.feature
223
220
  - features/cli_extension.feature
224
221
  - features/cli_init.feature
225
222
  - features/coffee-script.feature
@@ -254,6 +251,7 @@ files:
254
251
  - features/helpers_url_for.feature
255
252
  - features/i18n_builder.feature
256
253
  - features/i18n_force_locale.feature
254
+ - features/i18n_link_to.feature
257
255
  - features/i18n_partials.feature
258
256
  - features/i18n_preview.feature
259
257
  - features/ignore.feature
@@ -261,6 +259,7 @@ files:
261
259
  - features/image_srcset_paths.feature
262
260
  - features/implied_extensions.feature
263
261
  - features/instance_vars.feature
262
+ - features/javascript-testing.feature
264
263
  - features/layouts_dir.feature
265
264
  - features/liquid.feature
266
265
  - features/markdown.feature
@@ -327,6 +326,8 @@ files:
327
326
  - fixtures/asset-hash-app/source/api.json.erb
328
327
  - fixtures/asset-hash-app/source/apple-touch-icon.png
329
328
  - fixtures/asset-hash-app/source/favicon.ico
329
+ - fixtures/asset-hash-app/source/fonts/fontawesome-webfont.woff
330
+ - fixtures/asset-hash-app/source/fonts/fontawesome-webfont.woff2
330
331
  - fixtures/asset-hash-app/source/images/100px.gif
331
332
  - fixtures/asset-hash-app/source/images/100px.jpg
332
333
  - fixtures/asset-hash-app/source/images/100px.png
@@ -340,6 +341,7 @@ files:
340
341
  - fixtures/asset-hash-app/source/slim.html.slim
341
342
  - fixtures/asset-hash-app/source/stylesheets/_partial.sass
342
343
  - fixtures/asset-hash-app/source/stylesheets/site.css.scss
344
+ - fixtures/asset-hash-app/source/stylesheets/uses_fonts.css
343
345
  - fixtures/asset-hash-app/source/stylesheets/uses_partials.css.sass
344
346
  - fixtures/asset-hash-app/source/subdir/api.json.erb
345
347
  - fixtures/asset-hash-app/source/subdir/index.html.erb
@@ -412,6 +414,7 @@ files:
412
414
  - fixtures/chained-app/config.rb
413
415
  - fixtures/chained-app/data/article.yml
414
416
  - fixtures/chained-app/source/index.html.str.erb
417
+ - fixtures/chained-app/source/test.erb.combobreaker.str.erb
415
418
  - fixtures/clean-app/config-complications.rb
416
419
  - fixtures/clean-app/config-empty.rb
417
420
  - fixtures/clean-app/config.rb
@@ -646,6 +649,8 @@ files:
646
649
  - fixtures/instance-vars-app/config.rb
647
650
  - fixtures/instance-vars-app/source/content.html.erb
648
651
  - fixtures/instance-vars-app/source/layout.erb
652
+ - fixtures/javascript-app/config.rb
653
+ - fixtures/javascript-app/source/index.html
649
654
  - fixtures/large-build-app/config.rb
650
655
  - fixtures/large-build-app/source/.htaccess
651
656
  - fixtures/large-build-app/source/.htpasswd
@@ -878,6 +883,19 @@ files:
878
883
  - fixtures/preview-app/config.rb
879
884
  - fixtures/preview-app/source/content.html.erb
880
885
  - fixtures/preview-app/source/layout.erb
886
+ - fixtures/preview-server-app/bin/dns_server.rb
887
+ - fixtures/preview-server-app/config-complications.rb
888
+ - fixtures/preview-server-app/config-empty.rb
889
+ - fixtures/preview-server-app/config.rb
890
+ - fixtures/preview-server-app/source/index.html.erb
891
+ - fixtures/preview-server-app/source/layout.erb
892
+ - fixtures/preview-server-app/source/layouts/custom.erb
893
+ - fixtures/preview-server-app/source/real.html
894
+ - fixtures/preview-server-app/source/real/index.html.erb
895
+ - fixtures/preview-server-app/source/should_be_ignored.html
896
+ - fixtures/preview-server-app/source/should_be_ignored2.html
897
+ - fixtures/preview-server-app/source/should_be_ignored3.html
898
+ - fixtures/preview-server-app/source/static.html
881
899
  - fixtures/proxy-pages-app/config.rb
882
900
  - fixtures/proxy-pages-app/source/real.html
883
901
  - fixtures/proxy-pages-app/source/real/index-ivars.html.erb
@@ -896,9 +914,12 @@ files:
896
914
  - fixtures/relative-app/source/images/blank.gif
897
915
  - fixtures/relative-app/source/stylesheets/relative_assets.css.sass
898
916
  - fixtures/relative-assets-app/config.rb
917
+ - fixtures/relative-assets-app/source/absolute_image_relative_css.html.erb
899
918
  - fixtures/relative-assets-app/source/images/blank.gif
900
919
  - fixtures/relative-assets-app/source/img/blank.gif
920
+ - fixtures/relative-assets-app/source/javascripts/app.js
901
921
  - fixtures/relative-assets-app/source/relative_image.html.erb
922
+ - fixtures/relative-assets-app/source/relative_image_absolute_css.html.erb
902
923
  - fixtures/relative-assets-app/source/stylesheets/relative_assets.css.sass
903
924
  - fixtures/request-app/config.rb
904
925
  - fixtures/request-app/source/index.html.erb
@@ -1062,6 +1083,11 @@ files:
1062
1083
  - lib/middleman-core/core_extensions/request.rb
1063
1084
  - lib/middleman-core/core_extensions/routing.rb
1064
1085
  - lib/middleman-core/core_extensions/show_exceptions.rb
1086
+ - lib/middleman-core/dns_resolver.rb
1087
+ - lib/middleman-core/dns_resolver/basic_network_resolver.rb
1088
+ - lib/middleman-core/dns_resolver/hosts_resolver.rb
1089
+ - lib/middleman-core/dns_resolver/local_link_resolver.rb
1090
+ - lib/middleman-core/dns_resolver/network_resolver.rb
1065
1091
  - lib/middleman-core/extension.rb
1066
1092
  - lib/middleman-core/extensions.rb
1067
1093
  - lib/middleman-core/load_paths.rb
@@ -1081,6 +1107,15 @@ files:
1081
1107
  - lib/middleman-core/meta_pages/templates/index.html.erb
1082
1108
  - lib/middleman-core/meta_pages/templates/sitemap.html.erb
1083
1109
  - lib/middleman-core/preview_server.rb
1110
+ - lib/middleman-core/preview_server/checks.rb
1111
+ - lib/middleman-core/preview_server/information.rb
1112
+ - lib/middleman-core/preview_server/network_interface_inventory.rb
1113
+ - lib/middleman-core/preview_server/server_hostname.rb
1114
+ - lib/middleman-core/preview_server/server_information.rb
1115
+ - lib/middleman-core/preview_server/server_information_validator.rb
1116
+ - lib/middleman-core/preview_server/server_ip_address.rb
1117
+ - lib/middleman-core/preview_server/server_url.rb
1118
+ - lib/middleman-core/preview_server/tcp_port_prober.rb
1084
1119
  - lib/middleman-core/profiling.rb
1085
1120
  - lib/middleman-core/renderers/asciidoc.rb
1086
1121
  - lib/middleman-core/renderers/coffee_script.rb
@@ -1107,6 +1142,7 @@ files:
1107
1142
  - lib/middleman-core/sitemap/store.rb
1108
1143
  - lib/middleman-core/step_definitions.rb
1109
1144
  - lib/middleman-core/step_definitions/builder_steps.rb
1145
+ - lib/middleman-core/step_definitions/commandline_steps.rb
1110
1146
  - lib/middleman-core/step_definitions/middleman_steps.rb
1111
1147
  - lib/middleman-core/step_definitions/server_steps.rb
1112
1148
  - lib/middleman-core/templates.rb
@@ -1264,6 +1300,9 @@ files:
1264
1300
  - spec/middleman-core/binary_spec/stars.svgz
1265
1301
  - spec/middleman-core/binary_spec/unicode
1266
1302
  - spec/middleman-core/binary_spec/unicode.txt
1303
+ - spec/middleman-core/dns_resolver_spec.rb
1304
+ - spec/middleman-core/preview_server/server_hostname_spec.rb
1305
+ - spec/middleman-core/preview_server/server_ip_address_spec.rb
1267
1306
  - spec/spec_helper.rb
1268
1307
  homepage: http://middlemanapp.com
1269
1308
  licenses:
@@ -1303,6 +1342,7 @@ test_files:
1303
1342
  - features/capture_html.feature
1304
1343
  - features/chained_templates.feature
1305
1344
  - features/clean_build.feature
1345
+ - features/cli/preview_server.feature
1306
1346
  - features/cli_extension.feature
1307
1347
  - features/cli_init.feature
1308
1348
  - features/coffee-script.feature
@@ -1337,6 +1377,7 @@ test_files:
1337
1377
  - features/helpers_url_for.feature
1338
1378
  - features/i18n_builder.feature
1339
1379
  - features/i18n_force_locale.feature
1380
+ - features/i18n_link_to.feature
1340
1381
  - features/i18n_partials.feature
1341
1382
  - features/i18n_preview.feature
1342
1383
  - features/ignore.feature
@@ -1344,6 +1385,7 @@ test_files:
1344
1385
  - features/image_srcset_paths.feature
1345
1386
  - features/implied_extensions.feature
1346
1387
  - features/instance_vars.feature
1388
+ - features/javascript-testing.feature
1347
1389
  - features/layouts_dir.feature
1348
1390
  - features/liquid.feature
1349
1391
  - features/markdown.feature
@@ -1410,6 +1452,8 @@ test_files:
1410
1452
  - fixtures/asset-hash-app/source/api.json.erb
1411
1453
  - fixtures/asset-hash-app/source/apple-touch-icon.png
1412
1454
  - fixtures/asset-hash-app/source/favicon.ico
1455
+ - fixtures/asset-hash-app/source/fonts/fontawesome-webfont.woff
1456
+ - fixtures/asset-hash-app/source/fonts/fontawesome-webfont.woff2
1413
1457
  - fixtures/asset-hash-app/source/images/100px.gif
1414
1458
  - fixtures/asset-hash-app/source/images/100px.jpg
1415
1459
  - fixtures/asset-hash-app/source/images/100px.png
@@ -1423,6 +1467,7 @@ test_files:
1423
1467
  - fixtures/asset-hash-app/source/slim.html.slim
1424
1468
  - fixtures/asset-hash-app/source/stylesheets/_partial.sass
1425
1469
  - fixtures/asset-hash-app/source/stylesheets/site.css.scss
1470
+ - fixtures/asset-hash-app/source/stylesheets/uses_fonts.css
1426
1471
  - fixtures/asset-hash-app/source/stylesheets/uses_partials.css.sass
1427
1472
  - fixtures/asset-hash-app/source/subdir/api.json.erb
1428
1473
  - fixtures/asset-hash-app/source/subdir/index.html.erb
@@ -1495,6 +1540,7 @@ test_files:
1495
1540
  - fixtures/chained-app/config.rb
1496
1541
  - fixtures/chained-app/data/article.yml
1497
1542
  - fixtures/chained-app/source/index.html.str.erb
1543
+ - fixtures/chained-app/source/test.erb.combobreaker.str.erb
1498
1544
  - fixtures/clean-app/config-complications.rb
1499
1545
  - fixtures/clean-app/config-empty.rb
1500
1546
  - fixtures/clean-app/config.rb
@@ -1729,6 +1775,8 @@ test_files:
1729
1775
  - fixtures/instance-vars-app/config.rb
1730
1776
  - fixtures/instance-vars-app/source/content.html.erb
1731
1777
  - fixtures/instance-vars-app/source/layout.erb
1778
+ - fixtures/javascript-app/config.rb
1779
+ - fixtures/javascript-app/source/index.html
1732
1780
  - fixtures/large-build-app/config.rb
1733
1781
  - fixtures/large-build-app/source/.htaccess
1734
1782
  - fixtures/large-build-app/source/.htpasswd
@@ -1961,6 +2009,19 @@ test_files:
1961
2009
  - fixtures/preview-app/config.rb
1962
2010
  - fixtures/preview-app/source/content.html.erb
1963
2011
  - fixtures/preview-app/source/layout.erb
2012
+ - fixtures/preview-server-app/bin/dns_server.rb
2013
+ - fixtures/preview-server-app/config-complications.rb
2014
+ - fixtures/preview-server-app/config-empty.rb
2015
+ - fixtures/preview-server-app/config.rb
2016
+ - fixtures/preview-server-app/source/index.html.erb
2017
+ - fixtures/preview-server-app/source/layout.erb
2018
+ - fixtures/preview-server-app/source/layouts/custom.erb
2019
+ - fixtures/preview-server-app/source/real.html
2020
+ - fixtures/preview-server-app/source/real/index.html.erb
2021
+ - fixtures/preview-server-app/source/should_be_ignored.html
2022
+ - fixtures/preview-server-app/source/should_be_ignored2.html
2023
+ - fixtures/preview-server-app/source/should_be_ignored3.html
2024
+ - fixtures/preview-server-app/source/static.html
1964
2025
  - fixtures/proxy-pages-app/config.rb
1965
2026
  - fixtures/proxy-pages-app/source/real.html
1966
2027
  - fixtures/proxy-pages-app/source/real/index-ivars.html.erb
@@ -1979,9 +2040,12 @@ test_files:
1979
2040
  - fixtures/relative-app/source/images/blank.gif
1980
2041
  - fixtures/relative-app/source/stylesheets/relative_assets.css.sass
1981
2042
  - fixtures/relative-assets-app/config.rb
2043
+ - fixtures/relative-assets-app/source/absolute_image_relative_css.html.erb
1982
2044
  - fixtures/relative-assets-app/source/images/blank.gif
1983
2045
  - fixtures/relative-assets-app/source/img/blank.gif
2046
+ - fixtures/relative-assets-app/source/javascripts/app.js
1984
2047
  - fixtures/relative-assets-app/source/relative_image.html.erb
2048
+ - fixtures/relative-assets-app/source/relative_image_absolute_css.html.erb
1985
2049
  - fixtures/relative-assets-app/source/stylesheets/relative_assets.css.sass
1986
2050
  - fixtures/request-app/config.rb
1987
2051
  - fixtures/request-app/source/index.html.erb