reach-ruby 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/.dockerignore +1 -0
  3. data/.gitignore +18 -0
  4. data/.rubocop.yml +58 -0
  5. data/.rubocop_todo.yml +193 -0
  6. data/AUTHORS.md +52 -0
  7. data/CHANGES.md +3 -0
  8. data/CODE_OF_CONDUCT.md +73 -0
  9. data/CONTRIBUTING.md +163 -0
  10. data/Dockerfile +9 -0
  11. data/Gemfile +3 -0
  12. data/ISSUE_TEMPLATE.md +30 -0
  13. data/LICENSE +21 -0
  14. data/Makefile +34 -0
  15. data/PULL_REQUEST_TEMPLATE.md +31 -0
  16. data/README.md +237 -0
  17. data/Rakefile +10 -0
  18. data/UPGRADE.md +5 -0
  19. data/VERSIONS.md +35 -0
  20. data/advanced-examples/custom-http-client.md +166 -0
  21. data/examples/examples.rb +23 -0
  22. data/githooks/pre-commit +1 -0
  23. data/lib/rack/reach_webhook_authentication.rb +72 -0
  24. data/lib/reach-ruby/framework/reach_response.rb +19 -0
  25. data/lib/reach-ruby/framework/request.rb +41 -0
  26. data/lib/reach-ruby/framework/response.rb +18 -0
  27. data/lib/reach-ruby/framework/rest/domain.rb +39 -0
  28. data/lib/reach-ruby/framework/rest/error.rb +51 -0
  29. data/lib/reach-ruby/framework/rest/helper.rb +11 -0
  30. data/lib/reach-ruby/framework/rest/page.rb +144 -0
  31. data/lib/reach-ruby/framework/rest/resource.rb +23 -0
  32. data/lib/reach-ruby/framework/rest/version.rb +240 -0
  33. data/lib/reach-ruby/framework/serialize.rb +81 -0
  34. data/lib/reach-ruby/framework/values.rb +9 -0
  35. data/lib/reach-ruby/http/http_client.rb +82 -0
  36. data/lib/reach-ruby/http.rb +5 -0
  37. data/lib/reach-ruby/rest/api/authentix/.openapi-generator/FILES +10 -0
  38. data/lib/reach-ruby/rest/api/authentix/.openapi-generator/VERSION +1 -0
  39. data/lib/reach-ruby/rest/api/authentix/.openapi-generator-ignore +23 -0
  40. data/lib/reach-ruby/rest/api/authentix/authentication_trial_item.rb +418 -0
  41. data/lib/reach-ruby/rest/api/authentix/authentication_trial_stat_item.rb +279 -0
  42. data/lib/reach-ruby/rest/api/authentix/configuration_item/authentication_control_item.rb +214 -0
  43. data/lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb +449 -0
  44. data/lib/reach-ruby/rest/api/authentix/configuration_item.rb +583 -0
  45. data/lib/reach-ruby/rest/api/authentix.rb +72 -0
  46. data/lib/reach-ruby/rest/api/messaging/.openapi-generator/FILES +2 -0
  47. data/lib/reach-ruby/rest/api/messaging/.openapi-generator/VERSION +1 -0
  48. data/lib/reach-ruby/rest/api/messaging/.openapi-generator-ignore +23 -0
  49. data/lib/reach-ruby/rest/api/messaging/messaging_item.rb +582 -0
  50. data/lib/reach-ruby/rest/api/messaging.rb +51 -0
  51. data/lib/reach-ruby/rest/api.rb +50 -0
  52. data/lib/reach-ruby/rest/client.rb +130 -0
  53. data/lib/reach-ruby/rest.rb +13 -0
  54. data/lib/reach-ruby/security/request_validator.rb +149 -0
  55. data/lib/reach-ruby/util/configuration.rb +25 -0
  56. data/lib/reach-ruby/version.rb +3 -0
  57. data/lib/reach-ruby.rb +44 -0
  58. data/reach-ruby.gemspec +38 -0
  59. data/sonar-project.properties +13 -0
  60. metadata +267 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 87b1dd38a32ed6c02afbf47b8c1608179c62b497913680cee152ac4cdff63646
