rails-dev-tweaks 0.6.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a67a324a02566d48e0e83455cc99d90d70021ed0
4
+ data.tar.gz: 853f0ae798bf4f0b3e455a14cec35b9051988dcc
5
+ SHA512:
6
+ metadata.gz: 9cbbf7ca9028627fd517ff8cccdc6907a75429dc172fb5fb4bdb86f52e965c4ade878c59b8283698e2146c879b80bdc46034a24a32d6e9c81359c81f38e75453
7
+ data.tar.gz: fd4f61486585950dce576d8272e98af42a51a34f0a58980eea881874cce5481093bb61222d4c4b86f9cc6c2460a02a0f900bba9d018f76b037bc7aecf7f03e23
data/README.md CHANGED
@@ -1,35 +1,44 @@
1
- # rails-dev-tweaks
1
+ rails-dev-tweaks
2
+ ================
3
+
2
4
  A collection of tweaks to improve your Rails (3.1+) development experience.
3
5
 
4
6
  To install, simply add it to your gemfile:
5
7
 
6
- gem 'rails-dev-tweaks', '~> 0.6.0'
8
+ gem 'rails-dev-tweaks', '~> 1.1'
9
+
10
+ And review the following section to make sure that `rails-dev-tweaks` is
11
+ configured the way you expect:
7
12
 
8
- At the moment, the current tweaks center around speeding up requests by giving granular control over which requests
9
- cause the Rails reloader to kick in.
10
13
 
14
+ Intended Usage (and Caveats)
15
+ ----------------------------
11
16
 
12
- ## Intended Usage (and Caveats)
13
- This gem is intended to provide a default configuration that covers most rails apps. You should be aware of some of
14
- the more imposing defaults, in case they don't jive with your workflow. Important points of note:
17
+ This gem is intended to provide a default configuration that covers most rails
18
+ apps:
15
19
 
16
- * _All_ asset requests _will not_ reload your app's code. This is probably only a problem if you are using custom sass
17
- functions, or otherwise referencing your app from within assets.
20
+ * _All_ asset requests _will not_ reload your app's code. This is probably only
21
+ a problem if you are using custom sass functions, or otherwise referencing
22
+ your app from within assets.
18
23
 
19
- * _All_ XHR requests _will not_ reload your app's code until you make a regular content request! The assumption is
20
- that you generally do not debug XHR responses without reloading the base page first.
24
+ * XHR requests **will reload** your app's code. (This was not the case in prior
25
+ versions of `rails-dev-tweaks`)
21
26
 
22
- If any of these points don't work out for you, don't fret! You can override the defaults with some simple
23
- configuration tweaks to your environment. Read on:
27
+ If any of these points don't work out for you, don't fret! You can override the
28
+ defaults with some simple configuration tweaks to your environment. Read on:
24
29
 
25
30
 
26
- # Granular Autoload
27
- You can specify autoload rules for your app via a configuration block in your application or environment configuration.
28
- These rules are specified via exclusion (`skip`) and inclusion (`keep`). Rules defined later override those defined
29
- before.
31
+ Granular Autoload
32
+ =================
33
+
34
+ You can specify autoload rules for your app via a configuration block in your
35
+ application or environment configuration. These rules are specified via
36
+ exclusion (`skip`) and inclusion (`keep`). Rules defined later override those
37
+ defined before.
30
38
 
31
39
  config.dev_tweaks.autoload_rules do
32
- # You can used named matchers (see below). This particular matcher effectively clears any default matchers
40
+ # You can used named matchers (see below). This particular matcher
41
+ # effectively clears any default matchers
33
42
  keep :all
34
43
 
35
44
  # Exclude all requests that begin with /search
@@ -52,53 +61,74 @@ The default autoload rules should cover most development patterns:
52
61
  keep :forced
53
62
  end
54
63
 
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:
64
+ By default, every request that skips the autoload hooks will generate an
65
+ additional log line saying so in an effort to be transparent about what is going
66
+ on. If you prefer, you can disable that log message to keep things a bit more
67
+ tidy in your logs:
58
68
 
59
69
  config.dev_tweaks.log_autoload_notice = false
60
70
 
61
71
 
62
- ## Named Matchers
63
- Named matchers are classes defined under RailsDevTweaks::GranularAutoload::Matchers:: and simply define a call
64
- method that is given a ActionDispatch::Request and returns true/false on whether that request matches. Match names
65
- are converted into a module name via "#{name.to\_s.classify}Matcher". E.g. :assets will specify the
66
- RailsDevTweaks::GranularAutoload::Matchers::AssetMatcher.
72
+ Named Matchers
73
+ --------------
74
+
75
+ Named matchers are classes defined under
76
+ RailsDevTweaks::GranularAutoload::Matchers:: and simply define a call method
77
+ that is given a ActionDispatch::Request and returns true/false on whether that
78
+ request matches. Match names are converted into a module name via
79
+ "#{name.to\_s.classify}Matcher". E.g. :assets will specify
80
+ `RailsDevTweaks::GranularAutoload::Matchers::AssetMatcher`.
81
+
82
+ Any additional arguments given to a `skip` or `keep` call will be passed as
83
+ initializer arguments to the matcher.
67
84
 
68
- Any additional arguments given to a `skip` or `keep` call will be passed as initializer arguments to the matcher.
69
85
 
70
86
  ### :all
87
+
71
88
  Matches every request passed to it.
