redbreast 1.4.2 → 1.5.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 +4 -4
- data/.github/CODEOWNERS +1 -0
- data/.github/ISSUE_TEMPLATE/bug_report.yml +55 -0
- data/.github/ISSUE_TEMPLATE/feature_request.yml +18 -0
- data/.github/pull_request_template.md +42 -0
- data/CODE_OF_CONDUCT.md +15 -15
- data/CONTRIBUTING.md +52 -0
- data/LICENSE +201 -0
- data/README.md +115 -93
- data/SECURITY.md +19 -0
- data/lib/redbreast/template_generators/tests/images/swiftui_images_tests_template_generator.rb +1 -0
- data/lib/redbreast/version.rb +1 -1
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aaf848735bc0c83653a069920ac23cf6b1738d911f365a4348e26cef992a501f
|
4
|
+
data.tar.gz: 1e6b9f18377b35f3f9904edd217a8e2bf175c245bedbb627e1a89ff10fc822f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdea174af0f29ac9340241eac7ba03a28dc05459dd5dbb2fcff9604f4c49f541c23a93a3d0ddc15e4792db09013f91da494b5581e54558cdac7a0b75ef965a7c
|
7
|
+
data.tar.gz: 2a5b5ea64841ff0faffd76105aa1b830a72d221d86133910adacefbe106cc12141fb3c6cd58588f2b98625797fd4199f9e24efc8f6cf6cbfd4c707cb59e58727
|
data/.github/CODEOWNERS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
* @ssvetina
|
@@ -0,0 +1,55 @@
|
|
1
|
+
name: Bug report
|
2
|
+
description: File a bug report.
|
3
|
+
labels: bug
|
4
|
+
body:
|
5
|
+
- type: textarea
|
6
|
+
id: description
|
7
|
+
attributes:
|
8
|
+
label: Description
|
9
|
+
description: A clear and concise description of what the bug is.
|
10
|
+
validations:
|
11
|
+
required: true
|
12
|
+
- type: textarea
|
13
|
+
id: environment
|
14
|
+
attributes:
|
15
|
+
label: Environment
|
16
|
+
description: |
|
17
|
+
An environment information where issue occurred. Try to provide as much information as possible, including:
|
18
|
+
- device name, model and manufacturer
|
19
|
+
- operating system version
|
20
|
+
- software name, version and build number
|
21
|
+
- additional information (e.g. dependencies, IDE, etc.)
|
22
|
+
value: |
|
23
|
+
- Device:
|
24
|
+
- Operating system:
|
25
|
+
- Software information:
|
26
|
+
- Additional information:
|
27
|
+
validations:
|
28
|
+
required: true
|
29
|
+
- type: textarea
|
30
|
+
id: reproduction-steps
|
31
|
+
attributes:
|
32
|
+
label: Reproduction steps
|
33
|
+
description: Steps to reproduce the behavior.
|
34
|
+
value: |
|
35
|
+
1.
|
36
|
+
2.
|
37
|
+
3.
|
38
|
+
...
|
39
|
+
validations:
|
40
|
+
required: true
|
41
|
+
- type: textarea
|
42
|
+
id: expected-behavior
|
43
|
+
attributes:
|
44
|
+
label: Expected behavior
|
45
|
+
description: A clear and concise description of what you expected to happen.
|
46
|
+
validations:
|
47
|
+
required: true
|
48
|
+
- type: textarea
|
49
|
+
id: additional-information
|
50
|
+
attributes:
|
51
|
+
label: Additional information
|
52
|
+
description: Any additional information that might be helpful in solving the issue.
|
53
|
+
validations:
|
54
|
+
required: false
|
55
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
name: Feature request
|
2
|
+
description: Propose a new feature or an idea for this project.
|
3
|
+
labels: enhancement
|
4
|
+
body:
|
5
|
+
- type: textarea
|
6
|
+
id: feature-description
|
7
|
+
attributes:
|
8
|
+
label: Feature description
|
9
|
+
description: A clear and concise description of the feature request, including what problem it solves.
|
10
|
+
validations:
|
11
|
+
required: true
|
12
|
+
- type: textarea
|
13
|
+
id: additional-information
|
14
|
+
attributes:
|
15
|
+
label: Additional information
|
16
|
+
description: An additional information or screenshots about the feature request.
|
17
|
+
validations:
|
18
|
+
required: false
|
@@ -0,0 +1,42 @@
|
|
1
|
+
## Summary
|
2
|
+
|
3
|
+
<!--
|
4
|
+
Provide an overview of what this pull request aims to address or achieve.
|
5
|
+
-->
|
6
|
+
|
7
|
+
**Related issue**: <!-- Add the issue number in format [#<number>](link) or set to "None" if this is not related to a reported issue. -->
|
8
|
+
|
9
|
+
## Changes
|
10
|
+
|
11
|
+
### Type
|
12
|
+
|
13
|
+
- [ ] **Feature**: This pull request introduces a new feature.
|
14
|
+
- [ ] **Bug fix**: This pull request fixes a bug.
|
15
|
+
- [ ] **Refactor**: This pull request refactors existing code.
|
16
|
+
- [ ] **Documentation**: This pull request updates documentation.
|
17
|
+
- [ ] **Other**: This pull request makes other changes.
|
18
|
+
|
19
|
+
#### Additional information
|
20
|
+
|
21
|
+
- [ ] This pull request introduces a **breaking change**.
|
22
|
+
|
23
|
+
### Description
|
24
|
+
|
25
|
+
<!--
|
26
|
+
Describe the specific changes made in this pull request, including any technical details or architectural decisions.
|
27
|
+
|
28
|
+
If applicable, include additional information like screenshots, logs or other data that demonstrate the changes.
|
29
|
+
-->
|
30
|
+
|
31
|
+
## Checklist
|
32
|
+
|
33
|
+
- [ ] I have performed a self-review of my own code.
|
34
|
+
- [ ] I have tested my changes, including edge cases.
|
35
|
+
- [ ] I have added necessary tests for the changes introduced (if applicable).
|
36
|
+
- [ ] I have updated the documentation to reflect my changes (if applicable).
|
37
|
+
|
38
|
+
## Additional notes
|
39
|
+
|
40
|
+
<!--
|
41
|
+
Add any additional comments, instructions, or insights about this pull request.
|
42
|
+
-->
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
#
|
1
|
+
# Code of conduct
|
2
2
|
|
3
|
-
## Our
|
3
|
+
## Our pledge
|
4
4
|
|
5
5
|
In the interest of fostering an open and welcoming environment, we as
|
6
6
|
contributors and maintainers pledge to making participation in our project and
|
7
7
|
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression,
|
9
|
-
|
10
|
-
orientation.
|
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
11
|
|
12
|
-
## Our
|
12
|
+
## Our standards
|
13
13
|
|
14
14
|
Examples of behavior that contributes to creating a positive environment
|
15
15
|
include:
|
@@ -23,15 +23,15 @@ include:
|
|
23
23
|
Examples of unacceptable behavior by participants include:
|
24
24
|
|
25
25
|
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
26
|
+
advances
|
27
27
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
28
|
* Public or private harassment
|
29
29
|
* Publishing others' private information, such as a physical or electronic
|
30
|
-
|
30
|
+
address, without explicit permission
|
31
31
|
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
|
32
|
+
professional setting
|
33
33
|
|
34
|
-
## Our
|
34
|
+
## Our responsibilities
|
35
35
|
|
36
36
|
Project maintainers are responsible for clarifying the standards of acceptable
|
37
37
|
behavior and are expected to take appropriate and fair corrective action in
|
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
|
|
55
55
|
## Enforcement
|
56
56
|
|
57
57
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at
|
58
|
+
reported by contacting the project team at opensource@infinum.com. All
|
59
59
|
complaints will be reviewed and investigated and will result in a response that
|
60
60
|
is deemed necessary and appropriate to the circumstances. The project team is
|
61
61
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
@@ -67,8 +67,8 @@ members of the project's leadership.
|
|
67
67
|
|
68
68
|
## Attribution
|
69
69
|
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant]
|
71
|
-
available
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4,
|
71
|
+
available [here](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html).
|
72
72
|
|
73
|
-
|
74
|
-
[
|
73
|
+
For answers to common questions about this code of conduct, visit
|
74
|
+
the [FAQ](https://www.contributor-covenant.org/faq) page.
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Contributing guidelines
|
2
|
+
|
3
|
+
Welcome to our project! We appreciate your interest in helping us improve it.
|
4
|
+
|
5
|
+
## How can I contribute?
|
6
|
+
|
7
|
+
There are multiple ways in which you can help us make this project even better.
|
8
|
+
|
9
|
+
- Reporting bugs or suggesting new features
|
10
|
+
- Contributing code improvements or new features
|
11
|
+
- Writing, updating, or fixing tests
|
12
|
+
- Improving documentation, including inline comments, user manuals, and developer guides
|
13
|
+
|
14
|
+
## Issue reporting
|
15
|
+
|
16
|
+
If you found a bug or have an idea for a new feature, please open an issue. Be sure to include a clear and descriptive title, as well as a detailed description of the bug or feature.
|
17
|
+
|
18
|
+
To avoid duplicate issues, please check if a similar issue has already been created.
|
19
|
+
|
20
|
+
## Making changes
|
21
|
+
|
22
|
+
To make changes to the project, please follow these steps:
|
23
|
+
|
24
|
+
1. Fork the project repository.
|
25
|
+
2. Create a new branch for your changes, based on the project's main branch.
|
26
|
+
3. Make your changes. Ensure you've followed the coding style and standards.
|
27
|
+
4. Test your changes thoroughly, ensuring all existing tests pass and new tests cover your changes where appropriate.
|
28
|
+
5. Commit your changes with a clear and descriptive commit message.
|
29
|
+
6. Push your changes to your fork.
|
30
|
+
7. Create a pull request to the project's main branch.
|
31
|
+
|
32
|
+
Once we check everything, we will merge the changes into the main branch and include it in the next release.
|
33
|
+
|
34
|
+
## Guidelines for pull requests
|
35
|
+
|
36
|
+
When submitting a pull request, please ensure that:
|
37
|
+
|
38
|
+
- Your pull request is concise and well-scoped
|
39
|
+
- Your code is properly tested
|
40
|
+
- Your code adheres to the project's coding standards and style guidelines
|
41
|
+
- Your commit message is clear and descriptive
|
42
|
+
- Your pull request includes a description of the changes you have made and why you have made them
|
43
|
+
|
44
|
+
Try to avoid creating large pull requests that include multiple unrelated changes. Instead, break them down into smaller, more focused pull requests. This will make it easier for us to review and merge your changes.
|
45
|
+
|
46
|
+
## Code of conduct
|
47
|
+
|
48
|
+
We want to ensure a welcoming environment for everyone. With that in mind, all contributors are expected to follow our [code of conduct](/CODE_OF_CONDUCT.md).
|
49
|
+
|
50
|
+
## License
|
51
|
+
|
52
|
+
By submitting a pull request you agree to release that code under the project's [license](/LICENSE).
|
data/LICENSE
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
data/README.md
CHANGED
@@ -1,107 +1,38 @@
|
|
1
1
|
# Redbreast
|
2
2
|
|
3
|
-
[](https://github.com/infinum/redbreast/blob/master/LICENSE.md)
|
4
|
-
|
5
3
|
<p align="center">
|
6
4
|
<img src="redbreast.svg" width="300" max-width="50%" alt="Japx"/>
|
7
5
|
</p>
|
8
6
|
|
9
|
-
|
10
|
-
|
11
|
-
Add this line to your application's Gemfile:
|
12
|
-
|
13
|
-
```ruby
|
14
|
-
gem 'redbreast'
|
15
|
-
```
|
16
|
-
|
17
|
-
And then execute:
|
18
|
-
|
19
|
-
$ bundle
|
20
|
-
|
21
|
-
Or install it yourself as:
|
22
|
-
|
23
|
-
$ gem install redbreast
|
7
|
+
iOS strong image typing library
|
24
8
|
|
25
9
|
## Description
|
26
10
|
|
27
11
|
Redbreast is a gem used for generating extensions (categories) of UIImage or UIColor. In Swift it creates computed properties of images or colors that are in your assets folder. While in Objective-C it creates static methods that returns UIImage or UIColor object.
|
28
12
|
|
29
|
-
|
30
|
-
|
31
|
-
In this example we will show how will your extensions (catergories) look like after using Redbreast.
|
32
|
-
|
33
|
-
Lets say this is how your *Images.xcassets* folder looks like:
|
34
|
-
|
35
|
-
```
|
36
|
-
Images.xcassets
|
37
|
-
└── App // namespaced
|
38
|
-
│ └── Admin // namespaced
|
39
|
-
│ │ └── Report.imageset
|
40
|
-
│ │ └── User.imageset
|
41
|
-
│ └── Course
|
42
|
-
│ └── Assignment.imageset
|
43
|
-
│
|
44
|
-
└── AppLogo.imageset
|
45
|
-
│
|
46
|
-
└── Arrows
|
47
|
-
└── DownArrow.imageset
|
48
|
-
```
|
49
|
-
|
50
|
-
*App* and *Admin* are namespaced folders while *Course* and *Arrows* are not. If a folder is namespaced, enum with that folder name will appear in the exension and path to that image will contain folder name. In the other case, folders are ignored and images belong to the last namespaced folder.
|
13
|
+
## Table of contents
|
51
14
|
|
52
|
-
|
15
|
+
* [Getting started](#getting-started)
|
16
|
+
* [Usage](#usage)
|
17
|
+
* [Contributing](#contributing)
|
18
|
+
* [License](#license)
|
19
|
+
* [Credits](#credits)
|
53
20
|
|
54
|
-
|
55
|
-
extension UIImage {
|
21
|
+
## Getting started
|
56
22
|
|
57
|
-
|
58
|
-
static var downArrow: UIImage { return UIImage(named: "DownArrow", in: .main, compatibleWith: nil)! }
|
59
|
-
|
60
|
-
enum App {
|
23
|
+
Add this line to your application's Gemfile:
|
61
24
|
|
62
|
-
|
63
|
-
|
64
|
-
static var user: UIImage { return UIImage(named: "App/Admin/User", in: .main, compatibleWith: nil)! }
|
65
|
-
}
|
66
|
-
|
67
|
-
static var assignment: UIImage { return UIImage(named: "App/Assignment", in: .main, compatibleWith: nil)! }
|
68
|
-
}
|
69
|
-
}
|
25
|
+
```ruby
|
26
|
+
gem 'redbreast'
|
70
27
|
```
|
71
28
|
|
72
|
-
|
73
|
-
```objc
|
74
|
-
@implementation UIImage (ApplicationName)
|
75
|
-
|
76
|
-
+ (UIImage *)appLogo
|
77
|
-
{
|
78
|
-
return [UIImage imageNamed:@"AppLogo" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
|
79
|
-
}
|
80
|
-
|
81
|
-
+ (UIImage *)downArrow
|
82
|
-
{
|
83
|
-
return [UIImage imageNamed:@"DownArrow" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
|
84
|
-
}
|
85
|
-
|
86
|
-
+ (UIImage *)appAdminReport
|
87
|
-
{
|
88
|
-
return [UIImage imageNamed:@"App/Admin/Report" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
|
89
|
-
}
|
90
|
-
|
91
|
-
+ (UIImage *)appAdminUser
|
92
|
-
{
|
93
|
-
return [UIImage imageNamed:@"App/Admin/User" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
|
94
|
-
}
|
29
|
+
And then execute:
|
95
30
|
|
96
|
-
|
97
|
-
{
|
98
|
-
return [UIImage imageNamed:@"App/Assignment" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
|
99
|
-
}
|
31
|
+
$ bundle
|
100
32
|
|
101
|
-
|
102
|
-
```
|
33
|
+
Or install it yourself as:
|
103
34
|
|
104
|
-
|
35
|
+
$ gem install redbreast
|
105
36
|
|
106
37
|
## Usage
|
107
38
|
|
@@ -188,26 +119,117 @@ When you finish creating `.redbreast.yml` file, run `redbreast generate` and al
|
|
188
119
|
|
189
120
|
Command `redbreast install` will setup a file generator in your project and whenever you build it, it will create new image/color names.
|
190
121
|
|
122
|
+
In this example we will show how will your extensions (catergories) look like after using Redbreast.
|
123
|
+
|
124
|
+
Lets say this is how your *Images.xcassets* folder looks like:
|
125
|
+
|
126
|
+
```
|
127
|
+
Images.xcassets
|
128
|
+
└── App // namespaced
|
129
|
+
│ └── Admin // namespaced
|
130
|
+
│ │ └── Report.imageset
|
131
|
+
│ │ └── User.imageset
|
132
|
+
│ └── Course
|
133
|
+
│ └── Assignment.imageset
|
134
|
+
│
|
135
|
+
└── AppLogo.imageset
|
136
|
+
│
|
137
|
+
└── Arrows
|
138
|
+
└── DownArrow.imageset
|
139
|
+
```
|
140
|
+
|
141
|
+
*App* and *Admin* are namespaced folders while *Course* and *Arrows* are not. If a folder is namespaced, enum with that folder name will appear in the exension and path to that image will contain folder name. In the other case, folders are ignored and images belong to the last namespaced folder.
|
142
|
+
|
143
|
+
Redbreast will generate a file similar to this one varying on app name (more in Usage chapter). As you can see *Arrows* folder is not namespaced so there isn't an enum called *Arrows*. Because of this *downArrow* is in root of extension and is accessed by writing `UIImage.downArrow`. *Report* image is in two namespaced folders (*App* and *Admin*) so path for it is *App/Admin* and it located inside both enums. *Report* is accessed by `UIImage.App.Admin.report`.
|
144
|
+
|
145
|
+
```swift
|
146
|
+
extension UIImage {
|
147
|
+
|
148
|
+
static var appLogo: UIImage { return UIImage(named: "AppLogo", in: .main, compatibleWith: nil)! }
|
149
|
+
static var downArrow: UIImage { return UIImage(named: "DownArrow", in: .main, compatibleWith: nil)! }
|
150
|
+
|
151
|
+
enum App {
|
152
|
+
|
153
|
+
enum Admin {
|
154
|
+
static var report: UIImage { return UIImage(named: "App/Admin/Report", in: .main, compatibleWith: nil)! }
|
155
|
+
static var user: UIImage { return UIImage(named: "App/Admin/User", in: .main, compatibleWith: nil)! }
|
156
|
+
}
|
157
|
+
|
158
|
+
static var assignment: UIImage { return UIImage(named: "App/Assignment", in: .main, compatibleWith: nil)! }
|
159
|
+
}
|
160
|
+
}
|
161
|
+
```
|
162
|
+
|
163
|
+
In Objective-C .h and .m files are generated. Because enums don't exist in Objc folder names are used in method name instead. Everything else is the same as in Swift.
|
164
|
+
```objc
|
165
|
+
@implementation UIImage (ApplicationName)
|
166
|
+
|
167
|
+
+ (UIImage *)appLogo
|
168
|
+
{
|
169
|
+
return [UIImage imageNamed:@"AppLogo" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
|
170
|
+
}
|
171
|
+
|
172
|
+
+ (UIImage *)downArrow
|
173
|
+
{
|
174
|
+
return [UIImage imageNamed:@"DownArrow" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
|
175
|
+
}
|
176
|
+
|
177
|
+
+ (UIImage *)appAdminReport
|
178
|
+
{
|
179
|
+
return [UIImage imageNamed:@"App/Admin/Report" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
|
180
|
+
}
|
181
|
+
|
182
|
+
+ (UIImage *)appAdminUser
|
183
|
+
{
|
184
|
+
return [UIImage imageNamed:@"App/Admin/User" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
|
185
|
+
}
|
186
|
+
|
187
|
+
+ (UIImage *)appAssignment
|
188
|
+
{
|
189
|
+
return [UIImage imageNamed:@"App/Assignment" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
|
190
|
+
}
|
191
|
+
|
192
|
+
@end
|
193
|
+
```
|
194
|
+
|
195
|
+
For more examples checkout the sample project.
|
196
|
+
|
191
197
|
## Contributing
|
192
198
|
|
193
|
-
|
199
|
+
We believe that the community can help us improve and build better a product.
|
200
|
+
Please refer to our [contributing guide](CONTRIBUTING.md) to learn about the types of contributions we accept and the process for submitting them.
|
194
201
|
|
195
|
-
|
202
|
+
To ensure that our community remains respectful and professional, we defined a [code of conduct](CODE_OF_CONDUCT.md) <!-- and [coding standards](<link>) --> that we expect all contributors to follow.
|
196
203
|
|
197
|
-
|
204
|
+
We appreciate your interest and look forward to your contributions.
|
198
205
|
|
199
206
|
## License
|
200
207
|
|
201
|
-
|
208
|
+
```text
|
209
|
+
Copyright 2024 Infinum
|
210
|
+
|
211
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
212
|
+
you may not use this file except in compliance with the License.
|
213
|
+
You may obtain a copy of the License at
|
214
|
+
|
215
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
216
|
+
|
217
|
+
Unless required by applicable law or agreed to in writing, software
|
218
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
219
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
220
|
+
See the License for the specific language governing permissions and
|
221
|
+
limitations under the License.
|
222
|
+
```
|
202
223
|
|
203
224
|
## Credits
|
204
225
|
|
205
|
-
Maintained and sponsored by [Infinum](
|
206
|
-
|
207
|
-
|
226
|
+
Maintained and sponsored by [Infinum](https://infinum.com).
|
227
|
+
|
228
|
+
<div align="center">
|
229
|
+
<a href='https://infinum.com'>
|
208
230
|
<picture>
|
209
231
|
<source srcset="https://assets.infinum.com/brand/logo/static/white.svg" media="(prefers-color-scheme: dark)">
|
210
232
|
<img src="https://assets.infinum.com/brand/logo/static/default.svg">
|
211
233
|
</picture>
|
212
|
-
|
213
|
-
</
|
234
|
+
</a>
|
235
|
+
</div>
|
data/SECURITY.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# Security
|
2
|
+
|
3
|
+
## Reporting security issues
|
4
|
+
|
5
|
+
At Infinum we are committed to ensuring the security of our software. If you have discovered a security vulnerability or have concerns regarding the security of our project, we encourage you to report it to us in a responsible manner.
|
6
|
+
|
7
|
+
If you discover a security vulnerability, please report it to us by emailing us at opensource@infinum.com. We will review your report, and if the issue is confirmed, we will work to resolve the issue as soon as possible and coordinate the release of a security patch.
|
8
|
+
|
9
|
+
## Responsible disclosure
|
10
|
+
|
11
|
+
We request that you practice responsible disclosure by allowing us time to investigate and address any reported vulnerabilities before making them public. We believe this approach helps protect our users and provides a better outcome for everyone involved.
|
12
|
+
|
13
|
+
## Preferred languages
|
14
|
+
|
15
|
+
We prefer all communication to be in English.
|
16
|
+
|
17
|
+
## Contributions
|
18
|
+
|
19
|
+
We greatly appreciate your help in keeping Infinum projects secure. Your efforts contribute to the ongoing improvement of our project's security.
|
data/lib/redbreast/template_generators/tests/images/swiftui_images_tests_template_generator.rb
CHANGED
@@ -13,6 +13,7 @@ module Redbreast
|
|
13
13
|
@testable import <%= bundle[:testableImport] %>
|
14
14
|
|
15
15
|
// THIS FILE IS AUTOGENERATED, DO NOT EDIT BY HAND
|
16
|
+
// swiftlint:disable function_body_length
|
16
17
|
class <%= File.basename(bundle[:outputTestPathImages], ".*") %>: XCTestCase {
|
17
18
|
|
18
19
|
func testIfImagesArePresent() {
|
data/lib/redbreast/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redbreast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maroje
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -130,16 +130,23 @@ executables:
|
|
130
130
|
extensions: []
|
131
131
|
extra_rdoc_files: []
|
132
132
|
files:
|
133
|
+
- ".github/CODEOWNERS"
|
134
|
+
- ".github/ISSUE_TEMPLATE/bug_report.yml"
|
135
|
+
- ".github/ISSUE_TEMPLATE/feature_request.yml"
|
136
|
+
- ".github/pull_request_template.md"
|
133
137
|
- ".gitignore"
|
134
138
|
- ".rspec"
|
135
139
|
- ".rubocop.yml"
|
136
140
|
- ".ruby-version"
|
137
141
|
- ".travis.yml"
|
138
142
|
- CODE_OF_CONDUCT.md
|
143
|
+
- CONTRIBUTING.md
|
139
144
|
- Gemfile
|
145
|
+
- LICENSE
|
140
146
|
- LICENSE.md
|
141
147
|
- README.md
|
142
148
|
- Rakefile
|
149
|
+
- SECURITY.md
|
143
150
|
- bin/console
|
144
151
|
- bin/setup
|
145
152
|
- exe/redbreast
|