view_inspect 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.markdown +2 -10
- data/lib/view_inspect.rb +3 -7
- data/lib/view_inspect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmNjNDhiZjFlMjJiMjlkMmNiMzBiNTU4MDNhZjE4NjcxYWJkNDhhMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2FmYTU1N2M1N2VkZmM1MDhmMzM2ZDE1MTM3ZmJlMmYwMjBjZWFkOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDY3ZGEyMjE4Zjk3ZmRkMTQxNTY1NWU1YjY3YzNjOGQ3MGM5OWYyMDZmMmNl
|
10
|
+
ZDFlNDVmMWQwNDY1MGJmMGU3MDM3NTdhNGI0N2RhMjJmM2UzY2Q3OTFhYWUz
|
11
|
+
NzJkNmE1MzI5MjYyMjBjMGFjNjExNmJkODI1MzY3OTgwYWUyZDY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWQzZGNkYWNjZDAwMmFmNTBjNmMwNzQ2MWQwOGRhNjcwYTljZTEyYjRjNjlh
|
14
|
+
NmU1NDlkYzY1M2ExNjkzMzcxNjJmNDkxNjAyYTQ0NWU3ZGQxNTA3NThlNTVj
|
15
|
+
ZGEzZDU5ODExMWQ2Njk4OTUwMTIzNGEwNjZmYTFkYzhjYmM2ZDk=
|
data/README.markdown
CHANGED
@@ -28,9 +28,9 @@ Installation
|
|
28
28
|
gem "view_inspect"
|
29
29
|
end
|
30
30
|
|
31
|
-
ViewInspect is
|
31
|
+
ViewInspect is enabled by default. To disable it, add this line on config/environments/development.rb
|
32
32
|
|
33
|
-
ViewInspect.
|
33
|
+
ViewInspect.disable = true
|
34
34
|
|
35
35
|
Server-Side Templates
|
36
36
|
----
|
@@ -63,14 +63,6 @@ Also, depending which library you're using, you may need to specify external lib
|
|
63
63
|
The reason why you may need to do this is because of the way we track the javascript file:line. We intercept the native DOM insertion methods such as appendChild, insertBefore, or replaceChild, look at the stacktrace, and then go through it to find the most recent caller which corresponds to our javascript code.
|
64
64
|
|
65
65
|
|
66
|
-
Disable ViewInspect
|
67
|
-
-----
|
68
|
-
|
69
|
-
If you want to temporarily disable ViewInspect (ie. you want to profile your code and don't want the extra overhead), you can simply set ViewInspect.enable to false in config/environments/development.rb
|
70
|
-
|
71
|
-
ViewInspect.enable = false
|
72
|
-
|
73
|
-
|
74
66
|
Warning
|
75
67
|
----
|
76
68
|
|
data/lib/view_inspect.rb
CHANGED
@@ -16,15 +16,11 @@ module ViewInspect
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.allow_view_source_location?
|
19
|
-
|
19
|
+
!@disable && ::Rails.env.development?
|
20
20
|
end
|
21
21
|
|
22
|
-
def self.
|
23
|
-
@
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.enabled?
|
27
|
-
@enable
|
22
|
+
def self.disable=(bool)
|
23
|
+
@disable = bool
|
28
24
|
end
|
29
25
|
|
30
26
|
def self.enable_javascript_tracking!(*library_exclude_list)
|
data/lib/view_inspect/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: view_inspect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reginald Tan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|