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 +4 -4
- data/README.md +11 -9
- data/lib/checkurl.rb +1 -1
- data/lib/checkurl/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28938b69a5af01c5e125a60c9aa6b07ca57ec0dcb6cf77d57181f7768314bd66
|
4
|
+
data.tar.gz: 2e2f89a0237b729e4753912c105f437c9b4df0bd20f713cb76456483fd42f5c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff29833b0bab75c07b5eae303661a99b5e9aef3114353917db51a24fa55fff1ddd2af0b00da8a3691d317ad77180eeafc11af5db3a88dd200ba8cf6e30b79e36
|
7
|
+
data.tar.gz: 047e4ce38c544a57010c65499d0eb0a2b4785890196ca87a3cf428ec93837e3cd160f59c5582f93184df7dfddd004660bf79edce059015809638e8be72eccae2
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Checkurl
|
2
2
|
|
3
|
-
|
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
|
-
|
26
|
-
|
27
|
-
Checkurl.response_code("https://google.com
|
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
|
-
|
30
|
-
|
31
|
-
Checkurl.working?("https://
|
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
|
|
data/lib/checkurl.rb
CHANGED
data/lib/checkurl/version.rb
CHANGED