a_parser_client 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/a_parser_client.rb +7 -3
- data/lib/a_parser_client/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: 487f5511052850dd7cd2d7b12a95651feaced8b69b252668d2c7abae5dc9ef50
|
4
|
+
data.tar.gz: d8e84bd9df18a3d58c7760e6b6b31d5ce8b8d9f0e3e40040dcc8155cdde4a5f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6be47c0a62d050e309e0c4f3321fddf26e90d3b11c146593ebc9053f80cf4f742bc553d2a30ebdebddb7c26a86a24246559c0db71d8eff20bcce46d66e95d8c9
|
7
|
+
data.tar.gz: f82d899c71bd7222e5ea725f6aa842b931ba5584b6293fff0d83589a66f4762bcd5f088dcb2b5b9d93ad812d48202ff67c5fbd12466dc2352489289090e5ca3d
|
data/Gemfile.lock
CHANGED
data/lib/a_parser_client.rb
CHANGED
@@ -11,9 +11,13 @@ module AParserClient
|
|
11
11
|
attr :api_url, :api_password, :alive
|
12
12
|
|
13
13
|
def initialize(api_url, api_password)
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
if api_url =~ URI::regexp
|
15
|
+
@api_url = api_url
|
16
|
+
@api_password = api_password
|
17
|
+
@alive = self.alive?
|
18
|
+
else
|
19
|
+
raise "Bad API URL provided."
|
20
|
+
end
|
17
21
|
end
|
18
22
|
|
19
23
|
def ping_a_parser
|