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.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/url_status.rb +11 -8
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGU2Nzc4NzRhNjIzMWE0MmFkM2U3M2NjYzVkM2EwMmE4ZjU1NDljMQ==
4
+ MTY0MGY1YTQ5ZGE3YmQ5YThkNzQ4MTVjYmU3ZjRkOTdiNWRhNjAxMA==
5
5
  data.tar.gz: !binary |-
6
- OTlhNTBkZTBhY2E3YWUzZjIyZmRkMjNlMzFkZjc3N2VkOWEzZDJiMg==
6
+ NzY4YTg4YmFkOTdiNzcyNzUzMjdiMTI0NmMyN2IzYjFjNjk1NDdkOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzBhODVlZDVmOWExMDBmNWVkN2JiMjQ5YTljZGZhNWUyYTllZmY3YjcwZDU1
10
- ZmIxZTM5ZGU2M2ZhYjZlZTIyYmUyOGIyYmJiMTNhODc1NGRkY2M3NDI0MTcy
11
- YWZkNzg4MzcyMjIyYzJiYzRhOGU3ZGQ1ZjVmODVkNjIyYTk2OGM=
9
+ OGRiMzU0NzIwOWQ4ZThkMjIxYTlhMzVkNjhjYzAyZDEzYzE5MDRhZWZlMTU4
10
+ YjIzZTA1ODA4NWEwMTY3OGNjNmM2YzEzNTEzYmE4ODBiN2ZjNzdhNjg2OTZk
11
+ MWIzMGEzMWViZGFhNjkxOTcwMGQwNDZlYjQ3NjZmYmQ0ZTk0MzM=
12
12
  data.tar.gz: !binary |-
13
- ZThkNzJhYTY2YWM2Nzk5YzI5NWEzMDA5NGYyNzNjNDYwMDY3M2M1NzZlM2M2
14
- ODMzYmFlZjUzMTcyNTg1OGM2NTQwNjY1YzU4NmYyMDlhOTlhZDI4ZTgxZDZm
15
- MDkwMjFlNjQ4Nzg2ZGMxZmY3MjZjYmM5NjY2NTQ3YjNiZjY2ZGU=
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
- require 'net/http'
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
- if url=="" then
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: url_status
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - as