partial_logging 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c12799ac6163e83c9a716bc617ce3d891aea3191
4
- data.tar.gz: 9b55c125b0e4278e1389b86334342d26fd3c316c
3
+ metadata.gz: 7cb848149dc0506a2482dd743b8f04b6a69782c3
4
+ data.tar.gz: 0d7c1e041f81393fb5f8508d3523e0dd118baea9
5
5
  SHA512:
6
- metadata.gz: 89744110f5e48e16928d8ab00b00ef42808aae5d9c8de93aa14f4ec7e87d4d51459bab2307872efaa5fb8ed7080de14522e906604701ecb95f7a75788266a9b1
7
- data.tar.gz: 38390a6b72a385d2c554e444d0cfb6f3d70ce9e90fc8773c00073527a1f3287d8edd983042f0c572946f86a0d3b36a2f056729b59dc447eb8add703bb93ce61b
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.
@@ -2,7 +2,7 @@ module PartialLogging
2
2
  class Version
3
3
  MAJOR = 0 unless defined? MAJOR
4
4
  MINOR = 1 unless defined? MINOR
5
- PATCH = 0 unless defined? PATCH
5
+ PATCH = 1 unless defined? PATCH
6
6
  PRE = nil unless defined? PRE
7
7
 
8
8
  class << self
@@ -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.0
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