bacon_ipsum 0.0.7 → 0.0.9

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: 2311a4fdfd743d40428a8b541877701199871145b743a1f530d12d9af685c54f
4
- data.tar.gz: 30dbfdfc178feab827c1580a529046d46cade7ecfa16fd7a117dd77db09822af
3
+ metadata.gz: 3349085129d74220623dcbe3366a9d59178219cb548f3cba5075e6651ca347dd
4
+ data.tar.gz: 7550666c8720db5a2e0d463e2e2d5e4bdf941fbe13562fa4279c889969a73c74
5
5
  SHA512:
6
- metadata.gz: 4bb8427490903afa7f92ca2e2ae175900a0d1668d52af579b70634830c4dc19b013150b847a84a1e338b067fc15dfe727dd1928956f80cc49844316c9d063fb2
7
- data.tar.gz: 8402f69ebef318ded5a869cec50f03bcbc65ec5ef68e322085ef3dfa0f17bd0ba7ac27c866e5bac3fac9cd99d54d222c0bea027180f07fd25c695f003a6006cd
6
+ metadata.gz: d732339bfa494c180b18fa3d0eb84ac27272b591ae5a12e4c0d592430a699ae9f5865f48bf5b9a48f1338892f26e8ca0b0cecb0787c810522acd5c2964724ff3
7
+ data.tar.gz: 8ead7e321cf03b5319cc346d18e2f98d20e9e1c088d89ba81178f4e46d9a1b6037065e6e2c9fae6ebbb859f09b22678f7a3e2acc65ba23f1de4528c91d64216a
@@ -3,6 +3,7 @@
3
3
  require 'typhoeus'
4
4
 
5
5
  module BaconIpsum
6
+ # http client for requests to bacon ipsum api
6
7
  class HttpClient
7
8
  BASE_ENDPOINT = 'https://baconipsum.com/api/'
8
9
  REQUEST_TIMEOUT = 30
@@ -3,6 +3,7 @@
3
3
  require 'json'
4
4
 
5
5
  module BaconIpsum
6
+ # parser of results received from HTTP client
6
7
  class Parser
7
8
  attr_accessor :response, :format
8
9
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BaconIpsum
4
- VERSION = '0.0.7'
4
+ VERSION = '0.0.9'
5
5
  end
data/lib/bacon_ipsum.rb CHANGED
@@ -3,12 +3,15 @@
3
3
  require_relative 'bacon_ipsum/http_client'
4
4
  require_relative 'bacon_ipsum/parser'
5
5
 
6
+ # main module with generation function
6
7
  module BaconIpsum
7
- def self.generate(paras: 5,
8
- sentences: nil,
9
- type: 'meat-and-filler',
10
- start_with_lorem: nil,
11
- format: 'json')
8
+ module_function
9
+
10
+ def generate(paras: 5,
11
+ sentences: nil,
12
+ type: 'meat-and-filler',
13
+ start_with_lorem: nil,
14
+ format: 'json')
12
15
 
13
16
  response = HttpClient.new(paras, sentences, type, start_with_lorem, format)
14
17
  Parser.new(response.get, format).parse
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.0.7
4
+ version: 0.0.9
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-08-13 00:00:00.000000000 Z
11
+ date: 2023-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  - !ruby/object:Gem::Version
57
57
  version: '0'
58
58
  requirements: []
59
- rubygems_version: 3.4.1
59
+ rubygems_version: 3.4.20
60
60
  signing_key:
61
61
  specification_version: 4
62
62
  summary: SDK for JSON API - Bacon Ipsum