calendlyr 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9d08b30cddb6172f8941fa8c8841a6dacb46754187c8c2b03292298b92a0e0d
4
- data.tar.gz: 3ba42d35d1d5e7cb9c97d7cb59eacfc32daea9e07581109bc5023309702d669b
3
+ metadata.gz: c57c6eee34f296883a41d1c78d7f9ab9f142768353c78068a91ed7a4f6ec33f8
4
+ data.tar.gz: b1adb963d1d9ec9b2529d2765b7ddc6c0ea2a92fb5a89b016154abbacdb0d7dd
5
5
  SHA512:
6
- metadata.gz: 8b624f9496806b7058589d2775424b7a7f117c0679c484c5178be7b7a185ce6ca60bb6717d740ce57e6177f399ae5eb13bd35c0858ef0b71abefa452d3a56d40
7
- data.tar.gz: 027d776e027168addd7e5d13330eb3a5a88cf7c7aa41c3f8703afe88d215c0d654871935cb679067fe90e266d925745f39100a79276f57c7bca4673e970877d3
6
+ metadata.gz: db6766c86112dc3e944e3b6387bcd8e67b4c335804590d8cb7ef55081a874e0c572a647e9d9ce799ef1207434eeda482c6ca2ea12ba842ed20abe054d0e7ed67
7
+ data.tar.gz: 4b59f6ad76dd238775a010501c647c383a0dca86861b1dc417b460d5f899b6b5be2852a6d1102a20637739857d7277eca3cf88655c7a1350fe08d1cb91cee894
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.7.3]
6
+ * Fix: Prevent possible empty body response to fail
7
+
8
+ [0.7.3]: https://github.com/araluce/calendlyr/compare/v0.7.1...v0.7.3
9
+
5
10
  ## [0.7.1]
6
11
  * Adding support for 429 responses from Calendly API
7
12
 
data/README.md CHANGED
@@ -1,9 +1,8 @@
1
- [![](https://img.shields.io/github/license/araluce/calendlyr)](https://github.com/araluce/calendlyr/blob/master/LICENSE.txt)
2
- [![](https://github.com/araluce/calendlyr/actions/workflows/ci.yml/badge.svg)](https://github.com/araluce/calendlyr/actions)
3
- [![codecov](https://codecov.io/gh/araluce/calendlyr/branch/master/graph/badge.svg?token=YSUU4PHM6Y)](https://codecov.io/gh/araluce/calendlyr)
4
- ![example workflow](https://github.com/araluce/calendlyr/actions/workflows/ci.yml/badge.svg)
5
- [![Gem Version](https://badge.fury.io/rb/calendlyr.svg)](https://badge.fury.io/rb/calendlyr)
6
- ![Gem Downloads (for specified version)](https://img.shields.io/gem/dv/calendlyr/0.7.2)
1
+ [![](https://img.shields.io/github/license/araluce/calendlyr?kill_cache=1)](https://github.com/araluce/calendlyr/blob/master/LICENSE.txt)
2
+ [![](https://github.com/araluce/calendlyr/actions/workflows/ci.yml/badge.svg?kill_cache=1)](https://github.com/araluce/calendlyr/actions)
3
+ [![codecov](https://codecov.io/gh/araluce/calendlyr/branch/master/graph/badge.svg?token=YSUU4PHM6Y&kill_cache=1)](https://codecov.io/gh/araluce/calendlyr)
4
+ [![Gem Version](https://badge.fury.io/rb/calendlyr.svg?kill_cache=1)](https://badge.fury.io/rb/calendlyr)
5
+ ![Gem Downloads (for specified version)](https://img.shields.io/gem/dv/calendlyr/0.7.3?kill_cache=1)
7
6
 
8
7
  # Calendly API Rubygem
9
8
 
@@ -24,7 +23,7 @@ We understand the importance of not adding unwanted dependencies.
24
23
  Add this line to your application's Gemfile:
25
24
 
26
25
  ```ruby
27
- gem 'calendlyr', '0.7.2'
26
+ gem 'calendlyr', '0.7.3'
28
27
  ```
29
28
 
30
29
  And then execute:
@@ -1,12 +1,20 @@
1
1
  module Calendlyr
2
2
  class Error < StandardError; end
3
+
3
4
  class PermissionDenied < StandardError; end
5
+
4
6
  class BadRequest < StandardError; end
7
+
5
8
  class PaymentRequired < StandardError; end
9
+
6
10
  class Unauthenticated < StandardError; end
11
+
7
12
  class NotFound < StandardError; end
13
+
8
14
  class ExternalCalendarEror < StandardError; end
15
+
9
16
  class InternalServerError < StandardError; end
17
+
10
18
  class TooManyRequestsEror < StandardError; end
11
19
 
12
20
  class ResponseErrorHandler
@@ -50,7 +50,12 @@ module Calendlyr
50
50
  def handle_response(response)
51
51
  return true unless response.read_body
52
52
 
53
- body = JSON.parse(response.read_body)
53
+ body = begin
54
+ JSON.parse(response.read_body)
55
+ rescue
56
+ {}
57
+ end
58
+
54
59
  if ERROR_CODES.include? response.code
55
60
  raise ResponseErrorHandler.new(response.code, body).error
56
61
  else
@@ -1,3 +1,3 @@
1
1
  module Calendlyr
2
- VERSION = "0.7.2"
2
+ VERSION = "0.7.3"
3
3
  end
@@ -1 +1,4 @@
1
- {}
1
+ {
2
+ "title": "External Calendar Error",
3
+ "message": "There is a problem accessing your calendar."
4
+ }
@@ -1,4 +1 @@
1
- {
2
- "title": "External Calendar Error",
3
- "message": "There is a problem accessing your calendar."
4
- }
1
+ {}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calendlyr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - araluce