breakfast 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +41 -13
- data/Gemfile +0 -1
- data/README.md +3 -0
- data/lib/breakfast/version.rb +1 -1
- data/lib/generators/breakfast/install_generator.rb +14 -2
- data/lib/tasks/breakfast.rake +9 -2
- data/node_package/package.json +1 -1
- data/node_package/src/live-reload.js +24 -16
- data/node_package/src/settings.js +8 -0
- data/node_package/src/status-bar.js +12 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8442c74d4c9830ebb2877bb85f5d9a908de18f64030061dacf8f01583218f13f
|
4
|
+
data.tar.gz: 5d95dee904bdf649c9ce5ba6a5db135bea2106f0bcb61ba373e2985985314926
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dd46fee6d3ba0e80a017a60904f263d80a58e336ab677cd4ce6fc9beabc6105bd99350770cf598cf5ab003014524cc969e72c06bd9e1142b78933a4028840df
|
7
|
+
data.tar.gz: cc2944a98c04347b766a0418b7131e07029e5f1aaa68c7f96fb8b17fe8a5dc3eb7123e5f75537fa50862378608550006af9dbef1751be72504b4c5af954f77b7
|
data/CHANGELOG.md
CHANGED
@@ -1,19 +1,30 @@
|
|
1
1
|
# CHANGE LOG
|
2
2
|
|
3
|
+
### 0.6.3 - 2018-08-14
|
4
|
+
|
5
|
+
#### Fixed
|
6
|
+
|
7
|
+
- Potential double yarn install
|
8
|
+
- assets:precompile not defined properly (when no Sprockets)
|
9
|
+
|
3
10
|
### 0.6.2 - 2017-05-11
|
11
|
+
|
4
12
|
#### Fixed
|
13
|
+
|
5
14
|
- Typo in install generator. Add brunch-babel package
|
6
15
|
|
7
16
|
@haffla
|
8
17
|
|
9
|
-
|
10
18
|
### 0.6.1 - 2017-05-04
|
19
|
+
|
11
20
|
#### Fixed
|
12
|
-
- Potential Heroku bug where assets would be cleared out on deploy.
|
13
21
|
|
22
|
+
- Potential Heroku bug where assets would be cleared out on deploy.
|
14
23
|
|
15
24
|
### 0.6.0 - 2017-03-12
|
25
|
+
|
16
26
|
#### Upgrading to `0.6.0` from `0.5.x`
|
27
|
+
|
17
28
|
- Update gem with `bundle update breakfast`
|
18
29
|
- Update the JS package with `yarn upgrade breakfast-rails`
|
19
30
|
- If deploying with Capistrano, remove `require "breakfast/capistrano"` from
|
@@ -22,60 +33,71 @@
|
|
22
33
|
and have `require 'capistrano/rails'` or `require 'capistrano/rails/assets'`
|
23
34
|
in your `Capfile`.
|
24
35
|
- If deploying with Heroku, run the following commands:
|
25
|
-
1.
|
26
|
-
2.
|
27
|
-
3.
|
36
|
+
1. heroku buildpacks:clear
|
37
|
+
2. heroku buildpacks:set heroku/nodejs --index 1
|
38
|
+
3. heroku buildpacks:set heroku/ruby --index 2
|
39
|
+
|
28
40
|
#### Fixed
|
41
|
+
|
29
42
|
- Puma hanging in clustered mode. Breakfast would fail to cleanly exit on Puma
|
30
43
|
exit, causing the server to hang indefinitely.
|
31
44
|
- Bumped Rails version dependency, can be used with Rails 5.0 and greater.
|
32
45
|
(Allows usage with Rails 5.1)
|
46
|
+
|
33
47
|
#### Removed
|
48
|
+
|
34
49
|
- Capistrano rake tasks. Previous behavior has been included into the Rails
|
35
50
|
asset:precompile task. Using the standard [Capistrano Rails](https://github.com/capistrano/rails)
|
36
51
|
gem is all that required now.
|
37
52
|
- Need for a custom Heroku buildpack.
|
38
53
|
|
39
|
-
|
40
54
|
### 0.5.1 - 2017-02-06
|
55
|
+
|
41
56
|
#### Changed
|
57
|
+
|
42
58
|
If `public/assets` does not exist Breakfast will now create the folder before
|
43
59
|
attempting to write to it.
|
44
60
|
|
45
|
-
|
46
61
|
### 0.5.0 - 2017-02-03
|
62
|
+
|
47
63
|
#### Added
|
64
|
+
|
48
65
|
- Adds support for [Yarn](https://yarnpkg.com/).
|
49
66
|
- New installs now require Yarn
|
50
67
|
- Capistrano options `:breakfast_yarn_path` && `:breakfast_yarn_install_command`
|
51
68
|
|
52
69
|
#### Removed
|
70
|
+
|
53
71
|
- NPM client requirement
|
54
72
|
- Capistrano options `:breakfast_npm_path` && `:breakfast_npm_install_command`
|
55
73
|
have been removed.
|
56
74
|
|
57
75
|
### Upgrading
|
76
|
+
|
58
77
|
#### Upgrading to `0.5.0` from `0.4.0`
|
78
|
+
|
59
79
|
- Update gem with `bundle update breakfast`
|
60
80
|
- Bump the `breakfast-rails` version in `package.json` to `0.5.0`
|
61
81
|
- Ensure [Yarn](https://yarnpkg.com/docs/install) is installed
|
62
82
|
- Run `yarn install`
|
63
83
|
|
64
|
-
|
84
|
+
_Note_ If you are deploying with Capistrano then Yarn is expected to be
|
65
85
|
installed on
|
66
86
|
|
67
|
-
|
68
87
|
### 0.4.0 - 2016-11-14
|
88
|
+
|
69
89
|
#### Upgrading to `0.4.0` from `0.3.0`
|
90
|
+
|
70
91
|
- Update gem with `bundle update breakfast`
|
71
92
|
- Bump the `breakfast-rails` version in `package.json` to `0.4.0`
|
72
93
|
- Run `npm install`
|
73
94
|
|
74
|
-
|
95
|
+
_Note_ Now by default asset fingerprinting will be on by default in production.
|
75
96
|
A copy of each with the original filename will be present as well, so any
|
76
97
|
hard-coded links to assets will still work correctly.
|
77
98
|
|
78
99
|
#### Added
|
100
|
+
|
79
101
|
- Asset Digests. Now when deploying assets will have fingerprints added to their
|
80
102
|
file names. This allows browsers to aggressively cache your assets.
|
81
103
|
- New Option: `breakfast.manifest.digest`. Defaults to false in development /
|
@@ -104,24 +126,26 @@ hard-coded links to assets will still work correctly.
|
|
104
126
|
```
|
105
127
|
|
106
128
|
#### Changes
|
107
|
-
- Fixed small CSS issue if box-sizing is not set border-box globally.
|
108
129
|
|
130
|
+
- Fixed small CSS issue if box-sizing is not set border-box globally.
|
109
131
|
|
110
132
|
#### Contributors
|
133
|
+
|
111
134
|
Many many thanks to the contributors for this release!
|
135
|
+
|
112
136
|
- [@patkoperwas](https://github.com/patkoperwas)
|
113
137
|
- [@mikeastock](https://github.com/mikeastock)
|
114
138
|
- [@HParker](https://github.com/HParker)
|
115
139
|
|
116
|
-
|
117
140
|
## 0.3.1 - 2016-10-19
|
141
|
+
|
118
142
|
- Better support for determining if Server is running. Using puma, passneger,
|
119
143
|
etc. instead of the default rails server command now work.
|
120
144
|
|
121
|
-
|
122
145
|
## 0.3.0 - 2016-09-28
|
123
146
|
|
124
147
|
### Upgrading from `0.2.0`
|
148
|
+
|
125
149
|
- Update gem with `bundle update breakfast`
|
126
150
|
- Bump the `breakfast-rails` version in `package.json` to `0.3.1`
|
127
151
|
- Run `npm install`
|
@@ -139,6 +163,7 @@ Many many thanks to the contributors for this release!
|
|
139
163
|
(probably `config/environments/development.rb`).
|
140
164
|
|
141
165
|
### Added
|
166
|
+
|
142
167
|
- New status bar that allows the user to switch reload strategies on the fly
|
143
168
|
- Support for Haml & Slim files (without .html extension)
|
144
169
|
- Reloading on ruby file changes.
|
@@ -147,14 +172,17 @@ Many many thanks to the contributors for this release!
|
|
147
172
|
- NPM binary path for Capistrano
|
148
173
|
|
149
174
|
### Changes
|
175
|
+
|
150
176
|
- config.breakfast.view_folders change to config.breakfast.source_code_folders.
|
151
177
|
Change brought about by need to trigger reloads when Ruby source code changes.
|
152
178
|
|
153
179
|
### Removed
|
180
|
+
|
154
181
|
- config.breakfast.view_folders is no longer supported. Deprecated in favor of
|
155
182
|
source_code_folders option.
|
156
183
|
|
157
184
|
#### Contributors
|
185
|
+
|
158
186
|
Many many thanks to the contributors for this release!
|
159
187
|
|
160
188
|
- [@patkoperwas](https://github.com/patkoperwas)
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -20,6 +20,9 @@ View updates in the [CHANGELOG](https://github.com/devlocker/breakfast/blob/mast
|
|
20
20
|
### Latest Patch `0.6.2`
|
21
21
|
#### Fixed
|
22
22
|
- Typo in install generator. Add brunch-babel package
|
23
|
+
- Add support for [Wiselinks](https://github.com/igor-alexandrov/wiselinks)
|
24
|
+
reloader.
|
25
|
+
[_@haffla_](https://github.com/devlocker/breakfast/pull/23)
|
23
26
|
|
24
27
|
### Latest Release `0.6.0`
|
25
28
|
#### Fixed
|
data/lib/breakfast/version.rb
CHANGED
@@ -60,8 +60,20 @@ module Breakfast
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def install_required_packages
|
63
|
-
|
64
|
-
|
63
|
+
packages = %w(
|
64
|
+
actioncable
|
65
|
+
babel
|
66
|
+
babel-brunch
|
67
|
+
breakfast-rails
|
68
|
+
brunch
|
69
|
+
clean-css-brunch
|
70
|
+
jquery
|
71
|
+
jquery-ujs
|
72
|
+
sass-brunch
|
73
|
+
turbolinks
|
74
|
+
uglify-js-brunch
|
75
|
+
)
|
76
|
+
run "yarn add #{packages.join(' ')}"
|
65
77
|
end
|
66
78
|
|
67
79
|
def create_directory_structure
|
data/lib/tasks/breakfast.rake
CHANGED
@@ -58,9 +58,16 @@ end
|
|
58
58
|
|
59
59
|
if Rake::Task.task_defined?("assets:precompile")
|
60
60
|
Rake::Task["assets:precompile"].enhance do
|
61
|
-
Rake::Task
|
62
|
-
|
61
|
+
unless File.exist?("./bin/yarn") && Rake::Task.task_defined?("yarn:install")
|
62
|
+
# Rails 5.1 includes a yarn install command - don't yarn install twice.
|
63
|
+
Rake::Task["breakfast:yarn:install"].invoke
|
64
|
+
end
|
65
|
+
Rake::Task["breakfast:assets:compile"].invoke
|
63
66
|
end
|
67
|
+
else
|
68
|
+
Rake::Task.define_task(
|
69
|
+
"assets:precompile" => ["breakfast:yarn", "breakfast:assets:compile"]
|
70
|
+
)
|
64
71
|
end
|
65
72
|
|
66
73
|
module Breakfast
|
data/node_package/package.json
CHANGED
@@ -52,13 +52,10 @@ class LiveReloader {
|
|
52
52
|
htmlReload(strategy) {
|
53
53
|
switch (strategy) {
|
54
54
|
case 'turbolinks':
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
} else {
|
60
|
-
location.reload();
|
61
|
-
}
|
55
|
+
this.reloadTurbolinks();
|
56
|
+
break;
|
57
|
+
case 'wiselinks':
|
58
|
+
this.reloadWiselinks();
|
62
59
|
break;
|
63
60
|
case 'page':
|
64
61
|
window.top.location.reload();
|
@@ -71,13 +68,10 @@ class LiveReloader {
|
|
71
68
|
rubyReload(strategy) {
|
72
69
|
switch (strategy) {
|
73
70
|
case 'turbolinks':
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
} else {
|
79
|
-
location.reload();
|
80
|
-
}
|
71
|
+
this.reloadTurbolinks();
|
72
|
+
break;
|
73
|
+
case 'wiselinks':
|
74
|
+
this.reloadWiselinks();
|
81
75
|
break;
|
82
76
|
case 'page':
|
83
77
|
window.top.location.reload();
|
@@ -87,8 +81,22 @@ class LiveReloader {
|
|
87
81
|
}
|
88
82
|
}
|
89
83
|
|
90
|
-
|
91
|
-
|
84
|
+
reloadTurbolinks() {
|
85
|
+
const location = window.top.location;
|
86
|
+
|
87
|
+
if (this.settings.turbolinksEnabled() && !this.onErrorPage()) {
|
88
|
+
Turbolinks.visit(location);
|
89
|
+
} else {
|
90
|
+
location.reload();
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
reloadWiselinks() {
|
95
|
+
if (this.settings.wiselinksEnabled() && !this.onErrorPage()) {
|
96
|
+
wiselinks.reload();
|
97
|
+
} else {
|
98
|
+
window.top.location.reload();
|
99
|
+
}
|
92
100
|
}
|
93
101
|
// If user is on an error page and they fix the error and re-render using
|
94
102
|
// turbolinks than the CSS from the Rails error page will hang around. Will
|
@@ -43,6 +43,14 @@ class Settings {
|
|
43
43
|
storedSettings() {
|
44
44
|
return (JSON.parse(localStorage.getItem(LOCAL_STORAGE_KEY)) || {});
|
45
45
|
}
|
46
|
+
|
47
|
+
turbolinksEnabled() {
|
48
|
+
return typeof Turbolinks !== 'undefined';
|
49
|
+
}
|
50
|
+
|
51
|
+
wiselinksEnabled() {
|
52
|
+
return typeof Wiselinks !== 'undefined';
|
53
|
+
}
|
46
54
|
}
|
47
55
|
|
48
56
|
module.exports = Settings;
|
@@ -23,8 +23,10 @@ class StatusBar {
|
|
23
23
|
init() {
|
24
24
|
let eventName;
|
25
25
|
|
26
|
-
if (
|
26
|
+
if (this.settings.turbolinksEnabled()) {
|
27
27
|
eventName = 'turbolinks:load';
|
28
|
+
} else if (this.settings.wiselinksEnabled()) {
|
29
|
+
eventName = 'page:done';
|
28
30
|
} else {
|
29
31
|
eventName = 'DOMContentLoaded';
|
30
32
|
}
|
@@ -94,7 +96,8 @@ class StatusBar {
|
|
94
96
|
<span>html: </span><span class="breakfast-type">${ this.settings.strategies.html }</span>
|
95
97
|
<div class="breakfast-menu">
|
96
98
|
${ this.renderLink('html', 'page', 'Page Reload') }
|
97
|
-
${ this.renderLink('html', 'turbolinks', 'Turbolinks Reload') }
|
99
|
+
${ this.renderLink('html', 'turbolinks', 'Turbolinks Reload', this.settings.turbolinksEnabled()) }
|
100
|
+
${ this.renderLink('html', 'wiselinks', 'Wiselinks Reload', this.settings.wiselinksEnabled()) }
|
98
101
|
${ this.renderLink('html', 'off', 'Off') }
|
99
102
|
</div>
|
100
103
|
</div>
|
@@ -103,16 +106,21 @@ class StatusBar {
|
|
103
106
|
<span>ruby: </span><span class="breakfast-type">${ this.settings.strategies.rb }</span>
|
104
107
|
<div class="breakfast-menu">
|
105
108
|
${ this.renderLink('rb', 'page', 'Page Reload') }
|
106
|
-
${ this.renderLink('rb', 'turbolinks', 'Turbolinks Reload') }
|
109
|
+
${ this.renderLink('rb', 'turbolinks', 'Turbolinks Reload', this.settings.turbolinksEnabled()) }
|
110
|
+
${ this.renderLink('rb', 'wiselinks', 'Wiselinks Reload', this.settings.wiselinksEnabled()) }
|
107
111
|
${ this.renderLink('rb', 'off', 'Off') }
|
108
112
|
</div>
|
109
113
|
</div>
|
110
114
|
`);
|
111
115
|
}
|
112
116
|
|
113
|
-
renderLink(type, strategy, text) {
|
117
|
+
renderLink(type, strategy, text, enabled = true) {
|
114
118
|
const active = this.settings.strategies[type] === strategy;
|
115
119
|
|
120
|
+
if (!enabled) {
|
121
|
+
return '';
|
122
|
+
}
|
123
|
+
|
116
124
|
return (`
|
117
125
|
<a
|
118
126
|
class="breakfast-menu-option ${ active ? 'breakfast-active' : '' }"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: breakfast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Koperwas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
version: '0'
|
157
157
|
requirements: []
|
158
158
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.6
|
159
|
+
rubygems_version: 2.7.6
|
160
160
|
signing_key:
|
161
161
|
specification_version: 4
|
162
162
|
summary: Integrates Brunch into Rails
|