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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- M2U3Y2M4ZDMyMDE3YmM4NjMwNjI0YjEwYzU1NGFiMjk2NGIxZTQ2OA==
4
+ ZmNjNDhiZjFlMjJiMjlkMmNiMzBiNTU4MDNhZjE4NjcxYWJkNDhhMg==
5
5
  data.tar.gz: !binary |-
6
- M2FiNDI4OTZhMWJmNTE1ODk1YTcyYjQxZDY1MDIxN2Y2NjA1ZjcxZg==
6
+ Y2FmYTU1N2M1N2VkZmM1MDhmMzM2ZDE1MTM3ZmJlMmYwMjBjZWFkOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YWM2ZWM2NTZiZDdkZTJhNTMyYjQ4YTI2MmY5NDAxNDNkMmQzMTkwN2JmZTQw
10
- N2YwMWY2MjJkMzc3YmUyNDU5MDk2M2ViYzY0YTg0ZjdmMTAyZTExNDNlZDg1
11
- OGMyYTUyZjU4MzBkNTczNjYwNmM0OWQyZjNiNzM3NjFkOWU3OWU=
9
+ ZDY3ZGEyMjE4Zjk3ZmRkMTQxNTY1NWU1YjY3YzNjOGQ3MGM5OWYyMDZmMmNl
10
+ ZDFlNDVmMWQwNDY1MGJmMGU3MDM3NTdhNGI0N2RhMjJmM2UzY2Q3OTFhYWUz
11
+ NzJkNmE1MzI5MjYyMjBjMGFjNjExNmJkODI1MzY3OTgwYWUyZDY=
12
12
  data.tar.gz: !binary |-
13
- MWY4MTBiNjNiMDBhMTZlOWFlNDNlYzUwNjY0OTJhYWE2ZGQwMTI2ZmZmODQ2
14
- Mjg0ODYxZmMxZTkzNTgxNDg1MGNmY2NhYTYzNzE4OTY1OWQ1MTU1ODBlOTZk
15
- N2UwMDI4NGIxNzI1YWY2MzExZDViOGRmMTYyZGQ0MjRjZWMwZGY=
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 disabled by default. To enable it, add this line on config/environments/development.rb
31
+ ViewInspect is enabled by default. To disable it, add this line on config/environments/development.rb
32
32
 
33
- ViewInspect.enable = true
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
- enabled? && ::Rails.env.development?
19
+ !@disable && ::Rails.env.development?
20
20
  end
21
21
 
22
- def self.enable=(bool)
23
- @enable = bool
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)
@@ -1,3 +1,3 @@
1
1
  module ViewInspect
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
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.0
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-05 00:00:00.000000000 Z
11
+ date: 2014-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri