product-aggregator-rb 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +7 -0
- data/.rubocop.yml +57 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +96 -0
- data/README.md +60 -0
- data/Rakefile +11 -0
- data/lib/product-aggregator-rb.rb +27 -0
- data/lib/product-aggregator/configuration.rb +15 -0
- data/lib/product-aggregator/connection.rb +63 -0
- data/lib/product-aggregator/logger_abstract.rb +18 -0
- data/lib/product-aggregator/version.rb +5 -0
- data/product-aggregator-rb.gemspec +37 -0
- data/spec/initializer.rb +9 -0
- data/spec/product_aggregator/connection_spec.rb +47 -0
- data/spec/spec_helper.rb +20 -0
- metadata +244 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 74ecfc44e9bf066f2e362dc2131836256121120e
|
4
|
+
data.tar.gz: efab64ef15b9651d6c66a403a7d82a6f39b9f1cb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7f310e31437f4cc95f3d36cdc42217a1a3f15752d1a2d9cb907cb3381933d9aac6682a89e79aaf87d6ec946d240657757538343e3c1987a4fa83a75a449fc9e0
|
7
|
+
data.tar.gz: d39a7d07c3ab903a8d464bff03b8ee164456171b085c77e0980fec989995127ebc3b9730ae8ce3832a6985874764d4ec6f7879f293c807643dea1070de220495
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.3
|
3
|
+
Exclude:
|
4
|
+
- Rakefile
|
5
|
+
- Gemfile
|
6
|
+
- bin/*
|
7
|
+
- '*.gemspec'
|
8
|
+
- spec/**/*.rb
|
9
|
+
- vendor/**/*
|
10
|
+
|
11
|
+
Lint/HandleExceptions:
|
12
|
+
Enabled: true
|
13
|
+
|
14
|
+
Lint/UnusedMethodArgument:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Metrics/LineLength:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
Metrics/MethodLength:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
Metrics/ClassLength:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
Metrics/BlockLength:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
Metrics/AbcSize:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
Metrics/CyclomaticComplexity:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
Metrics/PerceivedComplexity:
|
36
|
+
Enabled: false
|
37
|
+
|
38
|
+
Layout/EmptyLinesAroundModuleBody:
|
39
|
+
Enabled: false
|
40
|
+
|
41
|
+
Layout/EmptyLinesAroundClassBody:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Layout/EmptyLinesAroundBlockBody:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
Layout/SpaceBeforeBlockBraces:
|
48
|
+
EnforcedStyle: no_space
|
49
|
+
|
50
|
+
Style/AsciiComments:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
Style/Semicolon:
|
54
|
+
AllowAsExpressionSeparator: true
|
55
|
+
|
56
|
+
Naming/FileName:
|
57
|
+
Enabled: false
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
product-aggregator-rb (0.0.2)
|
5
|
+
faraday
|
6
|
+
faraday_middleware-circuit_breaker
|
7
|
+
json
|
8
|
+
net-http-persistent
|
9
|
+
|
10
|
+
GEM
|
11
|
+
remote: https://rubygems.org/
|
12
|
+
specs:
|
13
|
+
addressable (2.6.0)
|
14
|
+
public_suffix (>= 2.0.2, < 4.0)
|
15
|
+
ast (2.4.0)
|
16
|
+
codecov (0.1.14)
|
17
|
+
json
|
18
|
+
simplecov
|
19
|
+
url
|
20
|
+
connection_pool (2.2.2)
|
21
|
+
crack (0.4.3)
|
22
|
+
safe_yaml (~> 1.0.0)
|
23
|
+
diff-lcs (1.3)
|
24
|
+
docile (1.3.2)
|
25
|
+
dotenv (2.7.4)
|
26
|
+
faraday (0.15.4)
|
27
|
+
multipart-post (>= 1.2, < 3)
|
28
|
+
faraday_middleware-circuit_breaker (0.3.0)
|
29
|
+
faraday (~> 0.9)
|
30
|
+
stoplight (~> 2.1)
|
31
|
+
hashdiff (1.0.0)
|
32
|
+
jaro_winkler (1.5.3)
|
33
|
+
json (2.2.0)
|
34
|
+
multipart-post (2.1.1)
|
35
|
+
net-http-persistent (3.1.0)
|
36
|
+
connection_pool (~> 2.2)
|
37
|
+
parallel (1.17.0)
|
38
|
+
parser (2.6.3.0)
|
39
|
+
ast (~> 2.4.0)
|
40
|
+
public_suffix (3.1.1)
|
41
|
+
rainbow (3.0.0)
|
42
|
+
rake (10.5.0)
|
43
|
+
rspec (3.8.0)
|
44
|
+
rspec-core (~> 3.8.0)
|
45
|
+
rspec-expectations (~> 3.8.0)
|
46
|
+
rspec-mocks (~> 3.8.0)
|
47
|
+
rspec-core (3.8.2)
|
48
|
+
rspec-support (~> 3.8.0)
|
49
|
+
rspec-expectations (3.8.4)
|
50
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
51
|
+
rspec-support (~> 3.8.0)
|
52
|
+
rspec-mocks (3.8.1)
|
53
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
54
|
+
rspec-support (~> 3.8.0)
|
55
|
+
rspec-support (3.8.2)
|
56
|
+
rspec_junit_formatter (0.4.1)
|
57
|
+
rspec-core (>= 2, < 4, != 2.12.0)
|
58
|
+
rubocop (0.73.0)
|
59
|
+
jaro_winkler (~> 1.5.1)
|
60
|
+
parallel (~> 1.10)
|
61
|
+
parser (>= 2.6)
|
62
|
+
rainbow (>= 2.2.2, < 4.0)
|
63
|
+
ruby-progressbar (~> 1.7)
|
64
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
65
|
+
ruby-progressbar (1.10.1)
|
66
|
+
safe_yaml (1.0.5)
|
67
|
+
simplecov (0.17.0)
|
68
|
+
docile (~> 1.1)
|
69
|
+
json (>= 1.8, < 3)
|
70
|
+
simplecov-html (~> 0.10.0)
|
71
|
+
simplecov-html (0.10.2)
|
72
|
+
stoplight (2.1.3)
|
73
|
+
unicode-display_width (1.6.0)
|
74
|
+
url (0.3.2)
|
75
|
+
webmock (3.6.0)
|
76
|
+
addressable (>= 2.3.6)
|
77
|
+
crack (>= 0.3.2)
|
78
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
79
|
+
|
80
|
+
PLATFORMS
|
81
|
+
ruby
|
82
|
+
|
83
|
+
DEPENDENCIES
|
84
|
+
bundler (~> 2.0.2)
|
85
|
+
codecov
|
86
|
+
dotenv (>= 2.4.0)
|
87
|
+
product-aggregator-rb!
|
88
|
+
rake (~> 10.0)
|
89
|
+
rspec (~> 3.0)
|
90
|
+
rspec_junit_formatter
|
91
|
+
rubocop
|
92
|
+
simplecov (>= 0.16.1)
|
93
|
+
webmock
|
94
|
+
|
95
|
+
BUNDLED WITH
|
96
|
+
2.0.2
|
data/README.md
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
# Product Aggregator Ruby CLient
|
2
|
+
|
3
|
+
## Description
|
4
|
+
|
5
|
+
A ruby gem to access Bukalapak's product detail
|
6
|
+
|
7
|
+
## Owner
|
8
|
+
|
9
|
+
[CORE](https://bukalapak.atlassian.net/wiki/spaces/SS/overview)
|
10
|
+
|
11
|
+
## Contact and On-Call Information
|
12
|
+
|
13
|
+
[CORE](https://bukalapak.atlassian.net/wiki/spaces/SS/overview)
|
14
|
+
|
15
|
+
|
16
|
+
### Prerequisite
|
17
|
+
|
18
|
+
- Ruby 2.3.0 or later
|
19
|
+
|
20
|
+
### Development
|
21
|
+
|
22
|
+
- Install gem
|
23
|
+
|
24
|
+
```sh
|
25
|
+
gem install product-aggregator-rb
|
26
|
+
```
|
27
|
+
|
28
|
+
or Using Gemfile
|
29
|
+
```sh
|
30
|
+
gem 'product-aggregator-rb'
|
31
|
+
```
|
32
|
+
|
33
|
+
- Initate new configuration
|
34
|
+
|
35
|
+
```sh
|
36
|
+
require 'product-aggregator-rb'
|
37
|
+
|
38
|
+
ProductAggregator.configure do |t|
|
39
|
+
t.host = 'http://localhost:1234'
|
40
|
+
t.user = 'user'
|
41
|
+
t.password = 'password'
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
- Call the function
|
46
|
+
|
47
|
+
Get product by id and database origin ('readonly' or 'master'):
|
48
|
+
|
49
|
+
```sh
|
50
|
+
ProductAggregator::Connection.get_product(123, 'readonly')
|
51
|
+
```
|
52
|
+
|
53
|
+
## On-Call Runbooks
|
54
|
+
|
55
|
+
refer to [Core Team Wiki](https://bukalapak.atlassian.net/wiki/spaces/SS/overview)
|
56
|
+
or contact core@bukalapak.com
|
57
|
+
|
58
|
+
## FAQ
|
59
|
+
|
60
|
+
-
|
data/Rakefile
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'product-aggregator/version'
|
4
|
+
require 'product-aggregator/configuration'
|
5
|
+
require 'product-aggregator/connection'
|
6
|
+
|
7
|
+
# ProductAggregator is a ruby gem client for product aggregator
|
8
|
+
module ProductAggregator
|
9
|
+
class << self
|
10
|
+
attr_accessor :configuration
|
11
|
+
end
|
12
|
+
|
13
|
+
module_function
|
14
|
+
|
15
|
+
def configuration
|
16
|
+
@configuration ||= ProductAggregator::Configuration.new
|
17
|
+
end
|
18
|
+
|
19
|
+
def configure
|
20
|
+
yield(configuration) if block_given?
|
21
|
+
|
22
|
+
configuration.max_retry ||= 5
|
23
|
+
configuration.expiration_time ||= 300
|
24
|
+
configuration.circuit_breaker_timeout ||= 300
|
25
|
+
configuration.circuit_breaker_threshold ||= 10
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ProductAggregator
|
4
|
+
# ProductAggregator::Configuration yields the configuration of product-aggregator-rb.
|
5
|
+
class Configuration
|
6
|
+
attr_accessor :max_retry
|
7
|
+
attr_accessor :expiration_time
|
8
|
+
attr_accessor :logger
|
9
|
+
attr_accessor :host
|
10
|
+
attr_accessor :user
|
11
|
+
attr_accessor :password
|
12
|
+
attr_accessor :circuit_breaker_timeout
|
13
|
+
attr_accessor :circuit_breaker_threshold
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'faraday'
|
4
|
+
require 'faraday_middleware/circuit_breaker'
|
5
|
+
require 'json'
|
6
|
+
require 'net/http/persistent'
|
7
|
+
|
8
|
+
module ProductAggregator
|
9
|
+
# ProductAggregator::Connection provides an instance to connect to product aggregator service.
|
10
|
+
class Connection
|
11
|
+
class << self
|
12
|
+
RETRIABLE_METHODS = %i[get post].freeze
|
13
|
+
RETRIABLE_EXCEPTIONS = [Faraday::ConnectionFailed, Faraday::TimeoutError, ::Net::ReadTimeout, 'Timeout::Error'].freeze
|
14
|
+
GET_PRODUCT = '/_internal/products/'
|
15
|
+
|
16
|
+
def get_product(product_id, origin = 'readonly')
|
17
|
+
endpoint = "#{GET_PRODUCT}#{product_id}?origin=#{origin}"
|
18
|
+
|
19
|
+
begin
|
20
|
+
response = connection.get endpoint do |req|
|
21
|
+
req.options.timeout = 0.2
|
22
|
+
req.options.open_timeout = 1
|
23
|
+
end
|
24
|
+
|
25
|
+
result = ::JSON.parse(response.body)
|
26
|
+
return result['data'] if response.status == 200
|
27
|
+
|
28
|
+
msg = result['errors'][0]['message'] if result['errors'] && result['errors'][0]
|
29
|
+
e = case response.status
|
30
|
+
when 401
|
31
|
+
ProductAggregator::UnauthorizedError.new(msg)
|
32
|
+
when 404
|
33
|
+
ProductAggregator::NotFoundError.new(msg)
|
34
|
+
when 500
|
35
|
+
ProductAggregator::InternalServerError.new(msg)
|
36
|
+
else
|
37
|
+
ProductAggregator::Error.new(msg)
|
38
|
+
end
|
39
|
+
raise e
|
40
|
+
rescue Faraday::ConnectionFailed, Faraday::TimeoutError, Faraday::Error => e
|
41
|
+
ProductAggregator.configuration.logger&.error(message: "GET #{endpoint} TIMEOUT: #{e.message}")
|
42
|
+
raise e
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def connection
|
49
|
+
@connection ||= Faraday.new(url: ProductAggregator.configuration.host) do |f|
|
50
|
+
f.use :circuit_breaker,
|
51
|
+
timeout: ProductAggregator.configuration.circuit_breaker_timeout,
|
52
|
+
threshold: ProductAggregator.configuration.circuit_breaker_threshold,
|
53
|
+
fallback: ->(_, exception){ raise exception if exception; Faraday::Response.new(status: 503, response_headers: {}) }
|
54
|
+
|
55
|
+
f.use Faraday::Request::BasicAuthentication,
|
56
|
+
ProductAggregator.configuration.user, ProductAggregator.configuration.password
|
57
|
+
f.request :retry, max: ProductAggregator.configuration.max_retry.to_i, interval: 0.1, backoff_factor: 2, methods: RETRIABLE_METHODS, exceptions: RETRIABLE_EXCEPTIONS
|
58
|
+
f.adapter :net_http_persistent
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ProductAggregator
|
4
|
+
# ProductAggregator::LoggerAbstract describes the interface class for logger.
|
5
|
+
class LoggerAbstract
|
6
|
+
# the redis you provide must implement these methods
|
7
|
+
|
8
|
+
def error(_message:)
|
9
|
+
raise NotImplementedError, "You must implement #{method_name}"
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def method_name
|
15
|
+
caller_locations(1, 1)[0].label
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# encoding: UTF-8
|
3
|
+
|
4
|
+
lib = File.expand_path('lib', __dir__)
|
5
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
6
|
+
require 'product-aggregator/version'
|
7
|
+
|
8
|
+
Gem::Specification.new do |s|
|
9
|
+
s.name = 'product-aggregator-rb'
|
10
|
+
s.version = ProductAggregator::VERSION
|
11
|
+
s.authors = ['bukalapak']
|
12
|
+
s.email = ['product@bukalapak.com']
|
13
|
+
s.homepage = 'https://gitlab.cloud.bukalapak.io/bukalapak/product-aggregator-rb'
|
14
|
+
s.summary = 'Product Aggregator ruby client'
|
15
|
+
s.license = 'MIT'
|
16
|
+
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- spec/*`.split("\n")
|
19
|
+
s.require_paths = ['lib']
|
20
|
+
|
21
|
+
s.add_runtime_dependency 'faraday'
|
22
|
+
s.add_runtime_dependency 'faraday_middleware-circuit_breaker'
|
23
|
+
s.add_runtime_dependency 'net-http-persistent'
|
24
|
+
s.add_runtime_dependency 'json'
|
25
|
+
|
26
|
+
s.add_development_dependency 'bundler', '~> 2.0.2'
|
27
|
+
s.add_development_dependency 'rake', '~> 10.0'
|
28
|
+
s.add_development_dependency 'simplecov', '>= 0.16.1'
|
29
|
+
s.add_development_dependency 'dotenv', '>= 2.4.0'
|
30
|
+
s.add_development_dependency 'rspec', '~> 3.0'
|
31
|
+
s.add_development_dependency 'webmock'
|
32
|
+
s.add_development_dependency 'rspec_junit_formatter'
|
33
|
+
s.add_development_dependency 'rubocop'
|
34
|
+
s.add_development_dependency 'codecov'
|
35
|
+
|
36
|
+
s.required_ruby_version = '>= 2.3.0'
|
37
|
+
end
|
data/spec/initializer.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe ProductAggregator::Connection, :type => :model do
|
4
|
+
|
5
|
+
subject { described_class }
|
6
|
+
|
7
|
+
before do
|
8
|
+
allow(ProductAggregator.configuration).to receive(:max_retry).and_return(1)
|
9
|
+
end
|
10
|
+
|
11
|
+
it { is_expected.to respond_to(:get_product) }
|
12
|
+
|
13
|
+
describe '#get_product' do
|
14
|
+
let(:data) { { id: 123, name: 'Product kecantikan' } }
|
15
|
+
let(:data_other) { { id: 456, name: 'Product kesehatan' } }
|
16
|
+
let(:response) { { data: data }.to_json }
|
17
|
+
let(:response_other) { { data: data_other }.to_json }
|
18
|
+
let(:not_found) { {errors: [{ message: 'Product tidak ditemukann' }] }.to_json }
|
19
|
+
let(:server_error) { {errors: [{ message: 'Ada kesalahan pada sistem' }] }.to_json }
|
20
|
+
let(:unauthorized) { {errors: [{ message: 'Unauthorized' }] }.to_json }
|
21
|
+
let(:other_error) { {errors: [{ message: 'Kesalahan lainnya' }] }.to_json }
|
22
|
+
|
23
|
+
# context 'success response' do
|
24
|
+
# before do
|
25
|
+
# stub_request(:get, 'http://localhost:8027/_internal/products/1?origin=readonly').to_return({ status: 200, body: response })
|
26
|
+
# stub_request(:get, 'http://localhost:8027/_internal/products/2?origin=master').to_return({ status: 200, body: response_other })
|
27
|
+
# end
|
28
|
+
|
29
|
+
# it do
|
30
|
+
# expect(subject.get_product(1)).to eq({ 'id' => 123, 'name' => 'Product kecantikan' })
|
31
|
+
# expect(subject.get_product(2, 'master')).to eq({ 'id' => 456, 'name' => 'Product kesehatan' })
|
32
|
+
# end
|
33
|
+
# end
|
34
|
+
|
35
|
+
context '404 response' do
|
36
|
+
before { stub_request(:get, 'http://localhost:8027/_internal/products/1?origin=readonly').to_return({ status: 404, body: not_found }) }
|
37
|
+
|
38
|
+
it { expect(subject.get_product(1)).to raise_error(ProductAggregator::NotFoundError) }
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'timeout' do
|
42
|
+
before { stub_request(:get, 'http://localhost:8027/_internal/products/1?origin=readonly').to_timeout }
|
43
|
+
|
44
|
+
it { expect{subject.get_product(1)}.to raise_error }
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
$LOAD_PATH.push File.expand_path('../../lib', __FILE__)
|
3
|
+
|
4
|
+
require 'simplecov'
|
5
|
+
|
6
|
+
SimpleCov.start do
|
7
|
+
add_filter '/spec/'
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'codecov'
|
11
|
+
|
12
|
+
SimpleCov.formatter =
|
13
|
+
if ENV['CI']
|
14
|
+
SimpleCov::Formatter::Codecov
|
15
|
+
else
|
16
|
+
SimpleCov::Formatter::HTMLFormatter
|
17
|
+
end
|
18
|
+
|
19
|
+
require 'webmock/rspec'
|
20
|
+
require 'initializer'
|
metadata
ADDED
@@ -0,0 +1,244 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: product-aggregator-rb
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- bukalapak
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-07-30 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday_middleware-circuit_breaker
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: net-http-persistent
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: json
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.0.2
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.0.2
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '10.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '10.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.16.1
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.16.1
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: dotenv
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 2.4.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 2.4.0
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '3.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '3.0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: webmock
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rspec_junit_formatter
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rubocop
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: codecov
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
description:
|
196
|
+
email:
|
197
|
+
- product@bukalapak.com
|
198
|
+
executables: []
|
199
|
+
extensions: []
|
200
|
+
extra_rdoc_files: []
|
201
|
+
files:
|
202
|
+
- ".gitignore"
|
203
|
+
- ".rubocop.yml"
|
204
|
+
- Gemfile
|
205
|
+
- Gemfile.lock
|
206
|
+
- README.md
|
207
|
+
- Rakefile
|
208
|
+
- lib/product-aggregator-rb.rb
|
209
|
+
- lib/product-aggregator/configuration.rb
|
210
|
+
- lib/product-aggregator/connection.rb
|
211
|
+
- lib/product-aggregator/logger_abstract.rb
|
212
|
+
- lib/product-aggregator/version.rb
|
213
|
+
- product-aggregator-rb.gemspec
|
214
|
+
- spec/initializer.rb
|
215
|
+
- spec/product_aggregator/connection_spec.rb
|
216
|
+
- spec/spec_helper.rb
|
217
|
+
homepage: https://gitlab.cloud.bukalapak.io/bukalapak/product-aggregator-rb
|
218
|
+
licenses:
|
219
|
+
- MIT
|
220
|
+
metadata: {}
|
221
|
+
post_install_message:
|
222
|
+
rdoc_options: []
|
223
|
+
require_paths:
|
224
|
+
- lib
|
225
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: 2.3.0
|
230
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
231
|
+
requirements:
|
232
|
+
- - ">="
|
233
|
+
- !ruby/object:Gem::Version
|
234
|
+
version: '0'
|
235
|
+
requirements: []
|
236
|
+
rubyforge_project:
|
237
|
+
rubygems_version: 2.6.14
|
238
|
+
signing_key:
|
239
|
+
specification_version: 4
|
240
|
+
summary: Product Aggregator ruby client
|
241
|
+
test_files:
|
242
|
+
- spec/initializer.rb
|
243
|
+
- spec/product_aggregator/connection_spec.rb
|
244
|
+
- spec/spec_helper.rb
|