redbreast 1.4.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c480f664a7236aa040c135bbb0ac9ab3b0094079def7706d52e622f8761e50fe
4
- data.tar.gz: 7d0c140bd021d378e57c10bc83bd46bef2c18cf47df4805d82b2f45a970fcbe0
3
+ metadata.gz: aaf848735bc0c83653a069920ac23cf6b1738d911f365a4348e26cef992a501f
4
+ data.tar.gz: 1e6b9f18377b35f3f9904edd217a8e2bf175c245bedbb627e1a89ff10fc822f0
5
5
  SHA512:
6
- metadata.gz: 4e189fc86aa4bb2908217306485a6a1a42d79347934f46b132e32b97111084508799363c6e4b23528b229778227a13f44ce1fb90ca9c344c5ee2ff778679784d
7
- data.tar.gz: e44abf29a209555d579a51d8cbbf9651f5c41b77d4a348c933b612992423aa8b83fb6631ff6b26f432ae74c0fba77c23a65e625034cadd33e5ddca41e3800e6d
6
+ metadata.gz: bdea174af0f29ac9340241eac7ba03a28dc05459dd5dbb2fcff9604f4c49f541c23a93a3d0ddc15e4792db09013f91da494b5581e54558cdac7a0b75ef965a7c
7
+ data.tar.gz: 2a5b5ea64841ff0faffd76105aa1b830a72d221d86133910adacefbe106cc12141fb3c6cd58588f2b98625797fd4199f9e24efc8f6cf6cbfd4c707cb59e58727
@@ -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
- # Contributor Covenant Code of Conduct
1
+ # Code of conduct
2
2
 
3
- ## Our Pledge
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, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
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 Standards
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
- address, without explicit permission
30
+ address, without explicit permission
31
31
  * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
32
+ professional setting
33
33
 
