debug_html 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/debug_html.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4237864ef0384089e06bb77b5404a1b4c93ac753
|
4
|
+
data.tar.gz: 5b48ea3c72798dec6454243bef49cb9cd68614a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78305200d73800b9094c12748c8a1fe6dfbd6734b4dc9c43411c0ae99d01b06c6fcf6effb40fe7ced35676ffd38258815bacb31503895a0262f57a329808a82a
|
7
|
+
data.tar.gz: 30a3a1aa0420bab597b3e261ea469e7ddbd541b6fd93a4903f3a658d511b627ef546efee857f2ff7ab7c145657db76d222a7517878d0231f7a7ac4cfb3b05ce4
|
data/lib/debug_html.rb
CHANGED
@@ -11,7 +11,7 @@ module DebugHTML
|
|
11
11
|
Launchy.open(path)
|
12
12
|
end
|
13
13
|
|
14
|
-
|
14
|
+
def self.save_html(html)
|
15
15
|
file = File.new(full_path, 'w')
|
16
16
|
file.write(html)
|
17
17
|
file.close
|
@@ -19,13 +19,17 @@ module DebugHTML
|
|
19
19
|
file.path
|
20
20
|
end
|
21
21
|
|
22
|
-
|
22
|
+
def self.full_path
|
23
23
|
tmpdir = Dir.tmpdir
|
24
24
|
"#{tmpdir}/#{filename}"
|
25
25
|
end
|
26
26
|
|
27
|
-
|
27
|
+
def self.filename
|
28
28
|
timestamp = Time.new.strftime('%Y%m%d%H%M%S')
|
29
29
|
"debug_html-#{timestamp}#{rand(10**10)}.html"
|
30
30
|
end
|
31
|
+
|
32
|
+
private_class_method :save_html
|
33
|
+
private_class_method :full_path
|
34
|
+
private_class_method :filename
|
31
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: debug_html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Melvin Lammerts
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '3.5'
|
47
|
-
description: Drop-in HTML page save and open like
|
47
|
+
description: Drop-in HTML page save and open like capybara's save_and_open_page.
|
48
48
|
email: hi@melvin.sh
|
49
49
|
executables: []
|
50
50
|
extensions: []
|