bookingsync-api 0.2.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +25 -0
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/bookingsync-api.gemspec +2 -1
- data/lib/bookingsync/api/client.rb +6 -6
- data/lib/bookingsync/api/version.rb +1 -1
- data/lib/bookingsync/api.rb +1 -0
- metadata +20 -6
- data/.travis.yml +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfb114b36b33d06e8bd12258011fc7f239943892d3c6dd9040b5d3445c59b23d
|
4
|
+
data.tar.gz: 3463041120914e150c6b79ba8090930a480ab2e696508e3dc461abd3de884641
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f2dd54fc9d10886e9b6f90ea9601eabf1f34f539e27d131b7c24fb58451d585c993b8562f4fe9a6dd995a83f3b2bb97c6da19d325f3fd54678bc4c41eb545f7
|
7
|
+
data.tar.gz: 9d62cf5e48105ea7f179082c2545ce647f07a10295ab13cb0638a2668dd3bf028381830aa96ec8619295aaef8c999e9f9bcefeab6fab86c456070d4fdfdf7266
|
@@ -0,0 +1,25 @@
|
|
1
|
+
name: CI
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
pull_request:
|
7
|
+
jobs:
|
8
|
+
rspec:
|
9
|
+
strategy:
|
10
|
+
fail-fast: false
|
11
|
+
matrix:
|
12
|
+
include:
|
13
|
+
- { ruby: '2.7' }
|
14
|
+
- { ruby: '3.0' }
|
15
|
+
- { ruby: '3.1' }
|
16
|
+
runs-on: ubuntu-latest
|
17
|
+
env:
|
18
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/Gemfile
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v2
|
21
|
+
- uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
ruby-version: ${{ matrix.ruby }}
|
24
|
+
bundler-cache: true
|
25
|
+
- run: bundle exec rspec
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![Build Status](https://
|
1
|
+
[![Build Status](https://github.com/BookingSync/bookingsync-api/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/BookingSync/bookingsync-api/actions/workflows/ci.yml)
|
2
2
|
[![Code Climate](https://codeclimate.com/github/BookingSync/bookingsync-api.png)](https://codeclimate.com/github/BookingSync/bookingsync-api)
|
3
3
|
|
4
4
|
# BookingSync::API
|
data/bookingsync-api.gemspec
CHANGED
@@ -18,7 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "faraday", "
|
21
|
+
spec.add_dependency "faraday", "~> 2"
|
22
|
+
spec.add_dependency "faraday-net_http_persistent", ">= 2.0.2"
|
22
23
|
spec.add_dependency "net-http-persistent", [">= 4.0.1", "< 5.0"]
|
23
24
|
spec.add_dependency "hashie"
|
24
25
|
spec.add_dependency "addressable"
|
@@ -129,7 +129,7 @@ module BookingSync::API
|
|
129
129
|
@instrumenter = options[:instrumenter] || NoopInstrumenter
|
130
130
|
@base_url = options[:base_url]
|
131
131
|
@serializer = Serializer.new
|
132
|
-
@conn =
|
132
|
+
@conn = build_connection
|
133
133
|
@conn.headers[:accept] = MEDIA_TYPE
|
134
134
|
@conn.headers[:content_type] = MEDIA_TYPE
|
135
135
|
@conn.headers[:user_agent] = user_agent
|
@@ -306,15 +306,15 @@ module BookingSync::API
|
|
306
306
|
|
307
307
|
private
|
308
308
|
|
309
|
-
def
|
310
|
-
Faraday
|
311
|
-
|
312
|
-
|
309
|
+
def build_connection
|
310
|
+
Faraday.new(**faraday_options) do |f|
|
311
|
+
f.use :logger, logger
|
312
|
+
f.adapter :net_http_persistent
|
313
313
|
end
|
314
314
|
end
|
315
315
|
|
316
316
|
def faraday_options
|
317
|
-
{
|
317
|
+
{ ssl: { verify: verify_ssl? } }
|
318
318
|
end
|
319
319
|
|
320
320
|
# Return BookingSync base URL. Default is https://www.bookingsync.com
|
data/lib/bookingsync/api.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bookingsync-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sébastien Grosjean
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday-net_http_persistent
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - ">="
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
33
|
+
version: 2.0.2
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
40
|
+
version: 2.0.2
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: net-http-persistent
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,9 +135,9 @@ executables: []
|
|
121
135
|
extensions: []
|
122
136
|
extra_rdoc_files: []
|
123
137
|
files:
|
138
|
+
- ".github/workflows/ci.yml"
|
124
139
|
- ".gitignore"
|
125
140
|
- ".rspec"
|
126
|
-
- ".travis.yml"
|
127
141
|
- CHANGELOG.md
|
128
142
|
- Gemfile
|
129
143
|
- Guardfile
|
@@ -475,7 +489,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
475
489
|
- !ruby/object:Gem::Version
|
476
490
|
version: '0'
|
477
491
|
requirements: []
|
478
|
-
rubygems_version: 3.
|
492
|
+
rubygems_version: 3.3.7
|
479
493
|
signing_key:
|
480
494
|
specification_version: 4
|
481
495
|
summary: Ruby interface for accessing https://www.bookingsync.com
|