Sha256: 25fea0ec20a9b9c05680af674b450b0c2f5ce028954977253fae6d446190d8f4

Contents?: true

Size: 1.98 KB

Versions: 1

Compression:

Stored size: 1.98 KB

Contents

# GoPuff::ProdcatApi
[![Coverage Status](https://coveralls.io/repos/github/gopuff/go_puff-prodcat_api/badge.svg?branch=main&t=K8IagK)](https://coveralls.io/github/gopuff/go_puff-prodcat_api?branch=main)

This Rails library is designed to work with product-catalog/pds api

## Installation

Add this line to your application's Gemfile:

```ruby
source 'https://rubygems.pkg.github.com/gopuff' do
  gem 'go_puff-prodcat_api'
end
```

And then execute:

    $ bundle install

## Set up
```ruby
# config/initializers/prodcat_api.rb

GoPuff::ProdcatApi.configure do |c|
  c.logger = GoPuff::Logger
  c.url = ENV.fetch('PDS_API_URL')
  c.authorization_client_id = ENV.fetch('PRODCAT_API_AUTHORIZATION_CLIENT_ID')
  c.user_agent_header = GoPuff::Http.config.user_agent_header

  # config.requests.max_retries = 3 # default
  # config.requests.retry_wait_time = 0.5 # default
  # config.requests.retryable_exceptions = [EOFError, Errno::ECONNRESET, Timeout::Error, GoPuff::ProdcatApi::ServerError, GoPuff::ProdcatApi::ClientError, GoPuff::ProdcatApi::TimeoutError] # default
end
```

## Local development with docker
Authorize personal access token for Github by following the steps at https://docs.github.com/en/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on


```bash
cp .bundle/config.example .bundle/config
```
Add Github username and personal access token in `./bundle/config` and start project using:

```bash
docker-compose run --rm go_puff-prodcat_api bash
```
or with [dip](https://github.com/bibendi/dip#installation)

```bash
dip bash
```

## Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.

1. Clone the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
go_puff-prodcat_api-0.9.3.pre.beta.1 README.md