url_status 0.0.1 → 0.0.2
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 +8 -8
- data/lib/url_status.rb +11 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTY0MGY1YTQ5ZGE3YmQ5YThkNzQ4MTVjYmU3ZjRkOTdiNWRhNjAxMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzY4YTg4YmFkOTdiNzcyNzUzMjdiMTI0NmMyN2IzYjFjNjk1NDdkOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGRiMzU0NzIwOWQ4ZThkMjIxYTlhMzVkNjhjYzAyZDEzYzE5MDRhZWZlMTU4
|
10
|
+
YjIzZTA1ODA4NWEwMTY3OGNjNmM2YzEzNTEzYmE4ODBiN2ZjNzdhNjg2OTZk
|
11
|
+
MWIzMGEzMWViZGFhNjkxOTcwMGQwNDZlYjQ3NjZmYmQ0ZTk0MzM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmJkZjM4ZWRkZWU5MjVjNmZiYWQ1ODc2YzdmNDcxNzgzNDA2YjA1NTAzOTdk
|
14
|
+
MTE1ZDE0OGYxMjU1MmU5Yzg3MjQ1NWYyNDM4ZGY4NmVlYzU3YzgzMzkwYzE2
|
15
|
+
OGE5N2E5N2I1Y2RhMTAzYTIyY2VmOTJmZjAzMjRmNTQ2ZGNmY2M=
|
data/lib/url_status.rb
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
class Url_status
|
2
2
|
|
3
3
|
def self.status(url)
|
4
|
+
require 'net/http'
|
5
|
+
require 'uri'
|
4
6
|
if url=="" then
|
5
7
|
@code="not url found"
|
6
8
|
else
|
7
9
|
begin
|
8
|
-
|
9
|
-
require 'uri'
|
10
|
+
|
10
11
|
res = Net::HTTP.get_response(URI(url))
|
11
12
|
|
12
13
|
rescue
|
@@ -17,13 +18,15 @@ class Url_status
|
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
21
|
+
|
20
22
|
def self.message(url)
|
21
|
-
|
22
|
-
@code="not url found"
|
23
|
-
else
|
24
|
-
begin
|
25
|
-
require 'net/http'
|
23
|
+
require 'net/http'
|
26
24
|
require 'uri'
|
25
|
+
# if url=="" then
|
26
|
+
# @code="not url found"
|
27
|
+
# else
|
28
|
+
begin
|
29
|
+
|
27
30
|
res = Net::HTTP.get_response(URI(url))
|
28
31
|
|
29
32
|
rescue
|
@@ -35,6 +38,6 @@ class Url_status
|
|
35
38
|
|
36
39
|
|
37
40
|
end
|
38
|
-
end
|
41
|
+
# end
|
39
42
|
|
40
43
|
end
|