simplyq 0.8.2rc → 0.9.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: 4044d212ae7b9cd8952ae0c04499883576efba9b8d3b9b55588aa227465a7a6c
4
- data.tar.gz: ac7798ba1b45a305cee54455411554f7e42f1ae4e20505dfa44eb7bc45ca381a
3
+ metadata.gz: b5567d4d53527951f2a3009d7f97053293935c7cc35e0b58b84bb958dc7c7c7a
4
+ data.tar.gz: 0a911e6b8b50a80d2c1b72453ca25f03a7ebf31307e9e32f8ed80e25d1243aa1
5
5
  SHA512:
6
- metadata.gz: d9c27060de2a5626c982db7b619b27db036f75df7d1169851c9ea396e8ef04a5353e96c866f2be2084cbeda7c6dcd6fd21b01b47bd138e6ead6ff646f023dec0
7
- data.tar.gz: 2e63eb68816e4a8346b1f8cd711ffd7a4693718cd5ad5b5f70c9f3d9f7e838ccf215828ea108e707d6be963239720f1d70fe2e9faa924bbb40a3a8ceb361914c
6
+ metadata.gz: 82cb81ab6da6d446736a3e990184bc3c9b1f85c1d6f6bb06f91bcb517a2c1629a6dc5204635dab7a01340987907261fa7df2c02ae5331162679cfe1d7a5ad9c5
7
+ data.tar.gz: 982f118097a4cae8a784bf9bd1453fef495f5b670fe3d510d1ca6acc7dafb90a8777d5bc20a0771b203833f839323ec388fb72848ea101e76533d3961f66d37e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
- ## [Unreleased]
1
+ # Changelog
2
2
 