4
+ data.tar.gz: ca165afc78ef62dc9c900281b10481be12e8ad24de0acd6a2511387ee4a12986
5
+ SHA512:
6
+ metadata.gz: c198dca43b476244b40fc3d1eb560dd7f4c2b2b845334f4dceccb4f68f1a4123d1f77f1941f4a84450f58c0e4da31227bc3aa3c44a55cc2978ae62d140384fe1
7
+ data.tar.gz: 9c240ffb1d0366529c2e53f19ff5ed01654ce89d574314c518b10bd5eac201f0734b23a474d37155b863c5498291c5b467c9e024983adb2d2be778b3fbeacde5
data/.dockerignore ADDED
@@ -0,0 +1 @@
1
+ Gemfile.lock
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *~
2
+ !.rubocop_todo.yml
3
+ !.rubocop.yml
4
+ !.travis.yml
5
+ !.dockerignore
6
+ pkg/*
7
+ doc/*
8
+ Gemfile.lock
9
+ *.gem
10
+ bin
11
+ docs/_build
12
+ *.bak
13
+ *.iml
14
+ .bundle
15
+ .rakeTasks
16
+ .yardoc
17
+
18
+ coverage
data/.rubocop.yml ADDED
@@ -0,0 +1,58 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ AllCops:
4
+ TargetRubyVersion: 2.5
5
+ Exclude:
6
+ - 'lib/reach-ruby/rest/**/*'
7
+ - 'spec/integration/**/*'
8
+ - 'lib/reach-ruby/version.rb'
9
+ - 'lib/reach-ruby/util/configuration.rb'
10
+ - 'vendor/**/*'
11
+
12
+ Layout/LineLength:
13
+ Max: 120
14
+ Exclude:
15
+ - 'spec/**/*'
16
+
17
+ Style/BlockDelimiters:
18
+ Exclude:
19
+ - 'spec/**/*'
20
+
21
+ Lint/AmbiguousBlockAssociation:
22
+ Exclude:
23
+ - 'spec/**/*'
24
+
25
+ Metrics/BlockLength:
26
+ Exclude:
27
+ - 'spec/**/*'
28
+ - reach-ruby.gemspec
29
+
30
+ Layout/HeredocIndentation:
31
+ Enabled: false
32
+
33
+ Metrics/ClassLength:
34
+ Max: 175
35
+
36
+ Metrics/MethodLength:
37
+ Max: 25
38
+
39
+ Metrics/ParameterLists:
40
+ Max: 20
41
+
42
+ Metrics/AbcSize:
43
+ Enabled: false
44
+
45
+ Metrics/PerceivedComplexity:
46
+ Enabled: false
47
+
48
+ Metrics/CyclomaticComplexity:
49
+ Enabled: false
50
+
51
+ Style/HashEachMethods:
52
+ Enabled: true
53
+
54
+ Style/HashTransformKeys:
55
+ Enabled: false
56
+
57
+ Style/HashTransformValues:
58
+ Enabled: false
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,193 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2022-01-13 21:45:15 UTC using RuboCop version 1.24.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 2
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
12
+ # Include: **/*.gemspec
13
+ Gemspec/OrderedDependencies:
14
+ Exclude:
15
+ - 'reach-ruby.gemspec'
16
+
17
+ # Offense count: 1
18
+ # Configuration parameters: Include.
19
+ # Include: **/*.gemspec
20
+ Gemspec/RequiredRubyVersion:
21
+ Exclude:
22
+ - 'reach-ruby.gemspec'
23
+
24
+ # Offense count: 2
25
+ # Cop supports --auto-correct.
26
+ Layout/EmptyLineAfterGuardClause:
27
+ Exclude:
28
+ - 'lib/rack/reach_webhook_authentication.rb'
29
+ - 'lib/reach-ruby/framework/serialize.rb'
30
+
31
+ # Offense count: 3
32
+ # Configuration parameters: AllowedMethods.
33
+ # AllowedMethods: enums
34
+ Lint/ConstantDefinitionInBlock:
35
+ Exclude:
36
+ - 'spec/rest/client_spec.rb'
37
+
38
+ # Offense count: 1
39
+ Lint/MissingSuper:
40
+ Exclude:
41
+ - 'lib/reach-ruby/framework/rest/error.rb'
42
+
43
+ # Offense count: 1
44
+ Lint/SelfAssignment:
45
+ Exclude:
46
+ - 'lib/reach-ruby/framework/rest/version.rb'
47
+
48
+ # Offense count: 1
49
+ # Cop supports --auto-correct.
50
+ # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
51
+ Lint/UnusedBlockArgument:
52
+ Exclude:
53
+ - 'spec/rack/reach_webhook_authentication_spec.rb'
54
+
55
+ # Offense count: 4
56
+ # Cop supports --auto-correct.
57
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
58
+ Lint/UnusedMethodArgument:
59
+ Exclude:
60
+ - 'lib/reach-ruby.rb'
61
+ - 'lib/reach-ruby/framework/rest/page.rb'
62
+ - 'spec/holodeck/holodeck.rb'
63
+
64
+ # Offense count: 14
65
+ Lint/UselessAssignment:
66
+ Exclude:
67
+ - 'spec/rack/reach_webhook_authentication_spec.rb'
68
+
69
+ # Offense count: 6
70
+ # Configuration parameters: Max, CountKeywordArgs.
71
+ Metrics/ParameterLists:
72
+ MaxOptionalParameters: 6
73
+
74
+ # Offense count: 1
75
+ # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
76
+ # CheckDefinitionPathHierarchyRoots: lib, spec, test, src
77
+ # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
78
+ Naming/FileName:
79
+ Exclude:
80
+ - 'lib/reach-ruby.rb'
81
+
82
+ # Offense count: 2
83
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
84
+ # AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
85
+ Naming/MethodParameterName:
86
+ Exclude:
87
+ - 'lib/reach-ruby/security/request_validator.rb'
88
+
89
+
90
+ # Offense count: 3
91
+ # Cop supports --auto-correct.
92
+ Style/CaseLikeIf:
93
+ Exclude:
94
+ - 'lib/reach-ruby/framework/serialize.rb'
95
+
96
+ # Offense count: 40
97
+ # Configuration parameters: AllowedConstants.
98
+ Style/Documentation:
99
+ Enabled: false
100
+
101
+ # Offense count: 1
102
+ # Cop supports --auto-correct.
103
+ Style/Encoding:
104
+ Exclude:
105
+ - 'reach-ruby.gemspec'
106
+
107
+ # Offense count: 2
108
+ # Cop supports --auto-correct.
109
+ Style/ExpandPathArguments:
110
+ Exclude:
111
+ - 'spec/spec_helper.rb'
112
+ - 'reach-ruby.gemspec'
113
+
114
+ # Offense count: 24
115
+ # Cop supports --auto-correct.
116
+ # Configuration parameters: EnforcedStyle.
117
+ # SupportedStyles: always, always_true, never
118
+ Style/FrozenStringLiteralComment:
119
+ Enabled: false
120
+
121
+ # Offense count: 1
122
+ # Cop supports --auto-correct.
123
+ Style/GlobalStdStream:
124
+ Exclude:
125
+ - 'spec/rest/client_spec.rb'
126
+
127
+ # Offense count: 3
128
+ # Configuration parameters: MinBodyLength.
129
+ Style/GuardClause:
130
+ Exclude:
131
+ - 'lib/reach-ruby/framework/rest/page.rb'
132
+
133
+
134
+ # Offense count: 13
135
+ # Cop supports --auto-correct.
136
+ Style/IfUnlessModifier:
137
+ Exclude:
138
+ - 'lib/reach-ruby/framework/rest/page.rb'
139
+ - 'lib/reach-ruby/framework/rest/version.rb'
140
+
141
+
142
+ # Offense count: 2
143
+ # Cop supports --auto-correct.
144
+ Style/RedundantFileExtensionInRequire:
145
+ Exclude:
146
+ - 'spec/spec_helper.rb'
147
+
148
+ # Offense count: 2
149
+ # Cop supports --auto-correct.
150
+ Style/RedundantSelf:
151
+ Exclude:
152
+ - 'lib/reach-ruby/framework/serialize.rb'
153
+
154
+ # Offense count: 16
155
+ # Cop supports --auto-correct.
156
+ # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
157
+ # SupportedStyles: slashes, percent_r, mixed
158
+ Style/RegexpLiteral:
159
+ Exclude:
160
+ - 'lib/reach-ruby/framework/rest/domain.rb'
161
+ - 'lib/reach-ruby/framework/rest/helper.rb'
162
+ - 'lib/reach-ruby/framework/rest/version.rb'
163
+ - 'spec/rack/reach_webhook_authentication_spec.rb'
164
+
165
+ # Offense count: 12
166
+ # Cop supports --auto-correct.
167
+ # Configuration parameters: Mode.
168
+ Style/StringConcatenation:
169
+ Exclude:
170
+ - 'examples/examples.rb'
171
+ - 'lib/reach-ruby/framework/request.rb'
172
+ - 'lib/reach-ruby/framework/rest/error.rb'
173
+ - 'lib/reach-ruby/framework/serialize.rb'
174
+ - 'lib/reach-ruby/http/http_client.rb'
175
+ - 'spec/framework/request_spec.rb'
176
+ - 'spec/spec_helper.rb'
177
+
178
+ # Offense count: 7
179
+ # Cop supports --auto-correct.
180
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
181
+ # SupportedStyles: single_quotes, double_quotes
182
+ Style/StringLiterals:
183
+ Exclude:
184
+ - 'Gemfile'
185
+ - 'spec/framework/serialize_spec.rb'
186
+
187
+
188
+ # Offense count: 16
189
+ # Cop supports --auto-correct.
190
+ # Configuration parameters: MinSize, WordRegex.
191
+ # SupportedStyles: percent, brackets
192
+ Style/WordArray:
193
+ EnforcedStyle: brackets
data/AUTHORS.md ADDED
@@ -0,0 +1,52 @@
1
+ Authors
2
+ =======
3
+
4
+ A huge thanks to all of our contributors:
5
+
6
+
7
+ - Adam Ballai
8
+ - Alexander Murmann & Ryan Spore
9
+ - Alexandre Payment
10
+ - Andres Jaan Tack
11
+ - Andrew Benton
12
+ - Billy Chia
13
+ - Brian Levine
14
+ - Caley Woods
15
+ - Carlos Diaz-Padron
16
+ - Connor Montgomery
17
+ - Doug Black
18
+ - Elaine Tsai
19
+ - Fiona Tay & Will Read
20
+ - Geoff Petrie
21
+ - Guille Carlos
22
+ - Jeremy Franz
23
+ - Jingming Niu
24
+ - Josh Hull
25
+ - Joël Franusic
26
+ - K Gautam Pai
27
+ - Karl Freeman
28
+ - Karthik Sirasanagandla
29
+ - Kevin Burke
30
+ - Kush Kella
31
+ - Kyle Conroy
32
+ - Leo Adamek
33
+ - Matt Eldridge
34
+ - Matt Nowack
35
+ - Michael Wawra
36
+ - Moncef Belyamani
37
+ - Nate Berkopec
38
+ - Oscar
39
+ - Oscar Sanchez
40
+ - Phil Nash
41
+ - Rafael Chacon
42
+ - Ryan Bigg
43
+ - Ryan Cavicchioni
44
+ - Ryan Spore
45
+ - Sam Kimbrel
46
+ - Senthil Ramakrishnan
47
+ - Tom Moor
48
+ - Torey Heinz
49
+ - Vipul A M
50
+ - liz rush
51
+ - matt
52
+ - vfrride
data/CHANGES.md ADDED
@@ -0,0 +1,3 @@
1
+ reach-ruby changelog
2
+ =====================
3
+
@@ -0,0 +1,73 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
9
+ level of experience, education, socio-economic status, nationality, personal
10
+ appearance, race, religion, or sexual identity and orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ - Using welcoming and inclusive language
18
+ - Being respectful of differing viewpoints and experiences
19
+ - Gracefully accepting constructive criticism
20
+ - Focusing on what is best for the community
21
+ - Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ - The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ - Trolling, insulting/derogatory comments, and personal or political attacks
28
+ - Public or private harassment
29
+ - Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ - Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72
+
73
+ [homepage]: https://www.contributor-covenant.org
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,163 @@
1
+ # Contributing to `reach-ruby`
2
+
3
+ We'd love for you to contribute to our source code and to make `reach-ruby`
4
+ even better than it is today! Here are the guidelines we'd like you to follow:
5
+
6
+ - [Code of Conduct](#coc)
7
+ - [Question or Problem?](#question)
8
+ - [Issues and Bugs](#issue)
9
+ - [Feature Requests](#feature)
10
+ - [Documentation fixes](#docs)
11
+ - [Submission Guidelines](#submit)
12
+ - [Coding Rules](#rules)
13
+
14
+
15
+ ## <a name="coc"></a> Code of Conduct
16
+
17
+ Help us keep `reach-ruby` open and inclusive. Please be kind to and considerate
18
+ of other developers, as we all have the same goal: make `reach-ruby` as good as
19
+ it can be.
20
+
21
+ ## <a name="question"></a> Got an API/Product Question or Problem?
22
+
23
+ If you have questions about how to use `reach-ruby`, please see our
24
+ [docs](./README.md), and if you don't find the answer there, please contact
25
+ [help@talkylabs.com](mailto:help@talkylabs.com) with any issues you have.
26
+
27
+ ## <a name="issue"></a> Found an Issue?
28
+
29
+ If you find a bug in the source code or a mistake in the documentation, you can
30
+ help us by submitting [an issue][issue-link]. If the file in which the error
31
+ exists has this header:
32
+ ```
33
+ /*
34
+ * This code was generated by
35
+ * ___ ___ _ ___ _ _ _____ _ _ _ ___ ___ _ ___ ___ ___ _ ___ ___ ___ _ _ ___ ___ _ _____ ___ ___
36
+ * | _ \ __| /_\ / __| || |__|_ _/_\ | | | |/ | \ / / | /_\ | _ ) __|___ / _ \ /_\ |_ _|__ / __| __| \| | __| _ \ /_\_ _/ _ \| _ \
37
+ * | / _| / _ \ (__| __ |___|| |/ _ \| |__| ' < \ V /| |__ / _ \| _ \__ \___| (_) / _ \ | |___| (_ | _|| .` | _|| / / _ \| || (_) | /
38
+ * |_|_\___/_/ \_\___|_||_| |_/_/ \_\____|_|\_\ |_| |____/_/ \_\___/___/ \___/_/ \_\___| \___|___|_|\_|___|_|_\/_/ \_\_| \___/|_|_\
39
+ *
40
+ * Reach - XXXX
41
+ * YYY
42
+ *
43
+ * NOTE: This class is auto generated by OpenAPI Generator.
44
+ * https://openapi-generator.tech
45
+ * Do not edit the class manually.
46
+ */
47
+ ```
48
+ then it is a generated file and the change will need to be made by us, but
49
+ submitting an issue will help us track it and keep you up-to-date. If the file
50
+ isn't generated, you can help us out even more by submitting a Pull Request with
51
+ a fix.
52
+
53
+ **Please see the [Submission Guidelines](#submit) below.**
54
+
55
+ ## <a name="feature"></a> Want a Feature?
56
+
57
+ You can request a new feature by submitting an issue to our
58
+ [GitHub Repository][github]. If you would like to implement a new feature then
59
+ consider what kind of change it is:
60
+
61
+ * **Major Changes** that you wish to contribute to the project should be
62
+ discussed first with `reach-ruby` contributors in an issue or pull request so
63
+ that we can develop a proper solution and better coordinate our efforts,
64
+ prevent duplication of work, and help you to craft the change so that it is
65
+ successfully accepted into the project.
66
+ * **Small Changes** can be crafted and submitted to the
67
+ [GitHub Repository][github] as a Pull Request.
68
+
69
+ ## <a name="docs"></a> Want a Doc Fix?
70
+
71
+ If you want to help improve the docs in the helper library, it's a good idea to
72
+ let others know what you're working on to minimize duplication of effort. Create
73
+ a new issue (or comment on a related existing one) to let others know what
74
+ you're working on.
75
+
76
+ For large fixes, please build and test the documentation before submitting the
77
+ PR to be sure you haven't accidentally introduced layout or formatting issues.
78
+
79
+ ## <a name="submit"></a> Submission Guidelines
80
+
81
+ ### Submitting an Issue
82
+ Before you submit your issue search the archive, maybe your question was already
83
+ answered.
84
+
85
+ If your issue appears to be a bug, and hasn't been reported, open a new issue.
86
+ Help us to maximize the effort we can spend fixing issues and adding new
87
+ features by not reporting duplicate issues. Providing the following information
88
+ will increase the chances of your issue being dealt with quickly:
89
+
90
+ * **Overview of the Issue** - if an error is being thrown a non-minified stack
91
+ trace helps
92
+ * **Motivation for or Use Case** - explain why this is a bug for you
93
+ * **`reach-ruby` Version(s)** - is it a regression?
94
+ * **Operating System (if relevant)** - is this a problem with all systems or
95
+ only specific ones?
96
+ * **Reproduce the Error** - provide an isolated code snippet or an unambiguous
97
+ set of steps.
98
+ * **Related Issues** - has a similar issue been reported before?
99
+ * **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point
100
+ to what might be causing the problem (line of code or commit)
101
+
102
+ **If you get help, help others. Good karma rules!**
103
+
104
+ ### Submitting a Pull Request
105
+ Before you submit your pull request consider the following guidelines:
106
+
107
+ * Search [GitHub][github] for an open or closed Pull Request that relates to
108
+ your submission. You don't want to duplicate effort.
109
+ * Make your changes in a new git branch:
110
+
111
+ ```shell
112
+ git checkout -b my-fix-branch main
113
+ ```
114
+
115
+ * Create your patch, **including appropriate test cases**.
116
+ * Follow our [Coding Rules](#rules).
117
+ * Run the full `reach-ruby` test suite (aliased by `make test`), and ensure
118
+ that all tests pass.
119
+ * Commit your changes using a descriptive commit message.
120
+
121
+ ```shell
122
+ git commit -a
123
+ ```
124
+ Note: the optional commit `-a` command line option will automatically "add"
125
+ and "rm" edited files.
126
+
127
+ * Build your changes locally to ensure all the tests pass:
128
+
129
+ ```shell
130
+ make test
131
+ ```
132
+
133
+ * Push your branch to GitHub:
134
+
135
+ ```shell
136
+ git push origin my-fix-branch
137
+ ```
138
+
139
+ In GitHub, send a pull request to `reach-ruby:main`.
140
+ If we suggest changes, then:
141
+
142
+ * Make the required updates.
143
+ * Re-run the `reach-ruby` test suite to ensure tests are still passing.
144
+ * Commit your changes to your branch (e.g. `my-fix-branch`).
145
+ * Push the changes to your GitHub repository (this will update your Pull Request).
146
+
147
+ That's it! Thank you for your contribution!
148
+
149
+ #### After your pull request is merged
150
+
151
+ After your pull request is merged, you can safely delete your branch and pull
152
+ the changes from the main (upstream) repository.
153
+
154
+ ## <a name="rules"></a> Coding Rules
155
+
156
+ To ensure consistency throughout the source code, keep these rules in mind as
157
+ you are working:
158
+
159
+ * All features or bug fixes **must be tested** by one or more tests.
160
+ * All classes and methods **must be documented**.
161
+
162
+ [issue-link]: https://github.com/talkylabs/reach-ruby/issues/new
163
+ [github]: https://github.com/talkylabs/reach-ruby
data/Dockerfile ADDED
@@ -0,0 +1,9 @@
1
+ FROM ruby:2.4
2
+
3
+ RUN mkdir /talkylabs
4
+ WORKDIR /talkylabs
5
+
6
+ COPY . .
7
+
8
+ RUN bundle install
9
+ RUN bundle exec rake install
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+ gem 'simplecov', require: false, group: :test
3
+ gemspec
data/ISSUE_TEMPLATE.md ADDED
@@ -0,0 +1,30 @@
1
+ <!--
2
+ If this is a feature request, make sure you search Issues for an existing request before creating a new one!
3
+
4
+ Please utilize the template below to help us resolve your issue.
5
+
6
+ Note that many issues can be resolved by updating to the latest version.
7
+ -->
8
+
9
+ ### Issue Summary
10
+ A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, or code examples.
11
+
12
+ ### Steps to Reproduce
13
+ 1. This is the first step
14
+ 2. This is the second step
15
+ 3. Further steps, etc.
16
+
17
+ ### Code Snippet
18
+ ```ruby
19
+ # paste code here
20
+ ```
21
+
22
+ ### Exception/Log
23
+ ```
24
+ # paste exception/log here
25
+ ```
26
+
27
+ ### Technical details:
28
+ * reach-ruby version:
29
+ * ruby version:
30
+
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (C) 2023, TalkyLabs, Inc. <help@talkylabs.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
+ of the Software, and to permit persons to whom the Software is furnished to do
10
+ so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/Makefile ADDED
@@ -0,0 +1,34 @@
1
+ .PHONY: githooks install test test-docker lint docs docker-build docker-push
2
+
3
+ githooks:
4
+ ln -sf ../../githooks/pre-commit .git/hooks/pre-commit
5
+
6
+ install:
7
+ bundle install --with development; bundle exec rake install
8
+
9
+ test:
10
+ bundle exec rake spec
11
+
12
+ test-docker:
13
+ docker build -t talkylabs/reach-ruby .
14
+ docker run talkylabs/reach-ruby bundle exec rake spec
15
+
16
+ docs:
17
+ bundle exec yard doc --output-dir ./doc
18
+
19
+ authors:
20
+ echo "Authors\n=======\n\nA huge thanks to all of our contributors:\n\n" > AUTHORS.md
21
+ git log --raw | grep "^Author: " | cut -d ' ' -f2- | cut -d '<' -f1 | sed 's/^/- /' | sort | uniq >> AUTHORS.md
22
+
23
+ API_DEFINITIONS_SHA=$(shell git log --oneline | grep Regenerated | head -n1 | cut -d ' ' -f 5)
24
+ CURRENT_TAG=$(shell expr "${GITHUB_TAG}" : ".*-rc.*" >/dev/null && echo "rc" || echo "latest")
25
+ docker-build:
26
+ docker build -t talkylabs/reach-ruby .
27
+ docker tag talkylabs/reach-ruby talkylabs/reach-ruby:${GITHUB_TAG}
28
+ docker tag talkylabs/reach-ruby talkylabs/reach-ruby:apidefs-${API_DEFINITIONS_SHA}
29
+ docker tag talkylabs/reach-ruby talkylabs/reach-ruby:${CURRENT_TAG}
30
+
31
+ docker-push:
32
+ docker push talkylabs/reach-ruby:${GITHUB_TAG}
33
+ docker push talkylabs/reach-ruby:apidefs-${API_DEFINITIONS_SHA}
34
+ docker push talkylabs/reach-ruby:${CURRENT_TAG}