rails-sandbox-assets 0.1.3 → 0.2.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: b5e0ff68601118b0666eac95cf0adf96a5a95437
4
- data.tar.gz: 53fda9e30a2879b680832c3a62c3d36862449005
3
+ metadata.gz: 414fb86c7cd89addfc5ca8c7f1ed384901927720
4
+ data.tar.gz: 4ba2f25811f265e9a38557848fdbbd1f8f6a0ac4
5
5
  SHA512:
6
- metadata.gz: aad707c5ec99a809fc80b792ee9106468ba7cf4dd6192206ea69a4df5903aac6453f5f302aaed1c9e3103949ea0aa3ab8892a95c1e490deb5a0209928b3be6ba
7
- data.tar.gz: cce3c21d6cc97853afd9bf7032a559e395cc2368c373cc6156c68f852edd5ce834a216ccc95075d9825a76f66d2130e2ee3aefc9b2e633a561904bd8bd56a850
6
+ metadata.gz: ab3308b510e5aeea3b832ea6817de3503499c026a3ad36ad9d7fff3c83250cd751c4833eac8b96dd280e225272ed2f8121c71ccbd8f4fb567c8c12b2a0ece92b
7
+ data.tar.gz: ddf92c92b057d3c42f6b0d99e052690fda0b0e0889ad9d3e21a1a8e0e2628b5f4a49b2fd52359ec3faa41c5e2825c675b3b829becc5b4632dd37553079c07aea
@@ -2,10 +2,11 @@ require_dependency "sandbox_assets/test_asset"
2
2
 
3
3
  module SandboxAssets
4
4
  class BaseController < ActionController::Base
5
- before_filter :find_tests
6
- before_filter :find_stylesheets
7
- before_filter :extract_template_from_params
8
- before_filter :render_template
5
+ before_action :skip_sprockets_precompiled_check
6
+ before_action :find_tests
7
+ before_action :find_stylesheets
8
+ before_action :extract_template_from_params
9
+ before_action :render_template
9
10
 
10
11
  # additional before_filters can use this
11
12
  def template=(template)
@@ -18,6 +19,10 @@ module SandboxAssets
18
19
 
19
20
  protected
20
21
 
22
+ def skip_sprockets_precompiled_check
23
+ Thread.current[:skip_precompiled_check] = true
24
+ end
25
+
21
26
  def find_tests
22
27
  @tests = TestAsset.find_tests(params)
23
28
  end
@@ -9,5 +9,14 @@ module SandboxAssets
9
9
  config = app.config.sandbox_assets
10
10
  app.config.assets.paths.concat config.assets_paths
11
11
  end
12
+
13
+ config.after_initialize do
14
+ ActiveSupport.on_load(:action_view) do
15
+ default_checker = ActionView::Base.precompiled_asset_checker
16
+ ActionView::Base.precompiled_asset_checker = -> logical_path do
17
+ default_checker[logical_path] || Thread.current[:skip_precompiled_check]
18
+ end
19
+ end
20
+ end
12
21
  end
13
22
  end
@@ -1,3 +1,3 @@
1
1
  module SandboxAssets
2
- VERSION = "0.1.3"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -16,4 +16,5 @@ Gem::Specification.new do |gem|
16
16
  gem.version = SandboxAssets::VERSION
17
17
 
18
18
  gem.add_dependency 'railties', '>= 3.1'
19
+ gem.add_dependency 'sprockets-rails', '>= 3.0.0'
19
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-sandbox-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Rosenfeld Rosas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-21 00:00:00.000000000 Z
11
+ date: 2015-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: sprockets-rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 3.0.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 3.0.0
27
41
  description: Override your test runner and run rake sandbox_assets:serve
28
42
  email:
29
43
  - rr.rosas@gmail.com
@@ -68,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
82
  version: '0'
69
83
  requirements: []
70
84
  rubyforge_project:
71
- rubygems_version: 2.2.2
85
+ rubygems_version: 2.5.1
72
86
  signing_key:
73
87
  specification_version: 4
74
88
  summary: Allows assets to be served in a sandboxed application in a Rails project