guard-livereload 2.4.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96e1114b0493086538e38f047439527091466b61
4
- data.tar.gz: 37aa5be8a04fef4ec76f1b219602278daa199da1
3
+ metadata.gz: cda44c14816be8446e496f2ea2c306ce3ac400bb
4
+ data.tar.gz: d2d202a0411cea1a4259a859486464e4625900a0
5
5
  SHA512:
6
- metadata.gz: 7431db842e195a72a739e034537fc239c0e0d0a7dc454a01de152cdc041e60f7b41591d47ab40a27488288f86fd4b7d7766e35283ab6710a3d35f8ca79ca99ca
7
- data.tar.gz: b48e1dbe692afdba21ed79b4b34bc14ec9207ff6c1af448a58c0fa10dd35ea6e34c0fa8e919e1ae4af179f5c2ba9221014c19117b3c9d898f3f14f1856ac283a
6
+ metadata.gz: 481750e4e5618b791b2dcc94eaa33f98a9fff4b319deefa994d020fe9b2fb093ef37ff8c87ca1eb12add769c10f03bbd6bfc9676d7dbe6f44440406963a322cc
7
+ data.tar.gz: 68e2276c433dc2dbaea45a369b3c924e4cd599c2e48a9d1dd69b1ae9d975602759e3160d07e6552a0519d074accaf4f451574041b475dde9d7bdda7bca50c327
@@ -0,0 +1,6 @@
1
+ ruby:
2
+ enabled: true
3
+ config_file: .rubocop_merged_for_hound.yml
4
+
5
+ coffee_script:
6
+ enabled: true
@@ -0,0 +1,265 @@
1
+ #
2
+ # NOTE: * DO NOT EDIT THIS FILE! *
3
+ #
4
+ # This file should match the config/style_guides/ruby.yml from the
5
+ # thoughtbot/hound project
6
+
7
+ AllCops:
8
+ Exclude:
9
+ - db/schema.rb
10
+
11
+ AccessorMethodName:
12
+ Enabled: false
13
+
14
+ ActionFilter:
15
+ Enabled: false
16
+
17
+ Alias:
18
+ Enabled: false
19
+
20
+ ArrayJoin:
21
+ Enabled: false
22
+
23
+ AsciiComments:
24
+ Enabled: false
25
+
26
+ AsciiIdentifiers:
27
+ Enabled: false
28
+
29
+ Attr:
30
+ Enabled: false
31
+
32
+ BlockNesting:
33
+ Enabled: false
34
+
35
+ CaseEquality:
36
+ Enabled: false
37
+
38
+ CharacterLiteral:
39
+ Enabled: false
40
+
41
+ ClassAndModuleChildren:
42
+ Enabled: false
43
+
44
+ ClassLength:
45
+ Enabled: false
46
+
47
+ ClassVars:
48
+ Enabled: false
49
+
50
+ CollectionMethods:
51
+ PreferredMethods:
52
+ find: detect
53
+ reduce: inject
54
+ collect: map
55
+ find_all: select
56
+
57
+ ColonMethodCall:
58
+ Enabled: false
59
+
60
+ CommentAnnotation:
61
+ Enabled: false
62
+
63
+ CyclomaticComplexity:
64
+ Enabled: false
65
+
66
+ Delegate:
67
+ Enabled: false
68
+
69
+ DeprecatedHashMethods:
70
+ Enabled: false
71
+
72
+ Documentation:
73
+ Enabled: false
74
+
75
+ DotPosition:
76
+ EnforcedStyle: trailing
77
+
78
+ DoubleNegation:
79
+ Enabled: false
80
+
81
+ EachWithObject:
82
+ Enabled: false
83
+
84
+ EmptyLiteral:
85
+ Enabled: false
86
+
87
+ Encoding:
88
+ Enabled: false
89
+
90
+ EvenOdd:
91
+ Enabled: false
92
+
93
+ FileName:
94
+ Enabled: false
95
+
96
+ FlipFlop:
97
+ Enabled: false
98
+
99
+ FormatString:
100
+ Enabled: false
101
+
102
+ GlobalVars:
103
+ Enabled: false
104
+
105
+ GuardClause:
106
+ Enabled: false
107
+
108
+ IfUnlessModifier:
109
+ Enabled: false
110
+
111
+ IfWithSemicolon:
112
+ Enabled: false
113
+
114
+ InlineComment:
115
+ Enabled: false
116
+
117
+ Lambda:
118
+ Enabled: false
119
+
120
+ LambdaCall:
121
+ Enabled: false
122
+
123
+ LineEndConcatenation:
124
+ Enabled: false
125
+
126
+ LineLength:
127
+ Max: 80
128
+
129
+ MethodLength:
130
+ Enabled: false
131
+
132
+ ModuleFunction:
133
+ Enabled: false
134
+
135
+ NegatedIf:
136
+ Enabled: false
137
+
138
+ NegatedWhile:
139
+ Enabled: false
140
+
141
+ Next:
142
+ Enabled: false
143
+
144
+ NilComparison:
145
+ Enabled: false
146
+
147
+ Not:
148
+ Enabled: false
149
+
150
+ NumericLiterals:
151
+ Enabled: false
152
+
153
+ OneLineConditional:
154
+ Enabled: false
155
+
156
+ OpMethod:
157
+ Enabled: false
158
+
159
+ ParameterLists:
160
+ Enabled: false
161
+
162
+ PercentLiteralDelimiters:
163
+ Enabled: false
164
+
165
+ PerlBackrefs:
166
+ Enabled: false
167
+
168
+ PredicateName:
169
+ NamePrefixBlacklist:
170
+ - is_
171
+
172
+ Proc:
173
+ Enabled: false
174
+
175
+ RaiseArgs:
176
+ Enabled: false
177
+
178
+ RegexpLiteral:
179
+ Enabled: false
180
+
181
+ SelfAssignment:
182
+ Enabled: false
183
+
184
+ SingleLineBlockParams:
185
+ Enabled: false
186
+
187
+ SingleLineMethods:
188
+ Enabled: false
189
+
190
+ SignalException:
191
+ Enabled: false
192
+
193
+ SpecialGlobalVars:
194
+ Enabled: false
195
+
196
+ StringLiterals:
197
+ EnforcedStyle: double_quotes
198
+
199
+ VariableInterpolation:
200
+ Enabled: false
201
+
202
+ TrailingComma:
203
+ Enabled: false
204
+
205
+ TrivialAccessors:
206
+ Enabled: false
207
+
208
+ VariableInterpolation:
209
+ Enabled: false
210
+
211
+ WhenThen:
212
+ Enabled: false
213
+
214
+ WhileUntilModifier:
215
+ Enabled: false
216
+
217
+ WordArray:
218
+ Enabled: false
219
+
220
+ # Lint
221
+
222
+ AmbiguousOperator:
223
+ Enabled: false
224
+
225
+ AmbiguousRegexpLiteral:
226
+ Enabled: false
227
+
228
+ AssignmentInCondition:
229
+ Enabled: false
230
+
231
+ ConditionPosition:
232
+ Enabled: false
233
+
234
+ DeprecatedClassMethods:
235
+ Enabled: false
236
+
237
+ ElseLayout:
238
+ Enabled: false
239
+
240
+ HandleExceptions:
241
+ Enabled: false
242
+
243
+ InvalidCharacterLiteral:
244
+ Enabled: false
245
+
246
+ LiteralInCondition:
247
+ Enabled: false
248
+
249
+ LiteralInInterpolation:
250
+ Enabled: false
251
+
252
+ Loop:
253
+ Enabled: false
254
+
255
+ ParenthesesAsGroupedExpression:
256
+ Enabled: false
257
+
258
+ RequireParentheses:
259
+ Enabled: false
260
+
261
+ UnderscorePrefixedVariableName:
262
+ Enabled: false
263
+
264
+ Void:
265
+ Enabled: false
@@ -0,0 +1,19 @@
1
+ # NOTE: DO NOT put a 'inheried_from' in this file, because Hound with silently
2
+ # ignore it
3
+ #
4
+ # Files you want to exclude
5
+ AllCops:
6
+ # Rails cops (so we don't need to run with -R option)
7
+ RunRailsCops: true
8
+ Exclude:
9
+ - db/schema.rb
10
+ - Gemfile
11
+ - Rakefile
12
+
13
+ # TODO: put your overrides here:
14
+
15
+ StringLiterals:
16
+ EnforcedStyle: single_quotes
17
+ #
18
+ # LineLength:
19
+ # Max: 200
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
@@ -0,0 +1,8 @@
1
+ inherit_from:
2
+ - .hound/defaults.yml
3
+ - .hound/overrides.yml
4
+ - .rubocop_todo.yml
5
+
6
+ # Rails cops (so we don't need to run with -R option)
7
+ AllCops:
8
+ RunRailsCops: true
@@ -0,0 +1,41 @@
1
+ # This is a file generated by `hound-tools`
2
+ #
3
+ # We don't include .hound/defaults.yml, because Hound has internally
4
+ # loaded them at this point
5
+ #
6
+ # ---------------------------------
7
+ # .hound/overrides.yml
8
+ # ---------------------------------
9
+ # NOTE: DO NOT put a 'inheried_from' in this file, because Hound with silently
10
+ # ignore it
11
+ #
12
+ # Files you want to exclude
13
+ AllCops:
14
+ # Rails cops (so we don't need to run with -R option)
15
+ RunRailsCops: true
16
+ Exclude:
17
+ - db/schema.rb
18
+ - Gemfile
19
+ - Rakefile
20
+
21
+ # TODO: put your overrides here:
22
+
23
+ StringLiterals:
24
+ EnforcedStyle: single_quotes
25
+ #
26
+ # LineLength:
27
+ # Max: 200
28
+ # ---------------------------------
29
+ # .rubocop_todo.yml
30
+ # ---------------------------------
31
+ # This configuration was generated by `rubocop --auto-gen-config`
32
+ # on 2014-12-09 05:16:56 +0100 using RuboCop version 0.25.0.
33
+ # The point is for the user to remove these configuration records
34
+ # one by one as the offenses are removed from the code base.
35
+ # Note that changes in the inspected code, or installation of new
36
+ # versions of RuboCop, may require this file to be generated again.
37
+
38
+ # Offense count: 12
39
+ # Configuration parameters: AllowURI.
40
+ Metrics/LineLength:
41
+ Max: 163
@@ -0,0 +1,11 @@
1
+ # This configuration was generated by `rubocop --auto-gen-config`
2
+ # on 2014-12-09 05:16:56 +0100 using RuboCop version 0.25.0.
3
+ # The point is for the user to remove these configuration records
4
+ # one by one as the offenses are removed from the code base.
5
+ # Note that changes in the inspected code, or installation of new
6
+ # versions of RuboCop, may require this file to be generated again.
7
+
8
+ # Offense count: 12
9
+ # Configuration parameters: AllowURI.
10
+ Metrics/LineLength:
11
+ Max: 163
data/Gemfile CHANGED
@@ -3,10 +3,14 @@ source "https://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  group :development do
6
- gem 'ruby_gntp'
7
- gem 'guard-rspec'
6
+ gem "ruby_gntp", require: false
7
+ gem "guard-rspec", require: false
8
+ gem "guard-rubocop", require: false
9
+ gem "hound-tools", '~> 0.0.4', require: false
8
10
  end
