calendlyr 0.7.2 → 0.7.4

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: e9d08b30cddb6172f8941fa8c8841a6dacb46754187c8c2b03292298b92a0e0d
4
- data.tar.gz: 3ba42d35d1d5e7cb9c97d7cb59eacfc32daea9e07581109bc5023309702d669b
3
+ metadata.gz: 7fcea4c5206606b7ef08edb1e46d1aa2c51380cb769d8c911bb316aa7bc4bef1
4
+ data.tar.gz: 44177a86aa12c87a5ec66b4af52ffad054d9110743bbfaffd116b8fe70399586
5
5
  SHA512:
6
- metadata.gz: 8b624f9496806b7058589d2775424b7a7f117c0679c484c5178be7b7a185ce6ca60bb6717d740ce57e6177f399ae5eb13bd35c0858ef0b71abefa452d3a56d40
7
- data.tar.gz: 027d776e027168addd7e5d13330eb3a5a88cf7c7aa41c3f8703afe88d215c0d654871935cb679067fe90e266d925745f39100a79276f57c7bca4673e970877d3
6
+ metadata.gz: c0e22a796f4c0bea34e6881a999cb88f27b847d6acf8acd2b4bc65ec5b61e30023ca2349c2152cf8e5f4e8a92358b9e6bb020ac1bc8986ac2dd20724e0a9fdea
7
+ data.tar.gz: 75880af1a6ce07bd4a2b0afb5c0ed66c99adbc6d0fd0099ee13e81e911420039651667b5f528bcaf8487fbf84a7d3bcf501e57a29c56f75cd4839a3a9b80c989
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby: ["2.5", "2.6", "2.7", "3.0", "3.2"]
14
+ ruby: ["2.7", "3.0", "3.2", "3.3"]
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v4
data/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.7.4]
6
+ * Fix: Error class name typo `ExternalCalendarEror` -> `ExternalCalendarError`
7
+ * Fix: Error class name typo `TooManyRequestsEror` -> `TooManyRequests`
8
+ * Updating rubies versions in CI to add 3.3
9
+ * Adding total rubygems downloads badge to README
10
+
11
+ [0.7.4]: https://github.com/araluce/calendlyr/compare/v0.7.3...v0.7.4
12
+
13
+ ## [0.7.3]
14
+ * Fix: Prevent possible empty body response to fail
15
+
16
+ [0.7.3]: https://github.com/araluce/calendlyr/compare/v0.7.1...v0.7.3
17
+
5
18
  ## [0.7.1]
6
19
  * Adding support for 429 responses from Calendly API
7
20
 
data/README.md CHANGED
@@ -1,9 +1,7 @@
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 Downloads (for specified version)](https://img.shields.io/gem/dt/calendlyr)
7
5
 
8
6
  # Calendly API Rubygem
9
7
 
@@ -24,7 +22,7 @@ We understand the importance of not adding unwanted dependencies.
24
22
  Add this line to your application's Gemfile:
25
23
 
26
24
  ```ruby
27
- gem 'calendlyr', '0.7.2'
25
+ gem 'calendlyr', '0.7.4'
28
26
  ```
29
27
 
30
28
  And then execute:
@@ -1,13 +1,21 @@
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
8
- class ExternalCalendarEror < StandardError; end
13
+
14
+ class ExternalCalendarError < StandardError; end
15
+
9
16
  class InternalServerError < StandardError; end
10
- class TooManyRequestsEror < StandardError; end
17
+
18
+ class TooManyRequests < StandardError; end
11
19
 
12
20
  class ResponseErrorHandler
13
21
  ERROR_TYPES = {
@@ -15,8 +23,8 @@ module Calendlyr
15
23
  "401" => Unauthenticated,
16
24
  "403" => PermissionDenied,
17
25
  "404" => NotFound,
18
- "424" => ExternalCalendarEror,
19
- "429" => TooManyRequestsEror,
26
+ "424" => ExternalCalendarError,
27
+ "429" => TooManyRequests,
20
28
  "500" => InternalServerError
21
29
  }
22
30
 
@@ -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.4"
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,14 +1,14 @@
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.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - araluce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-16 00:00:00.000000000 Z
11
+ date: 2024-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake