middleman 2.0.5 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ 2.0.6
2
+ =====
3
+ - Pulled out livereload feature into its own extension, still installed by default.
4
+
1
5
  2.0.5
2
6
  =====
3
7
  - Vendored Padrino 0.10.0
@@ -1,6 +1,5 @@
1
1
  require "guard"
2
2
  require "guard/guard"
3
- require "guard/livereload"
4
3
  require "rbconfig"
5
4
 
6
5
  if Config::CONFIG['host_os'].downcase =~ %r{mswin|mingw}
@@ -8,34 +7,34 @@ if Config::CONFIG['host_os'].downcase =~ %r{mswin|mingw}
8
7
  require 'win32console'
9
8
  end
10
9
 
11
- module Middleman::Guard
12
- def self.start(options={}, livereload={})
13
- options_hash = ""
14
- options.each do |k,v|
15
- options_hash << ", :#{k} => '#{v}'"
10
+ module Middleman
11
+ module Guard
12
+ def self.add_guard(&block)
13
+ @additional_guards ||= []
14
+ @additional_guards << block
16
15
  end
17
-
18
- guardfile_contents = %Q{
19
- guard 'middleman'#{options_hash} do
20
- watch("config.rb")
21
- watch(%r{^lib/^[^\.](.*)\.rb$})
16
+
17
+ def self.start(options={}, livereload={})
18
+ options_hash = ""
19
+ options.each do |k,v|
20
+ options_hash << ", :#{k} => '#{v}'"
22
21
  end
23
- }
24
22
 
25
- if livereload
26
- livereload_options_hash = ""
27
- livereload.each do |k,v|
28
- livereload_options_hash << ", :#{k} => '#{v}'"
29
- end
30
-
31
- guardfile_contents << %Q{
32
- guard 'livereload'#{livereload_options_hash} do
33
- watch(%r{^source/([^\.].*)$})
23
+ guardfile_contents = %Q{
24
+ guard 'middleman'#{options_hash} do
25
+ watch("config.rb")
26
+ watch(%r{^lib/^[^\.](.*)\.rb$})
34
27
  end
35
28
  }
36
- end
37
29
 
38
- ::Guard.start({ :guardfile_contents => guardfile_contents })
30
+ (@additional_guards || []).each do |block|
31
+ result = block.call(options, livereload)
32
+ guardfile_contents << result unless result.nil?
33
+ end
34
+
35
+ $stderr.puts guardfile_contents
36
+ ::Guard.start({ :guardfile_contents => guardfile_contents })
37
+ end
39
38
  end
40
39
  end
41
40
 
@@ -1,3 +1,3 @@
1
1
  module Middleman
2
- VERSION = "2.0.5"
2
+ VERSION = "2.0.6"
3
3
  end
data/middleman.gemspec CHANGED
@@ -69,7 +69,7 @@ eos
69
69
  end
70
70
 
71
71
  s.add_runtime_dependency("guard", ["~> 0.6.2"])
72
- s.add_runtime_dependency("guard-livereload", ["~> 0.3.0"])
72
+ s.add_runtime_dependency("middleman-livereload", ["~> 0.2.0"])
73
73
  s.add_development_dependency("coffee-filter", ["~> 0.1.1"])
74
74
  s.add_development_dependency("cucumber", ["~> 1.0.2"])
75
75
  s.add_development_dependency("rake", ["0.8.7"])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 5
10
- version: 2.0.5
9
+ - 6
10
+ version: 2.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Thomas Reynolds
@@ -308,19 +308,19 @@ dependencies:
308
308
  type: :runtime
309
309
  version_requirements: *id018
310
310
  - !ruby/object:Gem::Dependency
311
- name: guard-livereload
311
+ name: middleman-livereload
312
312
  prerelease: false
313
313
  requirement: &id019 !ruby/object:Gem::Requirement
314
314
  none: false
315
315
  requirements:
316
316
  - - ~>
317
317
  - !ruby/object:Gem::Version
318
- hash: 19
318
+ hash: 23
319
319
  segments:
320
320
  - 0
321
- - 3
321
+ - 2
322
322
  - 0
323
- version: 0.3.0
323
+ version: 0.2.0
324
324
  type: :runtime
325
325
  version_requirements: *id019
326
326
  - !ruby/object:Gem::Dependency