9
11
 
10
12
  group :test do
11
- gem 'coveralls', require: false
13
+ gem "coveralls", require: false
14
+ gem "rake", require: false
15
+ gem 'rspec', '~> 3.1'
12
16
  end
data/Guardfile CHANGED
@@ -1,5 +1,14 @@
1
- guard :rspec do
2
- watch(%r{spec/.+_spec.rb})
3
- watch(%r{lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
4
- watch('spec/spec_helper.rb') { "spec" }
1
+ group :specs, halt_on_fail: true do
2
+ guard :rspec, cmd: 'bundle exec rspec', failed_mode: :keep, all_on_start: true do
3
+ watch(%r{spec/.+_spec.rb})
4
+ watch(%r{lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
5
+ watch('spec/spec_helper.rb') { 'spec' }
6
+ watch('lib/guard/livereload/templates/Guardfile') { 'spec/lib/guard/livereload/template_spec.rb' }
7
+ end
8
+
9
+ guard :rubocop, all_on_start: false, cli: '--rails' do
10
+ watch(%r{.+\.rb$}) { |m| m[0] }
11
+ watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
12
+ watch(%r{(?:.+/)?\.rubocop_todo\.yml$}) { |m| File.dirname(m[0]) }
13
+ end
5
14
  end
data/README.md CHANGED
@@ -24,7 +24,7 @@ Add it to your Gemfile (inside development group):
24
24
 
25
25
  ``` ruby
26
26
  group :development do
27
- gem 'guard-livereload', require: false
27
+ gem 'guard-livereload', '~> 2.4', require: false
28
28
  end
29
29
  ```
30
30
 
@@ -34,7 +34,7 @@ Add guard definition to your Guardfile by running this command:
34
34
  $ guard init livereload
35
35
  ```
36
36
 
37
- Use [rack-livereload](https://github.com/johnbintz/rack-livereload) or install [LiveReload Safari/Chrome extension](http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions-)
37
+ And to get everything running in the browser, use [rack-livereload](https://github.com/johnbintz/rack-livereload) or install the [LiveReload Safari/Chrome/Firefox extension](http://livereload.com/extensions#installing-sections).
38
38
 
39
39
  ## Usage
40
40
 
@@ -75,11 +75,27 @@ port: '12345' # default '35729'
75
75
  apply_css_live: false # default true
76
76
  override_url: false # default false
77
77
  grace_period: 0.5 # default 0 (seconds)
78
+ js_template: './my_livereload.js.erb' # default is livereload.js.erb from gem
78
79
  ```
79
80
 
81
+ Additional custom JS template options (see livereload.js.erb for details):
82
+ ``` ruby
83
+ js_apple_webkit_extra_wait_time: 50 # default is 5 (see issue #123)
84
+ js_default_extra_wait_time: 100 # default is 200
85
+ ```
86
+
87
+
80
88
  `notify` uses Guard's [system notifications](https://github.com/guard/guard/wiki/System-notifications).
81
89
  See [LiveReload configuration doc](https://github.com/mockko/livereload/blob/master/README-old.md) from version 1.x for more info about other options.
82
90
 
91
+ ## Troubleshooting
92
+
93
+ ##### 1. "hw.ncpu" is an unknown key.
94
+
95
+ Solution: just upgrade the `listen` gem to '3.x' (Listen is used by Guard).
96
+
97
+ (Details: https://github.com/guard/guard-livereload/issues/134)
98
+
83
99
  ## Development
84
100
 
85
101
  * Source hosted at [GitHub](https://github.com/guard/guard-livereload).