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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97439dc793ee31707c3bf1e4f99eff2af5cb365ad02e68db12d313c98c9272da
4
- data.tar.gz: c1119cf2b6665d5ba31b44ae2285d2d71303df40d0659f8eab3877fd07df6bcf
3
+ metadata.gz: dfb114b36b33d06e8bd12258011fc7f239943892d3c6dd9040b5d3445c59b23d
4
+ data.tar.gz: 3463041120914e150c6b79ba8090930a480ab2e696508e3dc461abd3de884641
5
5
  SHA512:
6
- metadata.gz: 48d1876b9c1f5fadf469415015f4cd869c727a0ffade3901d4aa3fcf858aafefa0173c62dee4e3ef72fa3db33fb092d180f3192e1442958d6142c0e84e48e3e4
7
- data.tar.gz: 72d793dc6bf7b4bd85ca5b773a9e03025f020cbc1cc23c694fbb5cb7a788df1dd7f09e5b51d6ac59b5231d58026e72ebfb14e52b3cb390c9ebdd05a191a5d5ed
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
@@ -2,6 +2,12 @@
2
2
 
3
3
  # master
4
4
 
5
+ ## 1.0.0
6
+
7
+ - Drop support for ruby prior to 2.7
8
+ - Add support for ruby 3.0 and 3.1
9
+ - Update and lock faraday at `~> 2`
10
+
5
11
  ## 0.2.0 - 2022-01-10
6
12
  - upgrade net-http-persistent to be ruby 3 ready
7
13
 
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.org/BookingSync/bookingsync-api.png?branch=master)](https://travis-ci.org/BookingSync/bookingsync-api)
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
@@ -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", ">= 0.15.2"
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 = Faraday.new(faraday_options)
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 middleware
310
- Faraday::RackBuilder.new do |builder|
311
- builder.use :logger, logger
312
- builder.adapter :net_http_persistent
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
- { builder: middleware, ssl: { verify: verify_ssl? } }
317
+ { ssl: { verify: verify_ssl? } }
318
318
  end
319
319
 
320
320
  # Return BookingSync base URL. Default is https://www.bookingsync.com
@@ -1,5 +1,5 @@
1
1
  module BookingSync
2
2
  module API
3
- VERSION = "0.2.0"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -1,4 +1,5 @@
1
1
  require "faraday"
2
+ require "faraday/net_http_persistent"
2
3
  require "bookingsync/api/version"
3
4
  require "bookingsync/api/client"
4
5
 
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.2.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-01-10 00:00:00.000000000 Z
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.15.2
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.15.2
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.2.22
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
data/.travis.yml DELETED
@@ -1,11 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - "2.1"
4
- - "2.2"
5
- - "2.4.4"
6
- - "2.5.1"
7
- before_install:
8
- - gem install bundler -v 1.12.5
9
- script:
10
- - bundle exec rake style:rubocop:without_auto_correct
11
- - bundle exec rake spec