3
- ## [0.1.0] - 2022-09-20
3
+ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
4
+
5
+ ## main
6
+
7
+ ## 0.9.0 - 2023-04-204
8
+
9
+ ENHANCEMENTS:
10
+
11
+ - Add `endpoint_url`, `response_headers`, `response_status_code_class` and `retry_count` to `Simplyq::Model::DeliveryAttempt` model [PR #52](https://github.com/simplyqio/apis/pull/52)
12
+
13
+ ## 0.1.0 - 2022-09-20
4
14
 
5
15
  - Initial release
data/Gemfile CHANGED
@@ -9,7 +9,7 @@ group :development do
9
9
 
10
10
  gem "rspec"
11
11
 
12
- gem "rubocop-rspec"
12
+ gem "rubocop-rspec", "~> 2.14"
13
13
 
14
14
  gem "rubocop", "~> 1.36"
15
15
 
data/README.md CHANGED
@@ -1,22 +1,48 @@
1
- # Simplyq
1
+ # SimplyQ Ruby Client
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/simplyq`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ [![Ruby CI](https://github.com/simplyqio/apis/actions/workflows/ruby-ci.yml/badge.svg?branch=main)](https://github.com/simplyqio/apis/actions/workflows/ruby-ci.yml) [![Gem Version](https://badge.fury.io/rb/simplyq.svg)](https://badge.fury.io/rb/simplyq)
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ The Ruby client for the [SimplyQ API](https://development.simplyq.io)
6
+
7
+ [SimplyQ](https://simplyq.io) distributes your events, with the Webhooks API you can send and manage your webhooks reliably and easily.
6
8
 
7
9
  ## Installation
8
10
 
9
11
  Install the gem and add to the application's Gemfile by executing:
10
12
 
11
- $ bundle add simplyq
13
+ ```shell
14
+ bundle add simplyq
15
+ ```
12
16
 
13
17
  If bundler is not being used to manage dependencies, install the gem by executing:
14
18
 
15
- $ gem install simplyq
19
+ ```shell
20
+ gem install simplyq
21
+ ```
16
22
 
17
23
  ## Usage
18
24
 
19
- TODO: Write usage instructions here
25
+ ```ruby
26
+ # Load the gem
27
+ require 'simplyq'
28
+
29
+ # Setup the client
30
+ client = Simplyq::Client.new({
31
+ # Configure Bearer authorization (bmp_2dNkUE1XXXXXXXXXXXXXXXXXXXXXXXXXXXXX): HTTPBearer
32
+ api_key: ENV.fetch("SIMPLYQ_API_KEY")
33
+ })
34
+
35
+ app = {
36
+ uid: 'example-app-1',
37
+ name: 'Example application #1'
38
+ }
39
+
40
+ # Create an application
41
+ app = client.applications.create(app)
42
+ ```
43
+
44
+ You can find more examples in the [examples](examples) directory. And also our API reference site which has examples of the ruby client https://developer.simplyq.io.
45
+
20
46
 
21
47
  ## Development
22
48
 
@@ -26,7 +52,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
26
52
 
27
53
  ## Contributing
28
54
 
29
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/simplyq. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/simplyq/blob/main/CODE_OF_CONDUCT.md).
55
+ Bug reports and pull requests are welcome on GitHub at https://github.com/simplyqio/apis, please first open an issue before opening a PR so we can discuss the changes. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/simplyqio/apis/blob/main/CODE_OF_CONDUCT.md).
30
56
 
31
57
  ## License
32
58
 
@@ -34,4 +60,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
34
60
 
35
61
  ## Code of Conduct
36
62
 
37
- Everyone interacting in the Simplyq project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/simplyq/blob/main/CODE_OF_CONDUCT.md).
63
+ Everyone interacting in the Simplyq project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/simplyqio/apis/blob/main/CODE_OF_CONDUCT.md).
@@ -9,19 +9,33 @@ module Simplyq
9
9
 
10
10
  attr_accessor :endpoint_id
11
11
 
12
+ # The endpoint url of the endpoint when the event delivery was attempted.
13
+ attr_accessor :endpoint_url
14
+
12
15
  # The response of the endpoint when a delivery attempt was made or null if not yet attempted.
13
16
  attr_accessor :response
14
17
 
18
+ # The response headers of the endpoint when the event delivery was attempted.
19
+ attr_accessor :response_headers
20
+
15
21
  # The response code of the endpoint when the event delivery was attempted.
16
22
  attr_accessor :response_status_code
17
23
 
24
+ # The response code class i.e. 2xx, 3xx, 4xx, 5xx of the endpoint when the event delivery was attempted.
25
+ attr_accessor :response_status_code_class
26
+
18
27
  # The delivery status of the event to the endpoint
19
28
  attr_accessor :status
20
29
 
21
30
  # The tigger of the delivery attempt
22
31
  attr_accessor :trigger_type
23
32
 
24
- # This is the timestamp of when the delivery attempt was made to the endpoint. In case it has not yet been attempted and the status of the delivery attempt is **pending**, then the value of the timestamp will be **null**.
33
+ # Number of times an event delivery attempt failed before the current attempt.
34
+ attr_accessor :retry_count
35
+
36
+ # This is the timestamp of when the delivery attempt was made to the endpoint.
37
+ # In case it has not yet been attempted and the status of the delivery attempt
38
+ # is **pending**, then the value of the timestamp will be **null**.
25
39
  attr_accessor :attempted_at
26
40
 
27
41
  def initialize(attributes = {})
@@ -31,14 +45,24 @@ module Simplyq
31
45
 
32
46
  self.endpoint_id = attributes[:endpoint_id] if attributes.key?(:endpoint_id)
33
47
 
48
+ self.endpoint_url = attributes[:endpoint_url] if attributes.key?(:endpoint_url)
49
+
34
50
  self.response = attributes[:response] if attributes.key?(:response)
35
51
 
52
+ self.response_headers = attributes[:response_headers] if attributes.key?(:response_headers)
53
+
36
54
  self.response_status_code = attributes[:response_status_code] if attributes.key?(:response_status_code)
37
55
 
56
+ if attributes.key?(:response_status_code_class)
57
+ self.response_status_code_class = attributes[:response_status_code_class]
58
+ end
59
+
38
60
  self.status = attributes[:status] if attributes.key?(:status)
39
61
 
40
62
  self.trigger_type = attributes[:trigger_type] if attributes.key?(:trigger_type)
41
63
 
64
+ self.retry_count = attributes[:retry_count] if attributes.key?(:retry_count)
65
+
42
66
  self.attempted_at = attributes[:attempted_at] if attributes.key?(:attempted_at)
43
67
  end
44
68
 
@@ -82,10 +106,14 @@ module Simplyq
82
106
  id == other.id &&
83
107
  event_id == other.event_id &&
84
108
  endpoint_id == other.endpoint_id &&
109
+ endpoint_url == other.endpoint_url &&
85
110
  response == other.response &&
111
+ response_headers == other.response_headers &&
86
112
  response_status_code == other.response_status_code &&
113
+ response_status_code_class == other.response_status_code_class &&
87
114
  status == other.status &&
88
115
  trigger_type == other.trigger_type &&
116
+ retry_count == other.retry_count &&
89
117
  attempted_at == other.attempted_at
90
118
  end
91
119
 
@@ -94,10 +122,14 @@ module Simplyq
94
122
  id: id,
95
123
  event_id: event_id,
96
124
  endpoint_id: endpoint_id,
125
+ endpoint_url: endpoint_url,
97
126
  response: response,
127
+ response_headers: response_headers,
98
128
  response_status_code: response_status_code,
129
+ response_status_code_class: response_status_code_class,
99
130
  status: status,
100
131
  trigger_type: trigger_type,
132
+ retry_count: retry_count,
101
133
  attempted_at: attempted_at
102
134
  }
103
135
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Simplyq
4
- VERSION = "0.8.2rc"
4
+ VERSION = "0.9.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplyq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2rc
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - simplyq-dxtimer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-12 00:00:00.000000000 Z
11
+ date: 2023-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -70,7 +70,6 @@ files:
70
70
  - ".rubocop_todo.yml"
71
71
  - ".tool-versions"
72
72
  - CHANGELOG.md
73
- - CODE_OF_CONDUCT.md
74
73
  - Gemfile
75
74
  - LICENSE.txt
76
75
  - README.md
@@ -109,11 +108,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
108
  version: '2.7'
110
109
  required_rubygems_version: !ruby/object:Gem::Requirement
111
110
  requirements:
112
- - - ">"
111
+ - - ">="
113
112
  - !ruby/object:Gem::Version
114
- version: 1.3.1
113
+ version: '0'
115
114
  requirements: []
116
- rubygems_version: 3.1.6
115
+ rubygems_version: 3.4.10
117
116
  signing_key:
118
117
  specification_version: 4
119
118
  summary: The SimplyQ API client for Ruby
data/CODE_OF_CONDUCT.md DELETED
@@ -1,84 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- * Demonstrating empathy and kindness toward other people
14
- * Being respectful of differing opinions, viewpoints, and experiences
15
- * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- * The use of sexualized language or imagery, and sexual attention or
22
- advances of any kind
23
- * Trolling, insulting or derogatory comments, and personal or political attacks
24
- * Public or private harassment
25
- * Publishing others' private information, such as a physical or email
26
- address, without their explicit permission
27
- * Other conduct which could reasonably be considered inappropriate in a
28
- professional setting
29
-
30
- ## Enforcement Responsibilities
31
-
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
-
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
-
36
- ## Scope
37
-
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
-
40
- ## Enforcement
41
-
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at ivan@simplyq.io. All complaints will be reviewed and investigated promptly and fairly.
43
-
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
-
46
- ## Enforcement Guidelines
47
-
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
-
50
- ### 1. Correction
51
-
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
-
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
-
56
- ### 2. Warning
57
-
58
- **Community Impact**: A violation through a single incident or series of actions.
59
-
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
-
62
- ### 3. Temporary Ban
63
-
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
-
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
-
68
- ### 4. Permanent Ban
69
-
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
-
72
- **Consequence**: A permanent ban from any sort of public interaction within the community.
73
-
74
- ## Attribution
75
-
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
-
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
-
81
- [homepage]: https://www.contributor-covenant.org
82
-
83
- For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.