middleman-livereload 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +14 -0
- data/CONTRIBUTING.md +43 -0
- data/Gemfile +9 -14
- data/Gemfile-3.0 +15 -0
- data/LICENSE.md +20 -0
- data/README.md +51 -26
- data/lib/middleman-livereload/extension_3_0.rb +3 -2
- data/lib/middleman-livereload/extension_3_1.rb +3 -1
- data/lib/middleman-livereload/version.rb +1 -1
- data/middleman-livereload.gemspec +12 -15
- metadata +22 -33
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 89eb8672ae3cc09dd8707914e4d855fb41aaef79
|
4
|
+
data.tar.gz: f4908de103b2b813abed91e8c31ee8cb37381cde
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fb869df5d3020e4e8a7bd6a1632b3f8dd2c0c0804687d30fa09e3b506b0a481008b507b035fc2d79fbe57b560db7334c18661c9cc559ab3f0ca799699fa9dbc0
|
7
|
+
data.tar.gz: ceff57c98085f13a0dba54d9bada015a580dd0120b7e6083450e07223d6ea8f8f3111d6dd7e2dc78bc09f92cf6ac2d12f16c10e346e7acec8a904aaeca092127
|
data/.travis.yml
ADDED
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Contributing
|
2
|
+
In the spirit of [free software][free-sw], **everyone** is encouraged to help
|
3
|
+
improve this project.
|
4
|
+
|
5
|
+
[free-sw]: http://www.fsf.org/licensing/essays/free-sw.html
|
6
|
+
|
7
|
+
Here are some ways *you* can contribute:
|
8
|
+
|
9
|
+
* by using alpha, beta, and prerelease versions
|
10
|
+
* by reporting bugs
|
11
|
+
* by suggesting new features
|
12
|
+
* by writing or editing documentation
|
13
|
+
* by writing specifications
|
14
|
+
* by writing code ( **no patch is too small** : fix typos, add comments, clean up inconsistent whitespace )
|
15
|
+
* by refactoring code
|
16
|
+
* by closing [issues][]
|
17
|
+
* by reviewing patches
|
18
|
+
|
19
|
+
[issues]: https://github.com/middleman/middleman-livereload/issues
|
20
|
+
|
21
|
+
## Submitting an Issue
|
22
|
+
We use the [GitHub issue tracker][issues] to track bugs and features. Before
|
23
|
+
submitting a bug report or feature request, check to make sure it hasn't
|
24
|
+
already been submitted. When submitting a bug report, please include a [Gist][]
|
25
|
+
that includes a stack trace and any details that may be necessary to reproduce
|
26
|
+
the bug, including your gem version, Ruby version, and operating system.
|
27
|
+
Ideally, a bug report should include a pull request with failing specs.
|
28
|
+
|
29
|
+
[gist]: https://gist.github.com/
|
30
|
+
|
31
|
+
## Submitting a Pull Request
|
32
|
+
1. [Fork the repository.][fork]
|
33
|
+
2. [Create a topic branch.][branch]
|
34
|
+
3. Add specs for your unimplemented feature or bug fix.
|
35
|
+
4. Run `bundle exec rake test`. If your specs pass, return to step 3.
|
36
|
+
5. Implement your feature or bug fix.
|
37
|
+
6. Run `bundle exec rake test`. If your specs fail, return to step 5.
|
38
|
+
7. Add, commit, and push your changes.
|
39
|
+
8. [Submit a pull request.][pr]
|
40
|
+
|
41
|
+
[fork]: http://help.github.com/fork-a-repo/
|
42
|
+
[branch]: http://learn.github.com/p/branching.html
|
43
|
+
[pr]: http://help.github.com/send-pull-requests/
|
data/Gemfile
CHANGED
@@ -1,23 +1,18 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
|
-
git "git://github.com/middleman/middleman.git", :branch => "
|
3
|
+
git "git://github.com/middleman/middleman.git", :branch => "v3-stable" do
|
4
4
|
# gem "middleman"
|
5
5
|
gem "middleman-core"
|
6
|
-
# gem "middleman-more"
|
7
6
|
end
|
8
7
|
|
9
8
|
# Specify your gem's dependencies in middleman-blog.gemspec
|
10
9
|
gemspec
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
gem "yard", "~> 0.8.0"
|
16
|
-
end
|
11
|
+
gem "rake", "~> 10.0.3"
|
12
|
+
gem "rdoc", "~> 3.9"
|
13
|
+
gem "yard", "~> 0.8.0"
|
17
14
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
gem "rspec", "~> 2.7"
|
23
|
-
end
|
15
|
+
gem "cucumber", "~> 1.2.0"
|
16
|
+
gem "fivemat"
|
17
|
+
gem "aruba", "~> 0.5"
|
18
|
+
gem "rspec", "~> 2.7"
|
data/Gemfile-3.0
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
gem "middleman", "~> 3.0.0"
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in middleman-blog.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem "rake", "~> 10.0.3"
|
9
|
+
gem "rdoc", "~> 3.9"
|
10
|
+
gem "yard", "~> 0.8.0"
|
11
|
+
|
12
|
+
gem "cucumber", "~> 1.2.0"
|
13
|
+
gem "fivemat"
|
14
|
+
gem "aruba", "~> 0.5"
|
15
|
+
gem "rspec", "~> 2.7"
|
data/LICENSE.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2010-2013 Thomas Reynolds
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,64 +1,89 @@
|
|
1
|
-
#
|
1
|
+
# Middleman-Livereload
|
2
2
|
|
3
|
-
middleman-livereload is an extension for the [Middleman]
|
3
|
+
middleman-livereload is an extension for the [Middleman] static site generator that adds livereloading functionality.
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
If you're just getting started, install the `middleman` gem and generate a new project:
|
7
8
|
|
8
9
|
```
|
9
10
|
gem install middleman
|
10
|
-
gem install middleman-livereload
|
11
11
|
middleman init MY_PROJECT
|
12
12
|
```
|
13
13
|
|
14
|
-
If you already have a Middleman project:
|
15
|
-
|
16
|
-
|
17
|
-
gem "
|
18
|
-
|
14
|
+
If you already have a Middleman project: Add `gem "middleman-livereload", "~> 3.1.0"` to your `Gemfile` and run `bundle install`
|
15
|
+
|
16
|
+
####Windows users:
|
17
|
+
You currently need to add `gem "em-websocket", github: "igrigorik/em-websocket"` to your `Gemfile` and run `bundle install`
|
18
|
+
Also be sure to specify the correct hostname `activate :livereload, :host => 'localhost'`
|
19
|
+
|
20
|
+
## Configuration
|
19
21
|
|
20
|
-
Then open your `config.rb` and add:
|
21
22
|
```
|
22
23
|
activate :livereload
|
23
24
|
```
|
24
25
|
|
25
|
-
|
26
|
+
The extension supports a number of options that can be given to the `activate` statement. Eg:
|
26
27
|
|
27
|
-
The extension supports a number of options that can be given to the `activate` statement. E.g.:
|
28
28
|
```
|
29
29
|
activate :livereload, :apply_js_live => false, :grace_period => 0.5
|
30
30
|
```
|
31
31
|
|
32
|
-
|
32
|
+
#### `:api_version`
|
33
33
|
|
34
34
|
Livereload API version, default `'1.6'`.
|
35
35
|
|
36
|
-
|
36
|
+
#### `:host` and `:port`
|
37
37
|
|
38
38
|
Livereload's listener host/port, these options get passed to ::Rack::LiveReload middleware. Defaults:`'0.0.0.0'` and `'35729'`.
|
39
39
|
|
40
|
-
|
40
|
+
#### `:apply_js_live` and `:apply_css_live`
|
41
41
|
|
42
42
|
Whether live reload should attempt to reload javascript / css 'in-place', without complete reload of the page. Both default to `true`.
|
43
43
|
|
44
|
-
|
44
|
+
#### `:grace_period`
|
45
45
|
|
46
46
|
A delay middleman-livereload should wait before reacting on file change / deletion notification (sec). Default is 0.
|
47
47
|
|
48
|
-
|
48
|
+
#### `:no_swf`
|
49
|
+
|
50
|
+
Disable Flash polyfil for browsers that support native WebSockets.
|
51
|
+
|
52
|
+
## Build & Dependency Status
|
53
|
+
|
54
|
+
[![Gem Version](https://badge.fury.io/rb/middleman-livereload.png)][gem]
|
55
|
+
[![Build Status](https://travis-ci.org/middleman/middleman-livereload.png)][travis]
|
56
|
+
[![Dependency Status](https://gemnasium.com/middleman/middleman-livereload.png?travis)][gemnasium]
|
57
|
+
[![Code Quality](https://codeclimate.com/github/middleman/middleman-livereload.png)][codeclimate]
|
58
|
+
|
59
|
+
## Community
|
60
|
+
|
61
|
+
The official community forum is available at: http://forum.middlemanapp.com
|
62
|
+
|
63
|
+
## Bug Reports
|
64
|
+
|
65
|
+
Github Issues are used for managing bug reports and feature requests. If you run into issues, please search the issues and submit new problems: https://github.com/middleman/middleman-livereload/issues
|
49
66
|
|
50
|
-
The
|
67
|
+
The best way to get quick responses to your issues and swift fixes to your bugs is to submit detailed bug reports, include test cases and respond to developer questions in a timely manner. Even better, if you know Ruby, you can submit [Pull Requests](https://help.github.com/articles/using-pull-requests) containing Cucumber Features which describe how your feature should work or exploit the bug you are submitting.
|
51
68
|
|
52
|
-
|
69
|
+
## How to Run Cucumber Tests
|
53
70
|
|
54
|
-
|
71
|
+
1. Checkout Repository: `git clone https://github.com/middleman/middleman-livereload.git`
|
72
|
+
2. Install Bundler: `gem install bundler`
|
73
|
+
3. Run `bundle install` inside the project root to install the gem dependencies.
|
74
|
+
4. Run test cases: `bundle exec rake test`
|
55
75
|
|
56
|
-
|
76
|
+
## Donate
|
57
77
|
|
58
|
-
https://
|
78
|
+
[Click here to lend your support to Middleman](https://spacebox.io/s/4dXbHBorC3)
|
59
79
|
|
60
|
-
|
80
|
+
## License
|
61
81
|
|
62
|
-
|
82
|
+
Copyright (c) 2010-2013 Thomas Reynolds. MIT Licensed, see [LICENSE] for details.
|
63
83
|
|
64
|
-
[
|
84
|
+
[middleman]: http://middlemanapp.com
|
85
|
+
[gem]: https://rubygems.org/gems/middleman-livereload
|
86
|
+
[travis]: http://travis-ci.org/middleman/middleman-livereload
|
87
|
+
[gemnasium]: https://gemnasium.com/middleman/middleman-livereload
|
88
|
+
[codeclimate]: https://codeclimate.com/github/middleman/middleman-livereload
|
89
|
+
[LICENSE]: https://github.com/middleman/middleman-livereload/blob/master/LICENSE.md
|
@@ -13,7 +13,8 @@ module Middleman
|
|
13
13
|
:port => '35729',
|
14
14
|
:apply_js_live => true,
|
15
15
|
:apply_css_live => true,
|
16
|
-
:grace_period => 0
|
16
|
+
:grace_period => 0,
|
17
|
+
:no_swf => false
|
17
18
|
}.merge(options)
|
18
19
|
|
19
20
|
app.ready do
|
@@ -49,7 +50,7 @@ module Middleman
|
|
49
50
|
@@reactor.reload_browser("#{Dir.pwd}/#{file}")
|
50
51
|
end
|
51
52
|
|
52
|
-
use ::Rack::LiveReload, :port => options[:port].to_i, :host => options[:host]
|
53
|
+
use ::Rack::LiveReload, :port => options[:port].to_i, :host => options[:host], :no_swf => options[:no_swf]
|
53
54
|
end
|
54
55
|
end
|
55
56
|
end
|
@@ -8,6 +8,7 @@ module Middleman
|
|
8
8
|
option :apply_js_live, true, 'Apply JS changes live, without reloading'
|
9
9
|
option :apply_css_live, true, 'Apply CSS changes live, without reloading'
|
10
10
|
option :grace_period, 0, 'Time (in seconds) to wait before reloading'
|
11
|
+
option :no_swf, false, 'Disable Flash WebSocket polyfill for browsers that support native WebSockets'
|
11
12
|
|
12
13
|
def initialize(app, options_hash={}, &block)
|
13
14
|
super
|
@@ -20,6 +21,7 @@ module Middleman
|
|
20
21
|
grace_period = options.grace_period
|
21
22
|
port = options.port.to_i
|
22
23
|
host = options.host
|
24
|
+
no_swf = options.no_swf
|
23
25
|
options_hash = options.to_h
|
24
26
|
|
25
27
|
app.ready do
|
@@ -56,7 +58,7 @@ module Middleman
|
|
56
58
|
@reactor.reload_browser("#{Dir.pwd}/#{file}")
|
57
59
|
end
|
58
60
|
|
59
|
-
use ::Rack::LiveReload, :port => port, :host => host
|
61
|
+
use ::Rack::LiveReload, :port => port, :host => host, :no_swf => no_swf
|
60
62
|
end
|
61
63
|
end
|
62
64
|
end
|
@@ -3,23 +3,20 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
require "middleman-livereload/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
|
-
s.name
|
7
|
-
s.version
|
8
|
-
s.platform
|
9
|
-
s.authors
|
10
|
-
s.email
|
11
|
-
s.homepage
|
12
|
-
s.summary
|
13
|
-
s.description = %q{
|
14
|
-
|
15
|
-
s.
|
16
|
-
|
17
|
-
s.files = `git ls-files -z`.split("\0")
|
18
|
-
s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
|
6
|
+
s.name = "middleman-livereload"
|
7
|
+
s.version = Middleman::LiveReload::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Thomas Reynolds"]
|
10
|
+
s.email = ["me@tdreyno.com"]
|
11
|
+
s.homepage = "https://github.com/middleman/middleman-livereload"
|
12
|
+
s.summary = %q{LiveReload support for Middleman}
|
13
|
+
s.description = %q{LiveReload support for Middleman}
|
14
|
+
s.license = "MIT"
|
15
|
+
s.files = `git ls-files -z`.split("\0")
|
16
|
+
s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
|
19
17
|
s.require_paths = ["lib"]
|
20
|
-
|
21
18
|
s.add_dependency("middleman-core", [">= 3.0.2"])
|
22
19
|
s.add_runtime_dependency('rack-livereload')
|
23
20
|
s.add_runtime_dependency('em-websocket', ['>= 0.2.0'])
|
24
21
|
s.add_runtime_dependency('multi_json', ['~> 1.0'])
|
25
|
-
end
|
22
|
+
end
|
metadata
CHANGED
@@ -1,68 +1,60 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-livereload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
5
|
-
prerelease:
|
4
|
+
version: 3.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Thomas Reynolds
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-01-26 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: middleman-core
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 3.0.2
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 3.0.2
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rack-livereload
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: em-websocket
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: 0.2.0
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: 0.2.0
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: multi_json
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,12 +62,11 @@ dependencies:
|
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '1.0'
|
78
|
-
description:
|
69
|
+
description: LiveReload support for Middleman
|
79
70
|
email:
|
80
71
|
- me@tdreyno.com
|
81
72
|
executables: []
|
@@ -83,7 +74,11 @@ extensions: []
|
|
83
74
|
extra_rdoc_files: []
|
84
75
|
files:
|
85
76
|
- .gitignore
|
77
|
+
- .travis.yml
|
78
|
+
- CONTRIBUTING.md
|
86
79
|
- Gemfile
|
80
|
+
- Gemfile-3.0
|
81
|
+
- LICENSE.md
|
87
82
|
- README.md
|
88
83
|
- Rakefile
|
89
84
|
- features/.gitkeep
|
@@ -96,35 +91,29 @@ files:
|
|
96
91
|
- lib/middleman_extension.rb
|
97
92
|
- middleman-livereload.gemspec
|
98
93
|
homepage: https://github.com/middleman/middleman-livereload
|
99
|
-
licenses:
|
94
|
+
licenses:
|
95
|
+
- MIT
|
96
|
+
metadata: {}
|
100
97
|
post_install_message:
|
101
98
|
rdoc_options: []
|
102
99
|
require_paths:
|
103
100
|
- lib
|
104
101
|
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
102
|
requirements:
|
107
|
-
- -
|
103
|
+
- - '>='
|
108
104
|
- !ruby/object:Gem::Version
|
109
105
|
version: '0'
|
110
|
-
segments:
|
111
|
-
- 0
|
112
|
-
hash: -1556732277774144508
|
113
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
107
|
requirements:
|
116
|
-
- -
|
108
|
+
- - '>='
|
117
109
|
- !ruby/object:Gem::Version
|
118
110
|
version: '0'
|
119
|
-
segments:
|
120
|
-
- 0
|
121
|
-
hash: -1556732277774144508
|
122
111
|
requirements: []
|
123
|
-
rubyforge_project:
|
124
|
-
rubygems_version: 1.
|
112
|
+
rubyforge_project:
|
113
|
+
rubygems_version: 2.1.11
|
125
114
|
signing_key:
|
126
|
-
specification_version:
|
127
|
-
summary:
|
115
|
+
specification_version: 4
|
116
|
+
summary: LiveReload support for Middleman
|
128
117
|
test_files:
|
129
118
|
- features/.gitkeep
|
130
119
|
- fixtures/.gitkeep
|