calendly 0.2.0 → 0.3.0

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: 21eb586917df0301bac9cc14ee37b00f9d2e6775c4980778e8bf6f0194f19c2b
4
- data.tar.gz: '0846561057ab9fba60c3e4e20bb141b387f1e75924ed29e8ee5f661f269d2a27'
3
+ metadata.gz: 3656dc7886aad2a35932152a25f601d2160bed7f53b4ead91e67eb4cb82bb433
4
+ data.tar.gz: 337d5637a69e30e1dcc943ac1332f38b1675e3d55e0c09049d9308661b4edbe3
5
5
  SHA512:
6
- metadata.gz: d8436df1c0240bdaf1891feb514bd12aa48d7ba8f24dde0c8687e193b178e74f21a0cb9536b7cca778ede6369b76c5db1510d5db403931a79a2f5760400a6f75
7
- data.tar.gz: 011512ae26dda34a724b7ff31e05ea8d2bcc6e2e3750be397953ab435b9f2e42ae556d27b0427075cd686a3ba1ce34d355aa4739869c0b1a8a0eda1bcd75b6ec
6
+ metadata.gz: 32d0c18ebb375a99fb1b23b4365f99ba5957ebbbfed497690ef7d6db8bb0e0ada413853a927892963af62cc21afe39ad6f8d5740831af2e4e881fcc8e9bb5017
7
+ data.tar.gz: 81a59436778d27892dd325496bc234bea9380fba303b872a2d04ba6ea4b18d73b94d3a13133f7b90f2a68f19a994263ef464a60332239df3f61e064a6d116841
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.3.0
4
+
5
+ - remove zeitwerk dependency. (refs #16)
6
+
3
7
  ## 0.2.0
4
8
 
5
9
  - save fetched data in cache. (refs #14)
data/README.md CHANGED
@@ -5,40 +5,7 @@
5
5
  [![Gem Version](https://badge.fury.io/rb/calendly.svg)](http://badge.fury.io/rb/calendly)
6
6
  [![license](https://img.shields.io/github/license/koshilife/calendly-api-ruby-client)](https://github.com/koshilife/calendly-api-ruby-client/blob/master/LICENSE.txt)
7
7
 
8
- ## About
9
-
10
- These client libraries are created for [Calendly v2 APIs](https://calendly.stoplight.io/docs/gh/calendly/api-docs).
11
-
12
- As of August 2020, Calendly v2 API is currently undergoing an upgrade.
13
- This library is trying to follow and support for the upgrade.
14
-
15
- As of now the supported statuses each Calendly API are as below.
16
-
17
- ## Supported statuses each Calendly API
18
-
19
- - User
20
- - [x] Get basic information about a user
21
- - EventType
22
- - [ ] Get Event Type (This endpoint hasn't been released yet.)
23
- - [x] User Event Types
24
- - Organization
25
- - [x] Get Organization Invitation
26
- - [x] Get Organization Invitations
27
- - [x] Get Organization Membership
28
- - [x] Get a list of Organization Memberships
29
- - [x] Invite a person to Organization
30
- - [x] Remove a User from an Organization
31
- - [x] Revoke Organization Invitation
32
- - ScheduledEvent
33
- - [x] Get Event
34
- - [x] Get Invitee of an Event
35
- - [x] Get List of Event Invitees
36
- - [x] Get List of User Events
37
- - Webhook V2
38
- - [x] Create Webhook Subscription
39
- - [x] Delete Webhook Subscription
40
- - [x] Get Webhook Subscription
41
- - [x] List Webhook Subscriptions
8
+ These client libraries are created for [Calendly v2 APIs](https://calendly.stoplight.io/).
42
9
 
43
10
  ## Installation
44
11
 
@@ -172,6 +139,8 @@ invitation = my_org.create_invitation('foobar@example.com')
172
139
  # D, [2020-08-10T10:48:16] DEBUG -- : Response status:201, body:{"resource":{"created_at":"2020-08-10T10:48:16.051159Z","email":"foobar@example.com","last_sent_at":"2020-08-10T10:48:16.096518Z","organization":"https://api.calendly.com/organizations/ORG001","status":"pending","updated_at":"2020-08-10T10:48:16.051159Z","uri":"https://api.calendly.com/organizations/ORG001/invitations/INV001"}}
173
140
  ```
174
141
 
142
+ More in-depth method documentation can be found at [RubyDoc.info](https://www.rubydoc.info/gems/calendly/).
143
+
175
144
  ## Contributing
176
145
 
177
146
  Bug reports and pull requests are welcome on [GitHub](https://github.com/koshilife/calendly-api-ruby-client). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -29,7 +29,6 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ['lib']
30
30
 
31
31
  spec.add_runtime_dependency 'oauth2', '>= 1.4.4'
32
- spec.add_runtime_dependency 'zeitwerk', '>= 2.3.0'
33
32
 
34
33
  spec.add_development_dependency 'bundler'
35
34
  spec.add_development_dependency 'codecov'
@@ -1,9 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'zeitwerk'
4
- loader = Zeitwerk::Loader.for_gem
5
- loader.collapse('**/models')
6
- loader.setup
3
+ Dir[
4
+ File.join(
5
+ File.dirname(__FILE__),
6
+ 'calendly',
7
+ '**',
8
+ '*'
9
+ )
10
+ ].sort.each do |f|
11
+ next if File.directory? f
12
+
13
+ require f
14
+ end
7
15
 
8
16
  # module for Calendly apis client
9
17
  module Calendly
@@ -1,8 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'calendly/error'
4
+
3
5
  module Calendly
4
6
  # Calendly apis client error object.
5
- class ApiError < Calendly::Error
7
+ class ApiError < Error
6
8
  # @return [Faraday::Response]
7
9
  attr_reader :response
8
10
  # @return [Integer]
@@ -505,7 +505,7 @@ module Calendly
505
505
  end
506
506
 
507
507
  def check_not_empty(value, name)
508
- raise Calendly::Error.new("#{name} is required.") if blank? value
508
+ raise Error.new("#{name} is required.") if blank? value
509
509
  end
510
510
 
511
511
  def blank?(value)
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'calendly/loggable'
4
+
3
5
  module Calendly
4
6
  # calendly module's base error object
5
7
  class Error < StandardError
@@ -19,7 +19,7 @@ module Calendly
19
19
  log msg, :debug
20
20
  end
21
21
 
22
- private
22
+ private
23
23
 
24
24
  def log(msg, level = :info)
25
25
  logger = Calendly.configuration.logger
@@ -1,5 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'calendly/client'
4
+ require 'calendly/models/model_utils'
5
+ require 'calendly/models/event_type'
6
+
3
7
  module Calendly
4
8
  # Calendly's event model.
5
9
  # A meeting that has been scheduled
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'calendly/client'
4
+ require 'calendly/models/model_utils'
5
+
3
6
  module Calendly
4
7
  # Calendly's event type model.
5
8
  # A configuration for a schedulable event
@@ -1,5 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'calendly/client'
4
+ require 'calendly/models/model_utils'
5
+ require 'calendly/models/event'
6
+
3
7
  module Calendly
4
8
  # Calendly's Invitee model.
5
9
  # An individual who has been invited to meet with a Calendly member.
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'calendly/models/model_utils'
4
+
3
5
  module Calendly
4
6
  # Calendly's InviteeQuestionAndAnswer model.
5
7
  # An individual form question and response.
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'calendly/models/model_utils'
4
+
3
5
  module Calendly
4
6
  # Calendly's InviteeTracking model.
5
7
  # Object that represents UTM and Salesforce tracking parameters associated with the invitee.
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'calendly/models/model_utils'
4
+
3
5
  module Calendly
4
6
  # Calendly's location model.
5
7
  # Polymorphic base type for the various supported meeting locations.
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'time'
4
+ require 'calendly/error'
4
5
 
5
6
  module Calendly
6
7
  # Calendly model utility.
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'calendly/client'
4
+ require 'calendly/models/model_utils'
5
+
3
6
  module Calendly
4
7
  # Calendly's organization model.
5
8
  class Organization
@@ -1,5 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'calendly/client'
4
+ require 'calendly/models/model_utils'
5
+ require 'calendly/models/organization'
6
+ require 'calendly/models/user'
7
+
3
8
  module Calendly
4
9
  # Calendly's organization invitation model.
5
10
  class OrganizationInvitation
@@ -1,5 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'calendly/client'
4
+ require 'calendly/models/model_utils'
5
+ require 'calendly/models/organization'
6
+ require 'calendly/models/user'
7
+
3
8
  module Calendly
4
9
  # Calendly's organization membership model.
5
10
  class OrganizationMembership
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'calendly/client'
4
+ require 'calendly/models/model_utils'
5
+
3
6
  module Calendly
4
7
  # Calendly's user model.
5
8
  # Primary account details of a specific user.
@@ -1,7 +1,10 @@
1
- # Get a webhook subscription matching the provided UUID for the webhook subscription
2
-
3
1
  # frozen_string_literal: true
4
2
 
3
+ require 'calendly/client'
4
+ require 'calendly/models/model_utils'
5
+ require 'calendly/models/organization'
6
+ require 'calendly/models/user'
7
+
5
8
  module Calendly
6
9
  # Calendly's webhook model.
7
10
  class WebhookSubscription
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Calendly
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calendly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenji Koshikawa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-18 00:00:00.000000000 Z
11
+ date: 2020-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.4.4
27
- - !ruby/object:Gem::Dependency
28
- name: zeitwerk
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 2.3.0
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: 2.3.0
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: bundler
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -168,7 +154,7 @@ metadata:
168
154
  homepage_uri: https://github.com/koshilife/calendly-api-ruby-client
169
155
  source_code_uri: https://github.com/koshilife/calendly-api-ruby-client
170
156
  changelog_uri: https://github.com/koshilife/calendly-api-ruby-client/blob/master/CHANGELOG.md
171
- documentation_uri: https://www.rubydoc.info/gems/calendly/0.2.0
157
+ documentation_uri: https://www.rubydoc.info/gems/calendly/0.3.0
172
158
  post_install_message:
173
159
  rdoc_options: []
174
160
  require_paths: