view_source_map 0.0.2 → 0.0.3
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.
- data/README.md +8 -0
- data/lib/view_source_map.rb +3 -1
- data/lib/view_source_map/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -19,3 +19,11 @@ $ rails s
|
|
19
19
|
then see the source of your page:
|
20
20
|
|
21
21
|

|
22
|
+
|
23
|
+
## Tips
|
24
|
+
Sometimes this adds too much noise to the html when you're developing.
|
25
|
+
There is a simple way to turn it off.
|
26
|
+
|
27
|
+
```
|
28
|
+
$ DISABLE_VIEW_SOURCE_MAP=1 rails s
|
29
|
+
```
|
data/lib/view_source_map.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
module ViewSourceMap
|
2
2
|
class Railtie < Rails::Railtie
|
3
3
|
initializer "render_with_path_comment.initialize" do
|
4
|
-
|
4
|
+
if !ENV["DISABLE_VIEW_SOURCE_MAP"] && Rails.env.development?
|
5
|
+
ViewSourceMap.attach
|
6
|
+
end
|
5
7
|
end
|
6
8
|
end
|
7
9
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: view_source_map
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryo Nakamura
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-12-
|
18
|
+
date: 2012-12-05 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rails
|