sprockets-rails 3.2.1 → 3.2.2

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
- SHA1:
3
- metadata.gz: d671d520900799dfead3c800f71b8cd5be242dbe
4
- data.tar.gz: 65301c0eb28b55f83cb9782d0d086bdd0b21cbf4
2
+ SHA256:
3
+ metadata.gz: 801a6cbc13340fb4c74ecf9b7aa2d5c6c563605e3462512e0073f268e269fe8d
4
+ data.tar.gz: facde95b73f355f987059128c7f6d852b5b8845d26f2eca5214b4fc37ded168d
5
5
  SHA512:
6
- metadata.gz: 98c1b63972086b59bcd065d6508aa3f5367ff69a1ed61e758b053c5c911735d667859623c7ce59f5f314169f02689f354c1815ec9ca97f5d2d0d5fd505a21a2a
7
- data.tar.gz: b2b9a8b0d26554a21880ff43da22879100d5a66348b2c66fd3f0dde316abd3b8c1bf9acbc4384ed8b82c5bbe23c3bd1abc5830f2cacb0432d0cf511e91a0bc83
6
+ metadata.gz: 7f6c2f179ba5b3294ad0b49357c4a7a50c207f221d6cbb5d9cad406b1143ee5ff9d5a71897f3f6a2bd9709eda8d5e5bad5380e4defa1e135700cc3edd9669749
7
+ data.tar.gz: cbd34277b1e2e89c5ddded1b616ce179a269e384f1781b7032972c966737803e725440f5a23951383adf6b4a8705b50a307eb94a2bd6055ab42dcfc505aa468c
data/README.md CHANGED
@@ -138,7 +138,7 @@ The following plugins provide some extras for the Sprockets Asset Pipeline.
138
138
  * [coffee-rails](https://github.com/rails/coffee-rails)
139
139
  * [sass-rails](https://github.com/rails/sass-rails)
140
140
 
141
- **NOTE** That these plugins are optional. The core coffee-script, sass, less, uglify, (any many more) features are built into Sprockets itself. Many of these plugins only provide generators and extra helpers. You can probably get by without them.
141
+ **NOTE** That these plugins are optional. The core coffee-script, sass, less, uglify, (and many more) features are built into Sprockets itself. Many of these plugins only provide generators and extra helpers. You can probably get by without them.
142
142
 
143
143
 
144
144
  ## Changes from Rails 3.x
@@ -150,6 +150,15 @@ The following plugins provide some extras for the Sprockets Asset Pipeline.
150
150
  * `config.assets.manifest` (if used) must now include the manifest filename, e.g. `Rails.root.join('config/manifest.json')`. It cannot be a directory.
151
151
  * Two cleanup tasks: `rake assets:clean` is now a safe cleanup that only removes older assets that are no longer used, while `rake assets:clobber` nukes the entire `public/assets` directory. The clean task allows for rolling deploys that may still be linking to an old asset while the new assets are being built.
152
152
 
153
+ ### But what if I want sprockets to generate non-digest assets?
154
+
155
+ You have several options:
156
+
157
+ * Use the [non-digest-assets gem](https://github.com/mvz/non-digest-assets).
158
+ * Use the [sprockets-redirect gem](https://github.com/sikachu/sprockets-redirect).
159
+ * Use the [smart_assets gem](https://github.com/zarqman/smart_assets).
160
+ * Create [a rake task](https://github.com/rails/sprockets-rails/issues/49#issuecomment-20535134) to pre-generate a non-digest version in `public/`.
161
+
153
162
  ## Experimental
154
163
 
155
164
  ### [SRI](http://www.w3.org/TR/SRI/) support
@@ -189,4 +198,3 @@ Sprockets Rails is released under the [MIT License](MIT-LICENSE).
189
198
 
190
199
  * [![Travis CI](https://travis-ci.org/rails/sprockets-rails.svg?branch=master)](http://travis-ci.org/rails/sprockets-rails)
191
200
  * [![Gem Version](https://badge.fury.io/rb/sprockets-rails.svg)](http://badge.fury.io/rb/sprockets-rails)
192
- * [![Dependencies](https://gemnasium.com/rails/sprockets-rails.svg)](https://gemnasium.com/rails/sprockets-rails)
@@ -7,15 +7,16 @@ module Sprockets
7
7
  module Rails
8
8
  module Helper
9
9
  class AssetNotFound < StandardError; end
10
+ class AssetNotPrecompiled < StandardError; end
10
11
 
11
- class AssetNotPrecompiled < StandardError
12
+ class AssetNotPrecompiledError < AssetNotPrecompiled
12
13
  include Sprockets::Rails::Utils
13
14
  def initialize(source)
14
15
  msg =
15
16
  if using_sprockets4?
16
17
  "Asset `#{ source }` was not declared to be precompiled in production.\n" +
17
18
  "Declare links to your assets in `app/assets/config/manifest.js`.\n\n" +
18
- " //= link #{ source }\n" +
19
+ " //= link #{ source }\n\n" +
19
20
  "and restart your server"
20
21
  else
21
22
  "Asset was not declared to be precompiled in production.\n" +
@@ -57,7 +58,7 @@ module Sprockets
57
58
  end
58
59
 
59
60
  def self.extended(obj)
60
- obj.class_eval do
61
+ obj.singleton_class.class_eval do
61
62
  attr_accessor(*VIEW_ACCESSORS)
62
63
 
63
64
  remove_method :assets_environment
@@ -79,7 +80,7 @@ module Sprockets
79
80
  if asset_path = resolve_asset_path(path, debug)
80
81
  File.join(assets_prefix || "/", legacy_debug_path(asset_path, debug))
81
82
  else
82
- message = "The asset #{ path.inspect } is not present in the asset pipeline."
83
+ message = "The asset #{ path.inspect } is not present in the asset pipeline.\n"
83
84
  raise AssetNotFound, message unless unknown_asset_fallback
84
85
 
85
86
  if respond_to?(:public_compute_asset_path)
@@ -351,8 +352,16 @@ module Sprockets
351
352
  end
352
353
 
353
354
  private
354
- def find_asset(path, options = {})
355
- @env[path, options]
355
+ if RUBY_VERSION >= "2.7"
356
+ class_eval <<-RUBY, __FILE__, __LINE__ + 1
357
+ def find_asset(path, options = {})
358
+ @env[path, **options]
359
+ end
360
+ RUBY
361
+ else
362
+ def find_asset(path, options = {})
363
+ @env[path, options]
364
+ end
356
365
  end
357
366
 
358
367
  def precompiled?(path)
@@ -2,7 +2,6 @@ require 'rake'
2
2
  require 'rake/sprocketstask'
3
3
  require 'sprockets'
4
4
  require 'action_view'
5
- require 'action_view/base'
6
5
 
7
6
  module Sprockets
8
7
  module Rails
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Rails
3
- VERSION = "3.2.1"
3
+ VERSION = "3.2.2"
4
4
  end
5
5
  end
@@ -76,7 +76,8 @@ module Sprockets
76
76
  " //= link_tree ../images\n" +
77
77
  " //= link_directory ../javascripts .js\n" +
78
78
  " //= link_directory ../stylesheets .css\n" +
79
- "and restart your server"
79
+ "and restart your server\n\n" +
80
+ "For more information see: https://github.com/rails/sprockets/blob/070fc01947c111d35bb4c836e9bb71962a8e0595/UPGRADING.md#manifestjs"
80
81
  super msg
81
82
  end
82
83
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Peek
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-31 00:00:00.000000000 Z
11
+ date: 2020-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets
@@ -108,7 +108,7 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- description:
111
+ description:
112
112
  email: josh@joshpeek.com
113
113
  executables: []
114
114
  extensions: []
@@ -129,7 +129,7 @@ homepage: https://github.com/rails/sprockets-rails
129
129
  licenses:
130
130
  - MIT
131
131
  metadata: {}
132
- post_install_message:
132
+ post_install_message:
133
133
  rdoc_options: []
134
134
  require_paths:
135
135
  - lib
@@ -144,9 +144,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  requirements: []
147
- rubyforge_project:
148
- rubygems_version: 2.5.2
149
- signing_key:
147
+ rubygems_version: 3.1.2
148
+ signing_key:
150
149
  specification_version: 4
151
150
  summary: Sprockets Rails integration
152
151
  test_files: []