url_status 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.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/url_status.rb +3 -24
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTY0MGY1YTQ5ZGE3YmQ5YThkNzQ4MTVjYmU3ZjRkOTdiNWRhNjAxMA==
4
+ MzJkMDhkOWY1N2IwNjQ1MDRmOWRmMGRkNTlmMzhlYzM1OGU3MjVlMQ==
5
5
  data.tar.gz: !binary |-
6
- NzY4YTg4YmFkOTdiNzcyNzUzMjdiMTI0NmMyN2IzYjFjNjk1NDdkOQ==
6
+ MjgxMDY4Zjc0ZTNjZTc4M2I5MTJhZjE5ODllY2YyYmM4MzZmOTUyMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OGRiMzU0NzIwOWQ4ZThkMjIxYTlhMzVkNjhjYzAyZDEzYzE5MDRhZWZlMTU4
10
- YjIzZTA1ODA4NWEwMTY3OGNjNmM2YzEzNTEzYmE4ODBiN2ZjNzdhNjg2OTZk
11
- MWIzMGEzMWViZGFhNjkxOTcwMGQwNDZlYjQ3NjZmYmQ0ZTk0MzM=
9
+ ZTdiZmU1ODAxNmM5NDVkZTJiODhjZGY1OWQ5MDIxOTQzZTQ4MDVjOTUwODIz
10
+ MjJhNTU5NWQ0Mzg1NTVhMDJkOTU4ZGY4ZTNkZWM4ODFjOGY5NmY2ZWRjYzg2
11
+ NWNlNjIzOGNkYjM2MzUwMDJiYTIwZTVhMTlkMWM1OTMyMjFlMDA=
12
12
  data.tar.gz: !binary |-
13
- YmJkZjM4ZWRkZWU5MjVjNmZiYWQ1ODc2YzdmNDcxNzgzNDA2YjA1NTAzOTdk
14
- MTE1ZDE0OGYxMjU1MmU5Yzg3MjQ1NWYyNDM4ZGY4NmVlYzU3YzgzMzkwYzE2
15
- OGE5N2E5N2I1Y2RhMTAzYTIyY2VmOTJmZjAzMjRmNTQ2ZGNmY2M=
13
+ NTRmNTVkOTI5YjcxYjQ4NDRmMjUyYzQ2OWMyMDhjN2UyYWFkNDJmNzgyZjMy
14
+ OTIzNjUwOTBkYTZmYTEwNzgzNTJhYWJiNTgyMWI1YzAxMjgwMTI2NTc4ZGQ1
15
+ ODAzMmQyNDVkZGUzZjJjOWUwYzhiM2JkNGUzOWI1M2M0ZTBiMTc=
data/lib/url_status.rb CHANGED
@@ -1,15 +1,13 @@
1
1
  class Url_status
2
2
 
3
- def self.status(url)
4
- require 'net/http'
5
- require 'uri'
3
+ def status(url)
4
+ require 'net/http'
5
+ require 'uri'
6
6
  if url=="" then
7
7
  @code="not url found"
8
8
  else
9
9
  begin
10
-
11
10
  res = Net::HTTP.get_response(URI(url))
12
-
13
11
  rescue
14
12
  @code="Incorrrect url"
15
13
  else
@@ -19,25 +17,6 @@ class Url_status
19
17
  end
20
18
  end
21
19
 
22
- def self.message(url)
23
- require 'net/http'
24
- require 'uri'
25
- # if url=="" then
26
- # @code="not url found"
27
- # else
28
- begin
29
-
30
- res = Net::HTTP.get_response(URI(url))
31
20
 
32
- rescue
33
- @message="Incorrrect url"
34
- else
35
- @message=res.message
36
- ensure
37
- end
38
-
39
-
40
- end
41
- # end
42
21
 
43
22
  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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - as
@@ -10,7 +10,7 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2014-04-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Confirm that the url is online....require 'net/http' and require 'uri
13
+ description: Confirms that the url is online
14
14
  email: antonio_sirera@yahoo.es
15
15
  executables: []
16
16
  extensions: []
@@ -40,5 +40,5 @@ rubyforge_project:
40
40
  rubygems_version: 2.2.2
41
41
  signing_key:
42
42
  specification_version: 4
43
- summary: Confirm that the url is online....!
43
+ summary: Confirms that the url is online....!
44
44
  test_files: []