partial_logging 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -0
- data/lib/partial_logging/version.rb +1 -1
- data/partial_logging.gemspec +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cb848149dc0506a2482dd743b8f04b6a69782c3
|
4
|
+
data.tar.gz: 0d7c1e041f81393fb5f8508d3523e0dd118baea9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3338117bd4937e049050c264acba350a6c6b2a453b51d31fd1e07ac716c8845a905a3e55621505cd520090d48a48f6af74f50114bbd6bfce499dd929cfba49ca
|
7
|
+
data.tar.gz: 408a88fccb67fa122519551a7da8d3f8defc04fafa811f60805f3bd6b061df974f0366ca2b355914a434b4c6dd9246329077dbaadf1e987a5365011c1c182756
|
data/README.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# Partial Logging
|
2
|
+
|
3
|
+
For figuring out where the heck this HTML is coming from.
|
4
|
+
|
5
|
+
## Configuration
|
6
|
+
|
7
|
+
There is only one configuration option at the moment, and that is `log_partials`.
|
8
|
+
This takes a block that should return true or false, which will be executed to determine whether or not to log partials.
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
# config/initializers/partial_logging.rb
|
12
|
+
require 'partial_logging'
|
13
|
+
|
14
|
+
PartialLogging.config do |config|
|
15
|
+
config.log_partials do
|
16
|
+
Rails.env.development?
|
17
|
+
end
|
18
|
+
end
|
19
|
+
```
|
20
|
+
|
21
|
+
When the result is true, your HTML will have comments showing which partials were rendered.
|
22
|
+
See [this helpful post](http://lynn.io/2014/01/11/commenting-partials/) (made before the source code was gemified) to check out what this looks like.
|
data/partial_logging.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.date = '2014-01-12'
|
10
10
|
spec.description = 'HTML comments for Rails partial rendering.'
|
11
11
|
spec.email = 'tyre77@gmail.com'
|
12
|
-
spec.files = %w(LICENSE.md partial_logging.gemspec)
|
12
|
+
spec.files = %w(README.md LICENSE.md partial_logging.gemspec)
|
13
13
|
spec.files += Dir.glob('lib/**/*.rb')
|
14
14
|
spec.files += Dir.glob('spec/**/*')
|
15
15
|
spec.homepage = 'http://rubygems.org/gems/partial_logging'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: partial_logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Maddox
|
@@ -37,6 +37,7 @@ extensions: []
|
|
37
37
|
extra_rdoc_files: []
|
38
38
|
files:
|
39
39
|
- LICENSE.md
|
40
|
+
- README.md
|
40
41
|
- lib/partial_logging.rb
|
41
42
|
- lib/partial_logging/action_view.rb
|
42
43
|
- lib/partial_logging/configuration.rb
|