bacon_ipsum 0.1.4 → 1.0.2

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: 71515aabf8afed291d34548ae8263b7ca6d9265c1a1cdb7e59bd865cf35e5f06
4
- data.tar.gz: 878e20a3fcfac0f14982daf6830aad973f06f88d86bf9f902fb2f5df74e2fa0f
3
+ metadata.gz: 505f9c888927e3a405f881f7996654bbe021aca64f5d0d362d47b950d8621c85
4
+ data.tar.gz: 202c3b0933f63d8604666786b053989515d64dec9b45a8feec0fe7e37a0500be
5
5
  SHA512:
6
- metadata.gz: 3db5c0ae2a96b95b4c0b1d327a84cf23a6952c1dc83cf94c7170b31802f59b947fcce4c5d4aae744c45fdfd198f51e6113bccf90316108151c141cd329619dd3
7
- data.tar.gz: fdd2fa9f30cfb180e1b4b122591de85d2480925daf0fdcd46002d967b8cdc02c137dc4b5909574d3db3814cef0d4993b0a75e701747e94b56a3cfd357fa31b26
6
+ metadata.gz: aca04446cb444744251aea6f50794f00dfd48d963698d58cee13ceedd1796deee93e79bfa13df515db87b950406ab224a7da15addbffd04c99a759168461ff38
7
+ data.tar.gz: dae4d71e44adb04f071041f3d4c1b1ce8c9abf901025fd0c7ca0090c1ba61462431aeb9adc273a6d34f93dece8cedf52592b5271d74d029bfb84ede902eb37c6
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class BaconError < StandardError
4
+ end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'typhoeus'
4
+ require_relative 'bacon_error'
4
5
 
5
6
  module BaconIpsum
6
7
  # http client for requests to bacon ipsum api
@@ -24,7 +25,7 @@ module BaconIpsum
24
25
  params: params,
25
26
  timeout: REQUEST_TIMEOUT
26
27
  )
27
- raise 'BaconFail' unless response.success?
28
+ raise BaconError, 'response not success' unless response.success?
28
29
 
29
30
  response.body
30
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BaconIpsum
4
- VERSION = '0.1.4'
4
+ VERSION = '1.0.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bacon_ipsum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Leonov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-01 00:00:00.000000000 Z
11
+ date: 2024-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -31,6 +31,7 @@ extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
33
  - lib/bacon_ipsum.rb
34
+ - lib/bacon_ipsum/bacon_error.rb
34
35
  - lib/bacon_ipsum/http_client.rb
35
36
  - lib/bacon_ipsum/parser.rb
36
37
  - lib/bacon_ipsum/version.rb
@@ -56,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
57
  - !ruby/object:Gem::Version
57
58
  version: '0'
58
59
  requirements: []
59
- rubygems_version: 3.4.20
60
+ rubygems_version: 3.5.16
60
61
  signing_key:
61
62
  specification_version: 4
62
63
  summary: SDK for JSON API - Bacon Ipsum