rails-dev-tweaks 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -3,7 +3,7 @@ A collection of tweaks to improve your Rails (3.1+) development experience.
3
3
 
4
4
  To install, simply add it to your gemfile:
5
5
 
6
- gem 'rails-dev-tweaks', '~> 0.4.0'
6
+ gem 'rails-dev-tweaks', '~> 0.5.1'
7
7
 
8
8
  At the moment, the current tweaks center around speeding up requests by giving granular control over which requests
9
9
  cause the Rails reloader to kick in.
@@ -52,6 +52,13 @@ The default autoload rules should cover most development patterns:
52
52
  keep :forced
53
53
  end
54
54
 
55
+ By default, every request that skips the autoload hooks will generate an additional log line saying
56
+ so in an effort to be transparent about what is going on. If you prefer, you can disable that log
57
+ message to keep things a bit more tidy in your logs:
58
+
59
+ config.dev_tweaks.log_autoload_notice = false
60
+
61
+
55
62
  ## Named Matchers
56
63
  Named matchers are classes defined under RailsDevTweaks::GranularAutoload::Matchers:: and simply define a call
57
64
  method that is given a ActionDispatch::Request and returns true/false on whether that request matches. Match names
@@ -67,7 +74,7 @@ Matches every request passed to it.
67
74
  Rails 3.1 integrated [Sprockets](http://getsprockets.org/) as its asset packager. Unfortunately, since the asset
68
75
  packager is mounted using the traditional Rails dispatching infrastructure, it's hidden behind the Rails autoloader
69
76
  (unloader). This matcher will match any requests that are routed to Sprockets (specifically any mounted
70
- Sprockets::Environment instance).
77
+ Sprockets::Base instance).
71
78
 
72
79
  ### :forced
73
80
  To aid in live-debugging when you need to, this matcher will match any request that has `force_autoload` set as a
@@ -1,8 +1,14 @@
1
1
  class RailsDevTweaks::Configuration
2
2
 
3
+ # By default, we log a notice on each request that has its to_prepare hooks skipped, you can
4
+ # disable that if you choose!
5
+ attr_accessor :log_autoload_notice
6
+
3
7
  attr_reader :granular_autoload_config
4
8
 
5
9
  def initialize
10
+ @log_autoload_notice = true
11
+
6
12
  @granular_autoload_config = GranularAutoloadConfiguration.new
7
13
 
8
14
  # And set our defaults
@@ -27,7 +27,7 @@ class RailsDevTweaks::GranularAutoload::Middleware
27
27
  end
28
28
  self.class.processed_a_request = true
29
29
 
30
- else
30
+ elsif Rails.application.config.dev_tweaks.log_autoload_notice
31
31
  Rails.logger.info 'RailsDevTweaks: Skipping ActionDispatch::Reloader hooks for this request.'
32
32
  end
33
33
 
@@ -1,3 +1,3 @@
1
1
  module RailsDevTweaks
2
- VERSION = '0.5.0'
2
+ VERSION = '0.5.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-dev-tweaks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-16 00:00:00.000000000Z
12
+ date: 2011-10-03 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70224616793660 !ruby/object:Gem::Requirement
16
+ requirement: &70140067515800 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70224616793660
24
+ version_requirements: *70140067515800
25
25
  description: A collection of tweaks to improve your Rails (3.1+) development experience.
26
26
  email:
27
27
  - info@wavii.com