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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 795b81d4f6d3ea0e71c8b64f72ec017c1945aa6c25b8ce72448a7ad96d20e10e
4
- data.tar.gz: 4fa2df5c11b3600bc7d407b9a44a550bf6b90dbcef44a790f484045022936d1c
3
+ metadata.gz: 487f5511052850dd7cd2d7b12a95651feaced8b69b252668d2c7abae5dc9ef50
4
+ data.tar.gz: d8e84bd9df18a3d58c7760e6b6b31d5ce8b8d9f0e3e40040dcc8155cdde4a5f0
5
5
  SHA512:
6
- metadata.gz: a15d99d21f04edec68444041d513b38447e360a6415682ba1c661133c21bbe6bf109253df0b83ae1484110f9b2a884ca983fc934bbcec70a4ab68c64273e171d
7
- data.tar.gz: e8fe26165e168f2b10ca8ade13b09650c5b7506f0e5d1067ab3254bf0d5f4253baca5fb59fbf88757adfefe4298ab0141759aa63173149cbd5aa793bfc5f98e2
6
+ metadata.gz: 6be47c0a62d050e309e0c4f3321fddf26e90d3b11c146593ebc9053f80cf4f742bc553d2a30ebdebddb7c26a86a24246559c0db71d8eff20bcce46d66e95d8c9
7
+ data.tar.gz: f82d899c71bd7222e5ea725f6aa842b931ba5584b6293fff0d83589a66f4762bcd5f088dcb2b5b9d93ad812d48202ff67c5fbd12466dc2352489289090e5ca3d
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- a_parser_client (0.1.0)
4
+ a_parser_client (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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
- @api_url = api_url
15
- @api_password = api_password
16
- @alive = self.alive? #fails whenever url is bad
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
@@ -1,3 +1,3 @@
1
1
  module AParserClient
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: a_parser_client
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
  - Yaroslav Shevchenko