34
- ## Our Responsibilities
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 vlaho.poluta@infinum.hr. All
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][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
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
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
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/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Infinum
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,8 +1,24 @@
1
1
  # Redbreast
2
2
 
3
- ![](https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/Turdus-migratorius-002.jpg/440px-Turdus-migratorius-002.jpg)
3
+ <p align="center">
4
+ <img src="redbreast.svg" width="300" max-width="50%" alt="Japx"/>
5
+ </p>
4
6
 
5
- ## Installation
7
+ iOS strong image typing library
8
+
9
+ ## Description
10
+
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.
12
+
13
+ ## Table of contents
14
+
15
+ * [Getting started](#getting-started)
16
+ * [Usage](#usage)
17
+ * [Contributing](#contributing)
18
+ * [License](#license)
19
+ * [Credits](#credits)
20
+
21
+ ## Getting started
6
22
 
7
23
  Add this line to your application's Gemfile:
8
24
 
@@ -18,11 +34,90 @@ Or install it yourself as:
18
34
 
19
35
  $ gem install redbreast
20
36
 
21
- ## Description
37
+ ## Usage
22
38
 
23
- 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.
39
+ ### Init
40
+
41
+ After installing redbreast run `redbreast init` to create `.redbreast.yml` file. This file is used for generating your extensions.
42
+ In the init you will be prompted to:
43
+
44
+ * Choose a language in which colors/images will be generated.
45
+ * Input the application name (optional)
46
+ * Input bundle names (default is main)
47
+ * Input whether you want to omit namespacing (optional)
48
+ * Choose whether you want to generate images, colors or both
49
+ * Input the path to assets folder
50
+ * Input the path where the files will be created
51
+ * Choose to create tests for generated assets
24
52
 
25
- ### Example ###
53
+ This is how your `.redbreast.yml` file should look after the `redbreast init` if you are using version 1.3.1 and lower:
54
+
55
+ ```yml
56
+ ---
57
+ :language: swift
58
+ :bundles:
59
+ - :name: main
60
+ :reference: ".main"
61
+ :shouldOmitNamespace: false
62
+ :assetsSearchPath: "MyProject/**/*.xcassets"
63
+ :outputSourcePathImages: "./MyProject/Common/Extensions/UIImage+Redbreast.swift"
64
+ :outputSourcePathColors: "./MyProject/Common/Extensions/UIColor+Redbreast.swift"
65
+ :outputTestPathImages: "./MyProject-UnitTests/Common/Extensions/UIImageExtensionTest.swift"
66
+ :outputTestPathColors: "./MyProject-UnitTests/Common/Extensions/UIColorExtensionTest.swift"
67
+ :testableImport: MyProject
68
+ :app_name: MyProject
69
+ ```
70
+
71
+ Multiple language support is available from version 1.4.0. Example `.redbreast.yml` files from version 1.4.0 and higher:
72
+
73
+ If you are using only one language:
74
+
75
+ ```yml
76
+ ---
77
+ :bundles:
78
+ - :language: swift
79
+ :name: main
80
+ :reference: ".main"
81
+ :assetsSearchPath: "MyProject/**/*.xcassets"
82
+ :outputSourcePathImages: "./MyProject/Common/Extensions/UIImage+Redbreast.swift"
83
+ :outputSourcePathColors: "./MyProject/Common/Extensions/UIColor+Redbreast.swift"
84
+ :outputTestPathImages: "./MyProject-UnitTests/Common/Extensions/UIImageExtensionTest.swift"
85
+ :outputTestPathColors: "./MyProject-UnitTests/Common/Extensions/UIColorExtensionTest.swift"
86
+ :testableImport: MyProject
87
+ :app_name: MyProject
88
+ ```
89
+
90
+ and if you are using two or more languages:
91
+
92
+ ```yml
93
+ ---
94
+ :bundles:
95
+ - :language: swift
96
+ :name: main
97
+ :reference: ".main"
98
+ :assetsSearchPath: "**/*.xcassets"
99
+ :outputSourcePathImages: ".MyProject/Common/Extensions/UIImageExtension.swift"
100
+ :outputTestPathImages: ".MyProject/Common/Extensions/UIImageExtensionTest.swift"
101
+ :testableImport: MyProject
102
+ - :language: swiftui
103
+ :name: MyProjectUI
104
+ :reference: ".MyProjectUI"
105
+ :assetsSearchPath: "MyProject/**/*.xcassets"
106
+ :outputSourcePathImages: ".MyProject/Common/Extensions/ImageExtension.swift"
107
+ :outputSourcePathColors: ".MyProject/Common/Extensions/ColorExtension.swift"
108
+ :outputTestPathImages: ".MyProject/Common/Extensions/ImageExtensionTest.swift"
109
+ :outputTestPathColors: ".MyProject/Common/Extensions/ColorExtensionTest.swift"
110
+ :testableImport: MyProject
111
+ :app_name: MyProject
112
+ ```
113
+
114
+ ### Generate
115
+
116
+ When you finish creating `.redbreast.yml` file, run `redbreast generate` and all needed files will be generated.
117
+
118
+ ### Install
119
+
120
+ Command `redbreast install` will setup a file generator in your project and whenever you build it, it will create new image/color names.
26
121
 
27
122
  In this example we will show how will your extensions (catergories) look like after using Redbreast.
28
123
 
@@ -59,7 +154,7 @@ extension UIImage {
59
154
  static var report: UIImage { return UIImage(named: "App/Admin/Report", in: .main, compatibleWith: nil)! }
60
155
  static var user: UIImage { return UIImage(named: "App/Admin/User", in: .main, compatibleWith: nil)! }
61
156
  }
62
-
157
+
63
158
  static var assignment: UIImage { return UIImage(named: "App/Assignment", in: .main, compatibleWith: nil)! }
64
159
  }
65
160
  }
@@ -71,27 +166,27 @@ In Objective-C .h and .m files are generated. Because enums don't exist in Objc
71
166
 
72
167
  + (UIImage *)appLogo
73
168
  {
74
- return [UIImage imageNamed:@"AppLogo" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
169
+ return [UIImage imageNamed:@"AppLogo" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
75
170
  }
76
171
 
77
172
  + (UIImage *)downArrow
78
173
  {
79
- return [UIImage imageNamed:@"DownArrow" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
174
+ return [UIImage imageNamed:@"DownArrow" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
80
175
  }
81
176
 
82
177
  + (UIImage *)appAdminReport
83
178
  {
84
- return [UIImage imageNamed:@"App/Admin/Report" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
179
+ return [UIImage imageNamed:@"App/Admin/Report" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
85
180
  }
86
181
 
87
182
  + (UIImage *)appAdminUser
88
183
  {
89
- return [UIImage imageNamed:@"App/Admin/User" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
184
+ return [UIImage imageNamed:@"App/Admin/User" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
90
185
  }
91
186
 
92
187
  + (UIImage *)appAssignment
93
188
  {
94
- return [UIImage imageNamed:@"App/Assignment" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
189
+ return [UIImage imageNamed:@"App/Assignment" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
95
190
  }
96
191
 
97
192
  @end
@@ -99,39 +194,42 @@ In Objective-C .h and .m files are generated. Because enums don't exist in Objc
99
194
 
100
195
  For more examples checkout the sample project.
101
196
 
102
- ## Usage
103
-
104
- ### Init
105
-
106
- After installing redbreast run `redbreast init` to create `redbreast.yml` file. This file is used for generating your extensions.
107
- In the init you will be prompted to:
108
-
109
- * Choose a language in which colors/images will be generated.
110
- * Input the application name (optional)
111
- * Input bundle names (default is main)
112
- * Choose whether you want to generate images, colors or both
113
- * Input the path to assets folder
114
- * Input the path where the files will be created
115
- * Choose to create tests for generated assets
197
+ ## Contributing
116
198
 
117
- ### Generate
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.
118
201
 
119
- When you finish creating `redbreast.yml` file, run `redbreast generate` and all needed files will be generated.
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.
120
203
 
121
- ### Install
204
+ We appreciate your interest and look forward to your contributions.
122
205
 
123
- Command `redbreast install` will setup a file generator in your project and whenever you build it, it will create new image/color names.
124
-
125
- ## Contributing
206
+ ## License
126
207
 
127
- Bug reports and pull requests are welcome on GitHub at https://github.com/infinum/redbreast. 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.
208
+ ```text
209
+ Copyright 2024 Infinum
128
210
 
129
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
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
130
214
 
131
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
215
+ http://www.apache.org/licenses/LICENSE-2.0
132
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
+ ```
133
223
 
134
- ## License
224
+ ## Credits
135
225
 
136
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
226
+ Maintained and sponsored by [Infinum](https://infinum.com).
137
227
 
228
+ <div align="center">
229
+ <a href='https://infinum.com'>
230
+ <picture>
231
+ <source srcset="https://assets.infinum.com/brand/logo/static/white.svg" media="(prefers-color-scheme: dark)">
232
+ <img src="https://assets.infinum.com/brand/logo/static/default.svg">
233
+ </picture>
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.
@@ -24,7 +24,9 @@ module Redbreast
24
24
  bundles.each do |bundle|
25
25
  color_names = pull_asset_names(bundle[:assetsSearchPath])
26
26
  bundle_language = bundle[:language] || programming_language
27
- write_colors(color_names, bundle, bundle_language, app_name)
27
+ shouldOmitNamespace = bundle[:shouldOmitNamespace]
28
+ namespace = shouldOmitNamespace ? '' : app_name
29
+ write_colors(color_names, bundle, bundle_language, namespace)
28
30
  end
29
31
  end
30
32
 
@@ -24,7 +24,9 @@ module Redbreast
24
24
  bundles.each do |bundle|
25
25
  image_names = pull_asset_names(bundle[:assetsSearchPath])
26
26
  bundle_language = bundle[:language] || programming_language
27
- write_images(image_names, bundle, bundle_language, app_name)
27
+ shouldOmitNamespace = bundle[:shouldOmitNamespace]
28
+ namespace = shouldOmitNamespace ? '' : app_name
29
+ write_images(image_names, bundle, bundle_language, namespace)
28
30
  end
29
31
  end
30
32
 
@@ -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() {
@@ -1,3 +1,3 @@
1
1
  module Redbreast
2
- VERSION = '1.4.1'
2
+ VERSION = '1.5.0'
3
3
  end
data/redbreast.svg ADDED
@@ -0,0 +1,8 @@
1
+ <svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M35 60.5L29.5 74.5L42 65.5L53.5 74.5L49 60.5" stroke="#D82828" stroke-width="4" stroke-linejoin="round"/>
3
+ <path d="M63 33C63 47.1199 53.3093 58 42 58C30.6907 58 21 47.1199 21 33C21 18.8801 30.6907 8 42 8C53.3093 8 63 18.8801 63 33Z" stroke="#D82828" stroke-width="4"/>
4
+ <path d="M63 34.5C63 27.5 50.5 18.5 42 30.5C38 25.5001 28.2 19.3001 21 34.5" stroke="#D82828" stroke-width="4"/>
5
+ <circle cx="36" cy="16" r="3" fill="#D82828"/>
6
+ <path d="M31 12H16L23 20.5" stroke="#D82828" stroke-width="4" stroke-linejoin="round"/>
7
+ <path d="M58.5 50H63C64.1046 50 65 50.8954 65 52V58C65 59.1046 64.1046 60 63 60H21C19.8954 60 19 59.1046 19 58V52C19 50.8954 19.8954 50 21 50H26.5" stroke="#D82828" stroke-width="4"/>
8
+ </svg>
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.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: 2023-08-31 00:00:00.000000000 Z
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
140
- - LICENSE.txt
145
+ - LICENSE
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
@@ -178,6 +185,7 @@ files:
178
185
  - lib/redbreast/template_generators/tests/images/swiftui_images_tests_template_generator.rb
179
186
  - lib/redbreast/version.rb
180
187
  - redbreast.gemspec
188
+ - redbreast.svg
181
189
  homepage: https://github.com/infinum/redbreast
182
190
  licenses:
183
191
  - MIT
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2019 Vlaho
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all 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
21
- THE SOFTWARE.