sprockets_better_errors 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/sprockets_better_errors/sprockets_rails_helper.rb +1 -9
- data/lib/sprockets_better_errors/version.rb +1 -1
- data/sprockets_better_errors.gemspec +4 -1
- data/test/dummy/app/views/foo/no_errors.html.erb +1 -0
- data/test/dummy/public/cinco.png +0 -0
- metadata +48 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1b0efa352229774fbb71e6d8e226f396da0634f
|
4
|
+
data.tar.gz: 4d5464e44ca61976ec14cb372b812af9491d765b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 864ce10f25603796c1bba56308a4d485394b47859d9623958696ad757f721befc3c08a6acc1c397b7b72700b1c4d39a6dad1729ce4af1aa6d4ce620fd2cd55f9
|
7
|
+
data.tar.gz: dc8de91da5aa2a63b85f5c3f0189a390b442e6a151dce69e64c295bf8ef95639dca8a84050d8e7fe8b2d2c5223a5f2cd3142f784766ee5b99c6f841fa0be1ac2
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Errors, more of them, and better. For sprockets, specifically sprockets-rails. T
|
|
7
7
|
Let's say you're referencing an asset in your view
|
8
8
|
|
9
9
|
```erb
|
10
|
-
<%=
|
10
|
+
<%= stylesheet_link_tag "search" %>
|
11
11
|
```
|
12
12
|
|
13
13
|
This works in development but you'll find if you're precompiling your assets that it won't work in production. Why? By default sprockets is configured only to precompile `application.css`. Wouldn't it have been great if you could have been warned in development before you pushed to production and your site broke?
|
@@ -20,7 +20,7 @@ That would be AMAZING! Well this gem adds these types of helpful errors!
|
|
20
20
|
|
21
21
|
## Compatibility
|
22
22
|
|
23
|
-
If you're using Rails 3.2 you will need to [enable the Rails 4 asset pipeline in Rails 3](https://discussion.heroku.com/t/using-the-rails-4-asset-pipeline-in-rails-3-apps-for-faster-deploys/205
|
23
|
+
If you're using Rails 3.2 you will need to [enable the Rails 4 asset pipeline in Rails 3](https://discussion.heroku.com/t/using-the-rails-4-asset-pipeline-in-rails-3-apps-for-faster-deploys/205). Works out of the box with Rails 4.
|
24
24
|
|
25
25
|
## Install
|
26
26
|
|
@@ -85,7 +85,7 @@ Implementation is quite simple and limited to `helper.rb`, additional code is al
|
|
85
85
|
|
86
86
|
## Upstream
|
87
87
|
|
88
|
-
Why not add this code upstream? I
|
88
|
+
Why not add this code upstream? I already tried, there are several PR awaiting merge. If you found this Gem useful maybe give them a `:+1:`.
|
89
89
|
|
90
90
|
- [Raise On Dev asset not in Precompile list](https://github.com/rails/sprockets-rails/pull/84)
|
91
91
|
- [Raise on improper dependency use](https://github.com/rails/sprockets-rails/pull/96)
|
@@ -30,14 +30,6 @@ module Sprockets::Rails::Helper
|
|
30
30
|
include ActiveSupport::Configurable
|
31
31
|
config_accessor :precompile, :assets, :raise_asset_errors
|
32
32
|
|
33
|
-
class AssetNotPresentError < StandardError
|
34
|
-
def initialize(source)
|
35
|
-
msg = "Asset not present: " <<
|
36
|
-
"could not find '#{source}' in any asset directory"
|
37
|
-
super(msg)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
33
|
class AssetFilteredError < StandardError
|
42
34
|
def initialize(source)
|
43
35
|
msg = "Asset filtered out and will not be served: " <<
|
@@ -83,7 +75,7 @@ module Sprockets::Rails::Helper
|
|
83
75
|
return source if source =~ URI_REGEXP
|
84
76
|
|
85
77
|
asset = lookup_asset_for_path(source)
|
86
|
-
|
78
|
+
return if asset.blank?
|
87
79
|
raise AssetFilteredError.new(source) if asset_needs_precompile?(source, asset.pathname.to_s)
|
88
80
|
end
|
89
81
|
|
@@ -28,7 +28,10 @@ MSG
|
|
28
28
|
|
29
29
|
gem.post_install_message = msg
|
30
30
|
|
31
|
-
gem.add_dependency
|
31
|
+
gem.add_dependency "sprockets-rails", ">= 1.0.0"
|
32
|
+
gem.add_dependency "actionpack", "< 4.1"
|
33
|
+
gem.add_dependency "activesupport", "< 4.1"
|
34
|
+
|
32
35
|
gem.add_development_dependency "capybara", ">= 0.4.0"
|
33
36
|
gem.add_development_dependency "launchy", "~> 2.1.0"
|
34
37
|
gem.add_development_dependency "poltergeist"
|
Binary file
|
metadata
CHANGED
@@ -1,94 +1,122 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets_better_errors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Schneeman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets-rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: actionpack
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "<"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "<"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '4.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: activesupport
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "<"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '4.1'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "<"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '4.1'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: capybara
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
30
58
|
requirements:
|
31
|
-
- -
|
59
|
+
- - ">="
|
32
60
|
- !ruby/object:Gem::Version
|
33
61
|
version: 0.4.0
|
34
62
|
type: :development
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
|
-
- -
|
66
|
+
- - ">="
|
39
67
|
- !ruby/object:Gem::Version
|
40
68
|
version: 0.4.0
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: launchy
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
44
72
|
requirements:
|
45
|
-
- - ~>
|
73
|
+
- - "~>"
|
46
74
|
- !ruby/object:Gem::Version
|
47
75
|
version: 2.1.0
|
48
76
|
type: :development
|
49
77
|
prerelease: false
|
50
78
|
version_requirements: !ruby/object:Gem::Requirement
|
51
79
|
requirements:
|
52
|
-
- - ~>
|
80
|
+
- - "~>"
|
53
81
|
- !ruby/object:Gem::Version
|
54
82
|
version: 2.1.0
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
84
|
name: poltergeist
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
58
86
|
requirements:
|
59
|
-
- -
|
87
|
+
- - ">="
|
60
88
|
- !ruby/object:Gem::Version
|
61
89
|
version: '0'
|
62
90
|
type: :development
|
63
91
|
prerelease: false
|
64
92
|
version_requirements: !ruby/object:Gem::Requirement
|
65
93
|
requirements:
|
66
|
-
- -
|
94
|
+
- - ">="
|
67
95
|
- !ruby/object:Gem::Version
|
68
96
|
version: '0'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: rake
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
|
-
- -
|
101
|
+
- - ">="
|
74
102
|
- !ruby/object:Gem::Version
|
75
103
|
version: '0'
|
76
104
|
type: :development
|
77
105
|
prerelease: false
|
78
106
|
version_requirements: !ruby/object:Gem::Requirement
|
79
107
|
requirements:
|
80
|
-
- -
|
108
|
+
- - ">="
|
81
109
|
- !ruby/object:Gem::Version
|
82
110
|
version: '0'
|
83
|
-
description:
|
111
|
+
description: " Raise now so you don't pay later "
|
84
112
|
email:
|
85
113
|
- richard.schneeman+rubygems@gmail.com
|
86
114
|
executables: []
|
87
115
|
extensions: []
|
88
116
|
extra_rdoc_files: []
|
89
117
|
files:
|
90
|
-
- .gitignore
|
91
|
-
- .travis.yml
|
118
|
+
- ".gitignore"
|
119
|
+
- ".travis.yml"
|
92
120
|
- Gemfile
|
93
121
|
- README.md
|
94
122
|
- Rakefile
|
@@ -133,6 +161,7 @@ files:
|
|
133
161
|
- test/dummy/public/404.html
|
134
162
|
- test/dummy/public/422.html
|
135
163
|
- test/dummy/public/500.html
|
164
|
+
- test/dummy/public/cinco.png
|
136
165
|
- test/dummy/public/favicon.ico
|
137
166
|
- test/dummy/public/index.html
|
138
167
|
- test/dummy/script/rails
|
@@ -177,17 +206,17 @@ require_paths:
|
|
177
206
|
- lib
|
178
207
|
required_ruby_version: !ruby/object:Gem::Requirement
|
179
208
|
requirements:
|
180
|
-
- -
|
209
|
+
- - ">="
|
181
210
|
- !ruby/object:Gem::Version
|
182
211
|
version: '0'
|
183
212
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
213
|
requirements:
|
185
|
-
- -
|
214
|
+
- - ">="
|
186
215
|
- !ruby/object:Gem::Version
|
187
216
|
version: '0'
|
188
217
|
requirements: []
|
189
218
|
rubyforge_project:
|
190
|
-
rubygems_version: 2.
|
219
|
+
rubygems_version: 2.2.2
|
191
220
|
signing_key:
|
192
221
|
specification_version: 4
|
193
222
|
summary: Better sprockets errors in development so you'll know if things work before
|
@@ -229,6 +258,7 @@ test_files:
|
|
229
258
|
- test/dummy/public/404.html
|
230
259
|
- test/dummy/public/422.html
|
231
260
|
- test/dummy/public/500.html
|
261
|
+
- test/dummy/public/cinco.png
|
232
262
|
- test/dummy/public/favicon.ico
|
233
263
|
- test/dummy/public/index.html
|
234
264
|
- test/dummy/script/rails
|
@@ -258,4 +288,3 @@ test_files:
|
|
258
288
|
- test/route_inspector_test.rb
|
259
289
|
- test/support/integration_case.rb
|
260
290
|
- test/test_helper.rb
|
261
|
-
has_rdoc:
|