72
89
 
90
+
73
91
  ### :assets
74
- Rails 3.1 integrated [Sprockets](http://getsprockets.org/) as its asset packager. Unfortunately, since the asset
75
- packager is mounted using the traditional Rails dispatching infrastructure, it's hidden behind the Rails autoloader
76
- (unloader). This matcher will match any requests that are routed to Sprockets (specifically any mounted
77
- Sprockets::Base instance).
92
+
93
+ Rails 3.1 integrated [Sprockets](http://getsprockets.org/) as its asset
94
+ packager. Unfortunately, since the asset packager is mounted using the
95
+ traditional Rails dispatching infrastructure, it's hidden behind the Rails
96
+ autoloader (unloader). This matcher will match any requests that are routed to
97
+ Sprockets (specifically any mounted Sprockets::Base instance).
98
+
78
99
 
79
100
  ### :forced
80
- To aid in live-debugging when you need to, this matcher will match any request that has `force_autoload` set as a
81
- parameter (GET or POST), or that has the `Force-Autoload` header set to something.
82
101
 
83
- If you are live-debugging jQuery ajax requests, this helpful snippet will turn on forced autoloading for the remainder
84
- of the browser's session:
102
+ To aid in live-debugging when you need to, this matcher will match any request
103
+ that has `force_autoload` set as a parameter (GET or POST), or that has the
104
+ `Force-Autoload` header set to something.
105
+
106
+ If you are live-debugging jQuery ajax requests, this helpful snippet will turn
107
+ on forced autoloading for the remainder of the browser's session:
85
108
 
86
109
  $.ajaxSetup({"beforeSend": function(xhr) {xhr.setRequestHeader("Force-Autoload", "true")} })
87
110
 
111
+
88
112
  ### :path
113
+
89
114
  Matches the path of the request via a regular expression.
90
115
 
91
116
  keep :path, /thing/ # Match any request with "thing" in the path.
92
117
 
93
- Note that `keep '/stuff'` is just shorthand for `keep :path, /^\/stuff/`. Similarly, `keep /thing/` is shorthand for
94
- `keep :path, /thing/`
118
+ Note that `keep '/stuff'` is just shorthand for `keep :path, /^\/stuff/`.
119
+ Similarly, `keep /thing/` is shorthand for `keep :path, /thing/`
120
+
95
121
 
96
122
  ### :xhr
97
- Matches any XHR request (via request.xhr?). The assumption here is that you generally don't live-debug your XHR
98
- requests, and are instead refreshing the page that kicks them off before running against new response code.
99
123
 
124
+ Matches any XHR request (via request.xhr?). The assumption here is that you
125
+ generally don't live-debug your XHR requests, and are instead refreshing the
126
+ page that kicks them off before running against new response code.
127
+
128
+
129
+ License
130
+ =======
100
131
 
101
- # License
102
- rails-dev-tweaks is MIT licensed by Wavii, Inc. http://wavii.com
132
+ `rails-dev-tweaks` is MIT licensed by Wavii, Inc. http://wavii.com
103
133
 
104
134
  See the accompanying file, `MIT-LICENSE`, for the full text.
@@ -17,7 +17,6 @@ class RailsDevTweaks::Configuration
17
17
 
18
18
  skip '/favicon.ico'
19
19
  skip :assets
20
- skip :xhr
21
20
  keep :forced
22
21
  end
23
22
  end
@@ -1,3 +1,3 @@
1
1
  module RailsDevTweaks
2
- VERSION = '0.6.1'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,38 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-dev-tweaks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
5
- prerelease:
4
+ version: 1.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Wavii, Inc.
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-02-06 00:00:00.000000000 Z
11
+ date: 2014-01-21 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: railties
16
- requirement: &70168667703920 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ~>
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '3.1'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *70168667703920
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '3.1'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: actionpack
27
- requirement: &70168667703200 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ~>
31
+ - - '>='
31
32
  - !ruby/object:Gem::Version
32
33
  version: '3.1'
33
34
  type: :runtime
34
35
  prerelease: false
35
- version_requirements: *70168667703200
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '3.1'
36
41
  description: A collection of tweaks to improve your Rails (3.1+) development experience.
37
42
  email:
38
43
  - info@wavii.com
@@ -55,26 +60,25 @@ files:
55
60
  - README.md
56
61
  homepage: http://wavii.com/
57
62
  licenses: []
63
+ metadata: {}
58
64
  post_install_message:
59
65
  rdoc_options: []
60
66
  require_paths:
61
67
  - lib
62
68
  required_ruby_version: !ruby/object:Gem::Requirement
63
- none: false
64
69
  requirements:
65
- - - ! '>='
70
+ - - '>='
66
71
  - !ruby/object:Gem::Version
67
72
  version: '0'
68
73
  required_rubygems_version: !ruby/object:Gem::Requirement
69
- none: false
70
74
  requirements:
71
- - - ! '>='
75
+ - - '>='
72
76
  - !ruby/object:Gem::Version
73
77
  version: '0'
74
78
  requirements: []
75
79
  rubyforge_project: rails-dev-tweaks
76
- rubygems_version: 1.8.11
80
+ rubygems_version: 2.0.3
77
81
  signing_key:
78
- specification_version: 3
82
+ specification_version: 4
79
83
  summary: A collection of tweaks to improve your Rails (3.1+) development experience.
80
84
  test_files: []