checkurl 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dad5303ad041907e89c4f7a1cac337d1a3deeb5fde76c435179bf26c889ee9b4
4
- data.tar.gz: ab2a650d08c3f92a716b218fc43889847a52981fc7b2350ac436a62ece812711
3
+ metadata.gz: 28938b69a5af01c5e125a60c9aa6b07ca57ec0dcb6cf77d57181f7768314bd66
4
+ data.tar.gz: 2e2f89a0237b729e4753912c105f437c9b4df0bd20f713cb76456483fd42f5c1
5
5
  SHA512:
6
- metadata.gz: 96ad330e053ee86ffde7e29998ad5dfab36cd120811e612796fef9f235a9769dc98ba0a99a0bd3c49af20c8eb766b2eacdcc3bd9e6d52ab6f51751dc2d950e35
7
- data.tar.gz: 18290666c0691abe6918dffd189e6a8001c1fad108066026248221c2fe9e1961b382462a8a25054c2b7b9809f76dcbee1a26c5d448e65fa708142c8de48f794e
6
+ metadata.gz: ff29833b0bab75c07b5eae303661a99b5e9aef3114353917db51a24fa55fff1ddd2af0b00da8a3691d317ad77180eeafc11af5db3a88dd200ba8cf6e30b79e36
7
+ data.tar.gz: 047e4ce38c544a57010c65499d0eb0a2b4785890196ca87a3cf428ec93837e3cd160f59c5582f93184df7dfddd004660bf79edce059015809638e8be72eccae2
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Checkurl
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/checkurl`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Checkurl is a gem for checking details related to any given url. For example get response code, check if url is working or not, etc.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,13 +20,17 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- # Check response code
26
- Checkurl.response_code("https://www.google.com") # {:code=>"200", :message=>"OK"}
27
- Checkurl.response_code("https://google.com/1234") # {:code=>"404", :message=>"Not Found"}
23
+ Check response code:
24
+ ```ruby
25
+ Checkurl.response_code("https://www.google.com") # {:code=>"200", :message=>"OK"}
26
+ Checkurl.response_code("https://google.com/1234") # {:code=>"404", :message=>"Not Found"}
27
+ ```
28
28
 
29
- # Check if URL is working or not
30
- Checkurl.working?("https://www.google.com") # true
31
- Checkurl.working?("https://qwerty.com") # false
29
+ Check if URL is working or not:
30
+ ```ruby
31
+ Checkurl.working?("https://www.google.com") # true
32
+ Checkurl.working?("https://qwerty.com") # false
33
+ ```
32
34
 
33
35
  ## Development
34
36
 
@@ -3,7 +3,7 @@ require "checkurl/version"
3
3
  module Checkurl
4
4
  class Error < StandardError; end
5
5
 
6
- class self
6
+ class << self
7
7
  def response_code url
8
8
  begin
9
9
  url = URI(url.strip)
@@ -1,3 +1,3 @@
1
1
  module Checkurl
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkurl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tushar